diff options
author | Thomas Van Iseghem <[email protected]> | 2023-01-28 20:50:30 +0100 |
---|---|---|
committer | Thomas Van Iseghem <[email protected]> | 2023-01-28 20:50:30 +0100 |
commit | 7dc2868aea601a7aa5c2f096c63af51e8b4ec0af (patch) | |
tree | 7bbe560f0dfe075ff5a3f642199f894c6a200821 | |
parent | 8c884b4a38dc116f4790d5fc41382da8dd4962b7 (diff) | |
download | OpenCortex-7dc2868aea601a7aa5c2f096c63af51e8b4ec0af.tar.gz OpenCortex-7dc2868aea601a7aa5c2f096c63af51e8b4ec0af.zip |
Dockerfile for cross-compiler environment
-rw-r--r-- | QC-dev-environment/.gitignore | 1 | ||||
-rw-r--r-- | QC-dev-environment/Dockerfile | 32 | ||||
-rw-r--r-- | QC-dev-environment/install_toolchain.sh | 6 |
3 files changed, 39 insertions, 0 deletions
diff --git a/QC-dev-environment/.gitignore b/QC-dev-environment/.gitignore new file mode 100644 index 0000000..9ef6d6e --- /dev/null +++ b/QC-dev-environment/.gitignore @@ -0,0 +1 @@ +mount/*
\ No newline at end of file diff --git a/QC-dev-environment/Dockerfile b/QC-dev-environment/Dockerfile new file mode 100644 index 0000000..cc514ff --- /dev/null +++ b/QC-dev-environment/Dockerfile @@ -0,0 +1,32 @@ +# Use official Ubuntu as our base# Use official Ubuntu as our base +FROM ubuntu:20.04 + +# Add required packages in the noninteractive mode +RUN apt-get -y update +RUN DEBIAN_FRONTEND=noninteractive apt-get -y -q install curl net-tools build-essential minicom tftpd-hpa git-all subversion openssh-server ncurses-dev php gawk g++ m4 libncurses5-dev texinfo flex bison php-cli vim php-xml python-setuptools python-dev make unzip rsync cpio bc lib32z1 lib32stdc++6 qemu qemu-user-static + +# Set the workspace in /sc5xx_dev +ARG WORK_PATH=/sc5xx_dev +RUN mkdir -p ${WORK_PATH} + +# Set the path and name of Patch in /sc5xx_dev/linuxaddin-dockerfile/lib +ARG PATCH_PATH=${WORK_PATH}/lib +ARG PATCH=${PATCH_PATH}/0002-port-to-perl-5.22-and-later.patch + +# Set the Version and Path of cces-linux-add-in. +ARG LINUX_ADDIN_VERSION="1.3.1" + +# Working directory set to /sc5xx_dev +WORKDIR ${WORK_PATH} + +# Copy the install_toolchain.sh to /sc5xx_dev +COPY install_toolchain.sh . + +# Install the toolchain +RUN ./install_toolchain.sh ${WORK_PATH} + +# # Set toolchain PATH for remote container +ENV PATH=${PATH}:/opt/analog/cces-linux-add-in/${LINUX_ADDIN_VERSION}/ARM/arm-linux-gnueabi/bin/ +ENV QEMU_LD_PREFIX="/opt/analog/cces-linux-add-in/1.3.1/ARM/arm-linux-gnueabi/sysroot" + +ENTRYPOINT ["/bin/bash"]
\ No newline at end of file diff --git a/QC-dev-environment/install_toolchain.sh b/QC-dev-environment/install_toolchain.sh new file mode 100644 index 0000000..d4a5465 --- /dev/null +++ b/QC-dev-environment/install_toolchain.sh @@ -0,0 +1,6 @@ +#!/bin/sh +# Original toolchain download is broken, debian package can't be unpacked. +# This is the /opt/analog folder from the debian package. +curl -LO https://www.roelj.com/qc/qc-compiler-toolchain.tar.gz +cd / +tar axvf $1/qc-compiler-toolchain.tar.gz
\ No newline at end of file |