mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
21 lines
434 B
Text
21 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
|
||
|
}
|