cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
1,402 Views
Registered: ‎05-01-2012

Building OSL -- Bad ARM64 Image magic!

Jump to solution

I'm building the linux from the source at Xilinx's github using Vivado SDK 2017.4.1 (I've also tried 2018.1) with

ARCH=arm64
CROSS_COMPILE=aarch64-linux-gnu-

When trying to boot this image on a ZCU102 board, I get the u-boot error "Bad ARM64 Image magic!".  After a little investigation, it seems the problem is that the header of the Image file has an error.  There's an extra byte in the header, moving the magic number so that u-boot can't find it.  What could cause this and how can I fix it?

 

Here's my Image header:

bad image header.PNG

 

And here's a good Image header generated from petalinux:

petalinux image header.PNG

 

(For those that don't know, the structure of the header is defined in the u-boot source in cmd/booti.c.)

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Adventurer
Adventurer
1,313 Views
Registered: ‎05-01-2012

Re: Building OSL -- Bad ARM64 Image magic!

Jump to solution

So, the problem is that apparently the ftp transfer was using text mode instead of binary for some reason, so a bunch of added carriage returns got added into the file.

View solution in original post

0 Kudos
4 Replies
Highlighted
Moderator
Moderator
1,388 Views
Registered: ‎09-12-2007

Re: Building OSL -- Bad ARM64 Image magic!

Jump to solution
0 Kudos
Highlighted
Adventurer
Adventurer
1,380 Views
Registered: ‎05-01-2012

Re: Building OSL -- Bad ARM64 Image magic!

Jump to solution

I used pre-built items for everything except the linux kernel image.  I did follow those directions for compiling my linux image, other than setting ARCH=arm64 instead of aarch64, since aarch64 doesn't exist.

0 Kudos
Highlighted
Adventurer
Adventurer
1,371 Views
Registered: ‎05-01-2012

Re: Building OSL -- Bad ARM64 Image magic!

Jump to solution

Note that just deleting the 0x0d, which seems like the extra byte, doesn't work.  The kernel starts but then crashes immediately.

0 Kudos
Highlighted
Adventurer
Adventurer
1,314 Views
Registered: ‎05-01-2012

Re: Building OSL -- Bad ARM64 Image magic!

Jump to solution

So, the problem is that apparently the ftp transfer was using text mode instead of binary for some reason, so a bunch of added carriage returns got added into the file.

View solution in original post

0 Kudos