From 91aff038958f833a3aacbf2e98e6abc684611e3b Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Mon, 5 Oct 2015 06:47:43 -0300 Subject: uboot-usbarmory-linux-libre: add new package to [libre] --- .../uboot-usbarmory-linux-libre.install | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 libre/uboot-usbarmory-linux-libre/uboot-usbarmory-linux-libre.install (limited to 'libre/uboot-usbarmory-linux-libre/uboot-usbarmory-linux-libre.install') diff --git a/libre/uboot-usbarmory-linux-libre/uboot-usbarmory-linux-libre.install b/libre/uboot-usbarmory-linux-libre/uboot-usbarmory-linux-libre.install new file mode 100644 index 000000000..6c0ddcf9e --- /dev/null +++ b/libre/uboot-usbarmory-linux-libre/uboot-usbarmory-linux-libre.install @@ -0,0 +1,22 @@ +flash_uboot() { + echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0." + echo "Do this now? [y|N]" + read -r shouldwe + if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then + dd if=/boot/uboot-usbarmory-linux-libre/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2 conv=fsync + else + echo "You can do this later by running:" + echo "# dd if=/boot/uboot-usbarmory-linux-libre/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2 conv=fsync" + fi +} + +## arg 1: the new package version +post_install() { + flash_uboot +} + +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + flash_uboot +} -- cgit v1.2.3-54-g00ecf