From 4e6a68e2c494b96faa51181df6fc88108f21e975 Mon Sep 17 00:00:00 2001 From: Dan Johansen Date: Sat, 18 Jan 2020 17:57:38 +0100 Subject: [PATCH] change uboot flashing method for pbpro, rockpro64 and rockpi4, because of the new ATF enabled uboot packages Signed-off-by: Dan Johansen --- manjaro-arm-installer | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/manjaro-arm-installer b/manjaro-arm-installer index 3e96da8..1dbf3ff 100755 --- a/manjaro-arm-installer +++ b/manjaro-arm-installer @@ -421,11 +421,25 @@ cleanup () { # For rockchip devices - elif [[ "$DEVICE" = "rock64" ]] || [[ "$DEVICE" = "rockpro64" ]] || [[ "$DEVICE" = "rockpi4" ]] || [[ "$DEVICE" = "pbpro" ]]; then - #flash bootloader - dd if=$TMPDIR/root/boot/idbloader.img of=${SDCARD} seek=64 conv=notrunc 1> /dev/null 2>&1 - dd if=$TMPDIR/root/boot/uboot.img of=${SDCARD} seek=16384 conv=notrunc 1> /dev/null 2>&1 - dd if=$TMPDIR/root/boot/trust.img of=${SDCARD} seek=24576 conv=notrunc 1> /dev/null 2>&1 + elif [[ "$DEVICE" = "rock64" ]] || [[ "$DEVICE" = "rockpro64" ]] || [[ "$DEVICE" = "rockpi4" ]] || [[ "$DEVICE" = "pbpro" ]]; then + # Flash bootloader + if [[ "$DEVICE" = "pbpro" ]] || [[ "$DEVICE" = "rockpro64" ]] || [[ "$DEVICE" = "rockpi4" ]]; then + # Flash bootloader with ATF + dd if=$TMPDIR/root/boot/idbloader.img of=${LDEV} seek=64 conv=notrunc 1> /dev/null 2>&1 + dd if=$TMPDIR/root/boot/u-boot.itb of=${LDEV} seek=16384 conv=notrunc 1> /dev/null 2>&1 + else + #echo '' + dd if=$TMPDIR/root/boot/idbloader.img of=${LDEV} seek=64 conv=notrunc 1> /dev/null 2>&1 + dd if=$TMPDIR/root/boot/uboot.img of=${LDEV} seek=16384 conv=notrunc 1> /dev/null 2>&1 + dd if=$TMPDIR/root/boot/trust.img of=${LDEV} seek=24576 conv=notrunc 1> /dev/null 2>&1 + #fi + + # Below section is for testing uboot with ATF + #if [[ "$DEVICE" = "rock64" ]]; then + #flash bootloader + #dd if=$TMPDIR/root/boot/idbloader.img of=${LDEV} seek=64 conv=notrunc + #dd if=$TMPDIR/root/boot/u-boot.itb of=${LDEV} seek=16384 conv=notrunc + fi #clean up umount $TMPDIR/root