[PATCH 00/13] Complete decoupling of zboot logic from commands

This series refactors the zboot code to allow it to be used with CONFIG_COMMAND disabled.
A new zboot_run() function is used to boot a zimage.
This is cmde (part e of CMDLINE refactoring) It depends on dm/cmdd-working which depends on dm/bootstda-working which depends on dm/cmdc-working
Simon Glass (13): x86: zboot: Move zimage definitions to the header file x86: zboot: Move command code into its own file x86: zboot: Create a separate ZBOOT option for zboot logic x86: zboot: Avoid iteration in do_zboot_states() x86: zboot: Create separate functions for the logic x86: zboot: Move environment setting into zboot_load() x86: zboot: Drop intermediate zboot_setup() function x86: zboot: Drop intermediate zboot_go() function x86: zboot: Move argument processing outside zboot_start() x86: zboot: Rename zboot_start() to zboot_run() x86: zboot: Separate logic functions from commands x86: zboot: Use zboot_start() in zboot_run() x86: zboot: Tidy up the comment for zboot_run()
arch/Kconfig | 1 - arch/x86/Kconfig | 8 + arch/x86/include/asm/zimage.h | 97 ++++++++++++ arch/x86/lib/Makefile | 2 +- arch/x86/lib/zimage.c | 267 ++++------------------------------ boot/bootmeth_cros.c | 6 +- cmd/Kconfig | 2 + cmd/x86/Makefile | 1 + cmd/x86/zboot.c | 182 +++++++++++++++++++++++ include/bootm.h | 15 +- 10 files changed, 333 insertions(+), 248 deletions(-) create mode 100644 cmd/x86/zboot.c

In preparation for splitting the zboot-command code into a separate file, move the definitions into the header file.
While we are here, mention when load_address and base_ptr are set up and explain bzimage_addr better. Make cmdline const since it cannot be changed.
Signed-off-by: Simon Glass sjg@chromium.org ---
arch/x86/include/asm/zimage.h | 41 +++++++++++++++++++++++++++++++++++ arch/x86/lib/zimage.c | 36 +----------------------------- 2 files changed, 42 insertions(+), 35 deletions(-)
diff --git a/arch/x86/include/asm/zimage.h b/arch/x86/include/asm/zimage.h index 655675b66614..a91cfb2b8dd0 100644 --- a/arch/x86/include/asm/zimage.h +++ b/arch/x86/include/asm/zimage.h @@ -30,6 +30,47 @@ #define BZIMAGE_LOAD_ADDR 0x100000 #define ZIMAGE_LOAD_ADDR 0x10000
+enum { + ZBOOT_STATE_START = BIT(0), + ZBOOT_STATE_LOAD = BIT(1), + ZBOOT_STATE_SETUP = BIT(2), + ZBOOT_STATE_INFO = BIT(3), + ZBOOT_STATE_GO = BIT(4), + + /* This one doesn't execute automatically, so stop the count before 5 */ + ZBOOT_STATE_DUMP = BIT(5), + ZBOOT_STATE_COUNT = 5, +}; + +/** + * struct zboot_state - Current state of the boot + * + * @bzimage_addr: Address of the bzImage to boot, or 0 if the image has already + * been loaded and does not exist (as a cohesive whole) in memory + * @bzimage_size: Size of the bzImage, or 0 to detect this + * @initrd_addr: Address of the initial ramdisk, or 0 if none + * @initrd_size: Size of the initial ramdisk, or 0 if none + * @load_address: Address where the bzImage is moved before booting, either + * BZIMAGE_LOAD_ADDR or ZIMAGE_LOAD_ADDR + * This is set up when loading the zimage + * @base_ptr: Pointer to the boot parameters, typically at address + * DEFAULT_SETUP_BASE + * This is set up when loading the zimage + * @cmdline: Environment variable containing the 'override' command line, or + * NULL to use the one in the setup block + */ +struct zboot_state { + ulong bzimage_addr; + ulong bzimage_size; + ulong initrd_addr; + ulong initrd_size; + ulong load_address; + struct boot_params *base_ptr; + const char *cmdline; +}; + +extern struct zboot_state state; + /** * load_zimage() - Load a zImage or bzImage * diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index a41e1ccf8a65..b04d39b36dd4 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -56,41 +56,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define COMMAND_LINE_SIZE 2048
-/** - * struct zboot_state - Current state of the boot - * - * @bzimage_addr: Address of the bzImage to boot - * @bzimage_size: Size of the bzImage, or 0 to detect this - * @initrd_addr: Address of the initial ramdisk, or 0 if none - * @initrd_size: Size of the initial ramdisk, or 0 if none - * @load_address: Address where the bzImage is moved before booting, either - * BZIMAGE_LOAD_ADDR or ZIMAGE_LOAD_ADDR - * @base_ptr: Pointer to the boot parameters, typically at address - * DEFAULT_SETUP_BASE - * @cmdline: Environment variable containing the 'override' command line, or - * NULL to use the one in the setup block - */ -struct zboot_state { - ulong bzimage_addr; - ulong bzimage_size; - ulong initrd_addr; - ulong initrd_size; - ulong load_address; - struct boot_params *base_ptr; - char *cmdline; -} state; - -enum { - ZBOOT_STATE_START = BIT(0), - ZBOOT_STATE_LOAD = BIT(1), - ZBOOT_STATE_SETUP = BIT(2), - ZBOOT_STATE_INFO = BIT(3), - ZBOOT_STATE_GO = BIT(4), - - /* This one doesn't execute automatically, so stop the count before 5 */ - ZBOOT_STATE_DUMP = BIT(5), - ZBOOT_STATE_COUNT = 5, -}; +struct zboot_state state;
static void build_command_line(char *command_line, int auto_boot) {

Much of the code in zimage.c deals with the zboot command. Move it into a sepatate zboot.c file within the cmd/ directory. This will eventually allow use of the zimage logic without the command being enabled.
Signed-off-by: Simon Glass sjg@chromium.org ---
arch/x86/include/asm/zimage.h | 31 ++++++ arch/x86/lib/zimage.c | 199 +-------------------------------- cmd/x86/Makefile | 1 + cmd/x86/zboot.c | 203 ++++++++++++++++++++++++++++++++++ 4 files changed, 239 insertions(+), 195 deletions(-) create mode 100644 cmd/x86/zboot.c
diff --git a/arch/x86/include/asm/zimage.h b/arch/x86/include/asm/zimage.h index a91cfb2b8dd0..ac6683ea9ef3 100644 --- a/arch/x86/include/asm/zimage.h +++ b/arch/x86/include/asm/zimage.h @@ -71,6 +71,37 @@ struct zboot_state {
extern struct zboot_state state;
+/** + * zimage_dump() - Dump information about a zimage + * + * @base_ptr: Pointer to the boot parameters + * @show_cmdline: true to show the kernel command line + */ +void zimage_dump(struct boot_params *base_ptr, bool show_cmdline); + +/** + * zboot_load() - Load a zimage + * + * Load the zimage into the correct place + * + * Return: 0 if OK, -ve on error + */ +int zboot_load(void); + +/** + * zboot_setup() - Set up the zboot image reeady for booting + * + * Return: 0 if OK, -ve on error + */ +int zboot_setup(void); + +/** + * zboot_go() - Start the image + * + * Return: 0 if OK, -ve on error + */ +int zboot_go(void); + /** * load_zimage() - Load a zImage or bzImage * diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index b04d39b36dd4..1d1249fc25ac 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -56,6 +56,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define COMMAND_LINE_SIZE 2048
+/* Current state of the boot */ struct zboot_state state;
static void build_command_line(char *command_line, int auto_boot) @@ -366,54 +367,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, return 0; }
-static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - const char *s; - - memset(&state, '\0', sizeof(state)); - if (argc >= 2) { - /* argv[1] holds the address of the bzImage */ - s = argv[1]; - } else { - s = env_get("fileaddr"); - } - - if (s) - state.bzimage_addr = hextoul(s, NULL); - - if (argc >= 3) { - /* argv[2] holds the size of the bzImage */ - state.bzimage_size = hextoul(argv[2], NULL); - } - - if (argc >= 4) - state.initrd_addr = hextoul(argv[3], NULL); - if (argc >= 5) - state.initrd_size = hextoul(argv[4], NULL); - if (argc >= 6) { - /* - * When the base_ptr is passed in, we assume that the image is - * already loaded at the address given by argv[1] and therefore - * the original bzImage is somewhere else, or not accessible. - * In any case, we don't need access to the bzImage since all - * the processing is assumed to be done. - * - * So set the base_ptr to the given address, use this arg as the - * load address and set bzimage_addr to 0 so we know that it - * cannot be proceesed (or processed again). - */ - state.base_ptr = (void *)hextoul(argv[5], NULL); - state.load_address = state.bzimage_addr; - state.bzimage_addr = 0; - } - if (argc >= 7) - state.cmdline = env_get(argv[6]); - - return 0; -} - -static int zboot_load(void) +int zboot_load(void) { struct boot_params *base_ptr;
@@ -438,20 +392,7 @@ static int zboot_load(void) return 0; }
-static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - if (zboot_load()) - return CMD_RET_FAILURE; - - if (env_set_hex("zbootbase", map_to_sysmem(state.base_ptr)) || - env_set_hex("zbootaddr", state.load_address)) - return CMD_RET_FAILURE; - - return 0; -} - -static int zboot_setup(void) +int zboot_setup(void) { struct boot_params *base_ptr = state.base_ptr; int ret; @@ -465,33 +406,7 @@ static int zboot_setup(void) return 0; }
-static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - struct boot_params *base_ptr = state.base_ptr; - - if (!base_ptr) { - printf("base is not set: use 'zboot load' first\n"); - return CMD_RET_FAILURE; - } - if (zboot_setup()) { - puts("Setting up boot parameters failed ...\n"); - return CMD_RET_FAILURE; - } - - return 0; -} - -static int do_zboot_info(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - printf("Kernel loaded at %08lx, setup_base=%p\n", - state.load_address, state.base_ptr); - - return 0; -} - -static int zboot_go(void) +int zboot_go(void) { struct boot_params *params = state.base_ptr; struct setup_header *hdr = ¶ms->hdr; @@ -515,17 +430,6 @@ static int zboot_go(void) return ret; }
-static int do_zboot_go(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - int ret; - - ret = zboot_go(); - printf("Kernel returned! (err=%d)\n", ret); - - return CMD_RET_FAILURE; -} - int zboot_start(ulong addr, ulong size, ulong initrd, ulong initrd_size, ulong base, char *cmdline) { @@ -741,98 +645,3 @@ void zimage_dump(struct boot_params *base_ptr, bool show_cmdline) if (get_boot_protocol(hdr, false) >= 0x215) print_num("Kernel info offset", hdr->kernel_info_offset); } - -static int do_zboot_dump(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - struct boot_params *base_ptr = state.base_ptr; - - if (argc > 1) - base_ptr = (void *)hextoul(argv[1], NULL); - if (!base_ptr) { - printf("No zboot setup_base\n"); - return CMD_RET_FAILURE; - } - zimage_dump(base_ptr, true); - - return 0; -} - -/* Note: This defines the complete_zboot() function */ -U_BOOT_SUBCMDS(zboot, - U_BOOT_CMD_MKENT(start, 8, 1, do_zboot_start, "", ""), - U_BOOT_CMD_MKENT(load, 1, 1, do_zboot_load, "", ""), - U_BOOT_CMD_MKENT(setup, 1, 1, do_zboot_setup, "", ""), - U_BOOT_CMD_MKENT(info, 1, 1, do_zboot_info, "", ""), - U_BOOT_CMD_MKENT(go, 1, 1, do_zboot_go, "", ""), - U_BOOT_CMD_MKENT(dump, 2, 1, do_zboot_dump, "", ""), -) - -int do_zboot_states(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[], int state_mask) -{ - int i; - - for (i = 0; i < ZBOOT_STATE_COUNT; i++) { - struct cmd_tbl *cmd = &zboot_subcmds[i]; - int mask = 1 << i; - int ret; - - if (mask & state_mask) { - ret = cmd->cmd(cmd, flag, argc, argv); - if (ret) - return ret; - } - } - - return 0; -} - -int do_zboot_parent(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[], int *repeatable) -{ - /* determine if we have a sub command */ - if (argc > 1) { - char *endp; - - hextoul(argv[1], &endp); - /* - * endp pointing to nul means that argv[1] was just a valid - * number, so pass it along to the normal processing - */ - if (*endp) - return do_zboot(cmdtp, flag, argc, argv, repeatable); - } - - do_zboot_states(cmdtp, flag, argc, argv, ZBOOT_STATE_START | - ZBOOT_STATE_LOAD | ZBOOT_STATE_SETUP | - ZBOOT_STATE_INFO | ZBOOT_STATE_GO); - - return CMD_RET_FAILURE; -} - -U_BOOT_CMDREP_COMPLETE( - zboot, 8, do_zboot_parent, "Boot bzImage", - "[addr] [size] [initrd addr] [initrd size] [setup] [cmdline]\n" - " addr - The optional starting address of the bzimage.\n" - " If not set it defaults to the environment\n" - " variable "fileaddr".\n" - " size - The optional size of the bzimage. Defaults to\n" - " zero.\n" - " initrd addr - The address of the initrd image to use, if any.\n" - " initrd size - The size of the initrd image to use, if any.\n" - " setup - The address of the kernel setup region, if this\n" - " is not at addr\n" - " cmdline - Environment variable containing the kernel\n" - " command line, to override U-Boot's normal\n" - " cmdline generation\n" - "\n" - "Sub-commands to do part of the zboot sequence:\n" - "\tstart [addr [arg ...]] - specify arguments\n" - "\tload - load OS image\n" - "\tsetup - set up table\n" - "\tinfo - show summary info\n" - "\tgo - start OS\n" - "\tdump [addr] - dump info (optional address of boot params)", - complete_zboot -); diff --git a/cmd/x86/Makefile b/cmd/x86/Makefile index 5f82204c87e6..b1f39d3bfde5 100644 --- a/cmd/x86/Makefile +++ b/cmd/x86/Makefile @@ -5,3 +5,4 @@ obj-y += mtrr.o obj-$(CONFIG_CMD_EXCEPTION) += exception.o obj-$(CONFIG_USE_HOB) += hob.o obj-$(CONFIG_HAVE_FSP) += fsp.o +obj-$(CONFIG_CMD_ZBOOT) += zboot.o diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c new file mode 100644 index 000000000000..c9375fb417c1 --- /dev/null +++ b/cmd/x86/zboot.c @@ -0,0 +1,203 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2011 The Chromium OS Authors. + * (C) Copyright 2002 + * Daniel Engström, Omicron Ceti AB, daniel@omicron.se + */ + +#include <command.h> +#include <mapmem.h> +#include <vsprintf.h> +#include <asm/zimage.h> + +static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + const char *s; + + memset(&state, '\0', sizeof(state)); + if (argc >= 2) { + /* argv[1] holds the address of the bzImage */ + s = argv[1]; + } else { + s = env_get("fileaddr"); + } + + if (s) + state.bzimage_addr = hextoul(s, NULL); + + if (argc >= 3) { + /* argv[2] holds the size of the bzImage */ + state.bzimage_size = hextoul(argv[2], NULL); + } + + if (argc >= 4) + state.initrd_addr = hextoul(argv[3], NULL); + if (argc >= 5) + state.initrd_size = hextoul(argv[4], NULL); + if (argc >= 6) { + /* + * When the base_ptr is passed in, we assume that the image is + * already loaded at the address given by argv[1] and therefore + * the original bzImage is somewhere else, or not accessible. + * In any case, we don't need access to the bzImage since all + * the processing is assumed to be done. + * + * So set the base_ptr to the given address, use this arg as the + * load address and set bzimage_addr to 0 so we know that it + * cannot be proceesed (or processed again). + */ + state.base_ptr = (void *)hextoul(argv[5], NULL); + state.load_address = state.bzimage_addr; + state.bzimage_addr = 0; + } + if (argc >= 7) + state.cmdline = env_get(argv[6]); + + return 0; +} + +static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + if (zboot_load()) + return CMD_RET_FAILURE; + + if (env_set_hex("zbootbase", map_to_sysmem(state.base_ptr)) || + env_set_hex("zbootaddr", state.load_address)) + return CMD_RET_FAILURE; + + return 0; +} + +static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + struct boot_params *base_ptr = state.base_ptr; + + if (!base_ptr) { + printf("base is not set: use 'zboot load' first\n"); + return CMD_RET_FAILURE; + } + if (zboot_setup()) { + puts("Setting up boot parameters failed ...\n"); + return CMD_RET_FAILURE; + } + + return 0; +} + +static int do_zboot_info(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + printf("Kernel loaded at %08lx, setup_base=%p\n", + state.load_address, state.base_ptr); + + return 0; +} + +static int do_zboot_go(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + int ret; + + ret = zboot_go(); + printf("Kernel returned! (err=%d)\n", ret); + + return CMD_RET_FAILURE; +} + +static int do_zboot_dump(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + struct boot_params *base_ptr = state.base_ptr; + + if (argc > 1) + base_ptr = (void *)hextoul(argv[1], NULL); + if (!base_ptr) { + printf("No zboot setup_base\n"); + return CMD_RET_FAILURE; + } + zimage_dump(base_ptr, true); + + return 0; +} + +/* Note: This defines the complete_zboot() function */ +U_BOOT_SUBCMDS(zboot, + U_BOOT_CMD_MKENT(start, 8, 1, do_zboot_start, "", ""), + U_BOOT_CMD_MKENT(load, 1, 1, do_zboot_load, "", ""), + U_BOOT_CMD_MKENT(setup, 1, 1, do_zboot_setup, "", ""), + U_BOOT_CMD_MKENT(info, 1, 1, do_zboot_info, "", ""), + U_BOOT_CMD_MKENT(go, 1, 1, do_zboot_go, "", ""), + U_BOOT_CMD_MKENT(dump, 2, 1, do_zboot_dump, "", ""), +) + +int do_zboot_states(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[], int state_mask) +{ + int i; + + for (i = 0; i < ZBOOT_STATE_COUNT; i++) { + struct cmd_tbl *cmd = &zboot_subcmds[i]; + int mask = 1 << i; + int ret; + + if (mask & state_mask) { + ret = cmd->cmd(cmd, flag, argc, argv); + if (ret) + return ret; + } + } + + return 0; +} + +int do_zboot_parent(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[], int *repeatable) +{ + /* determine if we have a sub command */ + if (argc > 1) { + char *endp; + + hextoul(argv[1], &endp); + /* + * endp pointing to nul means that argv[1] was just a valid + * number, so pass it along to the normal processing + */ + if (*endp) + return do_zboot(cmdtp, flag, argc, argv, repeatable); + } + + do_zboot_states(cmdtp, flag, argc, argv, ZBOOT_STATE_START | + ZBOOT_STATE_LOAD | ZBOOT_STATE_SETUP | + ZBOOT_STATE_INFO | ZBOOT_STATE_GO); + + return CMD_RET_FAILURE; +} + +U_BOOT_CMDREP_COMPLETE( + zboot, 8, do_zboot_parent, "Boot bzImage", + "[addr] [size] [initrd addr] [initrd size] [setup] [cmdline]\n" + " addr - The optional starting address of the bzimage.\n" + " If not set it defaults to the environment\n" + " variable "fileaddr".\n" + " size - The optional size of the bzimage. Defaults to\n" + " zero.\n" + " initrd addr - The address of the initrd image to use, if any.\n" + " initrd size - The size of the initrd image to use, if any.\n" + " setup - The address of the kernel setup region, if this\n" + " is not at addr\n" + " cmdline - Environment variable containing the kernel\n" + " command line, to override U-Boot's normal\n" + " cmdline generation\n" + "\n" + "Sub-commands to do part of the zboot sequence:\n" + "\tstart [addr [arg ...]] - specify arguments\n" + "\tload - load OS image\n" + "\tsetup - set up table\n" + "\tinfo - show summary info\n" + "\tgo - start OS\n" + "\tdump [addr] - dump info (optional address of boot params)", + complete_zboot +);

Most of the functionality of zboot is contained in the logic which handles a zimage. Create a separate Kconfig for the logic so that it can (later) be used without the command itself being enabled.
Enable ZBOOT by default on x86, with the command depending on that. The existing 'imply' can therefore be removed.
Signed-off-by: Simon Glass sjg@chromium.org ---
arch/Kconfig | 1 - arch/x86/Kconfig | 8 ++++++++ arch/x86/lib/Makefile | 2 +- cmd/Kconfig | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig index 2e0528d819c9..de91aac4b8d4 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -246,7 +246,6 @@ config X86 imply CMD_PCI imply CMD_SF imply CMD_SF_TEST - imply CMD_ZBOOT imply DM_GPIO imply DM_KEYBOARD imply DM_MMC diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 99e59d94c606..e5ee10af33c5 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -1053,4 +1053,12 @@ config SPL_COREBOOT_SYSINFO display, memory and build information. It is stored in struct sysinfo_t after parsing by get_coreboot_info().
+config ZBOOT + bool "Support the zImage format" + default y + help + Enable this to support booting the x86-specific zImage format. This + uses a special, binary format containing information about the Linux + format to boot. + endmenu diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile index 90a7618ecfde..8fc35e1b51ea 100644 --- a/arch/x86/lib/Makefile +++ b/arch/x86/lib/Makefile @@ -48,7 +48,7 @@ obj-$(CONFIG_$(SPL_TPL_)GENERATE_ACPI_TABLE) += acpi_table.o endif obj-y += tables.o ifndef CONFIG_SPL_BUILD -obj-$(CONFIG_CMD_ZBOOT) += zimage.o +obj-$(CONFIG_ZBOOT) += zimage.o endif obj-$(CONFIG_USE_HOB) += hob.o ifndef CONFIG_TPL_BUILD diff --git a/cmd/Kconfig b/cmd/Kconfig index 9ebea76c2ce5..584ffd039686 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -538,6 +538,8 @@ config THOR_RESET_OFF
config CMD_ZBOOT bool "zboot - x86 boot command" + depends on ZBOOT + default y help With x86 machines it is common to boot a bzImage file which contains both a kernel and a setup.bin file. The latter includes

On Sun, Dec 03, 2023 at 05:29:28PM -0700, Simon Glass wrote:
Most of the functionality of zboot is contained in the logic which handles a zimage. Create a separate Kconfig for the logic so that it can (later) be used without the command itself being enabled.
Enable ZBOOT by default on x86, with the command depending on that. The existing 'imply' can therefore be removed.
Signed-off-by: Simon Glass sjg@chromium.org
Reviewed-by: Tom Rini trini@konsulko.com

Drop the iteration and write out each state in full. This will allow the arguments to be reduced and adjusted in future patches.
Signed-off-by: Simon Glass sjg@chromium.org ---
cmd/x86/zboot.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-)
diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c index c9375fb417c1..03cab1d67ebf 100644 --- a/cmd/x86/zboot.c +++ b/cmd/x86/zboot.c @@ -136,19 +136,20 @@ U_BOOT_SUBCMDS(zboot, int do_zboot_states(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[], int state_mask) { - int i; - - for (i = 0; i < ZBOOT_STATE_COUNT; i++) { - struct cmd_tbl *cmd = &zboot_subcmds[i]; - int mask = 1 << i; - int ret; - - if (mask & state_mask) { - ret = cmd->cmd(cmd, flag, argc, argv); - if (ret) - return ret; - } - } + int ret; + + if (flag & ZBOOT_STATE_START) + ret = do_zboot_start(cmdtp, flag, argc, argv); + if (!ret && (flag & ZBOOT_STATE_LOAD)) + ret = do_zboot_load(cmdtp, flag, argc, argv); + if (!ret && (flag & ZBOOT_STATE_SETUP)) + ret = do_zboot_setup(cmdtp, flag, argc, argv); + if (!ret && (flag & ZBOOT_STATE_INFO)) + ret = do_zboot_info(cmdtp, flag, argc, argv); + if (!ret && (flag & ZBOOT_STATE_GO)) + ret = do_zboot_go(cmdtp, flag, argc, argv); + if (ret) + return ret;
return 0; }

Separate out the commands from the logic. This will eventually allow the logic to be used when CONFIG_CMDLINE is not enabled.
Signed-off-by: Simon Glass sjg@chromium.org ---
cmd/x86/zboot.c | 66 ++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 52 insertions(+), 14 deletions(-)
diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c index 03cab1d67ebf..f5c90a8ba896 100644 --- a/cmd/x86/zboot.c +++ b/cmd/x86/zboot.c @@ -10,8 +10,7 @@ #include <vsprintf.h> #include <asm/zimage.h>
-static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) +static void zboot_start(int argc, char *const argv[]) { const char *s;
@@ -53,6 +52,27 @@ static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc, } if (argc >= 7) state.cmdline = env_get(argv[6]); +} + +static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + zboot_start(argc, argv); + + return 0; +} + +static int _zboot_load(void) +{ + int ret; + + ret = zboot_load(); + if (!ret) + ret = env_set_hex("zbootbase", map_to_sysmem(state.base_ptr)); + if (!ret) + ret = env_set_hex("zbootaddr", state.load_address); + if (ret) + return ret;
return 0; } @@ -60,18 +80,13 @@ static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc, static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - if (zboot_load()) - return CMD_RET_FAILURE; - - if (env_set_hex("zbootbase", map_to_sysmem(state.base_ptr)) || - env_set_hex("zbootaddr", state.load_address)) + if (_zboot_load()) return CMD_RET_FAILURE;
return 0; }
-static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) +static int _zboot_setup(void) { struct boot_params *base_ptr = state.base_ptr;
@@ -87,24 +102,47 @@ static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag, int argc, return 0; }
-static int do_zboot_info(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) +static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + return _zboot_setup(); +} + +static void zboot_info(void) { printf("Kernel loaded at %08lx, setup_base=%p\n", state.load_address, state.base_ptr); +} + +static int do_zboot_info(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) +{ + zboot_info();
return 0; }
+static int _zboot_go(void) +{ + int ret; + + ret = zboot_go(); + + return ret; +} + static int do_zboot_go(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret;
- ret = zboot_go(); - printf("Kernel returned! (err=%d)\n", ret); + ret = _zboot_go(); + if (ret) { + printf("Kernel returned! (err=%d)\n", ret); + return CMD_RET_FAILURE; + }
- return CMD_RET_FAILURE; + return 0; }
static int do_zboot_dump(struct cmd_tbl *cmdtp, int flag, int argc,

The only difference between the command and the underlying logic is the setting of envrionment variables. Move this out of the command processing since it needs to be done in any case.
Signed-off-by: Simon Glass sjg@chromium.org ---
arch/x86/lib/zimage.c | 7 +++++++ cmd/x86/zboot.c | 16 ++-------------- 2 files changed, 9 insertions(+), 14 deletions(-)
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index 1d1249fc25ac..b72e2f01bd57 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -370,6 +370,7 @@ int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, int zboot_load(void) { struct boot_params *base_ptr; + int ret;
if (state.base_ptr) { struct boot_params *from = (struct boot_params *)state.base_ptr; @@ -389,6 +390,12 @@ int zboot_load(void) } state.base_ptr = base_ptr;
+ ret = env_set_hex("zbootbase", map_to_sysmem(state.base_ptr)); + if (!ret) + ret = env_set_hex("zbootaddr", state.load_address); + if (ret) + return ret; + return 0; }
diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c index f5c90a8ba896..d39ab6a9698f 100644 --- a/cmd/x86/zboot.c +++ b/cmd/x86/zboot.c @@ -62,30 +62,18 @@ static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc, return 0; }
-static int _zboot_load(void) +static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { int ret;
ret = zboot_load(); - if (!ret) - ret = env_set_hex("zbootbase", map_to_sysmem(state.base_ptr)); - if (!ret) - ret = env_set_hex("zbootaddr", state.load_address); if (ret) return ret;
return 0; }
-static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - if (_zboot_load()) - return CMD_RET_FAILURE; - - return 0; -} - static int _zboot_setup(void) { struct boot_params *base_ptr = state.base_ptr;

Move error checking into the caller so that do_zboot_setup() can call zboot_setup() directly.
Signed-off-by: Simon Glass sjg@chromium.org ---
cmd/x86/zboot.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c index d39ab6a9698f..f392b6b3e493 100644 --- a/cmd/x86/zboot.c +++ b/cmd/x86/zboot.c @@ -74,11 +74,10 @@ static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc, return 0; }
-static int _zboot_setup(void) +static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag, int argc, + char *const argv[]) { - struct boot_params *base_ptr = state.base_ptr; - - if (!base_ptr) { + if (!state.base_ptr) { printf("base is not set: use 'zboot load' first\n"); return CMD_RET_FAILURE; } @@ -87,13 +86,10 @@ static int _zboot_setup(void) return CMD_RET_FAILURE; }
- return 0; -} + if (zboot_setup()) + return CMD_RET_FAILURE;
-static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag, int argc, - char *const argv[]) -{ - return _zboot_setup(); + return 0; }
static void zboot_info(void)

This function only calls zboot_go() so drop it.
Signed-off-by: Simon Glass sjg@chromium.org ---
cmd/x86/zboot.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c index f392b6b3e493..f49cdd91a1f8 100644 --- a/cmd/x86/zboot.c +++ b/cmd/x86/zboot.c @@ -106,21 +106,12 @@ static int do_zboot_info(struct cmd_tbl *cmdtp, int flag, int argc, return 0; }
-static int _zboot_go(void) -{ - int ret; - - ret = zboot_go(); - - return ret; -} - static int do_zboot_go(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { int ret;
- ret = _zboot_go(); + ret = zboot_go(); if (ret) { printf("Kernel returned! (err=%d)\n", ret); return CMD_RET_FAILURE;

Process the arguments before calling zboot_start() so that we can separate the command line from the internal logic.
Signed-off-by: Simon Glass sjg@chromium.org ---
cmd/x86/zboot.c | 67 +++++++++++++++++++++---------------------------- 1 file changed, 28 insertions(+), 39 deletions(-)
diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c index f49cdd91a1f8..572b58a5537d 100644 --- a/cmd/x86/zboot.c +++ b/cmd/x86/zboot.c @@ -10,56 +10,45 @@ #include <vsprintf.h> #include <asm/zimage.h>
-static void zboot_start(int argc, char *const argv[]) +static int zboot_start(ulong bzimage_addr, ulong bzimage_size, + ulong initrd_addr, ulong initrd_size, ulong base_addr, + const char *cmdline) { - const char *s; - memset(&state, '\0', sizeof(state)); - if (argc >= 2) { - /* argv[1] holds the address of the bzImage */ - s = argv[1]; - } else { - s = env_get("fileaddr"); - }
- if (s) - state.bzimage_addr = hextoul(s, NULL); - - if (argc >= 3) { - /* argv[2] holds the size of the bzImage */ - state.bzimage_size = hextoul(argv[2], NULL); + state.bzimage_size = bzimage_size; + state.initrd_addr = initrd_addr; + state.initrd_size = initrd_size; + if (base_addr) { + state.base_ptr = map_sysmem(base_addr, 0); + state.load_address = bzimage_addr; + } else { + state.bzimage_addr = bzimage_addr; } + state.cmdline = cmdline;
- if (argc >= 4) - state.initrd_addr = hextoul(argv[3], NULL); - if (argc >= 5) - state.initrd_size = hextoul(argv[4], NULL); - if (argc >= 6) { - /* - * When the base_ptr is passed in, we assume that the image is - * already loaded at the address given by argv[1] and therefore - * the original bzImage is somewhere else, or not accessible. - * In any case, we don't need access to the bzImage since all - * the processing is assumed to be done. - * - * So set the base_ptr to the given address, use this arg as the - * load address and set bzimage_addr to 0 so we know that it - * cannot be proceesed (or processed again). - */ - state.base_ptr = (void *)hextoul(argv[5], NULL); - state.load_address = state.bzimage_addr; - state.bzimage_addr = 0; - } - if (argc >= 7) - state.cmdline = env_get(argv[6]); + return 0; }
static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { - zboot_start(argc, argv); + ulong bzimage_addr = 0, bzimage_size, initrd_addr, initrd_size; + ulong base_addr; + const char *s, *cmdline;
- return 0; + /* argv[1] holds the address of the bzImage */ + s = cmd_arg1(argc, argv) ? : env_get("fileaddr"); + if (s) + bzimage_addr = hextoul(s, NULL); + bzimage_size = argc > 2 ? hextoul(argv[2], NULL) : 0; + initrd_addr = argc > 3 ? hextoul(argv[3], NULL) : 0; + initrd_size = argc > 4 ? hextoul(argv[4], NULL) : 0; + base_addr = argc > 5 ? hextoul(argv[5], NULL) : 0; + cmdline = argc > 6 ? env_get(argv[6]) : NULL; + + return zboot_start(bzimage_addr, bzimage_size, initrd_addr, initrd_size, + base_addr, cmdline); }
static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc,

The term 'start' is used withint bootm and zboot to indicate the first phase of booting an image.
Since zboot_start() does the whole boot, rename it to zboot_run() to align with bootm_run() etc.
Fix a log message while we are here.
Signed-off-by: Simon Glass sjg@chromium.org ---
arch/x86/lib/zimage.c | 6 +++--- boot/bootmeth_cros.c | 6 +++--- include/bootm.h | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index b72e2f01bd57..e8a1849947e6 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -437,8 +437,8 @@ int zboot_go(void) return ret; }
-int zboot_start(ulong addr, ulong size, ulong initrd, ulong initrd_size, - ulong base, char *cmdline) +int zboot_run(ulong addr, ulong size, ulong initrd, ulong initrd_size, + ulong base, char *cmdline) { int ret;
@@ -463,7 +463,7 @@ int zboot_start(ulong addr, ulong size, ulong initrd, ulong initrd_size, return log_msg_ret("set", ret); ret = zboot_go(); if (ret) - return log_msg_ret("set", ret); + return log_msg_ret("go", ret);
return -EFAULT; } diff --git a/boot/bootmeth_cros.c b/boot/bootmeth_cros.c index cd72db8250ce..f015f2e1c75f 100644 --- a/boot/bootmeth_cros.c +++ b/boot/bootmeth_cros.c @@ -432,9 +432,9 @@ static int cros_boot(struct udevice *dev, struct bootflow *bflow) }
if (IS_ENABLED(CONFIG_X86)) { - ret = zboot_start(map_to_sysmem(bflow->buf), bflow->size, 0, 0, - map_to_sysmem(bflow->x86_setup), - bflow->cmdline); + ret = zboot_run(map_to_sysmem(bflow->buf), bflow->size, 0, 0, + map_to_sysmem(bflow->x86_setup), + bflow->cmdline); } else { ret = bootm_boot_start(map_to_sysmem(bflow->buf), bflow->cmdline); diff --git a/include/bootm.h b/include/bootm.h index ce5298e4ed97..c815c40e3c4d 100644 --- a/include/bootm.h +++ b/include/bootm.h @@ -242,7 +242,7 @@ int bootm_process_cmdline(char *buf, int maxlen, int flags); int bootm_process_cmdline_env(int flags);
/** - * zboot_start() - Boot a zimage + * zboot_run() - Run through the various steps to boot a zimage * * Boot a zimage, given the component parts * @@ -255,8 +255,8 @@ int bootm_process_cmdline_env(int flags); * @cmdline: Command line to use for booting * Return: -EFAULT on error (normally it does not return) */ -int zboot_start(ulong addr, ulong size, ulong initrd, ulong initrd_size, - ulong base, char *cmdline); +int zboot_run(ulong addr, ulong size, ulong initrd, ulong initrd_size, + ulong base, char *cmdline);
/* * zimage_get_kernel_version() - Get the version string from a kernel

Move zboot_start() and zboot_info() in with the other logic functions.
Signed-off-by: Simon Glass sjg@chromium.org ---
arch/x86/include/asm/zimage.h | 25 +++++++++++++++++++++++++ arch/x86/lib/zimage.c | 23 +++++++++++++++++++++++ cmd/x86/zboot.c | 32 ++++---------------------------- 3 files changed, 52 insertions(+), 28 deletions(-)
diff --git a/arch/x86/include/asm/zimage.h b/arch/x86/include/asm/zimage.h index ac6683ea9ef3..8b5426051701 100644 --- a/arch/x86/include/asm/zimage.h +++ b/arch/x86/include/asm/zimage.h @@ -134,4 +134,29 @@ struct boot_params *load_zimage(char *image, unsigned long kernel_size, int setup_zimage(struct boot_params *setup_base, char *cmd_line, int auto_boot, ulong initrd_addr, ulong initrd_size, ulong cmdline_force);
+/** + * zboot_start() - Prepare to boot a zimage + * + * Record information about a zimage so it can be booted + * + * @bzimage_addr: Address of the bzImage to boot + * @bzimage_size: Size of the bzImage, or 0 to detect this + * @initrd_addr: Address of the initial ramdisk, or 0 if none + * @initrd_size: Size of the initial ramdisk, or 0 if none + * @base_addr: If non-zero, this indicates that the boot parameters have already + * been loaded by the caller to this address, so the load_zimage() call + * in zboot_load() will be skipped when booting + * @cmdline: Environment variable containing the 'override' command line, or + * NULL to use the one in the setup block + */ +void zboot_start(ulong bzimage_addr, ulong bzimage_size, ulong initrd_addr, + ulong initrd_size, ulong base_addr, const char *cmdline); + +/** + * zboot_info() - Show simple info about a zimage + * + * Shows wherer the kernel was loaded and also the setup base + */ +void zboot_info(void); + #endif diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index e8a1849947e6..f2d4f3b50162 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -652,3 +652,26 @@ void zimage_dump(struct boot_params *base_ptr, bool show_cmdline) if (get_boot_protocol(hdr, false) >= 0x215) print_num("Kernel info offset", hdr->kernel_info_offset); } + +void zboot_start(ulong bzimage_addr, ulong bzimage_size, ulong initrd_addr, + ulong initrd_size, ulong base_addr, const char *cmdline) +{ + memset(&state, '\0', sizeof(state)); + + state.bzimage_size = bzimage_size; + state.initrd_addr = initrd_addr; + state.initrd_size = initrd_size; + if (base_addr) { + state.base_ptr = map_sysmem(base_addr, 0); + state.load_address = bzimage_addr; + } else { + state.bzimage_addr = bzimage_addr; + } + state.cmdline = cmdline; +} + +void zboot_info(void) +{ + printf("Kernel loaded at %08lx, setup_base=%p\n", + state.load_address, state.base_ptr); +} diff --git a/cmd/x86/zboot.c b/cmd/x86/zboot.c index 572b58a5537d..addf28cb4aae 100644 --- a/cmd/x86/zboot.c +++ b/cmd/x86/zboot.c @@ -10,26 +10,6 @@ #include <vsprintf.h> #include <asm/zimage.h>
-static int zboot_start(ulong bzimage_addr, ulong bzimage_size, - ulong initrd_addr, ulong initrd_size, ulong base_addr, - const char *cmdline) -{ - memset(&state, '\0', sizeof(state)); - - state.bzimage_size = bzimage_size; - state.initrd_addr = initrd_addr; - state.initrd_size = initrd_size; - if (base_addr) { - state.base_ptr = map_sysmem(base_addr, 0); - state.load_address = bzimage_addr; - } else { - state.bzimage_addr = bzimage_addr; - } - state.cmdline = cmdline; - - return 0; -} - static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -47,8 +27,10 @@ static int do_zboot_start(struct cmd_tbl *cmdtp, int flag, int argc, base_addr = argc > 5 ? hextoul(argv[5], NULL) : 0; cmdline = argc > 6 ? env_get(argv[6]) : NULL;
- return zboot_start(bzimage_addr, bzimage_size, initrd_addr, initrd_size, - base_addr, cmdline); + zboot_start(bzimage_addr, bzimage_size, initrd_addr, initrd_size, + base_addr, cmdline); + + return 0; }
static int do_zboot_load(struct cmd_tbl *cmdtp, int flag, int argc, @@ -81,12 +63,6 @@ static int do_zboot_setup(struct cmd_tbl *cmdtp, int flag, int argc, return 0; }
-static void zboot_info(void) -{ - printf("Kernel loaded at %08lx, setup_base=%p\n", - state.load_address, state.base_ptr); -} - static int do_zboot_info(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) {

On Sun, Dec 03, 2023 at 05:29:36PM -0700, Simon Glass wrote:
Move zboot_start() and zboot_info() in with the other logic functions.
Signed-off-by: Simon Glass sjg@chromium.org
Reviewed-by: Tom Rini trini@konsulko.com

Now that we have a function to start the process of booting a zimage, use it in zboot_run() to avoid duplicated logic.
Signed-off-by: Simon Glass sjg@chromium.org ---
arch/x86/lib/zimage.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/arch/x86/lib/zimage.c b/arch/x86/lib/zimage.c index f2d4f3b50162..d7403876c13d 100644 --- a/arch/x86/lib/zimage.c +++ b/arch/x86/lib/zimage.c @@ -442,19 +442,7 @@ int zboot_run(ulong addr, ulong size, ulong initrd, ulong initrd_size, { int ret;
- memset(&state, '\0', sizeof(state)); - - if (base) { - state.base_ptr = map_sysmem(base, 0); - state.load_address = addr; - } else { - state.bzimage_addr = addr; - } - state.bzimage_size = size; - state.initrd_addr = initrd; - state.initrd_size = initrd_size; - state.cmdline = cmdline; - + zboot_start(addr, size, initrd, initrd_size, base, cmdline); ret = zboot_load(); if (ret) return log_msg_ret("ld", ret);

The current use case (ChromeOS) is the uncommon case. Document how this function is more normally used, where base is 0 and cmdline is NULL
Signed-off-by: Simon Glass sjg@chromium.org ---
include/bootm.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/include/bootm.h b/include/bootm.h index c815c40e3c4d..1800ca32c264 100644 --- a/include/bootm.h +++ b/include/bootm.h @@ -248,11 +248,14 @@ int bootm_process_cmdline_env(int flags); * * @addr: Address where the bzImage is moved before booting, either * BZIMAGE_LOAD_ADDR or ZIMAGE_LOAD_ADDR - * @base: Pointer to the boot parameters, typically at address - * DEFAULT_SETUP_BASE + * @size: Size of bzImage, or 0 to detect this * @initrd: Address of the initial ramdisk, or 0 if none * @initrd_size: Size of the initial ramdisk, or 0 if none - * @cmdline: Command line to use for booting + * @base_addr: If non-zero, this indicates that the boot parameters have already + * been loaded by the caller to this address, so the load_zimage() call + * in zboot_load() will be skipped when booting + * @cmdline: If non-NULL, the environment variable containing the command line + * to use for booting * Return: -EFAULT on error (normally it does not return) */ int zboot_run(ulong addr, ulong size, ulong initrd, ulong initrd_size,

On Sun, Dec 03, 2023 at 05:29:25PM -0700, Simon Glass wrote:
This series refactors the zboot code to allow it to be used with CONFIG_COMMAND disabled.
A new zboot_run() function is used to boot a zimage.
This is cmde (part e of CMDLINE refactoring) It depends on dm/cmdd-working which depends on dm/bootstda-working which depends on dm/cmdc-working
Just FYI, at this point all of the required series are now in -next so this could come in via the x86 tree now.

On Sun, 03 Dec 2023 17:29:25 -0700, Simon Glass wrote:
This series refactors the zboot code to allow it to be used with CONFIG_COMMAND disabled.
A new zboot_run() function is used to boot a zimage.
This is cmde (part e of CMDLINE refactoring) It depends on dm/cmdd-working which depends on dm/bootstda-working which depends on dm/cmdc-working
[...]
Applied to u-boot/master, thanks!
participants (2)
-
Simon Glass
-
Tom Rini