summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2023-05-14 11:27:18 -0400
committerTom Rini <trini@konsulko.com>2023-05-14 11:27:18 -0400
commit177e506952a8ee34011590c4bd578d191fafb1ca (patch)
tree1c4be9b6329df4a1976125e87bf2fd8447990f29
parente94fbdd2729fdcd570035d43f67adda8e0dfc115 (diff)
parentfba0e7380269771bb9587fce84e56a059ebf7d42 (diff)
downloadu-boot-177e506952a8ee34011590c4bd578d191fafb1ca.tar.gz
Merge branch '2023-05-13-bootstd-updates-and-improvements'
- Assorted bootstd fixes and cleanups. This should fix problems with Debian, and make script-based distributions work when BOOTMETH_DISTRO is enabled now (as BOOTMETH_DISTRO was renamed and then reintroduced).
-rw-r--r--arch/sandbox/dts/test.dts4
-rw-r--r--boot/Kconfig35
-rw-r--r--boot/Makefile4
-rw-r--r--boot/bootdev-uclass.c9
-rw-r--r--boot/bootmeth-uclass.c2
-rw-r--r--boot/bootmeth_efi.c2
-rw-r--r--boot/bootmeth_extlinux.c (renamed from boot/bootmeth_distro.c)58
-rw-r--r--boot/bootmeth_pxe.c50
-rw-r--r--boot/bootmeth_qfw.c2
-rw-r--r--boot/bootmeth_sandbox.c2
-rw-r--r--cmd/Kconfig2
-rw-r--r--cmd/bootflow.c4
-rw-r--r--cmd/usb.c1
-rw-r--r--common/usb.c2
-rw-r--r--doc/develop/bootstd.rst24
-rw-r--r--doc/device-tree-bindings/bootmeth.txt8
-rw-r--r--doc/device-tree-bindings/bootstd.txt4
-rw-r--r--doc/usage/cmd/bootflow.rst2
-rw-r--r--doc/usage/cmd/bootmeth.rst8
-rw-r--r--doc/usage/cmd/dm.rst2
-rw-r--r--drivers/usb/host/usb-uclass.c1
-rw-r--r--drivers/usb/host/usb_bootdev.c3
-rw-r--r--include/bootmeth.h2
-rw-r--r--include/extlinux.h (renamed from include/distro.h)10
-rw-r--r--include/usb.h3
-rw-r--r--net/eth_bootdev.c4
-rw-r--r--test/boot/bootdev.c9
-rw-r--r--test/boot/bootflow.c44
-rw-r--r--test/boot/bootmeth.c24
-rw-r--r--test/dm/blk.c3
30 files changed, 180 insertions, 148 deletions
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 453e53db71..6f9af489a3 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -86,8 +86,8 @@
filename-prefixes = "/", "/boot/";
bootdev-order = "mmc2", "mmc1";
- syslinux {
- compatible = "u-boot,distro-syslinux";
+ extlinux {
+ compatible = "u-boot,extlinux";
};
efi {
diff --git a/boot/Kconfig b/boot/Kconfig
index 8c27f52ec3..eea5ed6040 100644
--- a/boot/Kconfig
+++ b/boot/Kconfig
@@ -437,6 +437,7 @@ config BOOTSTD_DEFAULTS
depends on BOOTSTD
imply USE_BOOTCOMMAND
select BOOT_DEFAULTS
+ select BOOTMETH_DISTRO
help
These are not required but are commonly needed to support a good
selection of booting methods. Enable this to improve the capability
@@ -462,30 +463,38 @@ config BOOTMETH_GLOBAL
EFI bootmgr, since they take full control over which bootdevs are
selected to boot.
-config BOOTMETH_DISTRO
- bool "Bootdev support for distro boot"
+config BOOTMETH_EXTLINUX
+ bool "Bootdev support for extlinux boot"
select PXE_UTILS
default y
help
- Enables support for distro boot using bootdevs. This makes the
+ Enables support for extlinux boot using bootdevs. This makes the
bootdevs look for a 'extlinux/extlinux.conf' on each filesystem
they scan.
+ The specification for this filed is here:
+
+ https://uapi-group.org/specifications/specs/boot_loader_specification/
+
This provides a way to try out standard boot on an existing boot flow.
-config BOOTMETH_DISTRO_PXE
- bool "Bootdev support for distro boot over network"
+config BOOTMETH_EXTLINUX_PXE
+ bool "Bootdev support for extlinux boot over network"
depends on CMD_PXE && CMD_NET && DM_ETH
default y
help
- Enables support for distro boot using bootdevs. This makes the
+ Enables support for extlinux boot using bootdevs. This makes the
bootdevs look for a 'extlinux/extlinux.conf' on the tftp server.
+ The specification for this file is here:
+
+ https://uapi-group.org/specifications/specs/boot_loader_specification/
+
This provides a way to try out standard boot on an existing boot flow.
config BOOTMETH_EFILOADER
bool "Bootdev support for EFI boot"
- depends on CMD_BOOTEFI
+ depends on EFI_LOADER
default y
help
Enables support for EFI boot using bootdevs. This makes the
@@ -515,6 +524,13 @@ config BOOTMETH_VBE
supports selection of various firmware components, seleciton of an OS to
boot as well as updating these using fwupd.
+config BOOTMETH_DISTRO
+ bool # Options needed to boot any distro
+ select BOOTMETH_SCRIPT # E.g. Armbian uses scripts
+ select BOOTMETH_EXTLINUX # E.g. Debian uses these
+ select BOOTMETH_EXTLINUX_PXE if CMD_PXE && CMD_NET && DM_ETH
+ select BOOTMETH_EFILOADER if EFI_LOADER # E.g. Ubuntu uses this
+
config SPL_BOOTMETH_VBE
bool "Bootdev support for Verified Boot for Embedded (SPL)"
depends on SPL && FIT
@@ -638,6 +654,7 @@ config BOOTMETH_SANDBOX
config BOOTMETH_SCRIPT
bool "Bootdev support for U-Boot scripts"
default y if BOOTSTD_FULL
+ select HUSH_PARSER
help
Enables support for booting a distro via a U-Boot script. This makes
the bootdevs look for a 'boot/boot.scr' file which can be used to
@@ -1553,8 +1570,8 @@ config USE_BOOTCOMMAND
config BOOTCOMMAND
string "bootcmd value"
depends on USE_BOOTCOMMAND && !USE_DEFAULT_ENV_FILE
- default "bootflow scan -lb" if BOOTSTD_BOOTCOMMAND && CMD_BOOTFLOW_FULL
- default "bootflow scan" if BOOTSTD_BOOTCOMMAND && !CMD_BOOTFLOW_FULL
+ default "bootflow scan -lb" if BOOTSTD_DEFAULTS && CMD_BOOTFLOW_FULL
+ default "bootflow scan" if BOOTSTD_DEFAULTS && !CMD_BOOTFLOW_FULL
default "run distro_bootcmd" if !BOOTSTD_BOOTCOMMAND && DISTRO_DEFAULTS
help
This is the string of commands that will be used as bootcmd and if
diff --git a/boot/Makefile b/boot/Makefile
index 88193a1b60..f94c31d922 100644
--- a/boot/Makefile
+++ b/boot/Makefile
@@ -24,8 +24,8 @@ obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootflow.o
obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootmeth-uclass.o
obj-$(CONFIG_$(SPL_TPL_)BOOTSTD) += bootstd-uclass.o
-obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_DISTRO) += bootmeth_distro.o
-obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_DISTRO_PXE) += bootmeth_pxe.o
+obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EXTLINUX) += bootmeth_extlinux.o
+obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EXTLINUX_PXE) += bootmeth_pxe.o
obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_EFILOADER) += bootmeth_efi.o
obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SANDBOX) += bootmeth_sandbox.o
obj-$(CONFIG_$(SPL_TPL_)BOOTMETH_SCRIPT) += bootmeth_script.o
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index 57d2944647..9660ff7567 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -154,8 +154,15 @@ int bootdev_find_in_blk(struct udevice *dev, struct udevice *blk,
ret = -ESHUTDOWN;
else
bflow->state = BOOTFLOWST_MEDIA;
- if (ret)
+ if (ret) {
+ /* allow partition 1 to be missing */
+ if (iter->part == 1) {
+ iter->max_part = 3;
+ ret = -ENOENT;
+ }
+
return log_msg_ret("part", ret);
+ }
/*
* Currently we don't get the number of partitions, so just
diff --git a/boot/bootmeth-uclass.c b/boot/bootmeth-uclass.c
index 2aee1e0f0c..3b3e0614da 100644
--- a/boot/bootmeth-uclass.c
+++ b/boot/bootmeth-uclass.c
@@ -319,7 +319,7 @@ static int alloc_file(const char *fname, uint size, void **bufp)
return log_msg_ret("read", ret);
}
if (size != bytes_read)
- return log_msg_ret("bread", -EINVAL);
+ return log_msg_ret("bread", -EIO);
buf[size] = '\0';
*bufp = buf;
diff --git a/boot/bootmeth_efi.c b/boot/bootmeth_efi.c
index 6f70f2229b..af31fbfc85 100644
--- a/boot/bootmeth_efi.c
+++ b/boot/bootmeth_efi.c
@@ -235,7 +235,7 @@ static int distro_efi_read_bootflow_file(struct udevice *dev,
ret = efiload_read_file(desc, bflow);
if (ret)
- return log_msg_ret("read", -EINVAL);
+ return log_msg_ret("read", ret);
fdt_addr = env_get_hex("fdt_addr_r", 0);
diff --git a/boot/bootmeth_distro.c b/boot/bootmeth_extlinux.c
index b4b73ecbf5..24be076022 100644
--- a/boot/bootmeth_distro.c
+++ b/boot/bootmeth_extlinux.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
/*
- * Bootmethod for distro boot (syslinux boot from a block device)
+ * Bootmethod for extlinux boot from a block device
*
* Copyright 2021 Google LLC
* Written by Simon Glass <sjg@chromium.org>
@@ -14,15 +14,15 @@
#include <bootmeth.h>
#include <bootstd.h>
#include <command.h>
-#include <distro.h>
#include <dm.h>
+#include <extlinux.h>
#include <fs.h>
#include <malloc.h>
#include <mapmem.h>
#include <mmc.h>
#include <pxe_utils.h>
-static int distro_get_state_desc(struct udevice *dev, char *buf, int maxsize)
+static int extlinux_get_state_desc(struct udevice *dev, char *buf, int maxsize)
{
if (IS_ENABLED(CONFIG_SANDBOX)) {
int len;
@@ -35,10 +35,10 @@ static int distro_get_state_desc(struct udevice *dev, char *buf, int maxsize)
return 0;
}
-static int distro_getfile(struct pxe_context *ctx, const char *file_path,
- char *file_addr, ulong *sizep)
+static int extlinux_getfile(struct pxe_context *ctx, const char *file_path,
+ char *file_addr, ulong *sizep)
{
- struct distro_info *info = ctx->userdata;
+ struct extlinux_info *info = ctx->userdata;
ulong addr;
int ret;
@@ -54,7 +54,7 @@ static int distro_getfile(struct pxe_context *ctx, const char *file_path,
return 0;
}
-static int distro_check(struct udevice *dev, struct bootflow_iter *iter)
+static int extlinux_check(struct udevice *dev, struct bootflow_iter *iter)
{
int ret;
@@ -67,12 +67,12 @@ static int distro_check(struct udevice *dev, struct bootflow_iter *iter)
}
/**
- * distro_fill_info() - Decode the extlinux file to find out distro info
+ * extlinux_fill_info() - Decode the extlinux file to find out its info
*
* @bflow: Bootflow to process
* @return 0 if OK, -ve on error
*/
-static int distro_fill_info(struct bootflow *bflow)
+static int extlinux_fill_info(struct bootflow *bflow)
{
struct membuff mb;
char line[200];
@@ -98,7 +98,7 @@ static int distro_fill_info(struct bootflow *bflow)
return 0;
}
-static int distro_read_bootflow(struct udevice *dev, struct bootflow *bflow)
+static int extlinux_read_bootflow(struct udevice *dev, struct bootflow *bflow)
{
struct blk_desc *desc;
const char *const *prefixes;
@@ -121,7 +121,7 @@ static int distro_read_bootflow(struct udevice *dev, struct bootflow *bflow)
do {
prefix = prefixes ? prefixes[i] : NULL;
- ret = bootmeth_try_file(bflow, desc, prefix, DISTRO_FNAME);
+ ret = bootmeth_try_file(bflow, desc, prefix, EXTLINUX_FNAME);
} while (ret && prefixes && prefixes[++i]);
if (ret)
return log_msg_ret("try", ret);
@@ -131,25 +131,25 @@ static int distro_read_bootflow(struct udevice *dev, struct bootflow *bflow)
if (ret)
return log_msg_ret("read", ret);
- ret = distro_fill_info(bflow);
+ ret = extlinux_fill_info(bflow);
if (ret)
return log_msg_ret("inf", ret);
return 0;
}
-static int distro_boot(struct udevice *dev, struct bootflow *bflow)
+static int extlinux_boot(struct udevice *dev, struct bootflow *bflow)
{
struct cmd_tbl cmdtp = {}; /* dummy */
struct pxe_context ctx;
- struct distro_info info;
+ struct extlinux_info info;
ulong addr;
int ret;
addr = map_to_sysmem(bflow->buf);
info.dev = dev;
info.bflow = bflow;
- ret = pxe_setup_ctx(&ctx, &cmdtp, distro_getfile, &info, true,
+ ret = pxe_setup_ctx(&ctx, &cmdtp, extlinux_getfile, &info, true,
bflow->subdir, false);
if (ret)
return log_msg_ret("ctx", -EINVAL);
@@ -161,33 +161,33 @@ static int distro_boot(struct udevice *dev, struct bootflow *bflow)
return 0;
}
-static int distro_bootmeth_bind(struct udevice *dev)
+static int extlinux_bootmeth_bind(struct udevice *dev)
{
struct bootmeth_uc_plat *plat = dev_get_uclass_plat(dev);
plat->desc = IS_ENABLED(CONFIG_BOOTSTD_FULL) ?
- "Syslinux boot from a block device" : "syslinux";
+ "Extlinux boot from a block device" : "extlinux";
return 0;
}
-static struct bootmeth_ops distro_bootmeth_ops = {
- .get_state_desc = distro_get_state_desc,
- .check = distro_check,
- .read_bootflow = distro_read_bootflow,
+static struct bootmeth_ops extlinux_bootmeth_ops = {
+ .get_state_desc = extlinux_get_state_desc,
+ .check = extlinux_check,
+ .read_bootflow = extlinux_read_bootflow,
.read_file = bootmeth_common_read_file,
- .boot = distro_boot,
+ .boot = extlinux_boot,
};
-static const struct udevice_id distro_bootmeth_ids[] = {
- { .compatible = "u-boot,distro-syslinux" },
+static const struct udevice_id extlinux_bootmeth_ids[] = {
+ { .compatible = "u-boot,extlinux" },
{ }
};
-U_BOOT_DRIVER(bootmeth_distro) = {
- .name = "bootmeth_distro",
+U_BOOT_DRIVER(bootmeth_extlinux) = {
+ .name = "bootmeth_extlinux",
.id = UCLASS_BOOTMETH,
- .of_match = distro_bootmeth_ids,
- .ops = &distro_bootmeth_ops,
- .bind = distro_bootmeth_bind,
+ .of_match = extlinux_bootmeth_ids,
+ .ops = &extlinux_bootmeth_ops,
+ .bind = extlinux_bootmeth_bind,
};
diff --git a/boot/bootmeth_pxe.c b/boot/bootmeth_pxe.c
index 5a8af2bbd0..ce986bd260 100644
--- a/boot/bootmeth_pxe.c
+++ b/boot/bootmeth_pxe.c
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0+
/*
- * Bootmethod for distro boot using PXE (network boot)
+ * Bootmethod for extlinux boot using PXE (network boot)
*
* Copyright 2021 Google LLC
* Written by Simon Glass <sjg@chromium.org>
@@ -13,8 +13,8 @@
#include <bootflow.h>
#include <bootmeth.h>
#include <command.h>
-#include <distro.h>
#include <dm.h>
+#include <extlinux.h>
#include <fs.h>
#include <log.h>
#include <malloc.h>
@@ -23,10 +23,10 @@
#include <net.h>
#include <pxe_utils.h>
-static int distro_pxe_getfile(struct pxe_context *ctx, const char *file_path,
- char *file_addr, ulong *sizep)
+static int extlinux_pxe_getfile(struct pxe_context *ctx, const char *file_path,
+ char *file_addr, ulong *sizep)
{
- struct distro_info *info = ctx->userdata;
+ struct extlinux_info *info = ctx->userdata;
ulong addr;
int ret;
@@ -39,7 +39,7 @@ static int distro_pxe_getfile(struct pxe_context *ctx, const char *file_path,
return 0;
}
-static int distro_pxe_check(struct udevice *dev, struct bootflow_iter *iter)
+static int extlinux_pxe_check(struct udevice *dev, struct bootflow_iter *iter)
{
int ret;
@@ -54,7 +54,8 @@ static int distro_pxe_check(struct udevice *dev, struct bootflow_iter *iter)
return 0;
}
-static int distro_pxe_read_bootflow(struct udevice *dev, struct bootflow *bflow)
+static int extlinux_pxe_read_bootflow(struct udevice *dev,
+ struct bootflow *bflow)
{
const char *addr_str;
char fname[200];
@@ -90,7 +91,7 @@ static int distro_pxe_read_bootflow(struct udevice *dev, struct bootflow *bflow)
}
}
snprintf(fname, sizeof(fname), "%s%s",
- bflow->subdir ? bflow->subdir : "", DISTRO_FNAME);
+ bflow->subdir ? bflow->subdir : "", EXTLINUX_FNAME);
bflow->fname = strdup(fname);
if (!bflow->fname)
@@ -108,8 +109,9 @@ static int distro_pxe_read_bootflow(struct udevice *dev, struct bootflow *bflow)
return 0;
}
-static int distro_pxe_read_file(struct udevice *dev, struct bootflow *bflow,
- const char *file_path, ulong addr, ulong *sizep)
+static int extlinux_pxe_read_file(struct udevice *dev, struct bootflow *bflow,
+ const char *file_path, ulong addr,
+ ulong *sizep)
{
char *tftp_argv[] = {"tftp", NULL, NULL, NULL};
struct pxe_context *ctx = dev_get_priv(dev);
@@ -133,11 +135,11 @@ static int distro_pxe_read_file(struct udevice *dev, struct bootflow *bflow,
return 0;
}
-static int distro_pxe_boot(struct udevice *dev, struct bootflow *bflow)
+static int extlinux_pxe_boot(struct udevice *dev, struct bootflow *bflow)
{
struct pxe_context *ctx = dev_get_priv(dev);
struct cmd_tbl cmdtp = {}; /* dummy */
- struct distro_info info;
+ struct extlinux_info info;
ulong addr;
int ret;
@@ -145,7 +147,7 @@ static int distro_pxe_boot(struct udevice *dev, struct bootflow *bflow)
info.dev = dev;
info.bflow = bflow;
info.cmdtp = &cmdtp;
- ret = pxe_setup_ctx(ctx, &cmdtp, distro_pxe_getfile, &info, false,
+ ret = pxe_setup_ctx(ctx, &cmdtp, extlinux_pxe_getfile, &info, false,
bflow->subdir, false);
if (ret)
return log_msg_ret("ctx", -EINVAL);
@@ -157,7 +159,7 @@ static int distro_pxe_boot(struct udevice *dev, struct bootflow *bflow)
return 0;
}
-static int distro_bootmeth_pxe_bind(struct udevice *dev)
+static int extlinux_bootmeth_pxe_bind(struct udevice *dev)
{
struct bootmeth_uc_plat *plat = dev_get_uclass_plat(dev);
@@ -167,23 +169,23 @@ static int distro_bootmeth_pxe_bind(struct udevice *dev)
return 0;
}
-static struct bootmeth_ops distro_bootmeth_pxe_ops = {
- .check = distro_pxe_check,
- .read_bootflow = distro_pxe_read_bootflow,
- .read_file = distro_pxe_read_file,
- .boot = distro_pxe_boot,
+static struct bootmeth_ops extlinux_bootmeth_pxe_ops = {
+ .check = extlinux_pxe_check,
+ .read_bootflow = extlinux_pxe_read_bootflow,
+ .read_file = extlinux_pxe_read_file,
+ .boot = extlinux_pxe_boot,
};
-static const struct udevice_id distro_bootmeth_pxe_ids[] = {
- { .compatible = "u-boot,distro-pxe" },
+static const struct udevice_id extlinux_bootmeth_pxe_ids[] = {
+ { .compatible = "u-boot,extlinux-pxe" },
{ }
};
U_BOOT_DRIVER(bootmeth_pxe) = {
.name = "bootmeth_pxe",
.id = UCLASS_BOOTMETH,
- .of_match = distro_bootmeth_pxe_ids,
- .ops = &distro_bootmeth_pxe_ops,
- .bind = distro_bootmeth_pxe_bind,
+ .of_match = extlinux_bootmeth_pxe_ids,
+ .ops = &extlinux_bootmeth_pxe_ops,
+ .bind = extlinux_bootmeth_pxe_bind,
.priv_auto = sizeof(struct pxe_context),
};
diff --git a/boot/bootmeth_qfw.c b/boot/bootmeth_qfw.c
index a5f95d4d0c..ecd4b082fd 100644
--- a/boot/bootmeth_qfw.c
+++ b/boot/bootmeth_qfw.c
@@ -89,7 +89,7 @@ static struct bootmeth_ops qfw_bootmeth_ops = {
};
static const struct udevice_id qfw_bootmeth_ids[] = {
- { .compatible = "u-boot,qfw-syslinux" },
+ { .compatible = "u-boot,qfw-extlinux" },
{ }
};
diff --git a/boot/bootmeth_sandbox.c b/boot/bootmeth_sandbox.c
index 13ec5e95e6..aabc57e635 100644
--- a/boot/bootmeth_sandbox.c
+++ b/boot/bootmeth_sandbox.c
@@ -56,7 +56,7 @@ static struct bootmeth_ops sandbox_bootmeth_ops = {
};
static const struct udevice_id sandbox_bootmeth_ids[] = {
- { .compatible = "u-boot,sandbox-syslinux" },
+ { .compatible = "u-boot,sandbox-extlinux" },
{ }
};
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 87291e2d84..365371fb51 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -258,7 +258,7 @@ config CMD_BOOTFLOW
config CMD_BOOTFLOW_FULL
bool "bootflow - extract subcommands"
depends on BOOTSTD_FULL
- default y if BOOTSTD_FULL
+ default y
help
Add the ability to list the available bootflows, select one and obtain
information about it.
diff --git a/cmd/bootflow.c b/cmd/bootflow.c
index cfe3422698..5c61286a2a 100644
--- a/cmd/bootflow.c
+++ b/cmd/bootflow.c
@@ -55,7 +55,7 @@ static void report_bootflow_err(struct bootflow *bflow, int err)
break;
}
- printf(", err=%d\n", err);
+ printf(", err=%dE\n", err);
}
/**
@@ -125,7 +125,7 @@ static int do_bootflow_scan(struct cmd_tbl *cmdtp, int flag, int argc,
dev = std->cur_bootdev;
} else {
if (has_args) {
- printf("Flags not supported: enable CONFIG_BOOTFLOW_FULL\n");
+ printf("Flags not supported: enable CONFIG_BOOTSTD_FULL\n");
return CMD_RET_USAGE;
}
boot = true;
diff --git a/cmd/usb.c b/cmd/usb.c
index 73addb04c4..6193728384 100644
--- a/cmd/usb.c
+++ b/cmd/usb.c
@@ -620,7 +620,6 @@ static int do_usb(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
{
struct usb_device *udev = NULL;
int i;
- extern char usb_started;
if (argc < 2)
return CMD_RET_USAGE;
diff --git a/common/usb.c b/common/usb.c
index ae9253dfc0..836506dcd9 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -43,7 +43,7 @@
#define USB_BUFSIZ 512
static int asynch_allowed;
-char usb_started; /* flag for the started/stopped USB status */
+bool usb_started; /* flag for the started/stopped USB status */
#if !CONFIG_IS_ENABLED(DM_USB)
static struct usb_device usb_dev[USB_MAX_DEVICE];
diff --git a/doc/develop/bootstd.rst b/doc/develop/bootstd.rst
index 5dfa6cfce5..7a2a69fdfc 100644
--- a/doc/develop/bootstd.rst
+++ b/doc/develop/bootstd.rst
@@ -154,7 +154,7 @@ bootmeths
This environment variable can be used to control the list of bootmeths used and
their ordering for example::
- setenv bootmeths "syslinux efi"
+ setenv bootmeths "extlinux efi"
Entries may be removed or re-ordered in this list to affect the order the
bootmeths are tried on each bootdev. If the variable is empty, the default
@@ -389,8 +389,8 @@ Configuration
-------------
Standard boot is enabled with `CONFIG_BOOTSTD`. Each bootmeth has its own CONFIG
-option also. For example, `CONFIG_BOOTMETH_DISTRO` enables support for distro
-boot from a disk.
+option also. For example, `CONFIG_BOOTMETH_EXTLINUX` enables support for
+booting from a disk using an `extlinux.conf` file.
To enable all feature sof standard boot, use `CONFIG_BOOTSTD_FULL`. This
includes the full set of commands, more error messages when things go wrong and
@@ -406,8 +406,8 @@ Available bootmeth drivers
Bootmeth drivers are provided for:
- - distro boot from a disk (syslinux)
- - distro boot from a network (PXE)
+ - extlinux / syslinux boot from a disk
+ - extlinux boot from a network (PXE)
- U-Boot scripts from disk, network or SPI flash
- EFI boot using bootefi from disk
- VBE
@@ -683,8 +683,8 @@ This feature can be added as needed. Note that sandbox is a special case, since
in that case the host filesystem can be accessed even though the block device
is NULL.
-If we take the example of the `bootmeth_distro` driver, this call ends up at
-`distro_read_bootflow()`. It has the filesystem ready, so tries various
+If we take the example of the `bootmeth_extlinux` driver, this call ends up at
+`extlinux_read_bootflow()`. It has the filesystem ready, so tries various
filenames to try to find the `extlinux.conf` file, reading it if possible. If
all goes well the bootflow ends up in the `BOOTFLOWST_READY` state.
@@ -697,12 +697,12 @@ the `BOOTFLOWST_READY` state.
That is the basic operation of scanning for bootflows. The process of booting a
bootflow is handled by the bootmeth driver for that bootflow. In the case of
-distro boot, this parses and processes the `extlinux.conf` file that was read.
-See `distro_boot()` for how that works. The processing may involve reading
+extlinux boot, this parses and processes the `extlinux.conf` file that was read.
+See `extlinux_boot()` for how that works. The processing may involve reading
additional files, which is handled by the `read_file()` method, which is
-`distro_read_file()` in this case. All bootmethds should support reading files,
-since the bootflow is typically only the basic instructions and does not include
-the operating system itself, ramdisk, device tree, etc.
+`extlinux_read_file()` in this case. All bootmethds should support reading
+files, since the bootflow is typically only the basic instructions and does not
+include the operating system itself, ramdisk, device tree, etc.
The vast majority of the bootstd code is concerned with iterating through
partitions on bootdevs and using bootmethds to find bootflows.
diff --git a/doc/device-tree-bindings/bootmeth.txt b/doc/device-tree-bindings/bootmeth.txt
index de6396a7b3..127b09cd1b 100644
--- a/doc/device-tree-bindings/bootmeth.txt
+++ b/doc/device-tree-bindings/bootmeth.txt
@@ -7,8 +7,8 @@ device (bootdev). These are normally created as children of the bootstd device.
Required properties:
compatible:
- "u-boot,distro-syslinux" - distro boot from a block device
- "u-boot,distro-pxe" - distro boot from a network device
+ "u-boot,extlinux" - distro boot from a block device
+ "u-boot,extlinux-pxe" - distro boot from a network device
"u-boot,distro-efi" - EFI boot from an .efi file
"u-boot,efi-bootmgr" - EFI boot using boot manager (bootmgr)
@@ -21,8 +21,8 @@ Example:
filename-prefixes = "/", "/boot/";
bootdev-order = "mmc2", "mmc1";
- syslinux {
- compatible = "u-boot,distro-syslinux";
+ extlinux {
+ compatible = "u-boot,extlinux";
};
efi {
diff --git a/doc/device-tree-bindings/bootstd.txt b/doc/device-tree-bindings/bootstd.txt
index 8706c5f499..1f1b9cba60 100644
--- a/doc/device-tree-bindings/bootstd.txt
+++ b/doc/device-tree-bindings/bootstd.txt
@@ -26,8 +26,8 @@ Example:
filename-prefixes = "/", "/boot/";
bootdev-order = "mmc2", "mmc1";
- syslinux {
- compatible = "u-boot,distro-syslinux";
+ extlinux {
+ compatible = "u-boot,extlinux";
};
efi {
diff --git a/doc/usage/cmd/bootflow.rst b/doc/usage/cmd/bootflow.rst
index cad09bbec9..8590efca21 100644
--- a/doc/usage/cmd/bootflow.rst
+++ b/doc/usage/cmd/bootflow.rst
@@ -148,7 +148,7 @@ Name mmc\@7e202000.bootdev.part_2
Device mmc\@7e202000.bootdev
Block dev mmc\@7e202000.blk
Type distro
-Method: syslinux
+Method: extlinux
State ready
Partition 2
Subdir (none)
diff --git a/doc/usage/cmd/bootmeth.rst b/doc/usage/cmd/bootmeth.rst
index 29d8215a0c..f632d74e1d 100644
--- a/doc/usage/cmd/bootmeth.rst
+++ b/doc/usage/cmd/bootmeth.rst
@@ -45,7 +45,7 @@ The format looks like this:
===== === ================== =================================
Order Seq Name Description
===== === ================== =================================
- 0 0 distro Syslinux boot from a block device
+ 0 0 extlinunx Extlinux boot from a block device
1 1 efi EFI boot from an .efi file
2 2 pxe PXE boot from a network device
3 3 sandbox Sandbox boot for testing
@@ -77,7 +77,7 @@ This shows listing bootmeths. All are present and in the normal order::
=> bootmeth list
Order Seq Name Description
----- --- ------------------ ------------------
- 0 0 distro Syslinux boot from a block device
+ 0 0 distro Extlinux boot from a block device
1 1 efi EFI boot from an .efi file
2 2 pxe PXE boot from a network device
3 3 sandbox Sandbox boot for testing
@@ -92,7 +92,7 @@ Now the order is changed, to include only two of them::
Order Seq Name Description
----- --- ------------------ ------------------
0 3 sandbox Sandbox boot for testing
- 1 0 distro Syslinux boot from a block device
+ 1 0 distro Extlinux boot from a block device
----- --- ------------------ ------------------
(2 bootmeths)
@@ -102,7 +102,7 @@ which are not::
=> bootmeth list -a
Order Seq Name Description
----- --- ------------------ ------------------
- 1 0 distro Syslinux boot from a block device
+ 1 0 distro Extlinux boot from a block device
- 1 efi EFI boot from an .efi file
- 2 pxe PXE boot from a network device
0 3 sandbox Sandbox boot for testing
diff --git a/doc/usage/cmd/dm.rst b/doc/usage/cmd/dm.rst
index 236cd02bd6..74c6b01e36 100644
--- a/doc/usage/cmd/dm.rst
+++ b/doc/usage/cmd/dm.rst
@@ -366,7 +366,7 @@ This example shows the abridged sandbox output::
..
sysreset 0 [ ] sysreset_sandbox |-- sysreset_sandbox
bootstd 0 [ ] bootstd_drv |-- bootstd
- bootmeth 0 [ ] bootmeth_distro | |-- syslinux
+ bootmeth 0 [ ] bootmeth_extlinux | |-- extlinux
bootmeth 1 [ ] bootmeth_efi | `-- efi
reboot-mod 0 [ ] reboot-mode-gpio |-- reboot-mode0
reboot-mod 1 [ ] reboot-mode-rtc |-- reboot-mode@14
diff --git a/drivers/usb/host/usb-uclass.c b/drivers/usb/host/usb-uclass.c
index 28f7ca9654..02c0138a20 100644
--- a/drivers/usb/host/usb-uclass.c
+++ b/drivers/usb/host/usb-uclass.c
@@ -18,7 +18,6 @@
#include <dm/lists.h>
#include <dm/uclass-internal.h>
-extern bool usb_started; /* flag for the started/stopped USB status */
static bool asynch_allowed;
struct usb_uclass_priv {
diff --git a/drivers/usb/host/usb_bootdev.c b/drivers/usb/host/usb_bootdev.c
index 32919f9928..06e8f61aa1 100644
--- a/drivers/usb/host/usb_bootdev.c
+++ b/drivers/usb/host/usb_bootdev.c
@@ -22,6 +22,9 @@ static int usb_bootdev_bind(struct udevice *dev)
static int usb_bootdev_hunt(struct bootdev_hunter *info, bool show)
{
+ if (usb_started)
+ return 0;
+
return usb_init();
}
diff --git a/include/bootmeth.h b/include/bootmeth.h
index b12dfd42c9..c3df9702e8 100644
--- a/include/bootmeth.h
+++ b/include/bootmeth.h
@@ -255,7 +255,7 @@ int bootmeth_setup_iter_order(struct bootflow_iter *iter, bool include_global);
* This selects the ordering to use for bootmeths
*
* @order_str: String containing the ordering. This is a comma-separate list of
- * bootmeth-device names, e.g. "syslinux,efi". If empty then a default ordering
+ * bootmeth-device names, e.g. "extlinux,efi". If empty then a default ordering
* is used, based on the sequence number of devices (i.e. using aliases)
* Return: 0 if OK, -ENODEV if an unknown bootmeth is mentioned, -ENOMEM if
* out of memory, -ENOENT if there are no bootmeth devices
diff --git a/include/distro.h b/include/extlinux.h
index 2ee145871b..721ba46371 100644
--- a/include/distro.h
+++ b/include/extlinux.h
@@ -4,18 +4,18 @@
* Written by Simon Glass <sjg@chromium.org>
*/
-#ifndef __distro_h
-#define __distro_h
+#ifndef __extlinux_h
+#define __extlinux_h
-#define DISTRO_FNAME "extlinux/extlinux.conf"
+#define EXTLINUX_FNAME "extlinux/extlinux.conf"
/**
- * struct distro_info - useful information for distro_getfile()
+ * struct extlinux_info - useful information for extlinux_getfile()
*
* @dev: bootmethod device being used to boot
* @bflow: bootflow being booted
*/
-struct distro_info {
+struct extlinux_info {
struct udevice *dev;
struct bootflow *bflow;
struct cmd_tbl *cmdtp;
diff --git a/include/usb.h b/include/usb.h
index 80cb846720..42b001c3dd 100644
--- a/include/usb.h
+++ b/include/usb.h
@@ -11,12 +11,15 @@
#ifndef _USB_H_
#define _USB_H_
+#include <stdbool.h>
#include <fdtdec.h>
#include <usb_defs.h>
#include <linux/usb/ch9.h>
#include <asm/cache.h>
#include <part.h>
+extern bool usb_started; /* flag for the started/stopped USB status */
+
/*
* The EHCI spec says that we must align to at least 32 bytes. However,
* some platforms require larger alignment.
diff --git a/net/eth_bootdev.c b/net/eth_bootdev.c
index 13e5fcd3bd..f7b4196f78 100644
--- a/net/eth_bootdev.c
+++ b/net/eth_bootdev.c
@@ -13,8 +13,8 @@
#include <bootflow.h>
#include <command.h>
#include <bootmeth.h>
-#include <distro.h>
#include <dm.h>
+#include <extlinux.h>
#include <init.h>
#include <log.h>
#include <net.h>
@@ -36,7 +36,7 @@ static int eth_get_bootflow(struct udevice *dev, struct bootflow_iter *iter,
return log_msg_ret("check", ret);
/*
- * Like distro boot, this assumes there is only one Ethernet device.
+ * Like extlinux boot, this assumes there is only one Ethernet device.
* In this case, that means that @eth is ignored
*/
diff --git a/test/boot/bootdev.c b/test/boot/bootdev.c
index 8cf3f30e0f..6b29213416 100644
--- a/test/boot/bootdev.c
+++ b/test/boot/bootdev.c
@@ -19,9 +19,9 @@
/* Allow reseting the USB-started flag */
#if defined(CONFIG_USB_HOST) || defined(CONFIG_USB_GADGET)
-extern char usb_started;
+extern bool usb_started;
#else
-char usb_started;
+#include <usb.h>
#endif
/* Check 'bootdev list' command */
@@ -306,6 +306,7 @@ static int bootdev_test_hunter(struct unit_test_state *uts)
{
struct bootstd_priv *std;
+ usb_started = false;
test_set_skip_delays(true);
/* get access to the used hunters */
@@ -346,6 +347,7 @@ static int bootdev_test_cmd_hunt(struct unit_test_state *uts)
struct bootstd_priv *std;
test_set_skip_delays(true);
+ usb_started = false;
/* get access to the used hunters */
ut_assertok(bootstd_get_priv(&std));
@@ -474,6 +476,7 @@ BOOTSTD_TEST(bootdev_test_bootable, UT_TESTF_DM | UT_TESTF_SCAN_FDT);
/* Check hunting for bootdev of a particular priority */
static int bootdev_test_hunt_prio(struct unit_test_state *uts)
{
+ usb_started = false;
test_set_skip_delays(true);
console_record_reset_enable();
@@ -502,6 +505,8 @@ static int bootdev_test_hunt_label(struct unit_test_state *uts)
struct bootstd_priv *std;
int mflags;
+ usb_started = false;
+
/* get access to the used hunters */
ut_assertok(bootstd_get_priv(&std));
diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c
index fd0e1d6243..2b5f87d7f0 100644
--- a/test/boot/bootflow.c
+++ b/test/boot/bootflow.c
@@ -57,7 +57,7 @@ static int bootflow_cmd(struct unit_test_state *uts)
ut_assert_nextlinen("---");
ut_assert_nextline("Scanning bootdev 'mmc2.bootdev':");
ut_assert_nextline("Scanning bootdev 'mmc1.bootdev':");
- ut_assert_nextline(" 0 syslinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
+ ut_assert_nextline(" 0 extlinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
ut_assert_nextline("No more bootdevs");
ut_assert_nextlinen("---");
ut_assert_nextline("(1 bootflow, 1 valid)");
@@ -67,7 +67,7 @@ static int bootflow_cmd(struct unit_test_state *uts)
ut_assert_nextline("Showing bootflows for bootdev 'mmc1.bootdev'");
ut_assert_nextline("Seq Method State Uclass Part Name Filename");
ut_assert_nextlinen("---");
- ut_assert_nextline(" 0 syslinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
+ ut_assert_nextline(" 0 extlinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
ut_assert_nextlinen("---");
ut_assert_nextline("(1 bootflow, 1 valid)");
ut_assert_console_end();
@@ -136,7 +136,7 @@ static int bootflow_cmd_glob(struct unit_test_state *uts)
ut_assert_nextlinen("---");
ut_assert_nextline("Scanning bootdev 'mmc2.bootdev':");
ut_assert_nextline("Scanning bootdev 'mmc1.bootdev':");
- ut_assert_nextline(" 0 syslinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
+ ut_assert_nextline(" 0 extlinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
ut_assert_nextline("Scanning bootdev 'mmc0.bootdev':");
ut_assert_nextline("No more bootdevs");
ut_assert_nextlinen("---");
@@ -147,7 +147,7 @@ static int bootflow_cmd_glob(struct unit_test_state *uts)
ut_assert_nextline("Showing all bootflows");
ut_assert_nextline("Seq Method State Uclass Part Name Filename");
ut_assert_nextlinen("---");
- ut_assert_nextline(" 0 syslinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
+ ut_assert_nextline(" 0 extlinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
ut_assert_nextlinen("---");
ut_assert_nextline("(1 bootflow, 1 valid)");
ut_assert_console_end();
@@ -167,22 +167,22 @@ static int bootflow_cmd_scan_e(struct unit_test_state *uts)
ut_assert_nextline("Seq Method State Uclass Part Name Filename");
ut_assert_nextlinen("---");
ut_assert_nextline("Scanning bootdev 'mmc2.bootdev':");
- ut_assert_nextline(" 0 syslinux media mmc 0 mmc2.bootdev.whole <NULL>");
- ut_assert_nextline(" ** No partition found, err=-93");
+ ut_assert_nextline(" 0 extlinux media mmc 0 mmc2.bootdev.whole <NULL>");
+ ut_assert_nextline(" ** No partition found, err=-93: Protocol not supported");
ut_assert_nextline(" 1 efi media mmc 0 mmc2.bootdev.whole <NULL>");
- ut_assert_nextline(" ** No partition found, err=-93");
+ ut_assert_nextline(" ** No partition found, err=-93: Protocol not supported");
ut_assert_nextline("Scanning bootdev 'mmc1.bootdev':");
- ut_assert_nextline(" 2 syslinux media mmc 0 mmc1.bootdev.whole <NULL>");
- ut_assert_nextline(" ** No partition found, err=-2");
+ ut_assert_nextline(" 2 extlinux media mmc 0 mmc1.bootdev.whole <NULL>");
+ ut_assert_nextline(" ** No partition found, err=-2: No such file or directory");
ut_assert_nextline(" 3 efi media mmc 0 mmc1.bootdev.whole <NULL>");
- ut_assert_nextline(" ** No partition found, err=-2");
- ut_assert_nextline(" 4 syslinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
+ ut_assert_nextline(" ** No partition found, err=-2: No such file or directory");
+ ut_assert_nextline(" 4 extlinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
ut_assert_nextline(" 5 efi fs mmc 1 mmc1.bootdev.part_1 efi/boot/bootsbox.efi");
ut_assert_skip_to_line("Scanning bootdev 'mmc0.bootdev':");
ut_assert_skip_to_line(" 3f efi media mmc 0 mmc0.bootdev.whole <NULL>");
- ut_assert_nextline(" ** No partition found, err=-93");
+ ut_assert_nextline(" ** No partition found, err=-93: Protocol not supported");
ut_assert_nextline("No more bootdevs");
ut_assert_nextlinen("---");
ut_assert_nextline("(64 bootflows, 1 valid)");
@@ -192,9 +192,9 @@ static int bootflow_cmd_scan_e(struct unit_test_state *uts)
ut_assert_nextline("Showing all bootflows");
ut_assert_nextline("Seq Method State Uclass Part Name Filename");
ut_assert_nextlinen("---");
- ut_assert_nextline(" 0 syslinux media mmc 0 mmc2.bootdev.whole <NULL>");
+ ut_assert_nextline(" 0 extlinux media mmc 0 mmc2.bootdev.whole <NULL>");
ut_assert_nextline(" 1 efi media mmc 0 mmc2.bootdev.whole <NULL>");
- ut_assert_skip_to_line(" 4 syslinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
+ ut_assert_skip_to_line(" 4 extlinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
ut_assert_skip_to_line(" 3f efi media mmc 0 mmc0.bootdev.whole <NULL>");
ut_assert_nextlinen("---");
ut_assert_nextline("(64 bootflows, 1 valid)");
@@ -218,7 +218,7 @@ static int bootflow_cmd_info(struct unit_test_state *uts)
ut_assert_nextline("Name: mmc1.bootdev.part_1");
ut_assert_nextline("Device: mmc1.bootdev");
ut_assert_nextline("Block dev: mmc1.blk");
- ut_assert_nextline("Method: syslinux");
+ ut_assert_nextline("Method: extlinux");
ut_assert_nextline("State: ready");
ut_assert_nextline("Partition: 1");
ut_assert_nextline("Subdir: (none)");
@@ -251,7 +251,7 @@ static int bootflow_scan_boot(struct unit_test_state *uts)
ut_assertok(inject_response(uts));
ut_assertok(run_command("bootflow scan -b", 0));
ut_assert_nextline(
- "** Booting bootflow 'mmc1.bootdev.part_1' with syslinux");
+ "** Booting bootflow 'mmc1.bootdev.part_1' with extlinux");
ut_assert_nextline("Ignoring unknown command: ui");
/*
@@ -282,7 +282,7 @@ static int bootflow_iter(struct unit_test_state *uts)
ut_asserteq(0, iter.cur_method);
ut_asserteq(0, iter.part);
ut_asserteq(0, iter.max_part);
- ut_asserteq_str("syslinux", iter.method->name);
+ ut_asserteq_str("extlinux", iter.method->name);
ut_asserteq(0, bflow.err);
/*
@@ -309,7 +309,7 @@ static int bootflow_iter(struct unit_test_state *uts)
ut_asserteq(0, iter.cur_method);
ut_asserteq(0, iter.part);
ut_asserteq(0x1e, iter.max_part);
- ut_asserteq_str("syslinux", iter.method->name);
+ ut_asserteq_str("extlinux", iter.method->name);
ut_asserteq(0, bflow.err);
ut_asserteq(BOOTFLOWST_MEDIA, bflow.state);
bootflow_free(&bflow);
@@ -330,7 +330,7 @@ static int bootflow_iter(struct unit_test_state *uts)
ut_asserteq(0, iter.cur_method);
ut_asserteq(1, iter.part);
ut_asserteq(0x1e, iter.max_part);
- ut_asserteq_str("syslinux", iter.method->name);
+ ut_asserteq_str("extlinux", iter.method->name);
ut_asserteq(0, bflow.err);
ut_asserteq(BOOTFLOWST_READY, bflow.state);
bootflow_free(&bflow);
@@ -351,7 +351,7 @@ static int bootflow_iter(struct unit_test_state *uts)
ut_asserteq(0, iter.cur_method);
ut_asserteq(2, iter.part);
ut_asserteq(0x1e, iter.max_part);
- ut_asserteq_str("syslinux", iter.method->name);
+ ut_asserteq_str("extlinux", iter.method->name);
ut_asserteq(0, bflow.err);
ut_asserteq(BOOTFLOWST_MEDIA, bflow.state);
bootflow_free(&bflow);
@@ -489,7 +489,7 @@ static int bootflow_cmd_boot(struct unit_test_state *uts)
ut_assertok(inject_response(uts));
ut_asserteq(1, run_command("bootflow boot", 0));
ut_assert_nextline(
- "** Booting bootflow 'mmc1.bootdev.part_1' with syslinux");
+ "** Booting bootflow 'mmc1.bootdev.part_1' with extlinux");
ut_assert_nextline("Ignoring unknown command: ui");
/*
@@ -614,7 +614,7 @@ static int bootflow_cmd_hunt_label(struct unit_test_state *uts)
ut_assert_nextline("Scanning bootdev 'mmc2.bootdev':");
ut_assert_nextline("Scanning bootdev 'mmc1.bootdev':");
ut_assert_nextline(
- " 0 syslinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
+ " 0 extlinux ready mmc 1 mmc1.bootdev.part_1 /extlinux/extlinux.conf");
ut_assert_nextline("Scanning bootdev 'mmc0.bootdev':");
ut_assert_skip_to_line("(1 bootflow, 1 valid)");
ut_assert_console_end();
diff --git a/test/boot/bootmeth.c b/test/boot/bootmeth.c
index 0098ef3efd..e498eee036 100644
--- a/test/boot/bootmeth.c
+++ b/test/boot/bootmeth.c
@@ -21,7 +21,7 @@ static int bootmeth_cmd_list(struct unit_test_state *uts)
ut_assertok(run_command("bootmeth list", 0));
ut_assert_nextline("Order Seq Name Description");
ut_assert_nextlinen("---");
- ut_assert_nextline(" 0 0 syslinux Syslinux boot from a block device");
+ ut_assert_nextline(" 0 0 extlinux Extlinux boot from a block device");
ut_assert_nextline(" 1 1 efi EFI boot from an .efi file");
if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL))
ut_assert_nextline(" glob 2 firmware0 VBE simple");
@@ -39,16 +39,16 @@ static int bootmeth_cmd_order(struct unit_test_state *uts)
{
/* Select just one bootmethod */
console_record_reset_enable();
- ut_assertok(run_command("bootmeth order syslinux", 0));
+ ut_assertok(run_command("bootmeth order extlinux", 0));
ut_assert_console_end();
ut_assertnonnull(env_get("bootmeths"));
- ut_asserteq_str("syslinux", env_get("bootmeths"));
+ ut_asserteq_str("extlinux", env_get("bootmeths"));
/* Only that one should be listed */
ut_assertok(run_command("bootmeth list", 0));
ut_assert_nextline("Order Seq Name Description");
ut_assert_nextlinen("---");
- ut_assert_nextline(" 0 0 syslinux Syslinux boot from a block device");
+ ut_assert_nextline(" 0 0 extlinux Extlinux boot from a block device");
ut_assert_nextlinen("---");
ut_assert_nextline("(1 bootmeth)");
ut_assert_console_end();
@@ -57,7 +57,7 @@ static int bootmeth_cmd_order(struct unit_test_state *uts)
ut_assertok(run_command("bootmeth list -a", 0));
ut_assert_nextline("Order Seq Name Description");
ut_assert_nextlinen("---");
- ut_assert_nextline(" 0 0 syslinux Syslinux boot from a block device");
+ ut_assert_nextline(" 0 0 extlinux Extlinux boot from a block device");
ut_assert_nextline(" - 1 efi EFI boot from an .efi file");
if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL))
ut_assert_nextline(" glob 2 firmware0 VBE simple");
@@ -67,12 +67,12 @@ static int bootmeth_cmd_order(struct unit_test_state *uts)
ut_assert_console_end();
/* Check the -a flag with the reverse order */
- ut_assertok(run_command("bootmeth order \"efi syslinux\"", 0));
+ ut_assertok(run_command("bootmeth order \"efi extlinux\"", 0));
ut_assert_console_end();
ut_assertok(run_command("bootmeth list -a", 0));
ut_assert_nextline("Order Seq Name Description");
ut_assert_nextlinen("---");
- ut_assert_nextline(" 1 0 syslinux Syslinux boot from a block device");
+ ut_assert_nextline(" 1 0 extlinux Extlinux boot from a block device");
ut_assert_nextline(" 0 1 efi EFI boot from an .efi file");
if (IS_ENABLED(CONFIG_BOOTMETH_GLOBAL))
ut_assert_nextline(" glob 2 firmware0 VBE simple");
@@ -90,17 +90,17 @@ static int bootmeth_cmd_order(struct unit_test_state *uts)
"(3 bootmeths)" : "(2 bootmeths)");
/* Try reverse order */
- ut_assertok(run_command("bootmeth order \"efi syslinux\"", 0));
+ ut_assertok(run_command("bootmeth order \"efi extlinux\"", 0));
ut_assert_console_end();
ut_assertok(run_command("bootmeth list", 0));
ut_assert_nextline("Order Seq Name Description");
ut_assert_nextlinen("---");
ut_assert_nextline(" 0 1 efi EFI boot from an .efi file");
- ut_assert_nextline(" 1 0 syslinux Syslinux boot from a block device");
+ ut_assert_nextline(" 1 0 extlinux Extlinux boot from a block device");
ut_assert_nextlinen("---");
ut_assert_nextline("(2 bootmeths)");
ut_assertnonnull(env_get("bootmeths"));
- ut_asserteq_str("efi syslinux", env_get("bootmeths"));
+ ut_asserteq_str("efi extlinux", env_get("bootmeths"));
ut_assert_console_end();
return 0;
@@ -140,7 +140,7 @@ static int bootmeth_env(struct unit_test_state *uts)
/* Select just one bootmethod */
console_record_reset_enable();
- ut_assertok(env_set("bootmeths", "syslinux"));
+ ut_assertok(env_set("bootmeths", "extlinux"));
ut_asserteq(1, std->bootmeth_count);
/* Select an invalid bootmethod */
@@ -149,7 +149,7 @@ static int bootmeth_env(struct unit_test_state *uts)
ut_assert_nextlinen("## Error inserting");
ut_assert_console_end();
- ut_assertok(env_set("bootmeths", "efi syslinux"));
+ ut_assertok(env_set("bootmeths", "efi extlinux"));
ut_asserteq(2, std->bootmeth_count);
ut_assert_console_end();
diff --git a/test/dm/blk.c b/test/dm/blk.c
index 0aa04c64ef..446c4423e6 100644
--- a/test/dm/blk.c
+++ b/test/dm/blk.c
@@ -16,9 +16,6 @@
DECLARE_GLOBAL_DATA_PTR;
-/* Allow resetting the USB-started flag */
-extern char usb_started;
-
/* Test that block devices can be created */
static int dm_test_blk_base(struct unit_test_state *uts)
{