eive-obsw/bsp_q7s/Dockerfile

33 lines
990 B
Docker
Raw Normal View History

2021-05-24 12:43:22 +02:00
FROM ubuntu:latest
# FROM alpine:latest
2021-05-24 14:35:14 +02:00
RUN apt-get update && apt-get install -y curl cmake g++
2021-05-24 14:13:47 +02:00
2021-05-24 14:35:14 +02:00
# Q7S root filesystem, required for cross-compilation
RUN mkdir -p /usr/rootfs; \
2021-05-24 15:09:11 +02:00
curl https://eive-cloud.irs.uni-stuttgart.de/index.php/s/agnJGYeRf6fw2ci/download/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \
2021-05-24 14:35:14 +02:00
| tar xvz -C /usr/rootfs
# Q7S C++ cross-compiler
RUN mkdir -p /usr/tools; \
2021-05-24 15:09:11 +02:00
curl https://eive-cloud.irs.uni-stuttgart.de/index.php/s/2Fp2ag6NGnbtAsK/download/gcc-arm-linux-gnueabi.tar.gz usr/tools \
2021-05-24 14:35:14 +02:00
| tar xvz -C /usr/tools
2021-05-24 14:13:47 +02:00
2021-05-24 12:43:22 +02:00
# RUN apk add cmake make g++
2021-05-24 14:35:14 +02:00
# Required for cmake build
ENV Q7S_SYSROOT="/usr/rootfs/cortexa9hf-neon-xiphos-linux-gnueabi"
ENV PATH=$PATH:"/usr/tools/gcc-arm-linux-gnueabi/bin"
2021-05-24 12:43:22 +02:00
WORKDIR /usr/src/app
COPY . .
RUN set -ex; \
2021-05-24 14:35:14 +02:00
rm -rf build-q7s; \
mkdir build-q7s; \
cd build-q7s; \
cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=linux -DTGT_BSP="arm/q7s" ..;
2021-05-24 12:43:22 +02:00
2021-05-24 14:35:14 +02:00
ENTRYPOINT ["cmake", "--build", "build-q7s"]
CMD ["-j"]
# CMD ["bash"]