sysboot: add zboot support to boot x86 Linux kernel image
PATCH v3 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
Change since v2:
- Update do_zboot to do_zboot_parent function to follow the patch:
5588e776b0
cmd/pxe_utils.c | 4 ++++ include/command.h | 3 +++ 2 files changed, 7 insertions(+)
cmd/pxe_utils.c +4 -0
@@ -657,6 +657,10 @@ static int label_boot(struct cmd_tbl *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_parent(cmdtp, 0, bootm_argc, bootm_argv, NULL);#endif unmap_sysmem (buf);
include/command.h +3 -0
@@ -165,6 +165,9 @@ extern int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc,extern int do_booti (struct cmd_tbl *cmdtp,int flag,int argc,char *const argv[]); +extern int do_zboot_parent (struct cmd_tbl *cmdtp,int flag,int argc, +char *const argv[],int *repeatable); +extern int common_diskboot (struct cmd_tbl *cmdtp,const char *intf,int argc,char *const argv[]);
Signature · 1 line
2.17.1
PATCH v3 1/1 sysboot: add zboot support to boot x86 Linux kernel image
Hi Kory,
Quoted 23 lines · Kory Maincent
Add "zboot" command to the list of supported boot in the
label_bootfunction.Signed-off-by Kory Maincent <[email protected]>---
Change since v1:
- Modify commentChange since v2:
- Updatedo_zboottodo_zboot_parentfunction to follow the patch:5588e776b0cmd/pxe_utils.c | 4 ++++ include/command.h | 3 +++ 2 files changed, 7 insertions(+)cmd/pxe_utils.c +0
-0
cmd/pxe_utils.c static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label) · line 660
Quoted 4 lines
cmd/pxe_utils.c +1
-0@@ -657,6 +657,10 @@ static int label_boot(struct cmd_tbl *cmdtp, struct pxe_label *label)/* Try booting a Image */ else do_bootz(cmdtp, 0, bootm_argc, bootm_argv); +#elif defined(CONFIG_CMD_ZBOOT )
Can this use IS_ENABLED() ?
Quoted 11 lines
cmd/pxe_utils.c +3
-0+/* Try booting an x86_64 Linux kernel image */ + else + do_zboot_parent(cmdtp, 0, bootm_argc, bootm_argv, NULL);#endif unmap_sysmem (buf);include/command.h +0
-0
include/command.h extern int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, · line 169
Quoted 5 lines
include/command.h +2
-0@@ -165,6 +165,9 @@ extern int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc,extern int do_booti (struct cmd_tbl *cmdtp,int flag,int argc,char *const argv[]); +extern int do_zboot_parent (struct cmd_tbl *cmdtp,int flag,int argc, +char *const argv[],int *repeatable);
We don't normally use extern for function decls in header files.
Quoted 7 lines
include/command.h +1
-1+extern int common_diskboot (struct cmd_tbl *cmdtp,const char *intf,int argc,char *const argv[]); --2.17.1
PATCH v3 1/1 sysboot: add zboot support to boot x86 Linux kernel image
Hi Simon,
Thanks for the review.
Quoted 21 lines · On Mon, 1 Feb 2021 13:44:46 -0700 Simon Glass <[email protected]> wrote:
Hi Kory,
Quoted 18 lines · Kory Maincent
Add "zboot" command to the list of supported boot in the
label_bootfunction.Signed-off-by Kory Maincent <[email protected]>---
Change since v1:
- Modify commentChange since v2:
- Updatedo_zboottodo_zboot_parentfunction to follow the patch:5588e776b0cmd/pxe_utils.c | 4 ++++ include/command.h | 3 +++ 2 files changed, 7 insertions(+)
Quoted 11 lines
Quoted 9 lines
cmd/pxe_utils.c +0
-0@@ -657,6 +657,10 @@ static int label_boot(struct cmd_tbl *cmdtp, struct
pxe_label*label) /* Try booting a Image */else do_bootz(cmdtp, 0, bootm_argc, bootm_argv);+#elif
defined(CONFIG_CMD_ZBOOT)Can this use
IS_ENABLED()?
Yes it can use IS_ENABLED indeed.
Quoted 15 lines
Quoted 15 lines
cmd/pxe_utils.c +3
-0+/* Try booting an x86_64 Linux kernel image */ + else + do_zboot_parent(cmdtp, 0, bootm_argc, bootm_argv, NULL);#endif unmap_sysmem (buf);include/command.h +0
-0@@ -165,6 +165,9 @@ extern int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, extern int do_booti(struct cmd_tbl *cmdtp, int flag, int argc,char *const argv[]);
Quoted 4 lines
include/command.h extern int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, · line 169
Quoted 2 lines
include/command.h +2
-0+extern int do_zboot_parent (struct cmd_tbl *cmdtp,int flag,int argc, +char *const argv[],int *repeatable);We don't normally use extern for function decls in header files.
Ok, why the other boot commands (do_booti, do_bootz) use extern?
Regards,
PATCH v3 1/1 sysboot: add zboot support to boot x86 Linux kernel image
HI K?ry,
Quoted 41 lines · K?ry Maincent
Hi Simon,
Thanks for the review.
Quoted 21 lines · On Mon, 1 Feb 2021 13:44:46 -0700 Simon Glass <[email protected]> wrote:
Hi Kory,
Quoted 18 lines · Kory Maincent
Add "zboot" command to the list of supported boot in the
label_bootfunction.Signed-off-by Kory Maincent <[email protected]>---
Change since v1:
- Modify commentChange since v2:
- Updatedo_zboottodo_zboot_parentfunction to follow the patch:5588e776b0cmd/pxe_utils.c | 4 ++++ include/command.h | 3 +++ 2 files changed, 7 insertions(+)Quoted 11 lines
Quoted 9 lines
cmd/pxe_utils.c +0
-0@@ -657,6 +657,10 @@ static int label_boot(struct cmd_tbl *cmdtp, struct
pxe_label*label) /* Try booting a Image */else do_bootz(cmdtp, 0, bootm_argc, bootm_argv);+#elif
defined(CONFIG_CMD_ZBOOT)Can this use
IS_ENABLED()?
Quoted 1 line
Yes it can use
IS_ENABLEDindeed.
A separate clean-up patch to convert existing ones using IS_ENABLED()
Quoted 16 lines
Quoted 16 lines
Quoted 16 lines
cmd/pxe_utils.c +3
-0+/* Try booting an x86_64 Linux kernel image */ + else + do_zboot_parent(cmdtp, 0, bootm_argc, bootm_argv, NULL);#endif unmap_sysmem (buf);include/command.h +0
-0@@ -165,6 +165,9 @@ extern int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, extern int do_booti(struct cmd_tbl *cmdtp, int flag, int argc,char *const argv[]);
Quoted 7 lines
Quoted 4 lines
include/command.h extern int do_bootz(struct cmd_tbl *cmdtp, int flag, int argc, · line 169
Quoted 2 lines
include/command.h +2
-0+extern int do_zboot_parent (struct cmd_tbl *cmdtp,int flag,int argc, +char *const argv[],int *repeatable);We don't normally use extern for function decls in header files.
Ok, why the other boot commands (
do_booti,do_bootz) use extern?
I think you can create a clean-up patch to remove extern.
Regards,
Bin