uboot4extlinux-udoo.install 694 B

12345678910111213141516171819202122232425262728
  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 you want to 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. sync
  12. else
  13. echo "You can do this later by running:"
  14. echo "# dd if=/boot/SPL of=/dev/mmcblk0 seek=1 bs=1k"
  15. echo "# dd if=/boot/u-boot.img of=/dev/mmcblk0 seek=69 bs=1k"
  16. fi
  17. extlinux_warning
  18. }
  19. post_install() {
  20. flash_uboot
  21. }
  22. post_upgrade() {
  23. flash_uboot
  24. }