@@ -10,15 +10,6 @@ BOARD=$(echo $1)
10
10
11
11
FACTORY_BIN_DIR=" $( pwd) /factory_fw/binary"
12
12
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
-
22
13
if [ $4 -eq 1 ]; then
23
14
SCRIPT_NAME_4MB=" script_4MB_enc"
24
15
if [ $5 -eq 1 ]; then
@@ -66,10 +57,8 @@ VERSION=$(cat pycom_version.h |grep SW_VERSION_NUMBER | cut -d'"' -f2)
66
57
PKG_TMP_DIR=" ${BUILD_DIR} /firmware_package"
67
58
mkdir -p ${PKG_TMP_DIR}
68
59
69
- PART_FILE_4MB=' '
70
60
PART_FILE_8MB=' '
71
- SCRIPT_FILE_4MB=' '
72
- SCRIPT_FILE_8MB=' '
61
+ SCRIPT_FILE_8MB=' script_8MB'
73
62
74
63
if [ $4 -eq 1 ]; then
75
64
BOOT_FILE=' bootloader-reflash-digest.bin_enc'
@@ -93,28 +82,24 @@ cp ${BUILD_DIR}/${APP_FILE} ${PKG_TMP_DIR}
93
82
if [ $4 -eq 1 ]; then
94
83
if [ $5 -eq 1 ]; then
95
84
PART_FILE_8MB=' partitions_8MB_small_factory_fw.bin_enc'
96
- SCRIPT_FILE_8MB=' script_8MB_small_factory_fw_enc'
97
85
else
98
86
PART_FILE_8MB=' partitions_8MB_normal_factory_fw.bin_enc'
99
- SCRIPT_FILE_8MB=' script_8MB_normal_factory_fw_enc'
100
87
fi
101
88
else
102
89
if [ $5 -eq 1 ]; then
103
90
PART_FILE_8MB=' partitions_8MB_small_factory_fw.bin'
104
- SCRIPT_FILE_8MB=' script_8MB_small_factory_fw'
105
91
else
106
92
PART_FILE_8MB=' partitions_8MB_normal_factory_fw.bin'
107
- SCRIPT_FILE_8MB=' script_8MB_normal_factory_fw'
108
93
fi
109
94
fi
110
95
111
96
cp ${BUILD_DIR} /lib/${PART_FILE_8MB} ${PKG_TMP_DIR}
112
97
if [ $5 -eq 1 ]; then
113
98
cp ${FACTORY_BIN_DIR} /${FACTORY_FILE} ${PKG_TMP_DIR}
114
99
fi
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; }
116
101
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; }
118
103
echo " Release package ${FILE_NAME} created successfully."
119
104
120
105
rm -rf ${PKG_TMP_DIR} /
0 commit comments