[U-Boot] start address loading initrd in ram on arm
Joren Bultheel
joren.bultheel at esaturnus.com
Thu Feb 27 17:49:47 CET 2014
Thank you!
So in my situation; after loading the kernel in ram, I know where to load
my initrd image:
U-Boot > printenv boot_dev
boot_dev=mmc dev 2; ext2load mmc 2:1 0x10800000 /boot/uImage
U-Boot > run boot_dev
mmc2(part 0) is current device
Loading file "/boot/uImage" from mmc device 2:1 (xxc1)
4284096 bytes read
U-Boot > bdi
arch_number = 0x00001194
env_t = 0x00000000
boot_params = 0x10000100
DRAM bank = 0x00000000
-> start = 0x10000000
-> size = 0x80000000
This means that I can only use the address range between 0x10000000 and
0x80000000
Since the kernel is loaded at address 0x10800000 with size 4284096 bytes
(415ec0 in hex), I can start loading my initrd at address (0x10800000 +
415ec0 = ) 0x10c15ec0
The initrd size = 27237386 bytes but this does not matter here, I give this
size as a kernel argument.
I tested this and it works fine on my ARM machine.
On Thu, Feb 27, 2014 at 3:30 PM, Tom Rini <trini at ti.com> wrote:
> On Thu, Feb 27, 2014 at 11:50:33AM +0100, Joren Bultheel wrote:
>
> > Which address should I give when loading an initrd into ram using U-boot
> on
> > an arm-based architecture?
> > How can I find out?
> >
> > I have found many google hits where people are loading initrd files in
> ram
> > but they use always another target ram address.
> > It is never explained why they use 0x70000000 or 0x01200000 or ...
> >
> > In my case 0x70000000 does work finally, but I can not figure out why
> > 0x40000000 did not.
>
> Well, it depends on your platform as system ram starts in different
> locations on different platforms. For example:
> U-Boot# bdi
> arch_number = 0x00000E05
> boot_params = 0x80000100
> DRAM bank = 0x00000000
> -> start = 0x80000000
> -> size = 0x40000000
> ...
>
> And you also need to keep in mind where you load your kernel into memory
> and how big it is.
>
> --
> Tom
>
--
Joren Bultheel
Software Engineer
eSATURNUS
T. +32 16 40 12 82
www.esaturnus.com
More information about the U-Boot
mailing list