mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2025-03-01 11:45:27 +08:00
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>
26 lines
589 B
Bash
Executable File
26 lines
589 B
Bash
Executable File
#!/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
|