installer: select the fw_env config the way ffboot does

Newer factory firmware's generic /etc/fw_env.config points at the
wrong device; its per-device /etc/fw_env_mmcblk2.config is the correct
one for the eMMC environment. The read-back verify caught the failed
write and aborted before the flip, as designed.
This commit is contained in:
ScottW514
2026-08-08 12:55:13 -04:00
parent 39a973df02
commit 63792a8ed2
+8 -1
View File
@@ -99,7 +99,14 @@ slot_probe () {
# Verified atomic env flip (all four variables, classic u-boot-tools script # Verified atomic env flip (all four variables, classic u-boot-tools script
# format first - that is what factory firmware ships - then libubootenv # format first - that is what factory firmware ships - then libubootenv
# format, then per-variable writes; read-back verified in every case). # format, then per-variable writes; read-back verified in every case).
FWCONFIG="/etc/fw_env.config" # Config selection matches ffboot: newer factory firmware's generic
# fw_env.config points at the wrong device; its per-device
# fw_env_mmcblk2.config is the correct one for the eMMC environment.
if [ -f "/etc/fw_env_mmcblk2.config" ] && [ ! -d "/factory" ]; then
FWCONFIG="/etc/fw_env_mmcblk2.config"
else
FWCONFIG="/etc/fw_env.config"
fi
env_get () { fw_printenv -c "$FWCONFIG" -n "$1" 2>/dev/null; } env_get () { fw_printenv -c "$FWCONFIG" -n "$1" 2>/dev/null; }