summaryrefslogtreecommitdiff
path: root/libre/uboot-sunxi-linux-libre/uboot-sunxi-linux-libre.install
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-05 06:45:36 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2015-10-05 06:53:44 -0300
commitd737d4e1734b9f1aa3bb590133b3e9f99b89b00c (patch)
tree53e884be9ec57216cf685447fc6072aaf27cc48b /libre/uboot-sunxi-linux-libre/uboot-sunxi-linux-libre.install
parent8f4210ea6e51b01c5ca354c1092e63e8639fdd98 (diff)
uboot-sunxi-linux-libre: add new package to [libre]
Diffstat (limited to 'libre/uboot-sunxi-linux-libre/uboot-sunxi-linux-libre.install')
-rw-r--r--libre/uboot-sunxi-linux-libre/uboot-sunxi-linux-libre.install22
1 files changed, 22 insertions, 0 deletions
diff --git a/libre/uboot-sunxi-linux-libre/uboot-sunxi-linux-libre.install b/libre/uboot-sunxi-linux-libre/uboot-sunxi-linux-libre.install
new file mode 100644
index 000000000..3d2a2de7b
--- /dev/null
+++ b/libre/uboot-sunxi-linux-libre/uboot-sunxi-linux-libre.install
@@ -0,0 +1,22 @@
+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-sunxi-linux-libre/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8
+ else
+ echo "You can do this later by running:"
+ echo "# dd if=/boot/uboot-sunxi-linux-libre/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8"
+ 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
+}