Skip to content

Commit a77a86d

Browse files
unicornxmysterywolf
authored andcommitted
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 <[email protected]>
1 parent 94952b1 commit a77a86d

File tree

15 files changed

+31
-4
lines changed

15 files changed

+31
-4
lines changed

bsp/cvitek/README.md

100755100644
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,11 @@ export RTT_EXEC_PATH=/opt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/bin
128128
## 4.2. 依赖安装
129129

130130
```shell
131-
$ sudo apt install -y scons libncurses5-dev device-tree-compiler u-boot-tools
131+
$ sudo apt install -y scons libncurses5-dev device-tree-compiler u-boot-tools xz-utils
132132
```
133133

134+
其中 u-boot-tools 包含了打包需要的 mkimage, xz-utils 包含了打包需要的 lzma。
135+
134136
## 4.3. 构建
135137

136138
异构芯片需单独编译每个核的 OS,在大/小核对应的目录下,依次执行:

bsp/cvitek/cv18xx_aarch64/combine.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
C906_LITTLE_BIN_PATH=../c906_little/rtthread.bin
3-
GEN_FIP_PATH=../output/milkv-duo256m/
4-
DEPENDS_FILE_PATH=./prebuild/milkv-duo256m
3+
GEN_FIP_PATH=../output/duo256m/
4+
DEPENDS_FILE_PATH=./prebuild/duo256m
55

66
BLCP_IMG_RUNADDR=0x05200200
77
BLCP_PARAM_LOADADDR=0

bsp/cvitek/cv18xx_aarch64/mksdimg.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
set -e
3+
4+
PROJECT_PATH=$1
5+
IMAGE_NAME=$2
6+
7+
if [ -z "$PROJECT_PATH" ] || [ -z "$IMAGE_NAME" ]; then
8+
echo "Usage: $0 <PROJECT_DIR> <IMAGE_NAME>"
9+
exit 1
10+
fi
11+
12+
ROOT_PATH=$PROJECT_PATH/..
13+
14+
source ${ROOT_PATH}/tools.sh
15+
16+
BOARD_TYPE=`get_board_type $PROJECT_PATH`
17+
18+
echo "start compress kernel..."
19+
20+
lzma -c -9 -f -k ${PROJECT_PATH}/${IMAGE_NAME} > ${PROJECT_PATH}/dtb/${BOARD_TYPE}/Image.lzma
21+
22+
mkdir -p ${ROOT_PATH}/output/${BOARD_TYPE}
23+
mkimage -f ${PROJECT_PATH}/dtb/${BOARD_TYPE}/multi.its -r ${ROOT_PATH}/output/${BOARD_TYPE}/boot.sd
24+
25+
rm -rf ${PROJECT_PATH}/dtb/${BOARD_TYPE}/Image.lzma

0 commit comments

Comments
 (0)