uboot4extlinux-wandboard.install 670 B

123456789101112131415161718192021222324252627
  1. extlinux_warning() {
  2. echo "==> WARNING: Remember to set up your kernels in /boot/extlinux/extlinux.conf"
  3. }
  4. flash_uboot() {
  5. echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0."
  6. echo "Do this now? [y|N]"
  7. read -r shouldwe
  8. if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then
  9. dd if=/boot/SPL of=/dev/mmcblk0 seek=1 bs=1k
  10. dd if=/boot/u-boot.img of=/dev/mmcblk0 seek=69 bs=1k
  11. else
  12. echo "You can do this later by running:"
  13. echo "# dd if=/boot/SPL of=/dev/mmcblk0 seek=1 bs=1k"
  14. echo "# dd if=/boot/u-boot.img of=/dev/mmcblk0 seek=69 bs=1k"
  15. fi
  16. extlinux_warning
  17. }
  18. post_install() {
  19. flash_uboot
  20. }
  21. post_upgrade() {
  22. flash_uboot
  23. }