Fixes and cleanups after rockchip64 preparation for mainline u-boot (#1945)

This commit is contained in:
Piotr Szczepanik 2020-05-06 23:45:09 +02:00 committed by GitHub
parent 25eff65004
commit 91f2700eea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 50 deletions

View File

@ -29,6 +29,7 @@ elif [[ $BOOTCONFIG == *3328* ]]; then
elif [[ $BOARD == rockpi-4* ]]; then
BOOT_USE_BLOBS=yes
BOOT_SOC=rk3399
DDR_BLOB='rk33/rk3399_ddr_933MHz_v1.24.bin'
MINILOADER_BLOB='rk33/rk3399_miniloader_v1.19.bin'
BL31_BLOB='rk33/rk3399_bl31_v1.30.elf'
@ -40,7 +41,11 @@ elif [[ $BOARD == rockpro64 ]] || [[ $BOARD == pinebook-pro ]]; then
elif [[ $BOARD == rockpi-s ]]; then
UBOOT_TARGET_MAP="u-boot-dtb.bin;;idbloader.bin uboot.img trust.bin"
BOOT_USE_BLOBS=yes
BOOT_SOC=rk3308
DDR_BLOB='rk33/rk3308_ddr_589MHz_uart0_m0_v1.26.bin'
MINILOADER_BLOB='rk33/rk3308_miniloader_v1.13.bin'
BL31_BLOB='rk33/rk3308_bl31_v2.10.elf'
CPUMAX="1296000"
else
@ -145,7 +150,7 @@ uboot_custom_postprocess()
tools/mkimage -n $BOOT_SOC -T rksd -d $RKBIN_DIR/$DDR_BLOB idbloader.bin
cat $RKBIN_DIR/$MINILOADER_BLOB >> idbloader.bin
loaderimage --pack --uboot ./u-boot-dtb.bin uboot.img 0x200000
trust_merger --replace ./build/rk3399/debug/bl31/bl31.elf $RKBIN_DIR/$BL31_BLOB trust.ini
trust_merger --replace bl31.elf $RKBIN_DIR/$BL31_BLOB trust.ini
elif [[ $BOOT_RK3399_LEGACY_HYBRID == yes ]]; then

View File

@ -1,13 +1,11 @@
source "${BASH_SOURCE%/*}/include/rockchip64_common.inc"
ATFPATCHDIR='atf-rockchip64'
BOOTSOURCE='https://github.com/piter75/rockchip-u-boot.git'
BOOTDIR='u-boot-rockchip64'
BOOTBRANCH='branch:rockpis-next-dev'
BOOTPATCHDIR="u-boot-rockchip64"
BOOTSCRIPT='boot-rockpis.cmd:boot.cmd'
BOOTENV_FILE='rockpis.txt'
KERNELDIR='linux-rockchip64'
OVERLAY_PREFIX='rk3308'
case $BRANCH in
@ -16,6 +14,7 @@ case $BRANCH in
KERNELSOURCE='https://github.com/piter75/rockchip-kernel'
KERNELBRANCH='branch:rockpis-develop-4.4'
KERNELDIR='linux-rockchip64'
;;
@ -29,11 +28,15 @@ case $BRANCH in
esac
prepare_boot_configuration
uboot_custom_postprocess()
{
# TODO: remove this diversion from common caused by different loaderimage params
loaderimage --pack --uboot ./u-boot-dtb.bin uboot.img 0x600000 --size 1024 1
tools/mkimage -n rk3308 -T rksd -d $SRC/cache/sources/rkbin-tools/rk33/rk3308_ddr_589MHz_uart0_m0_v1.26.bin idbloader.bin
cat $SRC/cache/sources/rkbin-tools/rk33/rk3308_miniloader_v1.13.bin >> idbloader.bin
tools/mkimage -n rk3308 -T rksd -d $RKBIN_DIR/$DDR_BLOB idbloader.bin
cat $RKBIN_DIR/$MINILOADER_BLOB >> idbloader.bin
trust_merger --replace bl31.elf $RKBIN_DIR/$BL31_BLOB trust.ini
}
family_tweaks_bsp()

View File

@ -1,21 +0,0 @@
diff --git a/trust.ini b/trust.ini
new file mode 100644
index 0000000..4af021a
--- /dev/null
+++ b/trust.ini
@@ -0,0 +1,15 @@
+[VERSION]
+MAJOR=1
+MINOR=0
+[BL30_OPTION]
+SEC=0
+[BL31_OPTION]
+SEC=1
+PATH=./build/rk3399/debug/bl31/bl31.elf
+ADDR=0x10000
+[BL32_OPTION]
+SEC=0
+[BL33_OPTION]
+SEC=0
+[OUTPUT]
+PATH=trust.bin

View File

@ -1,21 +0,0 @@
diff --git a/trust.ini b/trust.ini
new file mode 100644
index 0000000..4af021a
--- /dev/null
+++ b/trust.ini
@@ -0,0 +1,15 @@
+[VERSION]
+MAJOR=1
+MINOR=0
+[BL30_OPTION]
+SEC=0
+[BL31_OPTION]
+SEC=1
+PATH=../../rkbin-tools/rk33/rk3308_bl31_v2.10.elf
+ADDR=0x10000
+[BL32_OPTION]
+SEC=0
+[BL33_OPTION]
+SEC=0
+[OUTPUT]
+PATH=trust.bin

View File

@ -11,7 +11,7 @@ index 0000000..4af021a
+SEC=0
+[BL31_OPTION]
+SEC=1
+PATH=./build/rk3399/debug/bl31/bl31.elf
+PATH=bl31.elf
+ADDR=0x10000
+[BL32_OPTION]
+SEC=0

View File

@ -11,7 +11,7 @@ index 0000000..4af021a
+SEC=0
+[BL31_OPTION]
+SEC=1
+PATH=./build/rk3399/debug/bl31/bl31.elf
+PATH=bl31.elf
+ADDR=0x10000
+[BL32_OPTION]
+SEC=0