Created
December 27, 2020 13:19
-
-
Save terinjokes/47fe17f35024f929a456751b0f62c991 to your computer and use it in GitHub Desktop.
terrible hack to get u-boot 2020.10 to boot bzImages with sysboot
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cmd/pxe_utils.c b/cmd/pxe_utils.c | |
index 8716e782f6..214baf18b0 100644 | |
--- a/cmd/pxe_utils.c | |
+++ b/cmd/pxe_utils.c | |
@@ -552,6 +552,17 @@ 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) | |
+ else { | |
+ bootm_argc=5; | |
+ char * tok = strtok(bootm_argv[2], ":"); | |
+ bootm_argv[3]=tok; | |
+ tok = strtok(NULL, ":"); | |
+ bootm_argv[4]=tok; | |
+ bootm_argv[2]= "-"; | |
+ | |
+ do_zboot(cmdtp, 0, bootm_argc, bootm_argv); | |
+ } | |
#endif | |
unmap_sysmem(buf); | |
diff --git a/include/command.h b/include/command.h | |
index b9b5ec1afa..cedaa425cd 100644 | |
--- a/include/command.h | |
+++ b/include/command.h | |
@@ -141,6 +141,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(struct cmd_tbl *cmdtp, int flag, int argc, | |
+ char *const argv[]); | |
+ | |
extern int common_diskboot(struct cmd_tbl *cmdtp, const char *intf, int argc, | |
char *const argv[]); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment