From a29c70c9b40b9f6cab9789805e445683418580f0 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 23 Dec 2021 17:09:05 +1100 Subject: [PATCH] esp8266: Allow building a board to any dest directory. Signed-off-by: Damien George --- ports/esp8266/boards/esp8266_common.ld | 4 ++-- tools/autobuild/build-esp8266-latest.sh | 13 ++++--------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ports/esp8266/boards/esp8266_common.ld b/ports/esp8266/boards/esp8266_common.ld index f40ff1e5fc..ae1509faee 100644 --- a/ports/esp8266/boards/esp8266_common.ld +++ b/ports/esp8266/boards/esp8266_common.ld @@ -144,7 +144,7 @@ SECTIONS *shared/timeutils/*.o*(.literal*, .text*) *drivers/bus/*.o(.literal* .text*) - build-*/main.o(.literal* .text*) + */main.o(.literal* .text*) *fatfs_port.o(.literal* .text*) *gccollect.o(.literal* .text*) *gchelper.o(.literal* .text*) @@ -182,7 +182,7 @@ SECTIONS */frozen.o(.rodata.mp_frozen_content) /* frozen modules */ /* for -mforce-l32 */ - build-*/*.o(.rodata*) + */*.o(.rodata*) _irom0_text_end = ABSOLUTE(.); } >irom0_0_seg :irom0_0_phdr diff --git a/tools/autobuild/build-esp8266-latest.sh b/tools/autobuild/build-esp8266-latest.sh index fe79587fd1..72c6ee9886 100755 --- a/tools/autobuild/build-esp8266-latest.sh +++ b/tools/autobuild/build-esp8266-latest.sh @@ -13,9 +13,7 @@ function do_build() { shift shift echo "building $descr $board" - #build_dir=/tmp/esp8266-build-$board - build_dir=build-$board # until esp8266.ld is fixed - rm -rf $build_dir # be sure we don't have anything leftover from a previous build + build_dir=/tmp/esp8266-build-$board $MICROPY_AUTOBUILD_MAKE $@ BOARD=$board BUILD=$build_dir || exit 1 mv $build_dir/firmware-combined.bin $dest_dir/$descr$fw_tag.bin mv $build_dir/firmware.elf $dest_dir/$descr$fw_tag.elf @@ -29,19 +27,16 @@ function do_build_ota() { shift shift echo "building $descr $board" - #build_dir=/tmp/esp8266-build-$board - build_dir=build-$board # until esp8266.ld is fixed - rm -rf $build_dir # be sure we don't have anything leftover from a previous build + build_dir=/tmp/esp8266-build-$board $MICROPY_AUTOBUILD_MAKE $@ BOARD=$board BUILD=$build_dir || exit 1 cat $yaota8266/yaota8266.bin $build_dir/firmware-ota.bin > $dest_dir/$descr$fw_tag.bin - cwd=$(pwd) pushd $yaota8266/ota-client - $PYTHON3 ota_client.py sign $cwd/$build_dir/firmware-ota.bin + $PYTHON3 ota_client.py sign $build_dir/firmware-ota.bin popd mv $build_dir/firmware-ota.bin.ota $dest_dir/$descr$fw_tag.ota mv $build_dir/firmware.elf $dest_dir/$descr$fw_tag.elf mv $build_dir/firmware.map $dest_dir/$descr$fw_tag.map - #rm -rf $build_dir + rm -rf $build_dir } # check/get parameters