summaryrefslogtreecommitdiff
path: root/libre/uboot-udoo/uboot-udoo.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-03-02 03:52:10 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-03-02 03:52:10 -0300
commit4c540714d37103329a5411d4d9e446a3eb323c01 (patch)
treeb68d1c65b14d7d4bce764d99fcb5fa085a9f2515 /libre/uboot-udoo/uboot-udoo.install
parent2df1f2841f65200bd77b2f1caff014678b378a79 (diff)
uboot-udoo: add new package to [libre]
Diffstat (limited to 'libre/uboot-udoo/uboot-udoo.install')
-rw-r--r--libre/uboot-udoo/uboot-udoo.install23
1 files changed, 23 insertions, 0 deletions
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
+}