uboot-udoo.install 563 B

123456789101112131415161718192021222324
  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.imx of=/dev/mmcblk0 bs=512 seek=2
  7. sync
  8. else
  9. echo "You can do this later by running:"
  10. echo "# dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2"
  11. fi
  12. }
  13. ## arg 1: the new package version
  14. post_install() {
  15. flash_uboot
  16. }
  17. ## arg 1: the new package version
  18. ## arg 2: the old package version
  19. post_upgrade() {
  20. flash_uboot
  21. }