diff --git a/tools/ci/cibuild.sh b/tools/ci/cibuild.sh index c1e0e9e608..a5ce2f6992 100755 --- a/tools/ci/cibuild.sh +++ b/tools/ci/cibuild.sh @@ -209,16 +209,16 @@ function elf-toolchain { } function gen-romfs { - add_path "${tools}"/genromfs/usr/bin - - if [ ! -f "${tools}/genromfs/usr/bin/genromfs" ]; then - git clone https://bitbucket.org/nuttx/tools.git "${tools}"/nuttx-tools - cd "${tools}"/nuttx-tools - tar zxf genromfs-0.5.2.tar.gz -C "${tools}" - cd "${tools}"/genromfs-0.5.2 - make install PREFIX="${tools}"/genromfs - cd "${tools}" - rm -rf genromfs-0.5.2 + if ! type genromfs &> /dev/null; then + case ${os} in + Darwin) + brew tap PX4/px4 + brew install genromfs + ;; + Linux) + apt-get install -y genromfs + ;; + esac fi } @@ -242,6 +242,7 @@ function kconfig-frontends { add_path "${tools}"/kconfig-frontends/bin if [ ! -f "${tools}/kconfig-frontends/bin/kconfig-conf" ]; then + git clone https://bitbucket.org/nuttx/tools.git "${tools}"/nuttx-tools cd "${tools}"/nuttx-tools/kconfig-frontends ./configure --prefix="${tools}"/kconfig-frontends \ --disable-kconfig --disable-nconf --disable-qconf \ diff --git a/tools/ci/docker/linux/Dockerfile b/tools/ci/docker/linux/Dockerfile index ec37e34e00..045c80547d 100644 --- a/tools/ci/docker/linux/Dockerfile +++ b/tools/ci/docker/linux/Dockerfile @@ -50,12 +50,6 @@ RUN mkdir bloaty -p \ && cmake -DCMAKE_SYSTEM_PREFIX_PATH=/tools/bloaty \ && make install -RUN cd nuttx-tools \ - && mkdir genromfs \ - && tar -C genromfs --strip-components=1 -xf genromfs-0.5.2.tar.gz \ - && cd genromfs \ - && make install PREFIX=/tools/genromfs - RUN cd nuttx-tools/kconfig-frontends \ && ./configure --enable-mconf --disable-gconf --disable-qconf --enable-static --prefix=/tools/kconfig-frontends \ && make install @@ -239,6 +233,7 @@ RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -y -q gcc \ gcc-avr \ gcc-multilib \ + genromfs \ gettext \ git \ lib32z1-dev \ @@ -302,8 +297,6 @@ WORKDIR /tools # Pull in the tools we just built for nuttx COPY --from=nuttx-tools /tools/bloaty/ bloaty/ ENV PATH="/tools/bloaty/bin:$PATH" -COPY --from=nuttx-tools /tools/genromfs/ /tools/genromfs/ -ENV PATH="/tools/genromfs/usr/bin:$PATH" COPY --from=nuttx-tools /tools/kconfig-frontends/ kconfig-frontends/ ENV PATH="/tools/kconfig-frontends/bin:$PATH"