Pull the ESP32 binary blobs from a configurable path

This commit is contained in:
Brennan Ashton 2020-03-22 14:47:51 -07:00 committed by Xiang Xiao
parent 47dc68aa45
commit f787df1d38
3 changed files with 26 additions and 4 deletions

View File

@ -1,3 +1,16 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
name: ci-container name: ci-container
runs: runs:
using: 'docker' using: 'docker'

View File

@ -64,7 +64,7 @@ jobs:
strategy: strategy:
matrix: matrix:
boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, arm-14, arm-15, mips-riscv-x86, sim, xtensa] boards: [arm-01, arm-02, arm-03, arm-04, arm-05, arm-06, arm-07, arm-08, arm-09, arm-10, arm-11, arm-12, arm-13, arm-14, arm-15, mips-riscv-x86-xtensa, sim]
steps: steps:
- name: Checkout nuttx repo - name: Checkout nuttx repo
uses: actions/checkout@v2 uses: actions/checkout@v2

View File

@ -23,6 +23,13 @@
# archive. These replace the default definitions at tools/Config.mk # archive. These replace the default definitions at tools/Config.mk
# POSTBUILD -- Perform post build operations # POSTBUILD -- Perform post build operations
ifdef BLOBDIR
BOOTLOADER=${BLOBDIR}/esp32core/bootloader.bin
PARTITION_TABLE=${BLOBDIR}/esp32core/partition-table.bin
else
BOOTLOADER=$(IDF_PATH)/hello_world/build/bootloader/bootloader.bin
PARTITION_TABLE=$(IDF_PATH)/hello_world/build/partition_table/partition-table.bin
endif
ifeq ($(CONFIG_ESP32CORE_FLASH_IMAGE),y) ifeq ($(CONFIG_ESP32CORE_FLASH_IMAGE),y)
define POSTBUILD define POSTBUILD
@ -38,12 +45,14 @@ define POSTBUILD
echo "run make again to create the nuttx.bin image."; \ echo "run make again to create the nuttx.bin image."; \
else \ else \
echo "Generating: $(NUTTXNAME).bin (ESP32 compatible)"; \ echo "Generating: $(NUTTXNAME).bin (ESP32 compatible)"; \
esptool.py --chip esp32 elf2image --flash_mode dio --flash_size 4MB -o nuttx.bin nuttx; \ esptool.py --chip esp32 elf2image --flash_mode dio --flash_size 4MB -o $(NUTTXNAME).bin nuttx; \
echo "Generated: $(NUTTXNAME).bin (ESP32 compatible)"; \ echo "Generated: $(NUTTXNAME).bin (ESP32 compatible)"; \
echo "Generating: flash_image.bin"; \ echo "Generating: flash_image.bin"; \
echo " Bootloader: $(BOOTLOADER)"; \
echo " Parition Table: $(PARTITION_TABLE)"; \
dd if=/dev/zero bs=1024 count=4096 of=flash_image.bin && \ dd if=/dev/zero bs=1024 count=4096 of=flash_image.bin && \
dd if=$(IDF_PATH)/hello_world/build/bootloader/bootloader.bin bs=1 seek=$(shell printf "%d" 0x1000) of=flash_image.bin conv=notrunc && \ dd if=$(BOOTLOADER) bs=1 seek=$(shell printf "%d" 0x1000) of=flash_image.bin conv=notrunc && \
dd if=$(IDF_PATH)/hello_world/build/partition_table/partition-table.bin bs=1 seek=$(shell printf "%d" 0x8000) of=flash_image.bin conv=notrunc && \ dd if=$(PARTITION_TABLE) bs=1 seek=$(shell printf "%d" 0x8000) of=flash_image.bin conv=notrunc && \
dd if=$(NUTTXNAME).bin bs=1 seek=$(shell printf "%d" 0x10000) of=flash_image.bin conv=notrunc && \ dd if=$(NUTTXNAME).bin bs=1 seek=$(shell printf "%d" 0x10000) of=flash_image.bin conv=notrunc && \
echo "Generated: flash_image.bin (it can be run with 'qemu-system-xtensa -nographic -machine esp32 -drive file=flash_image.bin,if=mtd,format=raw')"; \ echo "Generated: flash_image.bin (it can be run with 'qemu-system-xtensa -nographic -machine esp32 -drive file=flash_image.bin,if=mtd,format=raw')"; \
fi fi