aboutsummaryrefslogtreecommitdiffstats
path: root/main/u-boot/update-u-boot
diff options
context:
space:
mode:
Diffstat (limited to 'main/u-boot/update-u-boot')
-rwxr-xr-xmain/u-boot/update-u-boot18
1 files changed, 16 insertions, 2 deletions
diff --git a/main/u-boot/update-u-boot b/main/u-boot/update-u-boot
index b012b5fedfa..bfef80a2da9 100755
--- a/main/u-boot/update-u-boot
+++ b/main/u-boot/update-u-boot
@@ -10,13 +10,16 @@ get_defaults() {
if [ -z "$board" -a -e /sys/firmware/devicetree/base/compatible ]; then
case "$(cat /sys/firmware/devicetree/base/compatible 2>/dev/null)" in
wand,*) board=wand ;;
+ pine64,pine64-plus*) board=pine64_plus ;;
+ pine64,pinebook-pro*) board=pinebook-pro-rk3399 ;;
esac
fi
if [ -z "$device" ]; then
case "$board" in
wand|cubie|cubie2) device=/dev/mmcblk0p0 ;;
- mx6cuboxi) device=/dev/mmcblk0 ;;
+ pinebook-pro-rk3399) device=/dev/mmcblk2 ;;
+ mx6cuboxi|*rk33*|pine64_plus) device=/dev/mmcblk0 ;;
esac
fi
@@ -39,7 +42,7 @@ usage: $0 [-b|--board <board-type>] [-d|--device <device>]
options:
- -b,--board <board> Specify the board type: wand, cubie, cubie2, cuboxi
+ -b,--board <board> Specify the board type: wand, cubie, cubie2, cuboxi, pine64-lts, etc.
(current default: ${board:-none})
-d,--device <device> Specify the device where to install u-boot
@@ -62,6 +65,7 @@ while [ $# -gt 0 ]; do
wand|wandboard) board="wand" ;;
cubie|cubieboard) board="cubie" ;;
cuboxi|mx6cuboxi) board="mx6cuboxi" ;;
+ pine64-lts|pinebook|orangepi_3|teres_i|a64-olinuxino|a64-olinuxino-emmc|nanopi_neo2|*rk33*|pine64_plus) board="$1" ;;
*) usage; exit 1;;
esac
shift
@@ -115,6 +119,16 @@ mx6cuboxi)
$dryrun dd if=$imagedir/mx6cuboxi/SPL of=$device bs=1k seek=1 status=none
$dryrun dd if=$imagedir/mx6cuboxi/u-boot.img of=$device bs=1k seek=69 status=none
;;
+pine64-lts|pinebook|orangepi_3|teres_i|a64-olinuxino|a64-olinuxino-emmc|nanopi_neo2|pine64_plus)
+ [ -e "$imagedir/$board" ] || die "sunxi images not installed, apk add u-boot-sunxi"
+ $dryrun dd if=$imagedir/$board/u-boot-sunxi-with-spl.bin of=$device bs=1k seek=8 status=none
+ ;;
+*rk33*)
+ [ -e "$imagedir/$board" ] || die "$board images not installed, apk add u-boot-$board"
+
+ echo "Writing u-boot image"
+ $dryrun dd conv=notrunc if=$imagedir/$board/u-boot-rockchip.bin of=$device seek=64
+ ;;
esac
$dryrun sync
) || die "U-Boot installation in $device failed"