secubox-deb/board/espressobin-ultra/boot.cmd
CyberMind-FR 39667e41bc fix: ESPRESSObin v7 eMMC boot - DTB, root device, mv88e6xxx blacklist
- Use armada-3720-espressobin-v7-emmc.dtb to enable both SDHCI controllers
- Fix root device: /dev/mmcblk1p2 (eMMC is mmc1 with dual controller DTB)
- Add modprobe.blacklist=mv88e6xxx,dsa_core to prevent DSA probe loop
- Add sdhci.debug_quirks2=0x40 to fix xenon-sdhci DDR timing issues
- Add initramfs hooks for sdhci-xenon and mv88e6xxx blacklist
- Add systemd service to load mv88e6xxx after rootfs mount
- Fix fstab tmpfs mount (remove non-existent user reference)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-04-06 18:07:30 +02:00

54 lines
1.8 KiB
Batchfile

# SecuBox U-Boot boot script for ESPRESSObin Ultra
# Marvell Armada 3720 with 88E6341 DSA switch + eMMC
# Compile with: mkimage -C none -A arm64 -T script -d boot.cmd boot.scr
echo "============================================"
echo "SecuBox ESPRESSObin Ultra Boot"
echo "============================================"
# Detect boot device
if test -n "${devtype}" -a -n "${devnum}"; then
echo "Boot device from env: ${devtype} ${devnum}"
setenv bootdev "${devnum}"
else
echo "Probing boot devices..."
# ESPRESSObin Ultra: U-Boot eMMC = mmc1, Linux eMMC = mmcblk0
setenv bootdev 1
echo "Using mmc 1 (eMMC in U-Boot)"
fi
setenv bootpart "mmc ${bootdev}:1"
# IMPORTANT: Linux sees eMMC as mmcblk0 even though U-Boot sees it as mmc1
setenv rootpart "/dev/mmcblk0p2"
echo "Boot partition: ${bootpart}"
echo "Root partition: ${rootpart}"
# Load kernel
echo "Loading kernel..."
load ${bootpart} ${kernel_addr_r} Image
# Load DTB
echo "Loading device tree..."
# Try espressobin-ultra first, then v7-emmc as fallback
if load ${bootpart} ${fdt_addr_r} dtbs/marvell/armada-3720-espressobin-ultra.dtb; then
echo "DTB: espressobin-ultra"
elif load ${bootpart} ${fdt_addr_r} dtbs/marvell/armada-3720-espressobin-v7-emmc.dtb; then
echo "DTB: espressobin-v7-emmc (fallback)"
else
echo "DTB: trying espressobin-emmc..."
load ${bootpart} ${fdt_addr_r} dtbs/marvell/armada-3720-espressobin-emmc.dtb
fi
# Set boot args
# rootdelay=5: give storage time to settle
# mv88e6xxx.defer_ms=5000: delay DSA switch probe to prevent boot loop
setenv bootargs "root=${rootpart} rootfstype=ext4 rootwait rootdelay=5 console=ttyMV0,115200 net.ifnames=0 mv88e6xxx.defer_ms=5000"
echo "Boot args: ${bootargs}"
echo "============================================"
echo "Booting SecuBox..."
echo "============================================"
booti ${kernel_addr_r} - ${fdt_addr_r}