mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
20 lines
434 B
Text
20 lines
434 B
Text
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
|
|
}
|