Skip to contentSkip to conversation

sysboot: add zboot support to boot x86 Linux kernel image

PATCH Superseded Kory Maincent 2 participants 3 messages Dec 25, 2020 – Feb 1, 2021

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 sysboot: add zboot support to boot x86 Linux kernel image

Add "zboot" command to the list of supported boot in the label_boot function.

---

Change since v1:
- Modify comment

 cmd/pxe_utils.c   | 4 ++++
 include/command.h | 2 ++
 2 files changed, 6 insertions(+)
cmd/pxe_utils.c +4 -0
index 53af04d7dc..1de02e7353 100644
@@ -548,6 +548,10 @@ static int label_boot(cmd_tbl_t *cmdtp, struct pxe_label *label)
 	/* Try booting a Image */
 	else
 		do_bootz(cmdtp, 0, bootm_argc, bootm_argv);
+#elif defined(CONFIG_CMD_ZBOOT)
+	/* Try booting an x86_64 Linux kernel image */
+	else
+		do_zboot(cmdtp, 0, bootm_argc, bootm_argv);
 #endif
 	unmap_sysmem(buf);
 
include/command.h +2 -0
index d1063774ce..57fe65000b 100644
@@ -133,6 +133,8 @@ extern int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 
 extern int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
 
+extern int do_zboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
+
 extern int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
 			   char *const argv[]);
 
Signature · 1 line
2.17.1
#1 lore raw

PATCH v2 1/1 sysboot: add zboot support to boot x86 Linux kernel image

Quoted 4 lines · Kory Maincent

Add "zboot" command to the list of supported boot in the label_boot function.

Quoted 9 lines

---

Change since v1:
- Modify comment

 cmd/pxe_utils.c   | 4 ++++
 include/command.h | 2 ++
 2 files changed, 6 insertions(+)

applied to u-boot-x86, thanks!

#2 lore raw

PATCH v2 1/1 sysboot: add zboot support to boot x86 Linux kernel image

Hi Kory,

Quoted 11 lines · Bin Meng
Quoted 9 lines · Kory Maincent

Add "zboot" command to the list of supported boot in the label_boot function.

---

Change since v1:
- Modify comment

Quoted 6 lines
Quoted 4 lines
 cmd/pxe_utils.c   | 4 ++++
 include/command.h | 2 ++
 2 files changed, 6 insertions(+)

applied to u-boot-x86, thanks!

This patch unfortunately does not compile, due to the following commit made by Simon:

commit 5588e776b02d65afeae612d3dde92e7add2e03cc

Author: Simon Glass <[email protected]>
Date:   Sat Sep 5 14:50:43 2020 -0600

x86: zboot: Set up a sub-command structure

Add subcommands to zboot. At present there is only one called 'start' which does the whole boot. It is the default command so is optional.

Change the 's' string variable to const while we are here.

Could you please rework? Thanks!

Regards,
Bin