0

I'm learning about u-boot. using qemu model, I could (using qemu) load the Image on memory location I want and I could run the kernel booting using booti addr command. As you know in arm64, there is no uImage.
Then, when building linux kernel for arm (32 bit), what does make LOADADDR=0x20008000 uImage mean? We could load (from SD card or network) the uImage anywhere we want using u-boot shell anyway. Then, Does it mean that when we run bootm command, the u-boot program relocates the kernel image inside the uImage to 0x20008000? It's hard to find these information.

1 Answer 1

0

The LOADADDR parameter is where the uImage payload itself is to be placed in memory. The zImage that is wrapped inside of it (typically) will then take care of relocating itself as needed.

3
  • Thanks, then does it mean that I have to load the uImage to that LOADADDR myself? What happens if I load uImage to a different address using tftp?
    – Chan Kim
    Oct 26, 2021 at 1:01
  • It's tricky, actually, as I recall it. The LOADADDR is for the contents. The uImage is a header + contents. So normally you would have say base of memory = 0x20000000, LOADADDR = 0x2008000 and tftp or whatever the file to 0x28000000 so that the contents can be easily moved to LOADADDR. This however is going to waste some number of milliseconds with the multiple memory moves. It it also typically not worth optimizing away, which is why it's done this way so often.
    – Tom Rini
    Oct 26, 2021 at 21:45
  • I see.. so the bootm command should do the trick in that case(tftp case). Thank you!
    – Chan Kim
    Oct 26, 2021 at 21:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .