uboot-wandboard.install 646 B

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