Browse Source

esp8266: Allow building a board to any dest directory.

Signed-off-by: Damien George <damien@micropython.org>
pull/8107/head
Damien George 3 years ago
parent
commit
a29c70c9b4
  1. 4
      ports/esp8266/boards/esp8266_common.ld
  2. 13
      tools/autobuild/build-esp8266-latest.sh

4
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

13
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

Loading…
Cancel
Save