diff mbox

[U-Boot] config: Use booti instead of bootz on 64-bit ARM

Message ID 1426852577-19474-1-git-send-email-thierry.reding@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show

Commit Message

Thierry Reding March 20, 2015, 11:56 a.m. UTC
From: Thierry Reding <treding@nvidia.com>

The bootz command doesn't work with Linux kernel images on 64-bit ARM.
The replacement command with the same interface and functionality is
booti.

Cc: Dennis Gilmore <dennis@ausil.us>
Cc: Tom Rini <trini@konsulko.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 include/config_distro_defaults.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Stephen Warren March 20, 2015, 4:17 p.m. UTC | #1
On 03/20/2015 05:56 AM, Thierry Reding wrote:
> From: Thierry Reding <treding@nvidia.com>
>
> The bootz command doesn't work with Linux kernel images on 64-bit ARM.
> The replacement command with the same interface and functionality is
> booti.

Uggh. Why can't bootz work everywhere, or why can't bootz be an alias to 
booti on ARM64? Are the command-line parameters different? It'd be 
really nice to be able to create one boot.scr.uimg file that just works 
everywhere, and having different command names will scupper that.
Tom Rini March 20, 2015, 5:07 p.m. UTC | #2
On Fri, Mar 20, 2015 at 10:17:00AM -0600, Stephen Warren wrote:
> On 03/20/2015 05:56 AM, Thierry Reding wrote:
> >From: Thierry Reding <treding@nvidia.com>
> >
> >The bootz command doesn't work with Linux kernel images on 64-bit ARM.
> >The replacement command with the same interface and functionality is
> >booti.
> 
> Uggh. Why can't bootz work everywhere, or why can't bootz be an
> alias to booti on ARM64? Are the command-line parameters different?
> It'd be really nice to be able to create one boot.scr.uimg file that
> just works everywhere, and having different command names will
> scupper that.

So, a long while back I asked about maybe adding a
"bootSOMETHING-THAT-GUESSES-YOUR-FORMAT" command to help here.  The
issue is that "bootz" means "boot an ARM Linux Kernel with the kernel's
decompressor that's at the front".  It's not even (sadly, arg) what
"boot an x86 Linux Kernel with the kernel's decompressor that's at the
front" is, that's zboot.  In the kernel (today), there's no desire to
add the decompressor "arm" has to "aarch64" and instead leave
decompression to the loader (And compression to the user).  So we have
to handle the Image format that aarch64 uses.

Frankly I've always looked at the distro work here as the
"boot-do-what-I-mean" stuff where we hide that the common multi-platform
image types aren't popular and just let people boot the "normal" kernel
for their architecture.
Stephen Warren March 23, 2015, 7:44 p.m. UTC | #3
On 03/20/2015 11:07 AM, Tom Rini wrote:
> On Fri, Mar 20, 2015 at 10:17:00AM -0600, Stephen Warren wrote:
>> On 03/20/2015 05:56 AM, Thierry Reding wrote:
>>> From: Thierry Reding <treding@nvidia.com>
>>>
>>> The bootz command doesn't work with Linux kernel images on 64-bit ARM.
>>> The replacement command with the same interface and functionality is
>>> booti.
>>
>> Uggh. Why can't bootz work everywhere, or why can't bootz be an
>> alias to booti on ARM64? Are the command-line parameters different?
>> It'd be really nice to be able to create one boot.scr.uimg file that
>> just works everywhere, and having different command names will
>> scupper that.
>
> So, a long while back I asked about maybe adding a
> "bootSOMETHING-THAT-GUESSES-YOUR-FORMAT" command to help here.  The
> issue is that "bootz" means "boot an ARM Linux Kernel with the kernel's
> decompressor that's at the front".  It's not even (sadly, arg) what
> "boot an x86 Linux Kernel with the kernel's decompressor that's at the
> front" is, that's zboot.  In the kernel (today), there's no desire to
> add the decompressor "arm" has to "aarch64" and instead leave
> decompression to the loader (And compression to the user).  So we have
> to handle the Image format that aarch64 uses.
>
> Frankly I've always looked at the distro work here as the
> "boot-do-what-I-mean" stuff where we hide that the common multi-platform
> image types aren't popular and just let people boot the "normal" kernel
> for their architecture.

Ah yes, I guess that's true. A hypothetical universal "boot this image" 
function would be nice to enable everywhere. IIRC, bootm does some image 
format detection (uimage vs. FIT) so perhaps it could just grow the 
ability to boot anything?

I suppose it isn't too hard for a distro to detect ARM vs. ARM64 vs. x86 
and select bootz/booti/zboot for those cases, so long as all boards of 
an architecture are consistent.
Tom Rini March 28, 2015, 6:09 p.m. UTC | #4
On Fri, Mar 20, 2015 at 12:56:17PM +0100, Thierry Reding wrote:

> From: Thierry Reding <treding@nvidia.com>
> 
> The bootz command doesn't work with Linux kernel images on 64-bit ARM.
> The replacement command with the same interface and functionality is
> booti.
> 
> Cc: Dennis Gilmore <dennis@ausil.us>
> Cc: Tom Rini <trini@konsulko.com>
> Signed-off-by: Thierry Reding <treding@nvidia.com>

Applied to u-boot/master, thanks!
diff mbox

Patch

diff --git a/include/config_distro_defaults.h b/include/config_distro_defaults.h
index 1ecc0bb0a99d..f4a01ba80642 100644
--- a/include/config_distro_defaults.h
+++ b/include/config_distro_defaults.h
@@ -31,7 +31,11 @@ 
 
 #define CONFIG_OF_LIBFDT
 
+#ifdef CONFIG_ARM64
+#define CONFIG_CMD_BOOTI
+#else
 #define CONFIG_CMD_BOOTZ
+#endif
 #define CONFIG_CMD_DHCP
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_EXT2