PKGBUILDs/alarm/uboot-macchiatobin/uboot-macchiatobin.install

21 lines
434 B
Text
Raw Normal View History

2018-04-03 00:27:04 +00:00
flash_uboot() {
dev="/dev/mmcblk1"
echo "A new U-Boot version needs to be flashed onto ${dev}."
echo "Do you want to do this now? [y|N]"
read -r shouldwe
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
dd if=/boot/flash-image.bin of=${dev} seek=4096 conv=fdatasync,notrunc
else
echo "You can do this later by reinstalling the package."
fi
}
post_install() {
flash_uboot
}
post_upgrade() {
flash_uboot
}