change uboot flashing method for pbpro, rockpro64 and rockpi4, because of the new ATF enabled uboot packages

Signed-off-by: Dan Johansen <strit@manjaro.org>
This commit is contained in:
Dan Johansen 2020-01-18 17:57:38 +01:00
parent a26f945494
commit 4e6a68e2c4
1 changed files with 19 additions and 5 deletions

View File

@ -421,11 +421,25 @@ cleanup () {
# For rockchip devices # For rockchip devices
elif [[ "$DEVICE" = "rock64" ]] || [[ "$DEVICE" = "rockpro64" ]] || [[ "$DEVICE" = "rockpi4" ]] || [[ "$DEVICE" = "pbpro" ]]; then elif [[ "$DEVICE" = "rock64" ]] || [[ "$DEVICE" = "rockpro64" ]] || [[ "$DEVICE" = "rockpi4" ]] || [[ "$DEVICE" = "pbpro" ]]; then
#flash bootloader # Flash bootloader
dd if=$TMPDIR/root/boot/idbloader.img of=${SDCARD} seek=64 conv=notrunc 1> /dev/null 2>&1 if [[ "$DEVICE" = "pbpro" ]] || [[ "$DEVICE" = "rockpro64" ]] || [[ "$DEVICE" = "rockpi4" ]]; then
dd if=$TMPDIR/root/boot/uboot.img of=${SDCARD} seek=16384 conv=notrunc 1> /dev/null 2>&1 # Flash bootloader with ATF
dd if=$TMPDIR/root/boot/trust.img of=${SDCARD} seek=24576 conv=notrunc 1> /dev/null 2>&1 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 #clean up
umount $TMPDIR/root umount $TMPDIR/root