Skip to content

Commit

Permalink
Add ev3dev-buster
Browse files Browse the repository at this point in the history
  • Loading branch information
dlech committed Apr 27, 2019
1 parent ac5f2a0 commit 477ec50
Show file tree
Hide file tree
Showing 12 changed files with 117 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
language: bash
sudo: required
dist: trusty
dist: xenial
services: docker
before_script:
- docker --version
script:
- docker build
-t ev3dev/debian-jessie-cross
-f ev3dev-jessie/debian-jessie-cross.dockerfile
ev3dev-jessie
- docker build
-t ev3dev/debian-stretch-cross
-f ev3dev-stretch/debian-stretch-cross.dockerfile
ev3dev-stretch
- docker build
-t ev3dev/debian-buster-cross
-f ev3dev-buster/debian-buster-cross.dockerfile
ev3dev-buster
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ You can get the images by running one of the following:
docker pull ev3dev/debian-stretch-cross
docker pull ev3dev/debian-stretch-armel-cross
docker pull ev3dev/debian-stretch-armhf-cross
docker pull ev3dev/debian-buster-cross
docker pull ev3dev/debian-buster-armel-cross
docker pull ev3dev/debian-buster-armhf-cross

The `debian-<dist>-cross` images have an amd64 root file system and cross
compilers for armel and armhf. These images can be used to compile anything
Expand Down
8 changes: 8 additions & 0 deletions ev3dev-buster/apt.sources.list.debian
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
deb http://ftp.debian.org/debian buster main contrib non-free
deb-src http://ftp.debian.org/debian buster main contrib non-free

deb http://security.debian.org/ buster/updates main contrib non-free
deb-src http://security.debian.org/ buster/updates main contrib non-free

deb http://archive.ev3dev.org/debian buster main
deb-src http://archive.ev3dev.org/debian buster main
1 change: 1 addition & 0 deletions ev3dev-buster/compiler.sudoers
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
compiler ALL=(ALL) NOPASSWD:ALL
27 changes: 27 additions & 0 deletions ev3dev-buster/debian-buster-armel.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
FROM ev3dev/debian-buster-armel-qemu-minbase

# setup repositories and install required packages
COPY apt.sources.list.debian /etc/apt/sources.list
COPY ev3dev-archive-keyring.gpg /etc/apt/trusted.gpg.d/
RUN dpkg --add-architecture amd64 && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes xz-utils \
libc6:amd64 libz1:amd64 liblzma5:amd64 libncurses5:amd64 libpython2.7:amd64 \
build-essential cmake valac man-db bash-completion sudo vim nano less tree wget

# install the cross-compiler toolchain
RUN cd /opt && \
wget https://github.com/ev3dev/ev3dev-crosstool-ng/releases/download/gcc-ev3dev-6.3.0-2017.10/gcc-ev3dev-6.3.0-2017.10-x86_64_arm-ev3-linux-gnueabi.tar.gz && \
tar xf gcc-ev3dev-6.3.0-2017.10-x86_64_arm-ev3-linux-gnueabi.tar.gz && \
rm gcc-ev3dev-6.3.0-2017.10-x86_64_arm-ev3-linux-gnueabi.tar.gz && \
ln -s gcc-ev3dev-6.3.0-2017.10-x86_64_arm-ev3-linux-gnueabi arm-ev3-linux-gnueabi

# setup a new user
COPY compiler.sudoers /etc/sudoers.d/compiler
RUN chmod 0440 /etc/sudoers.d/compiler && \
adduser --disabled-password --gecos \"\" compiler && \
usermod -a -G sudo compiler
USER compiler
COPY toolchain.cmake.armel /home/compiler/toolchain.cmake
WORKDIR /home/compiler
CMD ["/bin/bash"] ["--login"]
26 changes: 26 additions & 0 deletions ev3dev-buster/debian-buster-armhf.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM ev3dev/debian-buster-armhf-qemu-minbase

# setup repositories and install required packages
COPY apt.sources.list.debian /etc/apt/sources.list
COPY ev3dev-archive-keyring.gpg /etc/apt/trusted.gpg.d/
RUN dpkg --add-architecture amd64 && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes xz-utils \
libc6:amd64 libz1:amd64 liblzma5:amd64 libncurses5:amd64 libpython2.7:amd64 \
build-essential cmake valac man-db bash-completion sudo vim nano less tree wget

# install the cross-compiler toolchain
RUN cd /opt && \
wget http://releases.linaro.org/components/toolchain/binaries/6.3-2017.02/arm-linux-gnueabihf/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz && \
tar xf gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz && \
rm gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf.tar.xz

# setup a new user
COPY compiler.sudoers /etc/sudoers.d/compiler
RUN chmod 0440 /etc/sudoers.d/compiler && \
adduser --disabled-password --gecos \"\" compiler && \
usermod -a -G sudo compiler
USER compiler
COPY toolchain.cmake.armhf /home/compiler/toolchain.cmake
WORKDIR /home/compiler
CMD ["/bin/bash"] ["--login"]
36 changes: 36 additions & 0 deletions ev3dev-buster/debian-buster-cross.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM debian:buster

# setup repositories and install required packages
COPY apt.sources.list.debian /etc/apt/sources.list
COPY ev3dev-archive-keyring.gpg /etc/apt/trusted.gpg.d/
RUN dpkg --add-architecture armel && \
dpkg --add-architecture armhf && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes --no-install-recommends \
bash-completion \
ca-certificates \
cmake \
crossbuild-essential-armel \
crossbuild-essential-armhf \
gdb-multiarch \
less \
man-db \
nano \
pkg-config \
qemu-user-static \
sudo \
tree \
vim \
wget \
xz-utils

# setup a new user
COPY compiler.sudoers /etc/sudoers.d/compiler
RUN chmod 0440 /etc/sudoers.d/compiler && \
adduser --disabled-password --gecos \"\" compiler && \
usermod -a -G sudo compiler
USER compiler
WORKDIR /home/compiler
CMD ["/bin/bash"] ["--login"]

ADD ["toolchain-*.cmake", "/home/compiler/"]
Binary file added ev3dev-buster/ev3dev-archive-keyring.gpg
Binary file not shown.
2 changes: 2 additions & 0 deletions ev3dev-buster/toolchain-armel.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set (CMAKE_C_COMPILER arm-linux-gnueabi-gcc)
set (CMAKE_CXX_COMPILER arm-linux-gnueabi-g++)
2 changes: 2 additions & 0 deletions ev3dev-buster/toolchain-armhf.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
set (CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
set (CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
3 changes: 3 additions & 0 deletions ev3dev-buster/toolchain.cmake.armel
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set (CMAKE_C_COMPILER /opt/arm-ev3-linux-gnueabi/bin/arm-linux-gnueabi-gcc)
set (CMAKE_CXX_COMPILER /opt/arm-ev3-linux-gnueabi/bin/arm-linux-gnueabi-g++)
set (CMAKE_SYSROOT /)
4 changes: 4 additions & 0 deletions ev3dev-buster/toolchain.cmake.armhf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set (CMAKE_C_COMPILER /opt/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc)
set (CMAKE_CXX_COMPILER /opt/gcc-linaro-6.3.1-2017.02-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++)

set (CMAKE_SYSROOT /)

0 comments on commit 477ec50

Please sign in to comment.