tools/ci: Install genromfs instead building it from source code

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-02-12 00:07:17 +08:00 committed by GUIDINGLI
parent 0582930e4b
commit d5b510e023
2 changed files with 12 additions and 18 deletions

View File

@ -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 \

View File

@ -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"