[U-Boot] u-boot mkimage tool generates wrong-endianness header when run on big endian, resulting in unbootable image

Justin Hibbits jrh29 at alumni.cwru.edu
Sat Jan 27 21:57:07 UTC 2018


Hi,

When trying to build a kernel uIimage for PowerPC, on a PoewrPC host,
mkimage generates a header that appears to be in Little-endian, rather
than Big-endian, resulting in an unbootable uImage.

>From a correct build (NetBSD's mkubootimage):

00000000: 2705 1956 ae84 7a0b 5a55 38e5 010e d6f8  '..V..z.ZU8.....
00000010: 03ff ffc0 0400 3000 cf58 6adf 0507 0200  ......0..Xj.....
00000020: 4672 6565 4253 4420 616d 6967 6136 3400  FreeBSD amiga64.
00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................

Same image header, from mkimage:

00000000: 5619 0527 92c5 020e 1df5 6c5a f8d6 0e01  V..'......lZ....
00000010: c0ff ff03 0030 0004 7642 4b26 0507 0200  .....0..vBK&....
00000020: 0000 0000 0000 0000 0000 0000 0000 0000  ................
00000030: 0000 0000 0000 0000 0000 0000 0000 0000  ................


I checked the mkimage source, but couldn't find anything obviously
wrong, so maybe someone else can see it.

The host system is a PowerPC (PowerMac G5), and the target is a PowerPC e5500.

Thanks,
Justin Hibbits


More information about the U-Boot mailing list