From: "Alex Bennée" <alex.bennee@linaro.org>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Cc: qemu-devel@nongnu.org, 1791796@bugs.launchpad.net,
thuth@redhat.com, Fam Zheng <famz@redhat.com>
Subject: Re: [Qemu-devel] [RFC PATCH 2/4] docker: add buildroot-nios2-cross image
Date: Mon, 01 Oct 2018 10:05:05 +0100 [thread overview]
Message-ID: <87murykpfi.fsf@linaro.org> (raw)
In-Reply-To: <6ef6c4bb-7f29-efef-f8b9-478880c78c8f@amsat.org>
Philippe Mathieu-Daudé <f4bug@amsat.org> writes:
> Hi Alex,
>
> On 9/11/18 4:06 PM, Alex Bennée wrote:
>> Build a buildroot toolchain for the nios2 target.
>>
>> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
>> ---
>> tests/docker/Makefile.include | 4 ++++
>> tests/docker/dockerfiles/buildroot-nios2-cross.docker | 10 ++++++++++
>> 2 files changed, 14 insertions(+)
>> create mode 100644 tests/docker/dockerfiles/buildroot-nios2-cross.docker
>>
>> diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
>> index 74a82de48a..a8dfde8ed5 100644
>> --- a/tests/docker/Makefile.include
>> +++ b/tests/docker/Makefile.include
>> @@ -120,6 +120,10 @@ docker-image-debian-riscv64-cross: docker-image-debian-sid
>> docker-image-debian-powerpc-cross: docker-image-debian-sid
>> docker-image-travis: NOUSER=1
>>
>> +# Buildroot base images
>> +# These involve building the toolchains and can take some time
>> +docker-image-buildroot-nios2-cross: docker-image-debian-buildroot-base
>> +
>> # Specialist build images, sometimes very limited tools
>> docker-image-tricore-cross: docker-image-debian9
>>
>> diff --git a/tests/docker/dockerfiles/buildroot-nios2-cross.docker b/tests/docker/dockerfiles/buildroot-nios2-cross.docker
>> new file mode 100644
>> index 0000000000..e573f0fa55
>> --- /dev/null
>> +++ b/tests/docker/dockerfiles/buildroot-nios2-cross.docker
>> @@ -0,0 +1,10 @@
>> +#
>> +# NIOS II toolchain
>> +#
>> +FROM qemu:debian-buildroot-base
>> +
>> +RUN cd /opt/buildroot-${BUILDROOT_VERSION} && make qemu_nios2_10m50_defconfig
>
> Simply:
>
> RUN make -C /opt/buildroot-${BUILDROOT_VERSION} qemu_nios2_10m50_defconfig
>
>> +RUN cd /opt/buildroot-${BUILDROOT_VERSION} && make toolchain
>
> RUN make -C /opt/buildroot-${BUILDROOT_VERSION} toolchain
>
>> +# The toolchain is in /opt/buildroot-${BUILDROOT_VERSION}/output/host/bin/nios2-*
>> +RUN ln -s /opt/buildroot-${BUILDROOT_VERSION}/output/host/bin/nios2-* /usr/bin
>
> Similarly:
>
> ENV PATH $PATH:/opt/buildroot-${BUILDROOT_VERSION}/output/host/bin
>
> Once build this image takes a bit more than 3GB (this took me 30min to
> build).
>
> With changes:
> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> Tested-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Apparently multi-stage builds are meant to help:
https://docs.docker.com/develop/develop-images/multistage-build/#name-your-build-stages
It's still a little sub-optimal compared to binary builds but it will do
if we care about supporting every guest architecture with tests. I only
picked nios2 as a random example.
--
Alex Bennée
next prev parent reply other threads:[~2018-10-01 9:05 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-10 19:16 [Qemu-devel] [Bug 1791796] [NEW] unimplemented thread syscalls in nios2 user-mode emulation Sandra Loosemore
2018-09-11 8:49 ` Alex Bennée
2018-09-11 9:27 ` Thomas Huth
2018-09-11 9:57 ` Alex Bennée
2018-09-11 14:06 ` [Qemu-devel] [RFC PATCH 0/4] Add Nios II cross-compiler and enable tests/tcg Alex Bennée
2018-09-11 14:06 ` [Qemu-devel] [RFC PATCH 1/4] docker: add debian-buildroot-base Alex Bennée
2018-09-11 14:06 ` [Qemu-devel] [RFC PATCH 2/4] docker: add buildroot-nios2-cross image Alex Bennée
[not found] ` <6ef6c4bb-7f29-efef-f8b9-478880c78c8f@amsat.org>
2018-10-01 9:05 ` Alex Bennée [this message]
2018-09-11 14:06 ` [Qemu-devel] [RFC PATCH 3/4] linux-user/nios2: bump min uname to 4.16.0 [!HACK] Alex Bennée
2018-09-11 14:14 ` Laurent Vivier
2018-09-11 14:27 ` Marek Vasut
2018-09-11 15:08 ` Alex Bennée
2018-09-11 15:30 ` Marek Vasut
2018-09-12 10:19 ` Alex Bennée
2018-09-11 14:40 ` [Qemu-devel] [Bug 1791796] " Alex Bennée
2018-09-11 14:46 ` [Qemu-devel] " Laurent Vivier
2018-09-11 14:06 ` [Qemu-devel] [RFC PATCH 4/4] tests/tcg: add nios2 architecture (NEEDS FIXES) Alex Bennée
2018-09-11 15:34 ` [Qemu-devel] [Bug 1791796] Re: unimplemented thread syscalls in nios2 user-mode emulation Sandra Loosemore
2018-09-11 19:03 ` Alex Bennée
2020-11-13 15:53 ` Thomas Huth
2021-01-13 4:17 ` Launchpad Bug Tracker
2021-01-13 7:59 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87murykpfi.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=1791796@bugs.launchpad.net \
--cc=f4bug@amsat.org \
--cc=famz@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.