diff options
author | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-02-24 22:06:07 +0100 |
---|---|---|
committer | Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org> | 2019-02-27 22:57:52 +0100 |
commit | 3e97fd7d71ceafaa4e755d679fd0888ed4891d47 (patch) | |
tree | 3337f26d8d2f76a333d48755f8b6f8d835558fef | |
parent | 1efefb8f32b5799ef7ede8109b113dae6c5ee5b9 (diff) | |
download | abslibre-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>
-rw-r--r-- | libre/uboot4extlinux-sunxi/PKGBUILD | 2 | ||||
-rw-r--r-- | libre/uboot4extlinux-sunxi/uboot4extlinux-sunxi.install | 25 |
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 } |