From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Thu, 27 Feb 2014 12:08:00 -0500 Subject: [U-Boot] start address loading initrd in ram on arm In-Reply-To: References: <20140227143028.GK16805@bill-the-cat> Message-ID: <20140227170800.GN16805@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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: