Skip to content

Commit f00fe32

Browse files
committed
Create nuttx_esp32_openeth.yml
1 parent 5596954 commit f00fe32

File tree

1 file changed

+124
-0
lines changed

1 file changed

+124
-0
lines changed
+124
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
name: Nuttx-esp32-openeth QEMU
2+
3+
permissions:
4+
## Allow publishing of GitHub Release
5+
contents: write
6+
on:
7+
workflow_dispatch:
8+
push:
9+
paths:
10+
- '.github/workflows/nuttx_esp32_openeth.yml'
11+
12+
jobs:
13+
nuttx-esp32-openeth:
14+
runs-on: windows-latest
15+
defaults:
16+
run:
17+
shell: msys2 {0}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: msys2/setup-msys2@v2
21+
with:
22+
msystem: MSYS
23+
update: false
24+
install: >-
25+
base-devel
26+
gcc
27+
gperf
28+
automake
29+
autoconf
30+
git
31+
python3
32+
ncurses-devel
33+
unzip
34+
zip
35+
tio
36+
zlib-devel
37+
cmake
38+
ninja
39+
python-pip
40+
vim
41+
42+
- name: pip3 install
43+
run: |
44+
echo 'pip3 install'
45+
uname
46+
pip3 install --root-user-action=ignore --no-cache-dir pyelftools cxxfilt kconfiglib
47+
48+
- name: Checkout Source Files
49+
run: |
50+
echo 'Checkout Source Files'
51+
mkdir nuttxspace
52+
ls -a
53+
cd nuttxspace
54+
## git clone https://github.com/apache/incubator-nuttx nuttx
55+
## git clone https://github.com/apache/incubator-nuttx-apps apps
56+
git clone --single-branch --branch simbit18-20240306 https://github.com/simbit18/nuttx.git nuttx
57+
git clone --single-branch --branch simbit18-20240306 https://github.com/simbit18/nuttx-apps.git apps
58+
## 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
59+
## 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
60+
## tar zxf nuttx.tar.gz --one-top-level=nuttx --strip-components 1
61+
## tar zxf apps.tar.gz --one-top-level=apps --strip-components 1
62+
## ls -a
63+
## cd nuttx
64+
ls -a
65+
echo 'Copy tools'
66+
cp -f ../tools/esp32/install_tools_esp.sh install_tools_esp.sh
67+
ls -a
68+
./install_tools_esp.sh
69+
70+
- name: Build
71+
run: |
72+
echo 'Build'
73+
source ./nuttxspace/tools/env.sh
74+
## Move to nuttx
75+
cd nuttxspace/nuttx
76+
ls -a
77+
78+
## Show the xtensa-esp32-elf-gcc version
79+
xtensa-esp32-elf-gcc --version
80+
## ls -a ../../
81+
cp -f ../../tools/esp32/Config.mk tools/esp32/Config.mk
82+
83+
## Configure the build
84+
./tools/configure.sh -g esp32-devkitc:qemu-openeth
85+
86+
## echo 'Enable CONFIG_ESP32_QEMU_IMAGE'
87+
## Enable CONFIG_ESP32_QEMU_IMAGE
88+
## kconfig-tweak --enable CONFIG_ESP32_QEMU_IMAGE
89+
## kconfig-tweak --enable CONFIG_ESP32_MERGE_BINS
90+
91+
## make savedefconfig
92+
93+
mkdir nuttxesp32
94+
95+
## Preserve the build config
96+
cp .config nuttxesp32/nuttx.config
97+
98+
make ESPTOOL_BINDIR=../tools/blobs EXTRAFLAGS=-DESP32_IGNORE_CHIP_REVISION_CHECK -j4
99+
100+
ls -a
101+
## touch nuttxesp32/nuttx.merged.bin
102+
## 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
103+
ls -a
104+
105+
# to_do
106+
cp nuttx.merged.bin nuttxesp32/nuttx.merged.bin
107+
cp nuttx.bin nuttxesp32/nuttx.bin
108+
cp defconfig nuttxesp32/defconfig
109+
cp System.map nuttxesp32/System.map
110+
zip -r nuttxesp32.zip nuttxesp32
111+
112+
- name: Get Current Date
113+
id: date
114+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
115+
116+
- name: Publish the GitHub Release
117+
uses: softprops/action-gh-release@v2
118+
with:
119+
tag_name: nuttx-esp32-qemu-openeth-${{ steps.date.outputs.date }}
120+
draft: false
121+
prerelease: false
122+
generate_release_notes: false
123+
files: |
124+
nuttxspace/nuttx/nuttxesp32.zip

0 commit comments

Comments
 (0)