PKGBUILDs/alarm/uboot-odroid-c1/uboot-odroid-c1.install

33 lines
731 B
Plaintext
Raw Permalink Normal View History

2014-12-31 01:05:05 +00:00
sd_fuse() {
if [ ! -b /dev/mmcblk0 ]; then
echo "No MMC device to flash, exiting."
exit 0
fi
echo "BL1 fusing"
dd if=/boot/bl1.bin.hardkernel of=/dev/mmcblk0 bs=1 count=442
dd if=/boot/bl1.bin.hardkernel of=/dev/mmcblk0 bs=512 skip=1 seek=1
echo "u-boot fusing"
dd if=/boot/u-boot.bin of=/dev/mmcblk0 bs=512 seek=64
}
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
sd_fuse
else
echo "You can do this later by running:"
echo "# cd /boot; ./sd_fusing.sh /dev/mmcblk0"
fi
}
post_install() {
flash_uboot
}
post_upgrade() {
flash_uboot
}