改为 在压缩前添加 oem_ext 但固件启动不起来
This commit is contained in:
@@ -344,6 +344,38 @@ if [ "x${CHIP_VER_UPPER}" == "x3" ]; then
|
||||
else
|
||||
cp ${TOP_DIR}/ap/.output/plc/lib/${HT_FILE} $CUR_DIR/ht.bin
|
||||
fi
|
||||
|
||||
# prepare oem.bin
|
||||
# 根据core类型指定oem文件
|
||||
if [ "x${CORE_TYPE_UPPER}" == "xAMPPLC" ]; then
|
||||
if [ ${IOT_SMART_BUILD} == 1 ]; then
|
||||
OEM_CFG=${BOARD_UPPER}"_AMPIOT_OEM.ini"
|
||||
OEM_FILE=${BOARD_UPPER}"_AMPIOT_OEM.bin"
|
||||
else
|
||||
OEM_CFG=${BOARD_UPPER}"_AMPSG_OEM.ini"
|
||||
OEM_FILE=${BOARD_UPPER}"_AMPSG_OEM.bin"
|
||||
fi
|
||||
else
|
||||
OEM_CFG=${BOARD_UPPER}"_OEM.ini"
|
||||
OEM_FILE=${BOARD_UPPER}"_OEM.bin"
|
||||
fi
|
||||
cp $TOP_DIR/tools/oem/$OEM_CFG ./tmp_oem.ini
|
||||
#set mid for iot board(cco and sta use same oem.ini)
|
||||
# smart模式需要根据img类型动态修改mid值
|
||||
if [ ${IOT_SMART_BUILD} == 1 ]; then
|
||||
if [ "${IMG_UPPER}" == "CCO" ]; then
|
||||
sed -i "s/mid.*/mid 1/g" ./tmp_oem.ini
|
||||
elif [ "${IMG_UPPER}" == "STA" ]; then
|
||||
sed -i "s/mid.*/mid 0/g" ./tmp_oem.ini
|
||||
fi
|
||||
fi
|
||||
if [ "${RUN_UPPER}" != "UPGRADE" ]; then
|
||||
# 打包非升级文件的时候生成 oem.bin
|
||||
./oem_tool --input=./tmp_oem.ini --output=$TOP_DIR/tools/oem/$OEM_FILE
|
||||
fi
|
||||
rm ./tmp_oem.ini
|
||||
cp $TOP_DIR/tools/oem/$OEM_FILE $CUR_DIR/oem.bin
|
||||
|
||||
# 修改配置文件中的layout index配置
|
||||
sed -i "/img_type=./a layout_index=${FLASH_LAYOUT_INDEX}" ${TMP_CFG_NAME}
|
||||
|
||||
@@ -512,37 +544,6 @@ if [ "x${CHIP_VER_UPPER}" == "x3" ]; then
|
||||
sed -i "s,vendor_id=18516,vendor_id=22864,g" ${TMP_CFG_NAME}
|
||||
fi
|
||||
|
||||
# prepare oem.bin
|
||||
# 根据core类型指定oem文件
|
||||
if [ "x${CORE_TYPE_UPPER}" == "xAMPPLC" ]; then
|
||||
if [ ${IOT_SMART_BUILD} == 1 ]; then
|
||||
OEM_CFG=${BOARD_UPPER}"_AMPIOT_OEM.ini"
|
||||
OEM_FILE=${BOARD_UPPER}"_AMPIOT_OEM.bin"
|
||||
else
|
||||
OEM_CFG=${BOARD_UPPER}"_AMPSG_OEM.ini"
|
||||
OEM_FILE=${BOARD_UPPER}"_AMPSG_OEM.bin"
|
||||
fi
|
||||
else
|
||||
OEM_CFG=${BOARD_UPPER}"_OEM.ini"
|
||||
OEM_FILE=${BOARD_UPPER}"_OEM.bin"
|
||||
fi
|
||||
cp $TOP_DIR/tools/oem/$OEM_CFG ./tmp_oem.ini
|
||||
#set mid for iot board(cco and sta use same oem.ini)
|
||||
# smart模式需要根据img类型动态修改mid值
|
||||
if [ ${IOT_SMART_BUILD} == 1 ]; then
|
||||
if [ "${IMG_UPPER}" == "CCO" ]; then
|
||||
sed -i "s/mid.*/mid 1/g" ./tmp_oem.ini
|
||||
elif [ "${IMG_UPPER}" == "STA" ]; then
|
||||
sed -i "s/mid.*/mid 0/g" ./tmp_oem.ini
|
||||
fi
|
||||
fi
|
||||
if [ "${RUN_UPPER}" != "UPGRADE" ]; then
|
||||
# 打包非升级文件的时候生成 oem.bin
|
||||
./oem_tool --input=./tmp_oem.ini --output=$TOP_DIR/tools/oem/$OEM_FILE
|
||||
fi
|
||||
rm ./tmp_oem.ini
|
||||
cp $TOP_DIR/tools/oem/$OEM_FILE $CUR_DIR/oem.bin
|
||||
|
||||
# prepare pib file
|
||||
# 根据board类型来选择pib文件
|
||||
PIB_IMG=${BOARD_UPPER}
|
||||
|
Reference in New Issue
Block a user