Skip to content

Commit fc1270d

Browse files
authored
update build scripts
1 parent 9749955 commit fc1270d

File tree

8 files changed

+10
-22
lines changed

8 files changed

+10
-22
lines changed

build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ rm -rf build sdkconfig out
119119

120120
# Add components version info
121121
mkdir -p "$AR_TOOLS/sdk" && rm -rf version.txt && rm -rf "$AR_TOOLS/sdk/versions.txt"
122-
component_version="esp-idf: "$(git -C "$IDF_PATH" symbolic-ref --short HEAD)" "$(git -C "$IDF_PATH" rev-parse --short HEAD)
122+
component_version="esp-idf: "$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD)" "$(git -C "$IDF_PATH" rev-parse --short HEAD)
123123
echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt"
124124
for component in `ls "$AR_COMPS"`; do
125125
if [ -d "$AR_COMPS/$component/.git" ] || [ -d "$AR_COMPS/$component/.github" ]; then
126-
component_version="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)
126+
component_version="$component: "$(git -C "$AR_COMPS/$component" symbolic-ref --short HEAD || git -C "$AR_COMPS/$component" tag --points-at HEAD)" "$(git -C "$AR_COMPS/$component" rev-parse --short HEAD)
127127
echo $component_version >> version.txt && echo $component_version >> "$AR_TOOLS/sdk/versions.txt"
128128
fi
129129
done

main/Kconfig.projbuild

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@ config LIB_BUILDER_FLASHFREQ
1313
default "40m" if ESPTOOLPY_FLASHFREQ_40M
1414
default "26m" if ESPTOOLPY_FLASHFREQ_26M
1515
default "20m" if ESPTOOLPY_FLASHFREQ_20M
16+
17+
config LIB_BUILDER_COMPILE
18+
bool
19+
default y

tools/archive-build.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD || echo "")
4-
IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || echo "")
4+
IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD || echo "")
55

66
idf_version_string=${IDF_BRANCH//\//_}"-$IDF_COMMIT"
77
archive_path="dist/arduino-esp32-libs-solo1-$idf_version_string.tar.gz"
@@ -25,7 +25,6 @@ rm -rf arduino-esp32/platform.txt
2525
rm -rf arduino-esp32/package.json
2626
cp -f platform.txt arduino-esp32/
2727
cp -Rf tools/sdk arduino-esp32/tools/
28-
cp -f tools/esptool.py arduino-esp32/tools/
2928
cp -f tools/gen_esp32part.py arduino-esp32/tools/
3029
cp -f tools/platformio-build-*.py arduino-esp32/tools/
3130
cp ../package.json arduino-esp32/package.json

tools/config.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ AR_COMPS="$AR_ROOT/components"
4646
AR_OUT="$AR_ROOT/out"
4747
AR_TOOLS="$AR_OUT/tools"
4848
AR_PLATFORM_TXT="$AR_OUT/platform.txt"
49-
AR_ESPTOOL_PY="$AR_TOOLS/esptool.py"
5049
AR_GEN_PART_PY="$AR_TOOLS/gen_esp32part.py"
5150
AR_SDK="$AR_TOOLS/sdk/$IDF_TARGET"
5251

tools/copy-bootloader.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,8 @@ BOOTCONF=$FLASH_MODE"_$FLASH_FREQ"
77

88
source ./tools/config.sh
99

10-
echo "Copying bootloader: $AR_SDK/bin/bootloader_$BOOTCONF.bin"
10+
echo "Copying bootloader: $AR_SDK/bin/bootloader_$BOOTCONF.elf"
1111

1212
mkdir -p "$AR_SDK/bin"
1313

14-
# Workaround for getting the bootloaders to be flashable with esptool v4.x
15-
# It might still be needed for IDF5, but using the included esptool instead
16-
#cp "build/bootloader/bootloader.bin" "$AR_SDK/bin/bootloader_$BOOTCONF.bin"
17-
18-
# We use esptool v.4.21 in Tasmota IDF fork so no need to clone here
19-
20-
#if [ ! -e "tools/esptool" ]; then
21-
# git clone https://github.com/espressif/esptool tools/esptool
22-
#fi
23-
./esp-idf/components/esptool_py/esptool/esptool.py --chip "$IDF_TARGET" elf2image --dont-append-digest "build/bootloader/bootloader.elf" -o "$AR_SDK/bin/bootloader_$BOOTCONF.bin"
2414
cp "build/bootloader/bootloader.elf" "$AR_SDK/bin/bootloader_$BOOTCONF.elf"

tools/copy-libs.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,9 +481,6 @@ rm -rf platform_start.txt platform_mid.txt 1platform_mid.txt
481481
# sdkconfig
482482
cp -f "sdkconfig" "$AR_SDK/sdkconfig"
483483

484-
# esptool.py
485-
cp "$IDF_COMPS/esptool_py/esptool/esptool.py" "$AR_ESPTOOL_PY"
486-
487484
# gen_esp32part.py
488485
cp "$IDF_COMPS/partition_table/gen_esp32part.py" "$AR_GEN_PART_PY"
489486

tools/copy-to-arduino.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,9 @@ fi
1616

1717
echo "Installing new libraries to $ESP32_ARDUINO"
1818

19-
rm -rf $ESP32_ARDUINO/tools/sdk $ESP32_ARDUINO/tools/esptool.py $ESP32_ARDUINO/tools/gen_esp32part.py $ESP32_ARDUINO/tools/platformio-build-*.py $ESP32_ARDUINO/platform.txt
19+
rm -rf $ESP32_ARDUINO/tools/sdk $ESP32_ARDUINO/tools/gen_esp32part.py $ESP32_ARDUINO/tools/platformio-build-*.py $ESP32_ARDUINO/platform.txt
2020

2121
cp -f $AR_OUT/platform.txt $ESP32_ARDUINO/
2222
cp -Rf $AR_TOOLS/sdk $ESP32_ARDUINO/tools/
23-
cp -f $AR_TOOLS/esptool.py $ESP32_ARDUINO/tools/
2423
cp -f $AR_TOOLS/gen_esp32part.py $ESP32_ARDUINO/tools/
2524
cp -f $AR_TOOLS/platformio-build-*.py $ESP32_ARDUINO/tools/

tools/install-esp-idf.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ cp "$IDF_PATH/components/esp32-camera/driver/private_include/cam_hal.h" "$IDF_PA
4646

4747
source $IDF_PATH/export.sh
4848
export IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD)
49-
export IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD)
49+
export IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || git -C "$IDF_PATH" tag --points-at HEAD)

0 commit comments

Comments
 (0)