2 # SPDX-License-Identifier: GPL-2.0+
4 # Copyright (C) 2019 Rockchip Electronic Co.,Ltd
6 # Script to generate FIT image source for 32-bit Rockchip SoCs with
7 # U-Boot proper, OPTEE, and devicetree.
11 [ -z "$TEE" ] && TEE="tee.bin"
13 if [ ! -f $TEE ]; then
14 echo "WARNING: TEE file $TEE NOT found, U-Boot.itb is non-functional" >&2
15 echo "Please export path for TEE or copy tee.bin to U-Boot folder" >&2
20 text_base=`sed -n "/SYS_TEXT_BASE=/s/CONFIG_SYS_TEXT_BASE=//p" .config \
22 dram_base=`sed -n "/SYS_SDRAM_BASE=/s/CONFIG_SYS_SDRAM_BASE=//p" \
23 include/autoconf.mk|tr -d '\r'`
24 tee_base=`echo "obase=16;$(($dram_base+0x8400000))"|bc`
25 tee_base='0x'$tee_base
29 * Copyright (C) 2017-2019 Rockchip Electronic Co.,Ltd
31 * Simple U-boot FIT source file containing U-Boot, dtb and optee
37 description = "FIT image with OP-TEE support";
42 description = "U-Boot";
43 data = /incbin/("u-boot-nodtb.bin");
51 description = "OP-TEE";
52 data = /incbin/("$TEE");
61 description = "$(basename $dtname .dtb)";
62 data = /incbin/("$dtname");
68 cat << __CONF_HEADER_EOF
74 description = "$(basename $dtname .dtb)";