uboot-usbarmory.install 617 B

1234567891011121314151617181920212223
  1. flash_uboot() {
  2. echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0."
  3. echo "Do this now? [y|N]"
  4. read -r shouldwe
  5. if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
  6. dd if=/boot/uboot-usbarmory-linux-libre/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2 conv=fsync
  7. else
  8. echo "You can do this later by running:"
  9. echo "# dd if=/boot/uboot-usbarmory-linux-libre/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2 conv=fsync"
  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. }