diff --git a/config/sources/families/include/rockchip64_common.inc b/config/sources/families/include/rockchip64_common.inc index ad2f098483..753241bd19 100644 --- a/config/sources/families/include/rockchip64_common.inc +++ b/config/sources/families/include/rockchip64_common.inc @@ -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 diff --git a/config/sources/families/rockpis.conf b/config/sources/families/rockpis.conf index 3a2f85a19e..c5c283f598 100644 --- a/config/sources/families/rockpis.conf +++ b/config/sources/families/rockpis.conf @@ -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() diff --git a/patch/atf/atf-rockchip64/board_rockpi-4b/add-trust-ini.patch b/patch/atf/atf-rockchip64/board_rockpi-4b/add-trust-ini.patch deleted file mode 100644 index 528ec55708..0000000000 --- a/patch/atf/atf-rockchip64/board_rockpi-4b/add-trust-ini.patch +++ /dev/null @@ -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 diff --git a/patch/atf/atf-rockchip64/board_rockpi-s/add-trust-ini.patch b/patch/atf/atf-rockchip64/board_rockpi-s/add-trust-ini.patch deleted file mode 100644 index 0fc40de9d4..0000000000 --- a/patch/atf/atf-rockchip64/board_rockpi-s/add-trust-ini.patch +++ /dev/null @@ -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 diff --git a/patch/u-boot/u-boot-rockchip64-mainline/add-trust-ini.patch b/patch/u-boot/u-boot-rockchip64-mainline/add-trust-ini.patch index 528ec55708..793f34dd12 100644 --- a/patch/u-boot/u-boot-rockchip64-mainline/add-trust-ini.patch +++ b/patch/u-boot/u-boot-rockchip64-mainline/add-trust-ini.patch @@ -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 diff --git a/patch/atf/atf-rockchip64/board_rockpi-4a/add-trust-ini.patch b/patch/u-boot/u-boot-rockchip64/add-trust-ini.patch similarity index 87% rename from patch/atf/atf-rockchip64/board_rockpi-4a/add-trust-ini.patch rename to patch/u-boot/u-boot-rockchip64/add-trust-ini.patch index 528ec55708..793f34dd12 100644 --- a/patch/atf/atf-rockchip64/board_rockpi-4a/add-trust-ini.patch +++ b/patch/u-boot/u-boot-rockchip64/add-trust-ini.patch @@ -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