Message ID | 20180911140631.18481-2-alex.bennee@linaro.org |
---|---|
State | New |
Headers | show |
Series | Add Nios II cross-compiler and enable tests/tcg | expand |
Hi Alex, On 9/11/18 4:06 PM, Alex Bennée wrote: > We can build some more cross-compilers using buildroot. This base > system contains simply the minimum number of tools required for > buildroot to work. We also download and unpack the buildroot source > tree as that will be common for all system deriving from it. > > Signed-off-by: Alex Bennée <alex.bennee@linaro.org> > --- > tests/docker/Makefile.include | 2 +- > .../dockerfiles/debian-buildroot-base.docker | 26 +++++++++++++++++++ > 2 files changed, 27 insertions(+), 1 deletion(-) > create mode 100644 tests/docker/dockerfiles/debian-buildroot-base.docker > > diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include > index d3101afecd..74a82de48a 100644 > --- a/tests/docker/Makefile.include > +++ b/tests/docker/Makefile.include > @@ -6,7 +6,7 @@ DOCKER_SUFFIX := .docker > DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles > DOCKER_DEPRECATED_IMAGES := debian > # we don't run tests on intermediate images (used as base by another image) > -DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian8-mxe debian-ports debian-sid debian-bootstrap > +DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian8-mxe debian-ports debian-sid debian-bootstrap debian-buildroot-base > DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker))))) > DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES)) > # Use a global constant ccache directory to speed up repetitive builds > diff --git a/tests/docker/dockerfiles/debian-buildroot-base.docker b/tests/docker/dockerfiles/debian-buildroot-base.docker > new file mode 100644 > index 0000000000..c4a29abadd > --- /dev/null > +++ b/tests/docker/dockerfiles/debian-buildroot-base.docker > @@ -0,0 +1,26 @@ > +# > +# Buildroot base setup on Debian > +# > + > +FROM debian:stretch-slim > +ENV BUILDROOT_VERSION=2018.08 To avoid cache invalidate, please move this bellow... > + > +# Duplicate deb line as deb-src > +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list > + > +# Install common build utilities > +RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata > +RUN DEBIAN_FRONTEND=noninteractive eatmydata \ > + apt install -y bc \ > + build-essential \ > + cpio \ > + file \ > + python \ > + unzip \ > + rsync \ > + wget > + > +# Grab the current buildroot version and unpack in /opt ... here (or similar around): ENV BUILDROOT_VERSION=2018.08 > +RUN mkdir -p /opt > +RUN cd /opt && wget https://buildroot.org/downloads/buildroot-${BUILDROOT_VERSION}.tar.gz > +RUN cd /opt && tar -xvf buildroot-${BUILDROOT_VERSION}.tar.gz > Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index d3101afecd..74a82de48a 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -6,7 +6,7 @@ DOCKER_SUFFIX := .docker DOCKER_FILES_DIR := $(SRC_PATH)/tests/docker/dockerfiles DOCKER_DEPRECATED_IMAGES := debian # we don't run tests on intermediate images (used as base by another image) -DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian8-mxe debian-ports debian-sid debian-bootstrap +DOCKER_PARTIAL_IMAGES := debian debian8 debian9 debian8-mxe debian-ports debian-sid debian-bootstrap debian-buildroot-base DOCKER_IMAGES := $(filter-out $(DOCKER_DEPRECATED_IMAGES),$(sort $(notdir $(basename $(wildcard $(DOCKER_FILES_DIR)/*.docker))))) DOCKER_TARGETS := $(patsubst %,docker-image-%,$(DOCKER_IMAGES)) # Use a global constant ccache directory to speed up repetitive builds diff --git a/tests/docker/dockerfiles/debian-buildroot-base.docker b/tests/docker/dockerfiles/debian-buildroot-base.docker new file mode 100644 index 0000000000..c4a29abadd --- /dev/null +++ b/tests/docker/dockerfiles/debian-buildroot-base.docker @@ -0,0 +1,26 @@ +# +# Buildroot base setup on Debian +# + +FROM debian:stretch-slim +ENV BUILDROOT_VERSION=2018.08 + +# Duplicate deb line as deb-src +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list + +# Install common build utilities +RUN apt update && DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata +RUN DEBIAN_FRONTEND=noninteractive eatmydata \ + apt install -y bc \ + build-essential \ + cpio \ + file \ + python \ + unzip \ + rsync \ + wget + +# Grab the current buildroot version and unpack in /opt +RUN mkdir -p /opt +RUN cd /opt && wget https://buildroot.org/downloads/buildroot-${BUILDROOT_VERSION}.tar.gz +RUN cd /opt && tar -xvf buildroot-${BUILDROOT_VERSION}.tar.gz
We can build some more cross-compilers using buildroot. This base system contains simply the minimum number of tools required for buildroot to work. We also download and unpack the buildroot source tree as that will be common for all system deriving from it. Signed-off-by: Alex Bennée <alex.bennee@linaro.org> --- tests/docker/Makefile.include | 2 +- .../dockerfiles/debian-buildroot-base.docker | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 tests/docker/dockerfiles/debian-buildroot-base.docker -- 2.17.1