uboot-sunxi.install 586 B

1234567891011121314151617181920212223
  1. flash_uboot() {
  2. echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0."
  3. echo "Do you want to do this now? [y|N]"
  4. read -r shouldwe
  5. if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
  6. dd if=/boot/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8
  7. else
  8. echo "You can do this later by running:"
  9. echo "# dd if=/boot/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8"
  10. fi
  11. }
  12. ## arg 1: the new package version
  13. post_install() {
  14. flash_uboot
  15. }
  16. ## arg 1: the new package version
  17. ## arg 2: the old package version
  18. post_upgrade() {
  19. flash_uboot
  20. }