Skip to content

add --depth 1

add --depth 1 #3

name: Nuttx-esp32-openeth QEMU
permissions:
## Allow publishing of GitHub Release
contents: write
on:
workflow_dispatch:
push:
paths:
- '.github/workflows/nuttx_esp32_openeth.yml'
jobs:
nuttx-esp32-openeth:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: MSYS
update: false
install: >-
base-devel
gcc
gperf
automake
autoconf
git
python3
ncurses-devel
unzip
zip
tio
zlib-devel
cmake
ninja
python-pip
vim
- name: pip3 install
run: |
echo 'pip3 install'
uname
python3 -m venv --system-site-packages /usr/local
pip3 install --root-user-action=ignore --no-cache-dir pyelftools cxxfilt kconfiglib
- name: Checkout Source Files
run: |
echo 'Checkout Source Files'
mkdir nuttxspace
ls -a
cd nuttxspace
## git clone https://github.com/apache/incubator-nuttx nuttx
## git clone https://github.com/apache/incubator-nuttx-apps apps
git clone --depth 1 --single-branch --branch simbit18-20240306 https://github.com/simbit18/nuttx.git nuttx
git clone --depth 1 --single-branch --branch simbit18-20240306 https://github.com/simbit18/nuttx-apps.git apps
## curl -L https://www.apache.org/dyn/closer.lua/nuttx/12.0.0/apache-nuttx-12.0.0.tar.gz?action=download -o nuttx.tar.gz
## curl -L https://www.apache.org/dyn/closer.lua/nuttx/12.0.0/apache-nuttx-apps-12.0.0.tar.gz?action=download -o apps.tar.gz
## tar zxf nuttx.tar.gz --one-top-level=nuttx --strip-components 1
## tar zxf apps.tar.gz --one-top-level=apps --strip-components 1
## ls -a
## cd nuttx
ls -a
echo 'Copy tools'
cp -f ../tools/esp32/install_tools_esp.sh install_tools_esp.sh
ls -a
./install_tools_esp.sh
- name: Build
run: |
echo 'Build'
source ./nuttxspace/tools/env.sh
## Move to nuttx
cd nuttxspace/nuttx
ls -a
## Show the xtensa-esp32-elf-gcc version
xtensa-esp32-elf-gcc --version
## ls -a ../../
cp -f ../../tools/esp32/Config.mk tools/esp32/Config.mk
## Configure the build
./tools/configure.sh -g esp32-devkitc:qemu-openeth
## echo 'Enable CONFIG_ESP32_QEMU_IMAGE'
## Enable CONFIG_ESP32_QEMU_IMAGE
## kconfig-tweak --enable CONFIG_ESP32_QEMU_IMAGE
## kconfig-tweak --enable CONFIG_ESP32_MERGE_BINS
## make savedefconfig
mkdir nuttxesp32
## Preserve the build config
cp .config nuttxesp32/nuttx.config
make ESPTOOL_BINDIR=../tools/blobs EXTRAFLAGS=-DESP32_IGNORE_CHIP_REVISION_CHECK -j4
ls -a
## touch nuttxesp32/nuttx.merged.bin
## esptool.exe -c esp32 merge_bin --output nuttx.merged.bin --fill-flash-size 4MB -fm dio -ff 40m 0x1000 ../tools/blobs/bootloader-esp32.bin 0x8000 ../tools/blobs/partition-table-esp32.bin 0x10000 nuttx.bin
ls -a
# to_do
cp nuttx.merged.bin nuttxesp32/nuttx.merged.bin
cp nuttx.bin nuttxesp32/nuttx.bin
cp defconfig nuttxesp32/defconfig
cp System.map nuttxesp32/System.map
zip -r nuttxesp32.zip nuttxesp32
- name: Get Current Date
id: date
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
- name: Publish the GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: nuttx-esp32-qemu-openeth-${{ steps.date.outputs.date }}
draft: false
prerelease: false
generate_release_notes: false
files: |
nuttxspace/nuttx/nuttxesp32.zip