Skip to content

Commit ac47c9d

Browse files
simbit18xiaoxiang781216
authored andcommitted
ci/docker: add Raspberry Pi picotool and fix GN build
- Add prebuilt Raspberry Pi picotool - fix GN build with: git checkout 5d0a4153b0bcc86c5a23310d5b648a587be3c56d Signed-off-by: simbit18 <[email protected]>
1 parent 6b2a5df commit ac47c9d

File tree

1 file changed

+19
-3
lines changed

1 file changed

+19
-3
lines changed

tools/ci/docker/linux/Dockerfile

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -q
4343
nodejs \
4444
npm \
4545
unzip \
46-
zip
46+
zip \
47+
python3
4748

4849
RUN mkdir -p /tools
4950
WORKDIR /tools
@@ -67,8 +68,10 @@ RUN cd nuttx-tools/kconfig-frontends \
6768
RUN mkdir -p /tools/gn \
6869
&& cd /tools/gn \
6970
&& git clone https://gn.googlesource.com/gn gn \
70-
&& cd gn && ./build/gen.py \
71-
&& cd out && ninja
71+
&& cd gn \
72+
&& git checkout 5d0a4153b0bcc86c5a23310d5b648a587be3c56d \
73+
&& python3 build/gen.py \
74+
&& ninja -C out
7275

7376
# Upgrade nodejs to the stable version we need before install zap
7477
RUN npm install -g n && n 20.10.0 node && hash -r
@@ -302,6 +305,15 @@ RUN mkdir -p pico-sdk && \
302305
curl -s -L "https://github.com/raspberrypi/pico-sdk/releases/download/2.2.0/pico-sdk-2.2.0.tar.gz" \
303306
| tar -C pico-sdk --strip-components 1 -xz
304307

308+
###############################################################################
309+
# Build image for tool required by Raspberry Pi picotool builds
310+
###############################################################################
311+
FROM nuttx-toolchain-base AS nuttx-toolchain-raspberrypi-picotool
312+
# Download the prebuilt Raspberry Pi picotool
313+
RUN mkdir -p picotool && \
314+
curl -s -L "https://github.com/raspberrypi/pico-sdk-tools/releases/download/v2.2.0-0/picotool-2.2.0-x86_64-lin.tar.gz" \
315+
| tar -C picotool --strip-components 1 -xz
316+
305317
###############################################################################
306318
# Final Docker image used for running CI system. This includes all toolchains
307319
# supported by the CI system.
@@ -493,6 +505,10 @@ COPY --from=nuttx-toolchain-esp32 /tools/blobs/* /tools/blobs/esp-bins/
493505
COPY --from=nuttx-toolchain-raspberrypi-pico-sdk /tools/pico-sdk/ pico-sdk/
494506
ENV PICO_SDK_PATH="/tools/pico-sdk"
495507

508+
# Raspberry Pi picotool
509+
COPY --from=nuttx-toolchain-raspberrypi-picotool /tools/picotool/ picotool/
510+
ENV PATH="/tools/picotool:$PATH"
511+
496512
# gn tool
497513
RUN mkdir -p /tools/gn
498514
COPY --from=nuttx-tools /tools/gn/gn/out/gn /tools/gn

0 commit comments

Comments
 (0)