Commit 8b5c738b85d49bdc7c48e5f787938fc40320bb27

Authored by Stephen Warren
Committed by Tom Warren
1 parent ba52199422

pxe: add AArch64 image support

The sysboot and pxe commands currently support either U-Boot formats or
raw zImages. Add support for the AArch64 Linux port's native image format
too.

As with zImage support, there is no auto-detection of the native image
format. Rather, if the image is auto-detected as a U-Boot format, U-Boot
will try to interpret it as such. Otherwise, U-Boot will fall back to a
raw/native image format, if one is enabled.

My belief is that CONFIG_CMD_BOOTZ won't ever be enabled for any AArch64
port, hence there's never a need to differentiate between CONFIG_CMD_
_BOOTI and _BOOTZ at run-time; compile-time will do. Even if this isn't
true, we want to prefer _BOOTI over _BOOTZ when defined, since _BOOTI is
definitely the native format for AArch64.

Change-Id: I83c5cc7566032afd72516de46f4e5eb7a780284a
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>

Showing 2 changed files with 8 additions and 2 deletions Side-by-side Diff

... ... @@ -793,8 +793,12 @@
793 793 /* Try bootm for legacy and FIT format image */
794 794 if (genimg_get_format(buf) != IMAGE_FORMAT_INVALID)
795 795 do_bootm(cmdtp, 0, bootm_argc, bootm_argv);
796   -#ifdef CONFIG_CMD_BOOTZ
797   - /* Try booting a zImage */
  796 +#ifdef CONFIG_CMD_BOOTI
  797 + /* Try booting an AArch64 Linux kernel image */
  798 + else
  799 + do_booti(cmdtp, 0, bootm_argc, bootm_argv);
  800 +#elif defined(CONFIG_CMD_BOOTZ)
  801 + /* Try booting a Image */
798 802 else
799 803 do_bootz(cmdtp, 0, bootm_argc, bootm_argv);
800 804 #endif
... ... @@ -104,6 +104,8 @@
104 104  
105 105 extern int do_bootz(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
106 106  
  107 +extern int do_booti(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
  108 +
107 109 extern int common_diskboot(cmd_tbl_t *cmdtp, const char *intf, int argc,
108 110 char *const argv[]);
109 111