2 # SPDX-License-Identifier: GPL-2.0+
4 # script to generate FIT image source for K3 Family boards with
5 # ATF, OPTEE, SPL and multiple device trees (given on the command line).
6 # Inspired from board/sunxi/mksunxi_fit_atf.sh
8 # usage: $0 <dt_name> [<dt_name> [<dt_name] ...]
10 [ -z "$ATF" ] && ATF="bl31.bin"
12 if [ ! -f $ATF ]; then
13 echo "WARNING ATF file $ATF NOT found, resulting binary is non-functional" >&2
17 [ -z "$TEE" ] && TEE="bl32.bin"
19 if [ ! -f $TEE ]; then
20 echo "WARNING OPTEE file $TEE NOT found, resulting might be non-functional" >&2
24 if [ ! -z "$IS_HS" ]; then
32 description = "Configuration to load ATF and SPL";
37 description = "ARM Trusted Firmware";
38 data = /incbin/("$ATF");
42 os = "arm-trusted-firmware";
47 description = "OPTEE";
48 data = /incbin/("$TEE");
57 description = "SPL (64-bit)";
58 data = /incbin/("spl/u-boot-spl-nodtb.bin$HS_APPEND");
70 cat << __FDT_IMAGE_EOF
72 description = "$(basename $dtname .dtb)";
73 data = /incbin/("$dtname$HS_APPEND");
81 cat << __CONF_HEADER_EOF
84 default = "$(basename $1)";
90 cat << __CONF_SECTION_EOF
92 description = "$(basename $dtname .dtb)";
94 loadables = "tee", "spl";
95 fdt = "$(basename $dtname)";