further work in progress

This commit is contained in:
2025-04-18 12:39:26 +02:00
parent f9a590a5a0
commit 442f0de5fd
8 changed files with 66 additions and 42 deletions
+1 -1
View File
@@ -1 +1 @@
console=ttyS0,115200 rootwait
console=ttyAMA1,115200 rootwait
+3 -3
View File
@@ -3,9 +3,8 @@ arm_64bit=1
# configure the uart
enable_uart=1
dtoverlay=disable-bt
core_freq=250
init_uart_clock=48000000
init_uart_baud=115200
uart_2ndstage=1
# Disable HDMI to reduce noise
@@ -19,6 +18,7 @@ gpu_mem=32
# start the bootloader which then selects system A or B
kernel=u-boot.bin
# dt overlays
# dt overlays Note: dt overlays must also be added in genimage-raspberrypi3_swupdate.cfg
dtdebug=1
dtoverlay=disable-bt
#dtoverlay=disable-wifi
@@ -0,0 +1,8 @@
# Disable kernel tracing and function tracing to avoid boot panic on RPi3 aarch64
CONFIG_FTRACE=n
CONFIG_FUNCTION_TRACER=n
CONFIG_DYNAMIC_FTRACE=n
CONFIG_FUNCTION_GRAPH_TRACER=n
CONFIG_STACK_TRACER=n
CONFIG_BRANCH_PROFILE_NONE=n
CONFIG_KPROBES=n
@@ -14,8 +14,8 @@ image boot.vfat {
file uboot.env {
image = "uboot-env.img"
}
file overlays/README {
image = "rpi-firmware/overlays/README"
file overlays/disable-bt.dtbo {
image = "rpi-firmware/overlays/disable-bt.dtbo"
}
file bootcode.bin {
image = "rpi-firmware/bootcode.bin"
@@ -0,0 +1 @@
/lib/systemd/system/getty@.service
+8 -30
View File
@@ -2,38 +2,16 @@
# Default variables for first boot - these will be modified during operation
# Active partition (A or B)
kernel_addr_r=0x01000000
fdt_addr_r=0x03000000
active_part=A
active_root=/dev/mmcblk0p2
inactive_part=B
inactive_root=/dev/mmcblk0p3
# Boot attempt counters
bootcount=0
bootlimit=3
# Default bootcmd
bootcmd=run bootcmd_${active_part}
# Kernel boot arguments
bootargs=console=ttyS0,115200 root=${active_root} rootwait
# Commands for booting from A or B partitions
bootcmd_A=setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait; load mmc 0:1 ${kernel_addr_r} Image; load mmc 0:1 0x03000000 bcm2710-rpi-3-b.dtb; booti ${kernel_addr_r} - 0x03000000
bootcmd_B=setenv bootargs console=ttyS0,115200 root=/dev/mmcblk0p3 rootwait; load mmc 0:1 ${kernel_addr_r} Image; load mmc 0:1 0x03000000 bcm2710-rpi-3-b.dtb; booti ${kernel_addr_r} - 0x03000000
# Fallback logic for failed boots
altbootcmd=if test ${active_part} = A; then setenv active_part B; setenv active_root /dev/mmcblk0p3; setenv inactive_part A; setenv inactive_root /dev/mmcblk0p2; else setenv active_part A; setenv active_root /dev/mmcblk0p2; setenv inactive_part B; setenv inactive_root /dev/mmcblk0p3; fi; setenv bootcount 0; saveenv; run bootcmd
# Memory addresses
kernel_addr_r=0x01000000
fdt_addr_r=0x02000000
fdt_addr_r=0x03000000
# Board name
board_name=rpi3
# Always boot partition A using PL011 UART for console and earlycon
bootcmd=setenv bootargs console=ttyAMA1,115200 earlycon=pl011,0x3f201000,115200 root=/dev/mmcblk0p2 rootwait net.ifnames=0; \
load mmc 0:1 ${kernel_addr_r} Image; \
load mmc 0:1 ${fdt_addr_r} bcm2710-rpi-3-b.dtb; \
booti ${kernel_addr_r} - ${fdt_addr_r}
# Network configuration (DHCP)
autoload=no
ethact=smi
ethaddr_sdio0=00:44:55:66:77:88
# No network, no A/B switching, no fallback logic
# Only the essential commands are included for clarity