UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
717 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
Adventurer
Adventurer
628 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.

0 Kudos
4 Replies
Moderator
Moderator
703 Views
Registered: ‎09-12-2007

Re: Building OSL -- Bad ARM64 Image magic!

Jump to solution
0 Kudos
Adventurer
Adventurer
695 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
Adventurer
Adventurer
686 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
Adventurer
Adventurer
629 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.

0 Kudos