summaryrefslogtreecommitdiff
path: root/libre/uboot-cubox-i-linux-libre/uboot-cubox-i-linux-libre.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-05 02:36:16 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-05 02:36:16 -0300
commit712d4814bd655fb3ed8b9af602158cc6923acae7 (patch)
treeb63eec3ed93130964a8f84558347bbe0fe95202b /libre/uboot-cubox-i-linux-libre/uboot-cubox-i-linux-libre.install
parent765e537cf6fa34b3cd9e099623e2552e21501877 (diff)
downloadabslibre-712d4814bd655fb3ed8b9af602158cc6923acae7.tar.gz
abslibre-712d4814bd655fb3ed8b9af602158cc6923acae7.tar.bz2
abslibre-712d4814bd655fb3ed8b9af602158cc6923acae7.zip
uboot-cubox-i-linux-libre: add new package to [libre]
Diffstat (limited to 'libre/uboot-cubox-i-linux-libre/uboot-cubox-i-linux-libre.install')
-rw-r--r--libre/uboot-cubox-i-linux-libre/uboot-cubox-i-linux-libre.install25
1 files changed, 25 insertions, 0 deletions
diff --git a/libre/uboot-cubox-i-linux-libre/uboot-cubox-i-linux-libre.install b/libre/uboot-cubox-i-linux-libre/uboot-cubox-i-linux-libre.install
new file mode 100644
index 000000000..ff3b52d2a
--- /dev/null
+++ b/libre/uboot-cubox-i-linux-libre/uboot-cubox-i-linux-libre.install
@@ -0,0 +1,25 @@
+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/uboot-cubox-i-linux-libre/SPL of=/dev/mmcblk0 bs=1K seek=1
+ dd if=/boot/uboot-cubox-i-linux-libre/u-boot.img of=/dev/mmcblk0 bs=1K seek=42
+ sync
+ else
+ echo "You can do this later by running:"
+ echo "# dd if=/boot/uboot-cubox-i-linux-libre/SPL of=/dev/mmcblk0 bs=1K seek=1"
+ echo "# dd dd if=/boot/uboot-cubox-i-linux-libre/u-boot.img of=/dev/mmcblk0 bs=1K seek=42"
+ 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
+}