Thanks for the help (and great background on u-boot!). The OS I’m working with is completely custom, so I don’t have access to the traditional “make Image
” build path. What I do have is a kernel ELF, which I flatten with objcopy then use mkimage to create the image for u-boot. Does that sound correct?
file
gives me: /boot/Image: u-boot legacy uImage, myos, Linux/ARM, OS Kernel Image (Not compressed), 568464 bytes, Fri Oct 2 14:27:40 2020, Load Address: 0x3E000000, Entry Point: 0x3E000000, Header CRC: 0x1CFCFB52, Data CRC: 0xBBAB2FDF
However, when replacing /boot/Image
with my image, I get the error:
`Enter choice: 1: primary kernel
Retrieving file: /boot/initrd
5565023 bytes read in 206 ms (25.8 MiB/s)
Retrieving file: /boot/Image
568528 bytes read in 62 ms (8.7 MiB/s)
append: root=/dev/mmcblk0p1 rw rootwait rootfstype=ext4 console=ttyS0,115200n8 console=tty0 fbcon=map:0 net.ifnames=0 video=tegrafb no_ct
Booting kernel from Legacy Image at 80280000 …
Image Name: myos
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 568464 Bytes = 555.1 KiB
Load Address: 3e000000
Entry Point: 3e000000
Verifying Checksum … OK
Unsupported Architecture 0x2
ERROR: can’t get kernel image!
2: backup kernel
`
And from there it falls back to the original Kernel image. Is this because my kernel is 32-bit ARM, and the TX2 u-boot expects AARCH64, or because my mkimage
(which is on a separate, x86_64 host) is incompatible with the u-boot on the TX2, or something else?
The commands I use for objcopy
and mkimage
as follows ($OBJROOT/kern/kernel is a ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, with debug_info, not stripped
):
objcopy $OBJROOT/kern/kernel -I elf32-littlearm -O binary --gap-fill=0xff $OBJROOT/kern/kernel.bin
#2
mkimage -A arm -n myos -C none -a 0x3e000000 -e 0x3e000000 -d $OBJROOT/kern/kernel.bin $OBJROOT/Image
Many thanks,