summaryrefslogtreecommitdiff
path: root/libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.install
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-02-24 22:06:07 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-02-27 22:57:52 +0100
commit3e97fd7d71ceafaa4e755d679fd0888ed4891d47 (patch)
tree3337f26d8d2f76a333d48755f8b6f8d835558fef /libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.install
parent1efefb8f32b5799ef7ede8109b113dae6c5ee5b9 (diff)
downloadabslibre-3e97fd7d71ceafaa4e755d679fd0888ed4891d47.tar.gz
abslibre-3e97fd7d71ceafaa4e755d679fd0888ed4891d47.tar.bz2
abslibre-3e97fd7d71ceafaa4e755d679fd0888ed4891d47.zip
libre: uboot4extlinux-sunxi: sync with uboot4extlinux-am335x
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
Diffstat (limited to 'libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.install')
-rw-r--r--libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.install25
1 files changed, 18 insertions, 7 deletions
diff --git a/libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.install b/libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.install
index 51b209923..4419c21af 100644
--- a/libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.install
+++ b/libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.install
@@ -1,16 +1,27 @@
+flash_instructions() {
+ echo "# dd if=/boot/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8"
+}
+
extlinux_warning() {
echo "==> WARNING: Remember to set up your kernels in /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-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8
+ root=$(mount | awk '/ on \/ / { print $1; }')
+ if [[ $root =~ ^/dev/mmcblk.*$ ]]; then
+ root=${root:0:12}
+ echo "A new U-Boot version needs to be flashed onto $root."
+ 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-sunxi-with-spl.bin of=$root bs=1024 seek=8
+ else
+ echo "You can do this later by running:"
+ flash_instructions
+ fi
else
- echo "You can do this later by running:"
- echo "# dd if=/boot/u-boot-sunxi-with-spl.bin of=/dev/mmcblk0 bs=1024 seek=8"
+ echo "Flash the new U-Boot version onto your boot device. For example:"
+ flash_instructions
fi
extlinux_warning
}