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
28 description = "Configuration to load ATF and SPL";
33 description = "ARM Trusted Firmware";
34 data = /incbin/("$ATF");
38 os = "arm-trusted-firmware";
43 description = "OPTEE";
44 data = /incbin/("$TEE");
53 description = "SPL (64-bit)";
54 data = /incbin/("spl/u-boot-spl-nodtb.bin");
66 cat << __FDT_IMAGE_EOF
68 description = "$(basename $dtname .dtb)";
69 data = /incbin/("$dtname");
77 cat << __CONF_HEADER_EOF
80 default = "$(basename $1)";
86 cat << __CONF_SECTION_EOF
88 description = "$(basename $dtname .dtb)";
90 loadables = "tee", "spl";
91 fdt = "$(basename $dtname)";