-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuildsuffix
executable file
·43 lines (35 loc) · 1.07 KB
/
buildsuffix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/csh -f
setenv SDKCONFIG "sdkconfig"
if("$1" != "") setenv SDKCONFIG "$1"
if(! -e "$SDKCONFIG") then
echo "Missing $SDKCONFIG"
exit 0
endif
# Match the code in revk.c for OTA suffix defaults
# suffix1
grep -q CONFIG_IDF_TARGET_ESP32=y "$SDKCONFIG"
if(! $status) echo -n "-S1"
grep -q CONFIG_IDF_TARGET_ESP32S2=y "$SDKCONFIG"
if(! $status) echo -n "-S2"
grep -q CONFIG_IDF_TARGET_ESP32S3=y "$SDKCONFIG"
if(! $status) echo -n "-S3"
grep -q CONFIG_IDF_TARGET_ESPC3=y "$SDKCONFIG"
if(! $status) echo -n "-C3"
grep -q CONFIG_IDF_TARGET_ESPH2=y "$SDKCONFIG"
if(! $status) echo -n "-H2"
# suffix2
grep -q CONFIG_FREERTOS_UNICORE=y "$SDKCONFIG"
if(! $status) echo -n "-SOLO"
# suffix3
grep -q CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y "$SDKCONFIG"
if(! $status) then
grep -q CONFIG_ESP32_SPIRAM_SUPPORT=y "$SDKCONFIG"
if(! $status) echo -n "-PICO"
endif
# suffix4
grep -q CONFIG_ESP32_REV_MIN_3=y "$SDKCONFIG"
if(! $status) echo -n "-V3"
grep -q CONFIG_ESP32_REV_MIN_2=y "$SDKCONFIG"
if(! $status) echo -n "-V2"
grep -q CONFIG_ESP32_REV_MIN_1=y "$SDKCONFIG"
if(! $status) echo -n "-V1"