diff --git a/config/sources/odroidxu4.conf b/config/sources/odroidxu4.conf index b603ffb2f..542465196 100644 --- a/config/sources/odroidxu4.conf +++ b/config/sources/odroidxu4.conf @@ -39,6 +39,19 @@ GOVERNOR=ondemand SERIALCON=ttySAC2 +setup_write_uboot_platform() +{ + # this will update u-boot on the device rootfs is located on + # in case it's a mmc device, otherwise DEVICE will not be changed + # and will default to /dev/mmcblk0 + local tmp=$(cat /proc/cmdline) + tmp="${tmp##*root=}" + tmp="${tmp%% *}" + [[ -n $tmp ]] && local part=$(findfs $tmp 2>/dev/null) + [[ -n $part ]] && local dev=$(lsblk -n -o PKNAME $part 2>/dev/null) + [[ -n $dev && $dev == mmcblk* ]] && DEVICE="/dev/${dev}" +} + write_uboot_platform() { # handle writing to eMMC on package upgrades