自动创建export/lib目录

This commit is contained in:
2024-09-28 16:55:35 +08:00
parent 234b8302be
commit 7dce72ceaf
2 changed files with 31 additions and 26 deletions

5
.gitignore vendored
View File

@@ -35,4 +35,7 @@ tools/gen_img/*.map
tools/gen_img/*.out
tools/gen_img/*.bin
tools/gen_img/*.bin.fw
tools/gen_img/lib_sdk_source/
tools/gen_img/lib_sdk_source/
mfgtool/ah/ah
mfgtool/lzma/elzma
mfgtool/oem_tool/oem_tool

View File

@@ -653,32 +653,34 @@ else
fi
fi
#prepare sdk source.
GEN_IMG_FOLDER="../tools/gen_img"
if [ ! -d "${GEN_IMG_FOLDER}/lib_sdk_source" ]; then
mkdir ${GEN_IMG_FOLDER}/lib_sdk_source
fi
# 如果不存在这些工具则创建
if [ ! -e "../tools/bin_tool/bin2hex" ]; then
cd "../tools/bin_tool"
gcc bin2hex.c -o bin2hex
cd -
fi
if [ ! -e "../tools/bin_tool/hex2bin" ]; then
cd "../tools/bin_tool"
gcc hex2bin.c -o hex2bin
cd -
fi
if [ ! -e "../tools/bin_tool/bin2hex_frame" ]; then
cd "../tools/bin_tool"
gcc bin2hex_frame.c -o bin2hex_frame
cd -
fi
build_prepare() {
#prepare sdk source.
GEN_IMG_FOLDER="../tools/gen_img"
if [ ! -d "${GEN_IMG_FOLDER}/lib_sdk_source" ]; then
mkdir ${GEN_IMG_FOLDER}/lib_sdk_source
fi
# 如果不存在这些工具则创建
if [ ! -e "../tools/bin_tool/bin2hex" ]; then
cd "../tools/bin_tool"
gcc bin2hex.c -o bin2hex
cd -
fi
if [ ! -e "../tools/bin_tool/hex2bin" ]; then
cd "../tools/bin_tool"
gcc hex2bin.c -o hex2bin
cd -
fi
if [ ! -e "../tools/bin_tool/bin2hex_frame" ]; then
cd "../tools/bin_tool"
gcc bin2hex_frame.c -o bin2hex_frame
cd -
fi
if [ ! -e "../export/lib" ]; then
mkdir ../export/lib
fi
}
build_prepare
export HW_CHIP_ID="${DEF_CHIP_ID}"