Skip to content

Commit 063c641

Browse files
rpardiniigorpecovnik
authored andcommitted
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
1 parent 230f937 commit 063c641

1 file changed

Lines changed: 27 additions & 12 deletions

File tree

config/bootscripts/boot-genio.cmd

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,35 @@ setenv rootfstype "ext4"
1313
setenv docker_optimizations "on"
1414
setenv earlycon "off"
1515

16-
# Set load address for temporary file loading (armbianEnv.txt, overlays, etc)
17-
# Using address that doesn't conflict with kernel (0x45000000) Note: on Arm64 it has to be 2mb aligned
18-
# Ramdisk (0x49000000),
19-
# or fdt (0x44000000)
16+
# U-Boot memory layout
17+
# ATTENTION: all hex references have to be quoted, even in comments, otherwise mkimage produces invalid .scr
18+
# Note: on arm64 must be 2mb aligned
19+
# Reserved areas:
20+
# low RAM "0x43200000" "0x43DFFFFF"
21+
# mid RAM "0x54600000" "0x547FFFFF"
22+
# mid RAM "0x60000000" "0x61FFFFFF"
23+
# Thus addresses using estimated max sizes
24+
25+
# Script/load address (boot scripts, small)
26+
# "0x43000000" = 1,116,277,120 bytes = ~1 MB
27+
# Important: the u-boot standard is "loadaddr" (CONFIG_SYS_TEXT_BASE=="0x4c000000"), "not load_addr" - used specifically on below script
2028
setenv load_addr "0x43000000"
2129

22-
# Move ramdisk further away to avoid kernel overwrite (176MB space for kernel)
23-
setenv ramdisk_addr_r "0x50000000"
30+
# FDT address (device tree, small)
31+
# "0x56000000" = 1,436,207,360 bytes = ~2 MB
32+
setenv fdt_addr_r "0x56000000"
33+
34+
# Kernel load address (100 MB)
35+
# "0x40000000" - "0x46400000"
36+
# 1,073,741,824 - 1,173,637,760 bytes = 100 MB
37+
setenv kernel_addr_r "0x40000000"
38+
39+
# Initramfs load address (500 MB)
40+
# "0x64000000" - "0x83800000"
41+
# 1,677,721,600 - 2,177,441,600 bytes = 500 MB
42+
# Positioned in high RAM to avoid reserved hole
43+
setenv ramdisk_addr_r "0x64000000"
44+
2445

2546
test -n "${distro_bootpart}" || distro_bootpart=1
2647

@@ -57,12 +78,6 @@ fi
5778

5879
echo "Final rootdev: ${rootdev}"
5980

60-
if test "${bootlogo}" = "true" ; then
61-
setenv consoleargs "splash plymouth.ignore-serial-consoles ${consoleargs}"
62-
else
63-
setenv consoleargs "splash=verbose ${consoleargs}"
64-
fi
65-
6681
if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi
6782
if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "console=ttyS0,921600 ${consoleargs}"; fi
6883
if test "${earlycon}" = "on"; then setenv consoleargs "earlycon ${consoleargs}"; fi

0 commit comments

Comments
 (0)