4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-14 23:39:21 +08:00

bsp: cvitek: fix build error for aarch64

This patch fixed the error "bash: mksdimg.sh: No such file
or directory" when building cv18xx_aarch64.

The issue is introduced by commit "bsp: cvitek: removed
useless files after using rttpkgtool".

In addition, in order to unify the logic with riscv as much
as possible, the name of the "milkv-duo256m" directory under
cv18xx_aarch64 is uniformly changed to "duo256m".

This patch also improve the README, adding instructions to
install xz-utils.

Signed-off-by: Chen Wang <unicorn_wang@outlook.com>
This commit is contained in:
Chen Wang 2025-02-03 20:03:10 +08:00 committed by Meco Man
parent 94952b18fc
commit a77a86d6b2
15 changed files with 31 additions and 4 deletions

4
bsp/cvitek/README.md Executable file → Normal file
View File

@ -128,9 +128,11 @@ export RTT_EXEC_PATH=/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin
## 4.2. 依赖安装
```shell
$ sudo apt install -y scons libncurses5-dev device-tree-compiler u-boot-tools
$ sudo apt install -y scons libncurses5-dev device-tree-compiler u-boot-tools xz-utils
```
其中 u-boot-tools 包含了打包需要的 mkimage, xz-utils 包含了打包需要的 lzma。
## 4.3. 构建
异构芯片需单独编译每个核的 OS在大/小核对应的目录下,依次执行:

View File

@ -1,7 +1,7 @@
#!/bin/bash
C906_LITTLE_BIN_PATH=../c906_little/rtthread.bin
GEN_FIP_PATH=../output/milkv-duo256m/
DEPENDS_FILE_PATH=./prebuild/milkv-duo256m
GEN_FIP_PATH=../output/duo256m/
DEPENDS_FILE_PATH=./prebuild/duo256m
BLCP_IMG_RUNADDR=0x05200200
BLCP_PARAM_LOADADDR=0

View File

@ -0,0 +1,25 @@
#!/bin/bash
set -e
PROJECT_PATH=$1
IMAGE_NAME=$2
if [ -z "$PROJECT_PATH" ] || [ -z "$IMAGE_NAME" ]; then
echo "Usage: $0 <PROJECT_DIR> <IMAGE_NAME>"
exit 1
fi
ROOT_PATH=$PROJECT_PATH/..
source ${ROOT_PATH}/tools.sh
BOARD_TYPE=`get_board_type $PROJECT_PATH`
echo "start compress kernel..."
lzma -c -9 -f -k ${PROJECT_PATH}/${IMAGE_NAME} > ${PROJECT_PATH}/dtb/${BOARD_TYPE}/Image.lzma
mkdir -p ${ROOT_PATH}/output/${BOARD_TYPE}
mkimage -f ${PROJECT_PATH}/dtb/${BOARD_TYPE}/multi.its -r ${ROOT_PATH}/output/${BOARD_TYPE}/boot.sd
rm -rf ${PROJECT_PATH}/dtb/${BOARD_TYPE}/Image.lzma

View File

@ -46,4 +46,4 @@ if PLATFORM == 'gcc':
DUMP_ACTION = OBJDUMP + ' -D -S $TARGET > rtt.asm\n'
POST_ACTION = OBJCPY + ' -O binary $TARGET rtthread.bin\n' + SIZE + ' $TARGET \n'
POST_ACTION += OBJCPY + ' -O binary $TARGET Image \n' + SIZE + ' $TARGET \n'
POST_ACTION += './combine.sh && cd .. && bash mksdimg.sh ' + os.getcwd() + ' Image \n'
POST_ACTION += './combine.sh && ./mksdimg.sh ' + os.getcwd() + ' Image \n'