-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c68fde2
commit 2a5cfba
Showing
4 changed files
with
59 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM debian:11-slim | ||
|
||
ARG workdir=/work | ||
ENV CROSS_SYSROOT=/var/cross-sysroot | ||
|
||
# install basic utilities | ||
RUN apt update && apt -y install git rsync python3 | ||
|
||
# git might complain about ownership, so ignore it | ||
RUN git config --global --add safe.directory $workdir | ||
|
||
# install aarch64 cross-compiler | ||
RUN apt -y install g++-aarch64-linux-gnu | ||
|
||
# install basic build tools | ||
RUN apt -y install build-essential make ccache cmake ninja-build | ||
|
||
# setup CMake for cross-compiling | ||
RUN mkdir -p ${CROSS_SYSROOT}/include/ | ||
RUN mkdir -p ${CROSS_SYSROOT}/lib/ | ||
ENV CMAKE_TOOLCHAIN_FILE=${CROSS_SYSROOT}/toolchain.cmake | ||
COPY linux-aarch64-tc.cmake ${CMAKE_TOOLCHAIN_FILE} | ||
COPY cmake-cross.sh /usr/bin/cmake-cross | ||
|
||
WORKDIR $workdir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM debian:11-slim | ||
|
||
ARG workdir=/work | ||
ENV CROSS_SYSROOT=/var/cross-sysroot | ||
|
||
# install basic utilities | ||
RUN apt update && apt -y install git rsync python3 | ||
|
||
# git might complain about ownership, so ignore it | ||
RUN git config --global --add safe.directory $workdir | ||
|
||
# install armhf cross-compiler | ||
RUN apt -y install g++-arm-linux-gnueabihf | ||
|
||
# install basic build tools | ||
RUN apt -y install build-essential make ccache cmake ninja-build | ||
|
||
# setup CMake for cross-compiling | ||
RUN mkdir -p ${CROSS_SYSROOT}/include/ | ||
RUN mkdir -p ${CROSS_SYSROOT}/lib/ | ||
ENV CMAKE_TOOLCHAIN_FILE=${CROSS_SYSROOT}/toolchain.cmake | ||
COPY linux-armhf-tc.cmake ${CMAKE_TOOLCHAIN_FILE} | ||
COPY cmake-cross.sh /usr/bin/cmake-cross | ||
|
||
WORKDIR $workdir |