Update to latest arm released compiler
This commit is contained in:
22
Dockerfile
22
Dockerfile
@@ -2,24 +2,28 @@ FROM ubuntu:20.04
|
|||||||
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
|
LABEL maintainer="Ben V. Brown <ralim@ralimtek.com>"
|
||||||
|
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
# Setup the ARM GCC toolchain
|
# Add extra mirrors for options
|
||||||
|
RUN echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal main restricted universe multiverse" > /etc/apt/sources.list && \
|
||||||
# Install any needed packages specified in requirements.txt
|
echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal-updates main restricted universe multiverse" >> /etc/apt/sources.list && \
|
||||||
RUN apt-get update && \
|
echo "deb mirror://mirrors.ubuntu.com/mirrors.txt focal-security main restricted universe multiverse" >> /etc/apt/sources.list && \
|
||||||
apt-get install -y \
|
DEBIAN_FRONTEND=noninteractive apt-get update
|
||||||
|
# Install dependencies to build the firmware
|
||||||
|
RUN apt-get install -y \
|
||||||
make \
|
make \
|
||||||
bzip2 \
|
bzip2 \
|
||||||
git \
|
git \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
wget && \
|
wget --no-install-recommends && \
|
||||||
apt-get clean
|
apt-get clean
|
||||||
RUN python3 -m pip install bdflib
|
RUN python3 -m pip install bdflib
|
||||||
RUN wget -qO- https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 | tar -xj
|
# Download the two compilers
|
||||||
RUN wget -qO- https://github.com/Ralim/nuclei-compiler/releases/download/2020.08/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2 | tar -xj
|
RUN wget -qO- "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2" | tar -xj
|
||||||
|
# This is the same as the one from Nuclei, just mirrored on Github as their download server is horrifically slow
|
||||||
|
RUN wget -qO- "https://github.com/Ralim/nuclei-compiler/releases/download/2020.08/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2" | tar -xj
|
||||||
|
|
||||||
# Add compiler to the path
|
# Add compiler to the path
|
||||||
ENV PATH "/build/gcc-arm-none-eabi-9-2020-q2-update/bin:$PATH"
|
ENV PATH "/build/gcc-arm-none-eabi-10-2020-q4-major/bin:$PATH"
|
||||||
ENV PATH "/build/gcc/bin/:$PATH"
|
ENV PATH "/build/gcc/bin/:$PATH"
|
||||||
COPY . /build/source
|
COPY . /build/source
|
||||||
COPY ./ci /build/ci
|
COPY ./ci /build/ci
|
||||||
|
|||||||
@@ -0,0 +1 @@
|
|||||||
|
8312c4c91799885f222f663fc81f9a31 gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
|
||||||
@@ -1 +0,0 @@
|
|||||||
2b9eeccc33470f9d3cda26983b9d2dc6 gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
|
|
||||||
10
setup.sh
10
setup.sh
@@ -12,25 +12,25 @@ cd /build
|
|||||||
MDPATH=${GITHUB_WORKSPACE:-/build/source/}
|
MDPATH=${GITHUB_WORKSPACE:-/build/source/}
|
||||||
sudo mkdir -p /build/cache
|
sudo mkdir -p /build/cache
|
||||||
cd /build/cache/
|
cd /build/cache/
|
||||||
if md5sum -c $MDPATH/ci/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2.md5; then
|
if md5sum -c $MDPATH/ci/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2.md5; then
|
||||||
echo "Good MD5 ARM"
|
echo "Good MD5 ARM"
|
||||||
else
|
else
|
||||||
echo "ARM MD5 Mismatch, downloading fresh"
|
echo "ARM MD5 Mismatch, downloading fresh"
|
||||||
sudo wget -q https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 -O gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2
|
sudo wget -q "https://developer.arm.com/-/media/Files/downloads/gnu-rm/10-2020q4/gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2" -O gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if md5sum -c $MDPATH/ci/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2.md5; then
|
if md5sum -c $MDPATH/ci/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2.md5; then
|
||||||
echo "Good MD5 RISCV"
|
echo "Good MD5 RISCV"
|
||||||
else
|
else
|
||||||
echo "RISCV MD5 Mismatch, downloading fresh"
|
echo "RISCV MD5 Mismatch, downloading fresh"
|
||||||
sudo wget -q https://github.com/Ralim/nuclei-compiler/releases/download/2020.08/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2 -O nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2
|
sudo wget -q "https://github.com/Ralim/nuclei-compiler/releases/download/2020.08/nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2" -O nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Extracting compilers"
|
echo "Extracting compilers"
|
||||||
sudo tar -xj -f gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2 -C /build/
|
sudo tar -xj -f gcc-arm-none-eabi-10-2020-q4-major-x86_64-linux.tar.bz2 -C /build/
|
||||||
sudo tar -xj -f nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2 -C /build/
|
sudo tar -xj -f nuclei_riscv_newlibc_prebuilt_linux64_2020.08.tar.bz2 -C /build/
|
||||||
|
|
||||||
echo "Link into PATH"
|
echo "Link into PATH"
|
||||||
|
|
||||||
sudo ln -s /build/gcc-arm-none-eabi-9-2020-q2-update/bin/* /usr/local/bin
|
sudo ln -s /build/gcc-arm-none-eabi-10-2020-q4-major/bin/* /usr/local/bin
|
||||||
sudo ln -s /build/gcc/bin/* /usr/local/bin
|
sudo ln -s /build/gcc/bin/* /usr/local/bin
|
||||||
|
|||||||
Reference in New Issue
Block a user