eive-obsw/bsp_q7s/Dockerfile

36 lines
1.1 KiB
Docker
Raw Normal View History

2021-05-24 12:43:22 +02:00
FROM ubuntu:latest
# FROM alpine:latest
2021-06-08 16:45:25 +02:00
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
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-06-09 12:09:13 +02:00
# Q7S root filesystem, required for cross-compilation. Use IPv6 for curl
2021-05-24 14:35:14 +02:00
RUN mkdir -p /usr/rootfs; \
2021-06-09 12:09:13 +02:00
curl -6 --tlsv1 https://eive-cloud.irs.uni-stuttgart.de/index.php/s/dnfMy9kGpgynN6J/download/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \
2021-05-24 14:35:14 +02:00
| tar xvz -C /usr/rootfs
2021-06-09 12:09:13 +02:00
# Q7S C++ cross-compiler. Use IPv6 for curl
2021-05-24 14:35:14 +02:00
RUN mkdir -p /usr/tools; \
2021-06-09 12:09:13 +02:00
curl -6 --tlsv1 https://eive-cloud.irs.uni-stuttgart.de/index.php/s/RMsbHydJc6PSqcz/download/gcc-arm-linux-gnueabi.tar.gz \
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"]