[U-Boot] uImage load address and entry point with Minnowboard

vinoth eswaran evinoth1206 at gmail.com
Thu Jun 23 08:58:12 CEST 2016


Dear Mr.Wolfgang Denk,


On Wed, Jun 22, 2016 at 8:41 PM, Wolfgang Denk <wd at denx.de> wrote:
> Dear vinoth,
>
> In message <CAJst-kGL+cNWys125Y9Xtj=XZvRhStdjnG7cfKMgiQN7dR5=jQ at mail.gmail.com> you wrote:
>>
>> I tried creating the uImage from the vmlinux --but I did not
>> understand what does the -a (load address) and -e (entry point )
>> points to? I assume that it is the same load address used when loading
>> the kernel image from sd card to RAM.
>
> No, it is not.
>
> There are actually two "load addresses". Uusally I prefer to call the
> first the "download address": this is the address in memory space
> where you download the uImage file to, i. e. the first address of the
> uImage file in the system memory (RAM or parallel NOR flash etc.).
>
> The payload of the uImage is often a _compressed_ kernel image.  To
> boot it, U-Boot will have to uncompress and _load_ it to some other
> address in RAM.  This is the "load address", given by the "-a" option
> to mkimage.  Afther that, you have the uncompressed, executable kerl
> image sitting in RAM, starting at the "load address" - but this is not
> necessarily the same as the entry point address - the latter is given
> by the "-e" argument.

Thanks for your explanation. But I still have some questions , sorry
if it is naive:

1) What's the address in the bootcmd corresponds to , I think it is
the address where we want the u-boot to load the Linux kernel image
into RAM

For ex: fatload mmc 0:1 01000000 bzImage; zboot 01000000

Here 01000000 is the address and bzImage is the compressed Linux
kernel stored in mmc0 partition1. Once the Kernel is copied to RAM we
are using zboot command to start the kernel, so after it Kernel
unpacks itself and starts running

2) I want to use uncompressed Kernel(vmlinux) instead of bzImage.
U-boot directly doesn't support running vmlinux, so I need to generate
the uImage using the mkImage tool. So the payload in my case in
uncompressed kernel.  To generate this I want two addresses , load
address and entry point address. You have mentioned that the addresses
are often fixed. How can I get these addresses?

I am using the same address in bootcmd: fatload mmc 0:1 01000000
uImage; bootm 01000000


> While you can download and store the uImage file at an arbitrary
> address in memory, the addresses for the executable (uncompressed)
> image and for the entry point are often fixed - this is why they re
> registered in the uImage file.
>
>
> Note that because you usually uncompress and load (copy) the image to
> the load address, you must not download the uImage to the load
> address; this will usually result in memory corruptuin and boot
> failure.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
> Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
> There is nothing in this world constant but inconstancy.      - Swift


More information about the U-Boot mailing list