mirror of
https://github.com/home-assistant/operating-system.git
synced 2025-07-27 23:16:31 +00:00
ODROID XU4: Update U-Boot on eMMC boot partition (#1699)
* ODROID XU4: Update U-Boot on eMMC boot partition Update the U-Boot on the eMMC boot partition if present. Only write the first megabyte as the eMMC boot partition might be smaller than the SPL image and only the first megabyte is occupied by FW/BL1/BL2/TZSW (see https://wiki.odroid.com/odroid-xu4/software/partition_table#tab__odroid-xu341).
This commit is contained in:
parent
0d52944262
commit
4529d91e86
@ -72,6 +72,14 @@ if [ "${RAUC_SLOT_CLASS}" = "spl" ]; then
|
||||
dd if="${RAUC_IMAGE_NAME}" of="${DEVICE_ROOT}" conv=notrunc oflag=direct bs=1 count=440
|
||||
dd if="${RAUC_IMAGE_NAME}" of="${DEVICE_ROOT}" conv=notrunc oflag=direct bs=512 seek=1 skip=1
|
||||
fi
|
||||
|
||||
# Flash to eMMC boot partition if necessary
|
||||
if [ "$RAUC_SYSTEM_COMPATIBLE" = "haos-odroid-xu4" ] && [ -b "${DEVICE_ROOT}boot0" ]; then
|
||||
echo "Updating eMMC boot partition"
|
||||
echo 0 > /sys/block/"$(basename "${DEVICE_ROOT}boot0")"/force_ro
|
||||
dd if="${RAUC_IMAGE_NAME}" of="${DEVICE_ROOT}boot0" conv=notrunc ${FLAGS} bs=512 skip=1 count=2047
|
||||
echo 1 > /sys/block/"$(basename "${DEVICE_ROOT}boot0")"/force_ro
|
||||
fi
|
||||
fi
|
||||
|
||||
##
|
||||
|
Loading…
x
Reference in New Issue
Block a user