diff --git a/arch/arm/mach-rockchip/make_fit_atf.sh b/arch/arm/mach-rockchip/make_fit_atf.sh index 4027aa7b74..258695c1b3 100755 --- a/arch/arm/mach-rockchip/make_fit_atf.sh +++ b/arch/arm/mach-rockchip/make_fit_atf.sh @@ -47,6 +47,22 @@ function generate_uboot_node() echo " };" } +function generate_kfdt_node() +{ + if [ -f ${srctree}/dts/kern.dtb ]; then + echo " kernel-fdt { + description = \"Kernel dtb\"; + data = /incbin/(\"./dts/kern.dtb\"); + type = \"flat_dt\"; + arch = \"${ARCH}\"; + compression = \"none\"; + hash { + algo = \"sha256\"; + }; + };" + fi +} + function generate_bl31_node() { NUM=1 @@ -147,6 +163,7 @@ EOF generate_uboot_node generate_bl31_node generate_bl32_node + generate_kfdt_node cat << EOF fdt { diff --git a/arch/arm/mach-rockchip/make_fit_optee.sh b/arch/arm/mach-rockchip/make_fit_optee.sh index 20200dea6f..6c499c5142 100755 --- a/arch/arm/mach-rockchip/make_fit_optee.sh +++ b/arch/arm/mach-rockchip/make_fit_optee.sh @@ -66,6 +66,19 @@ ${MCU_DIGEST} else SIGN_IMAGES=" sign-images = \"fdt\", \"firmware\", \"loadables\";" fi + +if [ -f ${srctree}/dts/kern.dtb ]; then + KFDT_NODE=" kernel-fdt { + description = \"Kernel dtb\"; + data = /incbin/(\"./dts/kern.dtb\"); + type = \"flat_dt\"; + arch = \"${ARCH}\"; + compression = \"none\"; + hash { + algo = \"sha256\"; + }; + };" +fi ######################################################################################################## cat << EOF @@ -124,6 +137,7 @@ cat << EOF }; }; EOF +echo "${KFDT_NODE}" echo "${MCU_NODE}" cat << EOF };