diff options
author | Tom Rini <trini@konsulko.com> | 2021-02-04 08:18:57 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2021-02-04 08:18:57 -0500 |
commit | 67472aa0594186a203e4384ef82b313b0b5922e9 (patch) | |
tree | 0d0310c7acbd32c087ba71578f8b2be1a273c3e2 /cmd/pxe_utils.c | |
parent | fdcb93e1709ab1a2ebb562455621617c29e2099c (diff) | |
parent | 18c25821836b4673aa67a43c792a4a82480f47fa (diff) |
Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86
- Fix broken multi-core boot for QEMU x86
- Add zboot support to boot x86 Linux kernel image in the PXE sysboot
utility
Diffstat (limited to 'cmd/pxe_utils.c')
-rw-r--r-- | cmd/pxe_utils.c | 53 |
1 files changed, 27 insertions, 26 deletions
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c index 3526a651d79..71c5af4c25d 100644 --- a/cmd/pxe_utils.c +++ b/cmd/pxe_utils.c @@ -492,16 +492,16 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) env_get("gatewayip"), env_get("netmask")); } -#ifdef CONFIG_CMD_NET - if (label->ipappend & 0x2) { - int err; - - strcpy(mac_str, " BOOTIF="); - err = format_mac_pxe(mac_str + 8, sizeof(mac_str) - 8); - if (err < 0) - mac_str[0] = '\0'; + if (IS_ENABLED(CONFIG_CMD_NET)) { + if (label->ipappend & 0x2) { + int err; + + strcpy(mac_str, " BOOTIF="); + err = format_mac_pxe(mac_str + 8, sizeof(mac_str) - 8); + if (err < 0) + mac_str[0] = '\0'; + } } -#endif if ((label->ipappend & 0x3) || label->append) { char bootargs[CONFIG_SYS_CBSIZE] = ""; @@ -649,15 +649,16 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) /* Try bootm for legacy and FIT format image */ if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID) do_bootm(cmdtp, 0, bootm_argc, bootm_argv); -#ifdef CONFIG_CMD_BOOTI /* Try booting an AArch64 Linux kernel image */ - else + else if (IS_ENABLED(CONFIG_CMD_BOOTI)) do_booti(cmdtp, 0, bootm_argc, bootm_argv); -#elif defined(CONFIG_CMD_BOOTZ) /* Try booting a Image */ - else + else if (IS_ENABLED(CONFIG_CMD_BOOTZ)) do_bootz(cmdtp, 0, bootm_argc, bootm_argv); -#endif + /* Try booting an x86_64 Linux kernel image */ + else if (IS_ENABLED(CONFIG_CMD_ZBOOT)) + do_zboot_parent(cmdtp, 0, bootm_argc, bootm_argv, NULL); + unmap_sysmem(buf); cleanup: @@ -1424,20 +1425,20 @@ void handle_pxe_menu(struct cmd_tbl *cmdtp, struct pxe_menu *cfg) struct menu *m; int err; -#ifdef CONFIG_CMD_BMP - /* display BMP if available */ - if (cfg->bmp) { - if (get_relfile(cmdtp, cfg->bmp, image_load_addr)) { - if (CONFIG_IS_ENABLED(CMD_CLS)) - run_command("cls", 0); - bmp_display(image_load_addr, - BMP_ALIGN_CENTER, BMP_ALIGN_CENTER); - } else { - printf("Skipping background bmp %s for failure\n", - cfg->bmp); + if (IS_ENABLED(CONFIG_CMD_BMP)) { + /* display BMP if available */ + if (cfg->bmp) { + if (get_relfile(cmdtp, cfg->bmp, image_load_addr)) { + if (CONFIG_IS_ENABLED(CMD_CLS)) + run_command("cls", 0); + bmp_display(image_load_addr, + BMP_ALIGN_CENTER, BMP_ALIGN_CENTER); + } else { + printf("Skipping background bmp %s for failure\n", + cfg->bmp); + } } } -#endif m = pxe_menu_to_menu(cfg); if (!m) |