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:
Stefan Agner 2021-12-29 15:19:31 +01:00 committed by GitHub
parent 5d2154cc97
commit abfee18363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -79,6 +79,14 @@ if [ "${RAUC_SLOT_CLASS}" = "spl" ]; then
dd if="${RAUC_IMAGE_NAME}" of="${DEVICE_ROOT}" conv=notrunc ${FLAGS} bs=1 count=440
dd if="${RAUC_IMAGE_NAME}" of="${DEVICE_ROOT}" conv=notrunc ${FLAGS} 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
##