From 063c641686267fac9d2cbbbdeed62cca30a9db54 Mon Sep 17 00:00:00 2001 From: Ricardo Pardini Date: Sun, 4 Jan 2026 23:32:48 +0100 Subject: [PATCH] genio: bootscript: boot-genio: rework addr's so can boot large initrd's - desktop images have half the world in their initrd (plymouth?) - `bdinfo` shows reserved regions, which are hit depending on the size of initrd - when reserved region is hit, u-boot says `** Reading file would overwrite reserved memory **` - done by AI after looking at `bdinfo` reserved regions - hard lesson: all `0x` hex have to be double quoted, otherwise `Wrong image format for "source" command` - add note about Meco having conjured up `load_addr` (it's `loadaddr`); doesn't hurt - while at it, remove copypasta/duplicate bootlogo/consoleargs stanza --- config/bootscripts/boot-genio.cmd | 39 +++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 12 deletions(-) diff --git a/config/bootscripts/boot-genio.cmd b/config/bootscripts/boot-genio.cmd index fbd05dcaf7..0296e3b84a 100644 --- a/config/bootscripts/boot-genio.cmd +++ b/config/bootscripts/boot-genio.cmd @@ -13,14 +13,35 @@ setenv rootfstype "ext4" setenv docker_optimizations "on" setenv earlycon "off" -# Set load address for temporary file loading (armbianEnv.txt, overlays, etc) -# Using address that doesn't conflict with kernel (0x45000000) Note: on Arm64 it has to be 2mb aligned -# Ramdisk (0x49000000), -# or fdt (0x44000000) +# U-Boot memory layout +# ATTENTION: all hex references have to be quoted, even in comments, otherwise mkimage produces invalid .scr +# Note: on arm64 must be 2mb aligned +# Reserved areas: +# low RAM "0x43200000" "0x43DFFFFF" +# mid RAM "0x54600000" "0x547FFFFF" +# mid RAM "0x60000000" "0x61FFFFFF" +# Thus addresses using estimated max sizes + +# Script/load address (boot scripts, small) +# "0x43000000" = 1,116,277,120 bytes = ~1 MB +# Important: the u-boot standard is "loadaddr" (CONFIG_SYS_TEXT_BASE=="0x4c000000"), "not load_addr" - used specifically on below script setenv load_addr "0x43000000" -# Move ramdisk further away to avoid kernel overwrite (176MB space for kernel) -setenv ramdisk_addr_r "0x50000000" +# FDT address (device tree, small) +# "0x56000000" = 1,436,207,360 bytes = ~2 MB +setenv fdt_addr_r "0x56000000" + +# Kernel load address (100 MB) +# "0x40000000" - "0x46400000" +# 1,073,741,824 - 1,173,637,760 bytes = 100 MB +setenv kernel_addr_r "0x40000000" + +# Initramfs load address (500 MB) +# "0x64000000" - "0x83800000" +# 1,677,721,600 - 2,177,441,600 bytes = 500 MB +# Positioned in high RAM to avoid reserved hole +setenv ramdisk_addr_r "0x64000000" + test -n "${distro_bootpart}" || distro_bootpart=1 @@ -57,12 +78,6 @@ fi echo "Final rootdev: ${rootdev}" -if test "${bootlogo}" = "true" ; then - setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}" -else - setenv consoleargs "splash=verbose ${consoleargs}" -fi - if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS0,921600 ${consoleargs}"; fi if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi