flash_uboot() { echo "A new U-Boot version needs to be flashed onto /dev/mmcblk1." echo "Do you want to do this now? [y|N]" read -r shouldwe if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then dd if=/boot/rksd_loader.img of=/dev/mmcblk1 seek=64 conv=notrunc dd if=/boot/u-boot.itb of=/dev/mmcblk1 seek=16384 conv=notrunc else echo "You can do this later by running:" echo "# dd if=/boot/rksd_loader.img of=/dev/mmcblk1 seek=64 conv=notrunc" echo "# dd if=/boot/u-boot.itb of=/dev/mmcblk1 seek=16384 conv=notrunc" fi } ## arg 1: the new package version post_install() { flash_uboot } ## arg 1: the new package version ## arg 2: the old package version post_upgrade() { flash_uboot } ##lsblk -dnpo name /dev/disk/by-partuuid/785dd377-de81-44f8-8cc9-0dcdc9a5c713