seL4_tools icon indicating copy to clipboard operation
seL4_tools copied to clipboard

make-uimage script sets -O linux for the image format, but seL4 is not a linux image

Open midnightveil opened this issue 7 months ago • 1 comments

Since seL4 image isn't an ARM64 linux image, we don't have the ARM64 linux magic.

Hence, recent U-Boot¹ fails to PXE boot uImages as it fails the magic check:

Bytes transferred = 3401304 (33e658 hex)
## Booting kernel from Legacy Image at 80080000 ...
   Image Name:
   Image Type:   AArch64 Linux Kernel Image (uncompressed)
   Data Size:    3401240 Bytes = 3.2 MiB
   Load Address: 806aa000
   Entry Point:  806aa000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 92000000
   Booting using the fdt blob at 0x92000000
Working FDT set to 92000000
   Loading Kernel Image to 806aa000
Bad Linux ARM64 Image magic!
Failed to prep arm64 kernel (err=1)
Res

Arguably, this has been a bug all along. I'm not too sure what the appropriate value is instead, though.

https://github.com/seL4/seL4_tools/blob/be89b58eefb14d57ce45a6ed7a984675ed24c2e1/cmake-tool/helpers/make-uimage#L122-L123

¹ Specifically, this commit: https://github.com/u-boot/u-boot/commit/bb07cdb19194bd141f7c3c631eddd4bfaf651e4d

midnightveil avatar Jun 04 '25 04:06 midnightveil

Could try qnx instead of linux, or not use legacy bootm any more.

Indanz avatar Jun 04 '25 10:06 Indanz