uboot-mx6_cubox-i.install 777 B

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