uboot-omap4_panda.install 631 B

12345678910111213141516171819202122
  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/MLO of=/dev/mmcblk0 count=1 seek=1 conv=notrunc bs=128k
  7. dd if=/boot/u-boot.img of=/dev/mmcblk0 count=2 seek=1 conv=notrunc bs=384k
  8. else
  9. echo "You can do this later by running:"
  10. echo "# dd if=/boot/MLO of=/dev/mmcblk0 count=1 seek=1 conv=notrunc bs=128k"
  11. echo "# dd if=/boot/u-boot.img of=/dev/mmcblk0 count=2 seek=1 conv=notrunc bs=384k"
  12. fi
  13. }
  14. post_install() {
  15. flash_uboot
  16. }
  17. post_upgrade() {
  18. flash_uboot
  19. }