summaryrefslogtreecommitdiff
path: root/libre-testing/uboot-udoo/uboot-udoo.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-02-24 00:56:40 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-02-24 00:56:40 -0300
commit7fb550684b5eca45e75575e265b17ec9db1384b8 (patch)
treedb1f8ee43b22e764ce5289572374b60c4ccf76a1 /libre-testing/uboot-udoo/uboot-udoo.install
parent1bb82c08642b54b742968bcb141c14cc2365c967 (diff)
downloadabslibre-7fb550684b5eca45e75575e265b17ec9db1384b8.tar.gz
abslibre-7fb550684b5eca45e75575e265b17ec9db1384b8.tar.bz2
abslibre-7fb550684b5eca45e75575e265b17ec9db1384b8.zip
uboot-udoo: add new package to [libre-testing]
Diffstat (limited to 'libre-testing/uboot-udoo/uboot-udoo.install')
-rw-r--r--libre-testing/uboot-udoo/uboot-udoo.install28
1 files changed, 28 insertions, 0 deletions
diff --git a/libre-testing/uboot-udoo/uboot-udoo.install b/libre-testing/uboot-udoo/uboot-udoo.install
new file mode 100644
index 000000000..9f535bae7
--- /dev/null
+++ b/libre-testing/uboot-udoo/uboot-udoo.install
@@ -0,0 +1,28 @@
+extlinux_warning() {
+ echo ">>> WARNING: for new entries, edit /boot/extlinux/extlinux.conf"
+}
+
+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
+ extlinux_warning
+}
+
+## 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
+}