summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorSimon Glass <[email protected]>2025-03-05 17:25:14 -0700
committerTom Rini <[email protected]>2025-03-18 13:12:15 -0600
commite2e87b840162ddf4ec8df3f235be98a74a964509 (patch)
treefb714298e767eb7fc4e66030314ba561b3992a70 /boot
parentfeb8d7fd749413e889ba2c396654f473ba32034d (diff)
boot: pxe: Refactor label_run_boot() to avoid cmdline
Adjust the remaining call in this function to use the bootm API. This will allow PXE to work without the command line. Signed-off-by: Simon Glass <[email protected]>
Diffstat (limited to 'boot')
-rw-r--r--boot/pxe_utils.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c
index 37306f37009..c606da9e96b 100644
--- a/boot/pxe_utils.c
+++ b/boot/pxe_utils.c
@@ -585,10 +585,8 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
char *kernel_addr, char *initrd_addr_str,
char *initrd_filesize, char *initrd_str)
{
- char *zboot_argv[] = { "zboot", NULL, "0", NULL, NULL };
struct bootm_info bmi;
ulong kernel_addr_r;
- int zboot_argc = 3;
void *buf;
int ret;
@@ -601,14 +599,14 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
return ret;
bmi.addr_img = kernel_addr;
- zboot_argv[1] = kernel_addr;
+ bootm_x86_set(&bmi, bzimage_addr, hextoul(kernel_addr, NULL));
if (initrd_addr_str) {
bmi.conf_ramdisk = initrd_str;
-
- zboot_argv[3] = initrd_addr_str;
- zboot_argv[4] = initrd_filesize;
- zboot_argc = 5;
+ bootm_x86_set(&bmi, initrd_addr,
+ hextoul(initrd_addr_str, NULL));
+ bootm_x86_set(&bmi, initrd_size,
+ hextoul(initrd_filesize, NULL));
}
if (!bmi.conf_fdt) {
@@ -642,7 +640,7 @@ static int label_run_boot(struct pxe_context *ctx, struct pxe_label *label,
/* Try booting an x86_64 Linux kernel image */
} else if (IS_ENABLED(CONFIG_CMD_ZBOOT)) {
log_debug("using zboot\n");
- do_zboot_parent(ctx->cmdtp, 0, zboot_argc, zboot_argv, NULL);
+ ret = zboot_run(&bmi);
}
unmap_sysmem(buf);