mirror of
https://github.com/openglow-org/forgefirm.git
synced 2026-09-28 01:01:12 -07:00
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:
@@ -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; }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user