summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2023-12-14 21:19:13 -0700
committerTom Rini <trini@konsulko.com>2024-04-10 17:04:25 -0600
commit207282d905a26754aa1496c0c02d09dc8b27138e (patch)
tree4c2fe8006a64b0ba150303758943d75773f124f7 /boot
parent6d803ec9cc757bda0c48f2fd419cb6878eab92c4 (diff)
downloadu-boot-207282d905a26754aa1496c0c02d09dc8b27138e.tar.gz
u-boot-207282d905a26754aa1496c0c02d09dc8b27138e.tar.bz2
u-boot-207282d905a26754aa1496c0c02d09dc8b27138e.zip
pxe: Allow booting without CMDLINE for the zboot method
Use zboot_run() to boot rather than the command line. This allows extlinux to be used (on x86) without CMDLINE being enabled. Collect any error but do not return it, to match the existing code. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'boot')
-rw-r--r--boot/pxe_utils.c19
1 files changed, 8 insertions, 11 deletions
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index c9da82b8e4..5ceabfd04e 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -568,10 +568,8 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
char *initrd_addr_str, char *initrd_filesize)
{
struct bootm_info bmi;
- char *zboot_argv[] = { "zboot", NULL, "0", NULL, NULL };
const char *fdt_addr;
ulong kernel_addr_r;
- int zboot_argc = 3;
void *buf;
int ret;
@@ -625,16 +623,10 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
}
bmi.addr_fit = kernel_addr;
- zboot_argv[1] = kernel_addr;
- if (initrd_addr_str) {
+ if (initrd_addr_str)
bmi.conf_ramdisk = initrd_str;
- zboot_argv[3] = initrd_addr_str;
- zboot_argv[4] = initrd_filesize;
- zboot_argc = 5;
- }
-
if (!fdt_addr)
fdt_addr = env_get("fdt_addr");
@@ -657,8 +649,13 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
else if (IS_ENABLED(CONFIG_BOOTM))
ret = bootz_run(&bmi);
/* Try booting an x86_64 Linux kernel image */
- else if (IS_ENABLED(CONFIG_CMD_ZBOOT))
- do_zboot_parent(ctx->cmdtp, 0, zboot_argc, zboot_argv, NULL);
+ else if (IS_ENABLED(CONFIG_ZBOOT))
+ ret = zboot_run(hextoul(kernel_addr, NULL), 0,
+ initrd_addr_str ?
+ hextoul(initrd_addr_str, NULL) : 0,
+ initrd_addr_str ?
+ hextoul(initrd_filesize, NULL) : 0,
+ 0, NULL);
unmap_sysmem(buf);