From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] start address loading initrd in ram on arm
Date: Thu, 27 Feb 2014 12:08:00 -0500 [thread overview]
Message-ID: <20140227170800.GN16805@bill-the-cat> (raw)
In-Reply-To: <CAEk_DrNJmAkJMNC75AfAkvcA=D4D-Npv43Em+2rgzBNgH7kCyg@mail.gmail.com>
On Thu, Feb 27, 2014 at 05:49:47PM +0100, Joren Bultheel wrote:
> 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.
Please note that while this may work, it's cutting it relatively close.
The zImage when run will decompress the kernel to near 0x10000000 and
you've not given yourself all that much room for the BSS and so forth
and may run into problems with slightly larger kernels. For saftey,
since you have so much DDR you may wish to place the initrd at more like
0x18800000 or simply 0x18000000 as the kernel should not be higher than
the first 128MB but the initrd can be. Documentation/arm/Booting in the
kernel has more details about where things may and may not reside.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140227/e6215288/attachment.pgp>
next prev parent reply other threads:[~2014-02-27 17:08 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 10:50 [U-Boot] start address loading initrd in ram on arm Joren Bultheel
2014-02-27 14:30 ` Tom Rini
2014-02-27 16:49 ` Joren Bultheel
2014-02-27 17:08 ` Tom Rini [this message]
2014-02-27 19:29 ` Joren Bultheel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140227170800.GN16805@bill-the-cat \
--to=trini@ti.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox