-
Notifications
You must be signed in to change notification settings - Fork 1
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
9ab6ff9
commit bcf6173
Showing
12 changed files
with
132 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
FROM ubuntu:18.04 | ||
|
||
USER root | ||
RUN echo root:1234 | chpasswd | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
build-essential make libssl-dev coreutils lsb-release wget g++-8 gcc-8 gcc-8-aarch64-linux-gnu g++-8-aarch64-linux-gnu patchelf unzip && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 --slave /usr/bin/g++ g++ /usr/bin/g++-8 | ||
|
||
RUN wget "https://github.com/Kitware/CMake/releases/download/v3.28.0/cmake-3.28.0-linux-x86_64.sh" -O cmake.sh && \ | ||
chmod +x cmake.sh && \ | ||
./cmake.sh --skip-license --prefix=/usr/local && \ | ||
rm ./cmake.sh | ||
|
||
RUN apt-get update && \ | ||
apt-get purge -y \ | ||
wget && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN apt-get update && \ | ||
DEBIAN_FRONTEND=noninteractive apt-get install -y \ | ||
openssh-server git && \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN git clone https://github.com/cmakelib/cmakelib.git /cmakelib | ||
RUN echo "export CMLIB_DIR=/cmakelib" >> /root/.bashrc | ||
|
||
RUN sed -ri 's/#?PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | ||
RUN mkdir -p /run/sshd | ||
|
||
COPY init_toolchain.sh /root/ | ||
RUN chmod +x /root/init_toolchain.sh && \ | ||
/root/init_toolchain.sh /root/toolchain /root/tools | ||
COPY lsb_release.txt /root/tools/ | ||
COPY uname.txt /root/tools/ | ||
|
||
ENV CXX=aarch64-linux-gnu-g++-8 | ||
ENV CC=aarch64-linux-gnu-gcc-8 | ||
|
||
RUN sed -ri 's/#?PermitUserEnvironment no/PermitUserEnvironment yes/' /etc/ssh/sshd_config | ||
RUN mkdir /root/.ssh && \ | ||
echo "CXX=${CXX}" > /root/.ssh/environment && \ | ||
echo "CC=${CC}" >> /root/.ssh/environment | ||
|
||
ENTRYPOINT ["/usr/sbin/sshd", "-D", "-o", "ListenAddress=0.0.0.0"] | ||
|
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,54 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
INSTALL_DIR="$1" | ||
TOOLS_INSTALL_DIR="$2" | ||
TMP_DIR="/tmp/toolchain-install" | ||
|
||
TOOLS_PACKAGE_URI="https://github.com/bringauto/packager/releases/download/v0.3.0/bringauto-packager-tools_v0.3.0_x86-64-linux.zip" | ||
|
||
if [[ ${INSTALL_DIR} = "" ]] | ||
then | ||
echo "Specify toolchain absolute install dir path as a first argument!" >&2 | ||
exit 1 | ||
fi | ||
|
||
if [[ ${TOOLS_INSTALL_DIR} = "" ]] | ||
then | ||
echo "Specify tools install dir absolute path as a second argument!" >&2 | ||
exit 1 | ||
fi | ||
|
||
if ! [[ -d ${INSTALL_DIR} ]] | ||
then | ||
echo "Install dir '${INSTALL_DIR}' does not exist" | ||
fi | ||
|
||
|
||
function install_tools() { | ||
if [[ -d ${TMP_DIR} ]] | ||
then | ||
echo "TMP dir '${TMP_DIR}' exist" | ||
fi | ||
mkdir -p "${TMP_DIR}" | ||
mkdir -p "${TOOLS_INSTALL_DIR}" | ||
|
||
pushd "${TMP_DIR}" | ||
wget ${TOOLS_PACKAGE_URI} \ | ||
-O "bringauto-packager-tools.zip" | ||
unzip bringauto-packager-tools.zip | ||
rm bringauto-packager-tools.zip | ||
directory_name="$(echo ./*)" | ||
mv "${directory_name}"/* "${TOOLS_INSTALL_DIR}" | ||
rm -r "${directory_name}" | ||
popd | ||
rm -r "${TMP_DIR}" | ||
|
||
chmod +x "${TOOLS_INSTALL_DIR}/lsb_release" | ||
chmod +x "${TOOLS_INSTALL_DIR}/uname" | ||
echo 'PATH='"${TOOLS_INSTALL_DIR}"'/:$PATH' >> /root/.bashrc | ||
} | ||
|
||
|
||
install_tools |
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,2 @@ | ||
Distributor ID: Ubuntu | ||
Release: 18.04 |
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 @@ | ||
Linux e25e113786d6 6.5.0-26-generic #26~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Mar 12 10:22:43 UTC 2 aarch64 GNU/Linux |
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 |
---|---|---|
|
@@ -33,7 +33,8 @@ | |
"debian12", | ||
"debian11", | ||
"ubuntu2304", | ||
"ubuntu2310" | ||
"ubuntu2310", | ||
"ubuntu1804-aarch64" | ||
] | ||
} | ||
} |
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 |
---|---|---|
|
@@ -33,7 +33,8 @@ | |
"debian12", | ||
"debian11", | ||
"ubuntu2304", | ||
"ubuntu2310" | ||
"ubuntu2310", | ||
"ubuntu1804-aarch64" | ||
] | ||
} | ||
} |
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 |
---|---|---|
|
@@ -33,7 +33,8 @@ | |
"debian12", | ||
"fleet-os-2", | ||
"ubuntu2304", | ||
"ubuntu2310" | ||
"ubuntu2310", | ||
"ubuntu1804-aarch64" | ||
] | ||
} | ||
} |
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 |
---|---|---|
|
@@ -33,7 +33,8 @@ | |
"debian12", | ||
"fleet-os-2", | ||
"ubuntu2304", | ||
"ubuntu2310" | ||
"ubuntu2310", | ||
"ubuntu1804-aarch64" | ||
] | ||
} | ||
} |
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 |
---|---|---|
|
@@ -29,7 +29,8 @@ | |
"fleet-os-2", | ||
"debian12", | ||
"ubuntu2304", | ||
"ubuntu2310" | ||
"ubuntu2310", | ||
"ubuntu1804-aarch64" | ||
] | ||
} | ||
} |
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 |
---|---|---|
|
@@ -29,7 +29,8 @@ | |
"fleet-os-2", | ||
"debian12", | ||
"ubuntu2304", | ||
"ubuntu2310" | ||
"ubuntu2310", | ||
"ubuntu1804-aarch64" | ||
] | ||
} | ||
} |