From 4c540714d37103329a5411d4d9e446a3eb323c01 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Wed, 2 Mar 2016 03:52:10 -0300 Subject: uboot-udoo: add new package to [libre] --- libre/uboot-udoo/uboot-udoo.install | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 libre/uboot-udoo/uboot-udoo.install (limited to 'libre/uboot-udoo/uboot-udoo.install') diff --git a/libre/uboot-udoo/uboot-udoo.install b/libre/uboot-udoo/uboot-udoo.install new file mode 100644 index 000000000..c74dc9766 --- /dev/null +++ b/libre/uboot-udoo/uboot-udoo.install @@ -0,0 +1,23 @@ +flash_uboot() { + echo "A new U-Boot version needs to be flashed onto /dev/mmcblk0." + echo "Do you want to do this now? [y|N]" + read -r shouldwe + if [[ $shouldwe =~ ^([yY][eE][sS]|[yY])$ ]]; then + dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2 + sync + else + echo "You can do this later by running:" + echo "# dd if=/boot/u-boot.imx of=/dev/mmcblk0 bs=512 seek=2" + 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