From 7dce72ceaf68dbfb2b830fb0e8226095e075c735 Mon Sep 17 00:00:00 2001 From: andy <1414772332@qq.com> Date: Sat, 28 Sep 2024 16:55:35 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E5=8A=A8=E5=88=9B=E5=BB=BAexport/lib?= =?UTF-8?q?=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 5 +++- build/build_flash_kl3.sh | 52 +++++++++++++++++++++------------------- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/.gitignore b/.gitignore index c66d46e..cdcb784 100644 --- a/.gitignore +++ b/.gitignore @@ -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/ \ No newline at end of file +tools/gen_img/lib_sdk_source/ +mfgtool/ah/ah +mfgtool/lzma/elzma +mfgtool/oem_tool/oem_tool diff --git a/build/build_flash_kl3.sh b/build/build_flash_kl3.sh index 48288c4..bdda43f 100755 --- a/build/build_flash_kl3.sh +++ b/build/build_flash_kl3.sh @@ -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}"