rt-thread-official/bsp/cvitek/cv18xx_aarch64/boot/combine.sh

45 lines
1.4 KiB
Bash
Executable File

C906_LITTLE_BIN_PATH=../../c906_little/rtthread.bin
GEN_FIP_PATH=.
DEPENDS_FILE_PATH=${GEN_FIP_PATH}/milkv-duo256m
BLCP_IMG_RUNADDR=0x05200200
BLCP_PARAM_LOADADDR=0
NAND_INFO=00000000
NOR_INFO='FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF'
FIP_COMPRESS=lzma
CHIP_CONF_PATH=${DEPENDS_FILE_PATH}/chip_conf.bin
DDR_PARAM_TEST_PATH=${DEPENDS_FILE_PATH}/ddr_param.bin
BL2_PATH=${DEPENDS_FILE_PATH}/bl2.bin
BLCP_PATH=${DEPENDS_FILE_PATH}/empty.bin
MONITOR_PATH=${DEPENDS_FILE_PATH}/bl31.bin
LOADER_2ND_PATH=${DEPENDS_FILE_PATH}/u-boot-raw.bin
if [ -f "$C906_LITTLE_BIN_PATH" ]; then
echo "The file $C906_LITTLE_BIN_PATH exist."
BLCP_2ND_PATH=${C906_LITTLE_BIN_PATH}
else
echo "The file $C906_LITTLE_BIN_PATH does not exist. Execute scons to compile it."
fi
echo "Combining fip.bin..."
. ${DEPENDS_FILE_PATH}/blmacros.env && \
${DEPENDS_FILE_PATH}/fiptool.py -v genfip \
${GEN_FIP_PATH}/fip.bin \
--MONITOR_RUNADDR="${MONITOR_RUNADDR}" \
--BLCP_2ND_RUNADDR="${BLCP_2ND_RUNADDR}" \
--CHIP_CONF=${CHIP_CONF_PATH} \
--NOR_INFO=${NOR_INFO} \
--NAND_INFO=${NAND_INFO} \
--BL2=${BL2_PATH} \
--BLCP_IMG_RUNADDR=${BLCP_IMG_RUNADDR} \
--BLCP_PARAM_LOADADDR=${BLCP_PARAM_LOADADDR} \
--BLCP=${BLCP_PATH} \
--DDR_PARAM=${DDR_PARAM_TEST_PATH} \
--BLCP_2ND=${BLCP_2ND_PATH} \
--MONITOR=${MONITOR_PATH} \
--LOADER_2ND=${LOADER_2ND_PATH} \
--compress=${FIP_COMPRESS}
echo "Combining fip.bin done!"