[PATCH v3 2/5] rpi: Set bootm_size to 512MB
Simon Glass
sjg at chromium.org
Mon Dec 16 16:16:59 CET 2024
Hi Peter,
On Wed, 11 Dec 2024 at 10:26, Simon Glass <sjg at chromium.org> wrote:
>
> Hi Peter,
>
> On Wed, 11 Dec 2024 at 09:27, Peter Robinson <pbrobinson at gmail.com> wrote:
> >
> >
> >
> > On Mon, 9 Dec 2024 at 19:55, Simon Glass <sjg at chromium.org> wrote:
> >>
> >> Set this option so that all boot images stay within the bottom 512MB of
> >> memory. This should allow us to drop the fdt_high and initrd_high
> >> options.
> >
> >
> > How does this work for a device with < 256Mb of RAM? There's a number of the original RPi series that have 256Mb of RAM and that equates to less than that due to reservations for the vendor firmware.
>
> Looking at boot_relocate_fdt(), this is just a maximum, and lmb is
> used to allocate the FDT / cmdline. So this patch shouldn't affect
> that.
>
> But the later patch to move the ramdisk up will cause problems. Based
> on the comment, a 256MB (I assume you mean) device can have as little
> as 64MB of RAM available to the ARM core, which is not enough to load
> a ramdisk from the new start-address of about 90MB.
>
> I found an old rpi1 which I could hook up to my lab, perhaps. Could
> you point me to a distro-image that boots OK on that, ideally with
> only 64MB available?
Well I set it up with Raspbian. It seems to boot OK into the kernel.
But unfortunately I only have a 512MB device.
"When I were a lad, we had hard drives of 20MB and were grateful for it!"
>
> >
> >>
> >> Signed-off-by: Simon Glass <sjg at chromium.org>
> >> Reviewed-by: Tom Rini <trini at konsulko.com>
> >> Suggested-by: Tom Rini <trini at konsulko.com>
> >> ---
> >>
> >> Changes in v3:
> >> - Add to the existing comment block
> >>
> >> Changes in v2:
> >> - Add new patch to set bootm_size
> >>
> >> board/raspberrypi/rpi/rpi.env | 5 +++++
> >> 1 file changed, 5 insertions(+)
> >>
> >> diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env
> >> index 30228285edd..a327fccc77f 100644
> >> --- a/board/raspberrypi/rpi/rpi.env
> >> +++ b/board/raspberrypi/rpi/rpi.env
> >> @@ -60,7 +60,12 @@ dfu_alt_info+=zImage fat 0 1
> >> * Even with the smallest possible CPU-GPU memory split of the CPU getting
> >> * only 64M, the remaining 25M starting at 0x02700000 should allow quite
> >> * large initrds before they start colliding with U-Boot.
> >> + *
> >> + * Limit bootm_size to 512MB so that all boot images stay within the bottom
> >> + * 512MB of memory
> >> */
> >> +bootm_size=0x20000000
> >> +
> >> #ifdef CONFIG_ARM64
> >> fdt_high=ffffffffffffffff
> >> initrd_high=ffffffffffffffff
> >> --
> >> 2.34.1
> >>
Regards,
Simon
More information about the U-Boot
mailing list