@@ -10,15 +10,6 @@ BOARD=$(echo $1)
1010
1111FACTORY_BIN_DIR=" $( pwd) /factory_fw/binary"
1212
13-
14- if [ $5 -eq 1 ]; then
15- PART_FILE_8MB=' partitions_8MB_small_factory_fw.bin_enc'
16- SCRIPT_FILE_8MB=' script_8MB_small_factory_fw_enc'
17- else
18- PART_FILE_8MB=' partitions_8MB_normal_factory_fw.bin_enc'
19- SCRIPT_FILE_8MB=' script_8MB_normal_factory_fw_enc'
20- fi
21-
2213if [ $4 -eq 1 ]; then
2314 SCRIPT_NAME_4MB=" script_4MB_enc"
2415 if [ $5 -eq 1 ]; then
@@ -66,10 +57,8 @@ VERSION=$(cat pycom_version.h |grep SW_VERSION_NUMBER | cut -d'"' -f2)
6657PKG_TMP_DIR=" ${BUILD_DIR} /firmware_package"
6758mkdir -p ${PKG_TMP_DIR}
6859
69- PART_FILE_4MB=' '
7060PART_FILE_8MB=' '
71- SCRIPT_FILE_4MB=' '
72- SCRIPT_FILE_8MB=' '
61+ SCRIPT_FILE_8MB=' script_8MB'
7362
7463if [ $4 -eq 1 ]; then
7564 BOOT_FILE=' bootloader-reflash-digest.bin_enc'
@@ -93,28 +82,24 @@ cp ${BUILD_DIR}/${APP_FILE} ${PKG_TMP_DIR}
9382if [ $4 -eq 1 ]; then
9483 if [ $5 -eq 1 ]; then
9584 PART_FILE_8MB=' partitions_8MB_small_factory_fw.bin_enc'
96- SCRIPT_FILE_8MB=' script_8MB_small_factory_fw_enc'
9785 else
9886 PART_FILE_8MB=' partitions_8MB_normal_factory_fw.bin_enc'
99- SCRIPT_FILE_8MB=' script_8MB_normal_factory_fw_enc'
10087 fi
10188else
10289 if [ $5 -eq 1 ]; then
10390 PART_FILE_8MB=' partitions_8MB_small_factory_fw.bin'
104- SCRIPT_FILE_8MB=' script_8MB_small_factory_fw'
10591 else
10692 PART_FILE_8MB=' partitions_8MB_normal_factory_fw.bin'
107- SCRIPT_FILE_8MB=' script_8MB_normal_factory_fw'
10893 fi
10994fi
11095
11196cp ${BUILD_DIR} /lib/${PART_FILE_8MB} ${PKG_TMP_DIR}
11297if [ $5 -eq 1 ]; then
11398 cp ${FACTORY_BIN_DIR} /${FACTORY_FILE} ${PKG_TMP_DIR}
11499fi
115- cat boards/$1 /${SCRIPT_FILE_8MB } > ${PKG_TMP_DIR} /${SCRIPT_FILE_8MB} || { echo >&2 " Cannot create ${SCRIPT_FILE_8MB} file! Aborting." ; exit 1; }
100+ cat boards/$1 /${SCRIPT_NAME_8MB } > ${PKG_TMP_DIR} /${SCRIPT_FILE_8MB} || { echo >&2 " Cannot create ${SCRIPT_FILE_8MB} file! Aborting." ; exit 1; }
116101
117- tar -czf ${RELEASE_DIR} /${FILE_NAME} -C ${PKG_TMP_DIR} ${BOOT_FILE} ${PART_FILE_4MB} ${ PART_FILE_8MB} ${APP_FILE} ${SCRIPT_FILE_8MB} ${FACTORY_FILE} || { echo >&2 " Cannot create ${RELEASE_DIR} /${FILE_NAME} ! Aborting." ; exit 1; }
102+ tar -czf ${RELEASE_DIR} /${FILE_NAME} -C ${PKG_TMP_DIR} ${BOOT_FILE} ${PART_FILE_8MB} ${APP_FILE} ${SCRIPT_FILE_8MB} ${FACTORY_FILE} || { echo >&2 " Cannot create ${RELEASE_DIR} /${FILE_NAME} ! Aborting." ; exit 1; }
118103echo " Release package ${FILE_NAME} created successfully."
119104
120105rm -rf ${PKG_TMP_DIR} /
0 commit comments