4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-25 22:07:17 +08:00
Chen Wang 7836e6ee4d bsp: cvitek: update combine.sh for arm64
Move the combine.sh to under cv18xx_aarch64, so we can
run this script the same as scons and no need to change
cwd.

Rename the folder boot to prebuild just becuase all the
files under boot are prebuild binaries.
Move the prebuilt fip.bin to under prebuild/milkv-duo256m
because it's only for 256.

Update combine.sh accordingly and output fip.bin to the output
folder where we create fip.bin/boot.sd as other bsp.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
2024-12-30 11:32:10 +08:00

49 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
C906_LITTLE_BIN_PATH=../c906_little/rtthread.bin
GEN_FIP_PATH=../output/milkv-duo256m/
DEPENDS_FILE_PATH=./prebuild/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."
exit
fi
mkdir -p $GEN_FIP_PATH
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!"