From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Stephen Warren <swarren@nvidia.com>,
Matthias Brugger <mbrugger@suse.com>,
Simon Glass <sjg@chromium.org>,
Peter Robinson <pbrobinson@gmail.com>
Subject: [PATCH v3 4/5] rpi: Update environment to support booti and large initrd
Date: Mon, 9 Dec 2024 12:55:26 -0700 [thread overview]
Message-ID: <20241209195528.730260-5-sjg@chromium.org> (raw)
In-Reply-To: <20241209195528.730260-1-sjg@chromium.org>
The existing values don't provide for decompressing an arm64 boot-image.
Add those values and move things apart a bit so that a 50MB kernel can be
accommodated.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v3:
- Update the comment block with the new values, including compression
board/raspberrypi/rpi/rpi.env | 27 ++++++++++++++++-----------
1 file changed, 16 insertions(+), 11 deletions(-)
diff --git a/board/raspberrypi/rpi/rpi.env b/board/raspberrypi/rpi/rpi.env
index 9b9fad82828..9ac9d6768ca 100644
--- a/board/raspberrypi/rpi/rpi.env
+++ b/board/raspberrypi/rpi/rpi.env
@@ -48,28 +48,33 @@ dfu_alt_info+=zImage fat 0 1
*
* scriptaddr and pxefile_addr_r can be pretty much anywhere that doesn't
* conflict with something else. Reserving 1M for each of them at
- * 0x02400000-0x02500000 and 0x02500000-0x02600000 should be plenty.
+ * 0x05400000-0x05500000 and 0x05500000-0x05600000 should be plenty.
*
* On ARM, both the DTB and any possible initrd must be loaded such that they
* fit inside the lowmem mapping in Linux. In practice, this usually means not
* more than ~700M away from the start of the kernel image but this number can
* be larger OR smaller depending on e.g. the 'vmalloc=xxxM' command line
* parameter given to the kernel. So reserving memory from low to high
- * satisfies this constraint again. Reserving 1M at 0x02600000-0x02700000 for
- * the DTB leaves rest of the free RAM to the initrd starting at 0x02700000.
- * 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.
+ * satisfies this constraint again. Reserving 1M at 0x05600000-0x05700000 for
+ * the DTB leaves rest of the free RAM to the initrd starting at 0x05700000.
+ * This means that the board must have at least 128MB of RAM available to
+ * U-Boot, more if the initrd is large.
*
- * Limit bootm_size to 512MB so that all boot images stay within the bottom
+ * For compressed kernels, the maximum size is just under 32MB, with an area for
+ * decompression at 0x02000000 with space for 52MB, which is plenty for current
+ * kernels.
+ *
+ * limit bootm_size to 512MB so that all boot images stay within the bottom
* 512MB of memory
*/
bootm_size=0x20000000
kernel_addr_r=0x00080000
-scriptaddr=0x02400000
-pxefile_addr_r=0x02500000
-fdt_addr_r=0x02600000
-ramdisk_addr_r=0x02700000
+kernel_comp_addr_r=0x02000000
+kernel_comp_size=0x03400000
+scriptaddr=0x05400000
+pxefile_addr_r=0x05500000
+fdt_addr_r=0x05600000
+ramdisk_addr_r=0x05700000
boot_targets=mmc usb pxe dhcp
--
2.34.1
next prev parent reply other threads:[~2024-12-09 19:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 19:55 [PATCH v3 0/5] rpi: Tidy up booting Simon Glass
2024-12-09 19:55 ` [PATCH v3 1/5] rpi: Add myself to the list of maintainers Simon Glass
2024-12-09 23:02 ` Peter Robinson
2024-12-09 19:55 ` [PATCH v3 2/5] rpi: Set bootm_size to 512MB Simon Glass
2024-12-10 11:16 ` Jaehoon Chung
2024-12-11 16:27 ` Peter Robinson
2024-12-11 16:57 ` Tom Rini
2024-12-11 17:26 ` Simon Glass
2024-12-16 15:16 ` Simon Glass
2024-12-09 19:55 ` [PATCH v3 3/5] rpi: Drop fdt_high and initrd_high Simon Glass
2024-12-10 11:16 ` Jaehoon Chung
2024-12-09 19:55 ` Simon Glass [this message]
2024-12-10 11:17 ` [PATCH v3 4/5] rpi: Update environment to support booti and large initrd Jaehoon Chung
2024-12-09 19:55 ` [PATCH v3 5/5] rpi: Use the U-Boot control FDT for fdt_addr Simon Glass
2024-12-10 11:17 ` Jaehoon Chung
2024-12-11 16:36 ` Peter Robinson
2024-12-16 0:27 ` Simon Glass
2024-12-18 16:26 ` Peter Robinson
2025-01-09 15:07 ` Simon Glass
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=20241209195528.730260-5-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=mbrugger@suse.com \
--cc=pbrobinson@gmail.com \
--cc=swarren@nvidia.com \
--cc=swarren@wwwdotorg.org \
--cc=trini@konsulko.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