Skip to content

Commit d4158af

Browse files
committed
Fix IDF commit based builds and add bootloader elfs
1 parent 7015cc1 commit d4158af

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

tools/archive-build.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

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

66
idf_version_string=${IDF_BRANCH//\//_}"-$IDF_COMMIT"
77
archive_path="dist/arduino-esp32-libs-$idf_version_string.tar.gz"

tools/copy-bootloader.sh

+1
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ if [ ! -e "tools/esptool" ]; then
1818
git clone https://github.com/espressif/esptool tools/esptool
1919
fi
2020
./tools/esptool/esptool.py --chip "$IDF_TARGET" elf2image --dont-append-digest "build/bootloader/bootloader.elf" -o "$AR_SDK/bin/bootloader_$BOOTCONF.bin"
21+
cp "build/bootloader/bootloader.elf" "$AR_SDK/bin/bootloader_$BOOTCONF.elf"

tools/update-components.sh

+7-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,14 @@ if [ -z $AR_BRANCH ]; then
2828
if [[ "$current_branch" != "master" && `git_branch_exists "$AR_COMPS/arduino" "$current_branch"` == "1" ]]; then
2929
export AR_BRANCH="$current_branch"
3030
else
31-
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "idf-$IDF_BRANCH"`
31+
if [ -z "$IDF_COMMIT" ]; then #commit was not specified at build time
32+
AR_BRANCH_NAME="idf-$IDF_BRANCH"
33+
else
34+
AR_BRANCH_NAME="idf-$IDF_COMMIT"
35+
fi
36+
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "$AR_BRANCH_NAME"`
3237
if [ "$has_ar_branch" == "1" ]; then
33-
export AR_BRANCH="idf-$IDF_BRANCH"
38+
export AR_BRANCH="$AR_BRANCH_NAME"
3439
else
3540
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "$AR_PR_TARGET_BRANCH"`
3641
if [ "$has_ar_branch" == "1" ]; then

0 commit comments

Comments
 (0)