Philippe Mathieu-Daudé <f4...@amsat.org> writes:

> Signed-off-by: Philippe Mathieu-Daudé <f4...@amsat.org>
> ---
>  tests/docker/Makefile.include                      |  4 +--
>  .../docker/dockerfiles/debian-powerpc-cross.docker | 40 
> ++++++++++++++++++++++
>  2 files changed, 42 insertions(+), 2 deletions(-)
>  create mode 100644 tests/docker/dockerfiles/debian-powerpc-cross.docker
>
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 111b8090b2..9815976486 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -56,11 +56,13 @@ docker-image-%: $(DOCKER_FILES_DIR)/%.docker
>               "BUILD","$*")
>
>  docker-image-debian-mipsel-cross: 
> EXTRA_FILES:=tests/docker/dockerfiles/debian-apt-fake.sh
> +docker-image-debian-powerpc-cross: 
> EXTRA_FILES:=tests/docker/dockerfiles/debian-apt-fake.sh
>
>  # Enforce dependancies for composite images
>  docker-image-debian-armhf-cross: docker-image-debian
>  docker-image-debian-arm64-cross: docker-image-debian
>  docker-image-debian-mipsel-cross: docker-image-debian
> +docker-image-debian-powerpc-cross: docker-image-debian
>
>  # Expand all the pre-requistes for each docker image and test combination
>  $(foreach i,$(DOCKER_IMAGES), \
> @@ -111,8 +113,6 @@ docker:
>       @echo '    NOUSER               Define to disable adding current user 
> to containers passwd.'
>       @echo '    NOCACHE=1            Ignore cache when build images.'
>       @echo '    EXECUTABLE=<path>    Include executable in image.'
> -     @echo '    EXTRA_FILES="<path> [... <path>]"'
> -     @echo '                         Include extra files in image.'

I'm fairly sure you didn't want to do this.

>
>  # This rule if for directly running against an arbitrary docker target.
>  # It is called by the expanded docker targets (e.g. make
> diff --git a/tests/docker/dockerfiles/debian-powerpc-cross.docker 
> b/tests/docker/dockerfiles/debian-powerpc-cross.docker
> new file mode 100644
> index 0000000000..fa2cc7a657
> --- /dev/null
> +++ b/tests/docker/dockerfiles/debian-powerpc-cross.docker
> @@ -0,0 +1,40 @@
> +#
> +# Docker powerpc cross-compiler target
> +#
> +# This docker target builds on the base debian image.
> +#
> +FROM qemu:debian
> +MAINTAINER Philippe Mathieu-Daudé <f4...@amsat.org>
> +
> +# Add the foreign architecture we want and install dependencies
> +RUN dpkg --add-architecture powerpc
> +RUN apt-get update
> +RUN DEBIAN_FRONTEND=noninteractive eatmydata \
> +    apt-get install -y --no-install-recommends \
> +        crossbuild-essential-powerpc
> +
> +# <kludge> to fix "following packages have unmet dependencies" ...
> +ADD debian-apt-fake.sh /usr/local/bin/apt-fake
> +RUN apt-get install -y --no-install-recommends \
> +        equivs \
> +        pkg-config
> +RUN apt-fake install \
> +        pkg-config:powerpc=0.28-1.1-fake && \
> +    ln -s pkg-config /usr/bin/powerpc-linux-gnu-pkg-config
> +ENV PKG_CONFIG_PATH /usr/lib/powerpc-linux-gnu/pkgconfig
> +# </kludge>
> +
> +# Specify the cross prefix for this image (see tests/docker/common.rc)
> +ENV QEMU_CONFIGURE_OPTS --cross-prefix=powerpc-linux-gnu-
> +
> +RUN DEBIAN_FRONTEND=noninteractive eatmydata \
> +    apt-get build-dep -yy -a powerpc qemu
> +RUN DEBIAN_FRONTEND=noninteractive \
> +    apt-get install -y --no-install-recommends \
> +        glusterfs-common:powerpc \
> +        libbz2-dev:powerpc \
> +        liblzo2-dev:powerpc \
> +        libncursesw5-dev:powerpc \
> +        libnfs-dev:powerpc \
> +        librdmacm-dev:powerpc \
> +        libsnappy-dev:powerpc


--
Alex Bennée

Reply via email to