4
0
mirror of https://github.com/RT-Thread/rt-thread.git synced 2025-02-01 01:30:26 +08:00

25 lines
515 B
Bash
Raw Normal View History

2024-03-28 23:35:54 +08:00
#/bin/sh
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=$(pwd)
echo ${ROOT_PATH}
2024-04-09 22:48:57 +08:00
. board_env.sh
2024-03-28 23:35:54 +08:00
get_board_type
echo "start compress kernel..."
lzma -c -9 -f -k ${PROJECT_PATH}/${IMAGE_NAME} > ${PROJECT_PATH}/dtb/${BOARD_TYPE}/Image.lzma
2024-03-28 23:35:54 +08:00
mkdir -p ${ROOT_PATH}/output/${BOARD_TYPE}
2024-04-09 22:48:57 +08:00
./mkimage -f ${PROJECT_PATH}/dtb/${BOARD_TYPE}/multi.its -r ${ROOT_PATH}/output/${BOARD_TYPE}/boot.${STORAGE_TYPE}