summaryrefslogtreecommitdiff
path: root/libre
diff options
context:
space:
mode:
Diffstat (limited to 'libre')
-rw-r--r--libre/uboot4extlinux-sunxi/PKGBUILD2
-rw-r--r--libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.install25
2 files changed, 19 insertions, 8 deletions
diff --git a/libre/uboot4extlinux-sunxi/PKGBUILD b/libre/uboot4extlinux-sunxi/PKGBUILD
index 16f895f44..b25bcc35c 100644
--- a/libre/uboot4extlinux-sunxi/PKGBUILD
+++ b/libre/uboot4extlinux-sunxi/PKGBUILD
@@ -26,7 +26,7 @@ pkgname=('uboot4extlinux-a10-olinuxino-lime'
'uboot4extlinux-orangepi_pc'
'uboot4extlinux-orangepi_plus')
pkgver=2019.01
-pkgrel=1
+pkgrel=2
arch=('armv7h')
url="http://git.denx.de/u-boot.git/"
license=('GPL')
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
}