Fix IDF commit based builds and add bootloader elfs

This commit is contained in:
me-no-dev 2022-09-16 14:32:23 +03:00
parent 7015cc11f5
commit d4158af358
3 changed files with 10 additions and 4 deletions

View file

@ -1,7 +1,7 @@
#!/bin/bash
IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD)
IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD)
IDF_COMMIT=$(git -C "$IDF_PATH" rev-parse --short HEAD || echo "")
IDF_BRANCH=$(git -C "$IDF_PATH" symbolic-ref --short HEAD || echo "")
idf_version_string=${IDF_BRANCH//\//_}"-$IDF_COMMIT"
archive_path="dist/arduino-esp32-libs-$idf_version_string.tar.gz"

View file

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

View file

@ -28,9 +28,14 @@ if [ -z $AR_BRANCH ]; then
if [[ "$current_branch" != "master" && `git_branch_exists "$AR_COMPS/arduino" "$current_branch"` == "1" ]]; then
export AR_BRANCH="$current_branch"
else
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "idf-$IDF_BRANCH"`
if [ -z "$IDF_COMMIT" ]; then #commit was not specified at build time
AR_BRANCH_NAME="idf-$IDF_BRANCH"
else
AR_BRANCH_NAME="idf-$IDF_COMMIT"
fi
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "$AR_BRANCH_NAME"`
if [ "$has_ar_branch" == "1" ]; then
export AR_BRANCH="idf-$IDF_BRANCH"
export AR_BRANCH="$AR_BRANCH_NAME"
else
has_ar_branch=`git_branch_exists "$AR_COMPS/arduino" "$AR_PR_TARGET_BRANCH"`
if [ "$has_ar_branch" == "1" ]; then