[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 32/42] docker: Add gentoo-mipsr5900el-cross image
From: |
Daniel P . Berrangé |
Subject: |
Re: [RFC PATCH 32/42] docker: Add gentoo-mipsr5900el-cross image |
Date: |
Mon, 15 Feb 2021 11:59:57 +0000 |
User-agent: |
Mutt/1.14.6 (2020-07-11) |
On Sun, Feb 14, 2021 at 06:59:02PM +0100, Philippe Mathieu-Daudé wrote:
> Add a Docker image providing cross toolchain for the MIPS R5900 CPU
> (used on the Sony PS2).
>
> This image is based on Gentoo and the toolchain is built using crossdev.
Is there any way we can do this with a distro that isn't Gentoo
so that we can get a container build that is fast enough to be
useful for CI ?
>
> Recipe from:
> https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg03944.html
>
> Suggested-by: Fredrik Noring <noring@nocrew.org>
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
> tests/docker/Makefile.include | 3 ++
> .../gentoo-mipsr5900el-cross.docker | 35 +++++++++++++++++++
> .../crossdev.conf | 5 +++
> 3 files changed, 43 insertions(+)
> create mode 100644 tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker
> create mode 100644
> tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker.d/crossdev.conf
>
> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
> index 93b29ad823e..3d6306c7728 100644
> --- a/tests/docker/Makefile.include
> +++ b/tests/docker/Makefile.include
> @@ -146,6 +146,9 @@ docker-image-debian-riscv64-cross: docker-image-debian10
> docker-image-debian-s390x-cross: docker-image-debian10
> docker-image-debian-sh4-cross: docker-image-debian10
> docker-image-debian-sparc64-cross: docker-image-debian10
> +docker-image-gentoo-mipsr5900el-cross: EXTRA_FILES:=$(addprefix \
> +
> $(SRC_PATH)/tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker.d/,\
> + crossdev.conf)
>
> docker-image-travis: NOUSER=1
>
> diff --git a/tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker
> b/tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker
> new file mode 100644
> index 00000000000..88ada20623d
> --- /dev/null
> +++ b/tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker
> @@ -0,0 +1,35 @@
> +#
> +# Docker mipsel (r5900) cross-compiler target
> +#
> +# Using multi-stage builds, this image requires docker-17.05.0 or later.
> +# (See: https://github.com/gentoo/gentoo-docker-images)
> +#
> +# SPDX-License-Identifier: GPL-2.0-or-later
> +
> +# name the portage image
> +FROM gentoo/portage:20201121 as portage
> +
> +# image is based on stage3-amd64
> +FROM gentoo/stage3:latest
> +
> +# copy the entire portage volume in
> +COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
> +
> +MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org>
> +
> +# set CROSSDEV_OVERLAY to /usr/local/portage-crossdev
> +RUN mkdir -p /usr/local/portage-crossdev/{profiles,metadata} && \
> + echo 'crossdev' > /usr/local/portage-crossdev/profiles/repo_name && \
> + echo 'masters = gentoo' >
> /usr/local/portage-crossdev/metadata/layout.conf && \
> + chown -R portage:portage /usr/local/portage-crossdev && \
> + mkdir -p /etc/portage/repos.conf
> +ADD crossdev.conf /etc/portage/repos.conf/crossdev.conf
> +
> +RUN emerge -qv \
> + dev-vcs/git ">=dev-libs/glib-2.0" \
> + sys-devel/crossdev \
> + sys-libs/zlib dev-lang/python
> +
> +RUN crossdev -s4 -t mipsr5900el-unknown-linux-gnu
> +
> +ENV QEMU_CONFIGURE_OPTS --cross-prefix=mipsr5900el-unknown-linux-gnu-
> diff --git
> a/tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker.d/crossdev.conf
> b/tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker.d/crossdev.conf
> new file mode 100644
> index 00000000000..b8fa368c1c3
> --- /dev/null
> +++ b/tests/docker/dockerfiles/gentoo-mipsr5900el-cross.docker.d/crossdev.conf
> @@ -0,0 +1,5 @@
> +[crossdev]
> +location = /usr/local/portage-crossdev
> +priority = 10
> +masters = gentoo
> +auto-sync = no
> --
> 2.26.2
>
>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- Re: [RFC PATCH 28/42] target/mips/tx79: Move RDHWR usermode kludge to trans_SQ(), (continued)
[RFC PATCH 29/42] linux-user/mips64: Support the n32 ABI for the R5900, Philippe Mathieu-Daudé, 2021/02/14
[RFC PATCH 30/42] target/mips: Reintroduce the R5900 CPU, Philippe Mathieu-Daudé, 2021/02/14
[RFC PATCH 31/42] default-configs: Support o32 ABI with R5900 64-bit MIPS CPU, Philippe Mathieu-Daudé, 2021/02/14
[RFC PATCH 32/42] docker: Add gentoo-mipsr5900el-cross image, Philippe Mathieu-Daudé, 2021/02/14
- Re: [RFC PATCH 32/42] docker: Add gentoo-mipsr5900el-cross image,
Daniel P . Berrangé <=
[RFC PATCH 33/42] gitlab-ci: Pass optional EXTRA_FILES when building docker images, Philippe Mathieu-Daudé, 2021/02/14
[RFC PATCH 34/42] gitlab-ci: Build MIPS R5900 cross-toolchain (Gentoo based), Philippe Mathieu-Daudé, 2021/02/14
[RFC PATCH 35/42] tests/tcg: Add MIPS R5900 to arches filter, Philippe Mathieu-Daudé, 2021/02/14
[RFC PATCH 36/42] tests/tcg/mips: Test user mode DMULT for the R5900, Philippe Mathieu-Daudé, 2021/02/14
[RFC PATCH 37/42] gitlab-ci: Add job to test the MIPS r5900o32el target, Philippe Mathieu-Daudé, 2021/02/14