PKGBUILDs/alarm/uboot-dragonboard410c/uboot-dragonboard410c.install

31 lines
704 B
Text
Raw Normal View History

2016-10-16 00:16:10 +00:00
flash_uboot() {
2017-01-15 23:56:28 +00:00
if [[ -e /dev/mmcblk0boot1 ]]; then
2017-03-26 21:44:57 +00:00
dev="/dev/mmcblk0"
2017-01-15 23:56:28 +00:00
else
2017-03-26 21:44:57 +00:00
dev="/dev/mmcblk1"
2017-01-15 23:56:28 +00:00
fi
echo "A new U-Boot version needs to be flashed onto ${dev}."
2016-10-16 00:16:10 +00:00
echo "Do you want to do this now? [y|N]"
read -r shouldwe
if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
2017-03-26 21:44:57 +00:00
dd if=/boot/NON-HLOS.bin of=${dev}p1
dd if=/boot/sbl1.mbn of=${dev}p2
dd if=/boot/rpm.mbn of=${dev}p3
dd if=/boot/tz.mbn of=${dev}p4
2017-03-26 21:44:57 +00:00
dd if=/boot/hyp.mbn of=${dev}p5
dd if=/boot/emmc_appsboot.mbn of=${dev}p7
dd if=/boot/u-boot.img of=${dev}p8
2016-10-16 00:16:10 +00:00
else
2017-03-26 21:44:57 +00:00
echo "You can do this later by reinstalling the package."
2016-10-16 00:16:10 +00:00
fi
}
post_install() {
flash_uboot
}
post_upgrade() {
flash_uboot
}