2013-11-23 03:57:53 +00:00
|
|
|
flash_uboot() {
|
|
|
|
echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0."
|
|
|
|
echo "Do you want to do this now? [y|N]"
|
|
|
|
read -r shouldwe
|
|
|
|
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
|
2016-09-24 21:20:31 +00:00
|
|
|
dd if=/boot/SPL of=/dev/mmcblk0 seek=1 bs=1k
|
|
|
|
dd if=/boot/u-boot.img of=/dev/mmcblk0 seek=69 bs=1k
|
2013-11-23 03:57:53 +00:00
|
|
|
sync
|
|
|
|
else
|
|
|
|
echo "You can do this later by running:"
|
2016-09-24 21:20:31 +00:00
|
|
|
echo "# dd if=/boot/SPL of=/dev/mmcblk0 seek=1 bs=1k"
|
|
|
|
echo "# dd if=/boot/u-boot.img of=/dev/mmcblk0 seek=69 bs=1k"
|
2013-11-23 03:57:53 +00:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
post_install() {
|
|
|
|
flash_uboot
|
|
|
|
}
|
|
|
|
|
|
|
|
post_upgrade() {
|
|
|
|
flash_uboot
|
|
|
|
}
|