Skip to content

Commit a416a44

Browse files
committed
Update OpenSSL for RaspberryPi
1 parent 8f79618 commit a416a44

File tree

2 files changed

+23
-41
lines changed

2 files changed

+23
-41
lines changed

build-linux/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,10 @@ RUN cmake -S cmake \
140140
-B build \
141141
-DBUILD_SHARED_LIBS=OFF \
142142
-Dprotobuf_DISABLE_RTTI=ON \
143+
-Dprotobuf_BUILD_TESTS=OFF \
143144
-DCMAKE_BUILD_TYPE=Release \
144145
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
145-
-DCMAKE_INSTALL_PREFIX=${YADOMS_DEPS}/protobuf \
146-
-Dprotobuf_BUILD_TESTS=OFF
147-
146+
-DCMAKE_INSTALL_PREFIX=${YADOMS_DEPS}/protobuf
148147
RUN cmake --build build -j$(nproc)
149148
RUN cmake --install build
150149
WORKDIR ${WORK_DIR}

build-raspberrypi/Dockerfile

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,12 @@ ARG RPI_SYSROOT_GOOGLEDRIVE_FILE_ID=1OHgyVJljewb-gIryf8cCTS3abb_kcQ1D
6060
# Create a virtualenv and install gdown inside (needed on debian:stable-slim)
6161
# Add venv to PATH and download file from Google Drive
6262
RUN python3 -m venv /opt/venv \
63-
&& /opt/venv/bin/pip install --no-cache-dir gdown > /dev/null
63+
&& /opt/venv/bin/pip install --no-cache-dir gdown
6464
ENV PATH="/opt/venv/bin:${PATH}"
6565
WORKDIR ${WORK_DIR}
66-
RUN gdown --id ${RPI_SYSROOT_GOOGLEDRIVE_FILE_ID} -O rpi2-sysroot.tar.gz > /dev/null
67-
RUN tar -xvzf rpi2-sysroot.tar.gz -C ${RPI_SYSROOT} > /dev/null
68-
RUN rm rpi2-sysroot.tar.gz > /dev/null
66+
RUN gdown --id ${RPI_SYSROOT_GOOGLEDRIVE_FILE_ID} -O rpi2-sysroot.tar.gz
67+
RUN tar -xvzf rpi2-sysroot.tar.gz -C ${RPI_SYSROOT}
68+
RUN rm rpi2-sysroot.tar.gz
6969

7070

7171
#############################################################
@@ -78,11 +78,11 @@ ARG boost_underscore=_
7878
ARG boost_version=$boost_version_major$boost_underscore$boost_version_minor$boost_underscore$boost_version_patch
7979
ARG boost_version_dot=$boost_version_major.$boost_version_minor.$boost_version_patch
8080
WORKDIR ${WORK_DIR}
81-
RUN wget --no-check-certificate --no-verbose https://archives.boost.io/release/$boost_version_dot/source/boost_$boost_version.tar.bz2 > /dev/null \
82-
&& tar xjf boost_$boost_version.tar.bz2 > /dev/null
81+
RUN wget --no-check-certificate --no-verbose https://archives.boost.io/release/$boost_version_dot/source/boost_$boost_version.tar.bz2 \
82+
&& tar xjf boost_$boost_version.tar.bz2
8383
WORKDIR ${WORK_DIR}/boost_$boost_version
8484
RUN echo "using gcc : arm : arm-linux-gnueabihf-g++ ;" > /tmp/user-config.jam \
85-
&& ./bootstrap.sh > /dev/null \
85+
&& ./bootstrap.sh \
8686
&& ./b2 -j$(nproc) \
8787
toolset=gcc-arm \
8888
target-os=linux \
@@ -92,26 +92,26 @@ RUN echo "using gcc : arm : arm-linux-gnueabihf-g++ ;" > /tmp/user-config.jam \
9292
cxxflags="-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard -fPIC" \
9393
--with-atomic --with-chrono --with-date_time --with-filesystem --with-locale --with-process --with-regex --with-system --with-test --with-thread \
9494
--no-samples --no-tests \
95-
--prefix=${YADOMS_DEPS}/boost-rpi2-armhf install > /dev/null
95+
--prefix=${YADOMS_DEPS}/boost-rpi2-armhf install
9696
WORKDIR ${WORK_DIR}
9797
RUN rm -Rf boost_$boost_version \
98-
&& rm boost_$boost_version.tar.bz2 > /dev/null
98+
&& rm boost_$boost_version.tar.bz2
9999

100100

101101
#############################################################
102102
## OpenSSL (cross compile only)
103103
#############################################################
104104
#TODO tester version plus récente
105-
ARG openssl_version=1.1.1k
105+
ARG openssl_version=3.6.0
106106
WORKDIR ${WORK_DIR}
107-
RUN wget --no-check-certificate --no-verbose https://www.openssl.org/source/openssl-1.1.1k.tar.gz \
108-
&& tar xzf openssl-${openssl_version}.tar.gz > /dev/null
107+
RUN wget --no-check-certificate --no-verbose https://www.openssl.org/source/openssl-${openssl_version}.tar.gz \
108+
&& tar xzf openssl-${openssl_version}.tar.gz
109109
WORKDIR ${WORK_DIR}/openssl-${openssl_version}
110-
RUN ./Configure linux-generic32 --prefix=${YADOMS_DEPS}/openssl-rpi2-armhf --cross-compile-prefix=arm-linux-gnueabihf- > /dev/null
111-
RUN make CC="arm-linux-gnueabihf-gcc" AR="arm-linux-gnueabihf-ar" RANLIB="arm-linux-gnueabihf-ranlib" -j$(nproc) \
112-
&& make install > /dev/null
110+
RUN ./Configure linux-generic32 --prefix=${YADOMS_DEPS}/openssl-rpi2-armhf --cross-compile-prefix=arm-linux-gnueabihf-
111+
RUN make CC="arm-linux-gnueabihf-gcc" AR="arm-linux-gnueabihf-ar" RANLIB="arm-linux-gnueabihf-ranlib" -j$(nproc)
112+
RUN make install
113113
WORKDIR ${WORK_DIR}
114-
RUN rm -Rf openssl-${openssl_version} && rm openssl-${openssl_version}.tar.gz > /dev/null
114+
RUN rm -Rf openssl-${openssl_version} && rm openssl-${openssl_version}.tar.gz
115115

116116

117117
#############################################################
@@ -120,7 +120,7 @@ RUN rm -Rf openssl-${openssl_version} && rm openssl-${openssl_version}.tar.gz >
120120
ARG poco_version=1.13.3
121121
WORKDIR ${WORK_DIR}
122122
RUN wget --no-check-certificate --no-verbose http://pocoproject.org/releases/poco-${poco_version}/poco-${poco_version}-all.tar.gz \
123-
&& tar xzf poco-${poco_version}-all.tar.gz > /dev/null
123+
&& tar xzf poco-${poco_version}-all.tar.gz
124124
WORKDIR ${WORK_DIR}/poco-${poco_version}-all/
125125
RUN cmake \
126126
-S . \
@@ -167,44 +167,27 @@ WORKDIR ${WORK_DIR}/protobuf-${protobuf_version}-host
167167
RUN cmake -S cmake \
168168
-B build \
169169
-DCMAKE_BUILD_TYPE=Release \
170+
-DBUILD_SHARED_LIBS=OFF \
171+
-Dprotobuf_DISABLE_RTTI=ON \
170172
-Dprotobuf_BUILD_TESTS=OFF
171173
RUN cmake --build build --target protoc -j$(nproc)
172174
RUN cmake --build build --target install/strip
173-
#TODO ménage
174-
# RUN mkdir build
175-
# WORKDIR ${WORK_DIR}/protobuf-${protobuf_version}-host/build
176-
# RUN cmake -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release ../cmake
177-
# RUN make -j$(nproc) \
178-
# && make install \
179-
# && ldconfig
180175

181176
# Protobuf library (Pi)
182177
WORKDIR ${WORK_DIR}/protobuf-${protobuf_version}
183178
RUN cmake -S cmake \
184179
-B build \
185180
-DCMAKE_TOOLCHAIN_FILE=${YADOMS_DEPS}/toolchain-rpi2.cmake \
186181
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
182+
-DBUILD_SHARED_LIBS=OFF \
183+
-Dprotobuf_DISABLE_RTTI=ON \
187184
-Dprotobuf_BUILD_TESTS=OFF \
188185
-Dprotobuf_WITH_ZLIB=OFF \
189186
-Dprotobuf_BUILD_PROTOC=OFF \
190187
-DProtobuf_PROTOC_EXECUTABLE=/usr/local/bin/protoc \
191188
-DCMAKE_BUILD_TYPE=Release \
192189
-DCMAKE_INSTALL_PREFIX=${YADOMS_DEPS}/protobuf-rpi2-armhf
193190
RUN cmake --build build -j$(nproc) --target install
194-
# RUN ./autogen.sh
195-
# RUN ./configure \
196-
# --enable-shared=no \
197-
# --host=arm-linux \
198-
# CC=arm-linux-gnueabihf-gcc \
199-
# CXX=arm-linux-gnueabihf-g++ \
200-
# AR=arm-linux-gnueabihf-ar \
201-
# STRIP=arm-linux-gnueabihf-strip \
202-
# RANLIB=arm-linux-gnueabihf-ranlib \
203-
# --prefix=${YADOMS_DEPS}/protobuf-rpi2-armhf \
204-
# --with-protoc=protoc \
205-
# --with-pic
206-
# RUN make -j$(nproc) \
207-
# && make install
208191

209192
# Cleanup
210193
WORKDIR ${WORK_DIR}

0 commit comments

Comments
 (0)