* [PATCH for 6.1 v2 0/2] tricore fixes
@ 2021-07-19 21:48 Alex Bennée
2021-07-19 21:48 ` [PATCH v2 1/2] hw/tricore: fix inclusion of tricore_testboard Alex Bennée
2021-07-19 21:48 ` [PATCH v2 2/2] gitlab: enable a very minimal build with the tricore container Alex Bennée
0 siblings, 2 replies; 6+ messages in thread
From: Alex Bennée @ 2021-07-19 21:48 UTC (permalink / raw)
To: qemu-devel; +Cc: Alex Bennée
Hi,
This fixes check-tcg for tricore and adds a test to the gitlab matrix
so we don't miss it breaking again. New for v2: actually works and
isn't an unholy mash of two docker container definitions.
Please review:
- gitlab: enable a very minimal build with the tricore container
- hw/tricore: fix inclusion of tricore_testboard
Alex Bennée (2):
hw/tricore: fix inclusion of tricore_testboard
gitlab: enable a very minimal build with the tricore container
configs/devices/tricore-softmmu/default.mak | 1 +
.gitlab-ci.d/buildtest.yml | 11 +++++
hw/tricore/Kconfig | 3 +-
hw/tricore/meson.build | 4 +-
.../dockerfiles/debian-tricore-cross.docker | 40 ++++++++++++++++---
5 files changed, 50 insertions(+), 9 deletions(-)
--
2.32.0.264.g75ae10bc75
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 1/2] hw/tricore: fix inclusion of tricore_testboard
2021-07-19 21:48 [PATCH for 6.1 v2 0/2] tricore fixes Alex Bennée
@ 2021-07-19 21:48 ` Alex Bennée
2021-07-19 22:47 ` Richard Henderson
2021-07-19 21:48 ` [PATCH v2 2/2] gitlab: enable a very minimal build with the tricore container Alex Bennée
1 sibling, 1 reply; 6+ messages in thread
From: Alex Bennée @ 2021-07-19 21:48 UTC (permalink / raw)
To: qemu-devel; +Cc: Bastian Koppelmann, Alex Bennée
We inadvertently added a symbol clash causing the build not to include
the testboard needed for check-tcg.
Fixes: f4063f9c31 ("meson: Introduce target-specific Kconfig")
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
configs/devices/tricore-softmmu/default.mak | 1 +
hw/tricore/Kconfig | 3 +--
hw/tricore/meson.build | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/configs/devices/tricore-softmmu/default.mak b/configs/devices/tricore-softmmu/default.mak
index 5cc91cebce..724cb85de7 100644
--- a/configs/devices/tricore-softmmu/default.mak
+++ b/configs/devices/tricore-softmmu/default.mak
@@ -1 +1,2 @@
+CONFIG_TRITEST=y
CONFIG_TRIBOARD=y
diff --git a/hw/tricore/Kconfig b/hw/tricore/Kconfig
index 506e6183c1..a1b2438d99 100644
--- a/hw/tricore/Kconfig
+++ b/hw/tricore/Kconfig
@@ -1,9 +1,8 @@
-config TRICORE
+config TRITEST
bool
config TRIBOARD
bool
- select TRICORE
select TC27X_SOC
config TC27X_SOC
diff --git a/hw/tricore/meson.build b/hw/tricore/meson.build
index 47e36bb077..692a4708ba 100644
--- a/hw/tricore/meson.build
+++ b/hw/tricore/meson.build
@@ -1,6 +1,6 @@
tricore_ss = ss.source_set()
-tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testboard.c'))
-tricore_ss.add(when: 'CONFIG_TRICORE', if_true: files('tricore_testdevice.c'))
+tricore_ss.add(when: 'CONFIG_TRITEST', if_true: files('tricore_testboard.c'))
+tricore_ss.add(when: 'CONFIG_TRITEST', if_true: files('tricore_testdevice.c'))
tricore_ss.add(when: 'CONFIG_TRIBOARD', if_true: files('triboard.c'))
tricore_ss.add(when: 'CONFIG_TC27X_SOC', if_true: files('tc27x_soc.c'))
--
2.32.0.264.g75ae10bc75
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 2/2] gitlab: enable a very minimal build with the tricore container
2021-07-19 21:48 [PATCH for 6.1 v2 0/2] tricore fixes Alex Bennée
2021-07-19 21:48 ` [PATCH v2 1/2] hw/tricore: fix inclusion of tricore_testboard Alex Bennée
@ 2021-07-19 21:48 ` Alex Bennée
2021-07-19 22:52 ` Richard Henderson
1 sibling, 1 reply; 6+ messages in thread
From: Alex Bennée @ 2021-07-19 21:48 UTC (permalink / raw)
To: qemu-devel
Cc: Willian Rampazzo, Thomas Huth, Alex Bennée,
Philippe Mathieu-Daudé,
Wainer dos Santos Moschetta
We do the same thing as hexagon and do a two stage build that provides
the minimal dependencies to build qemu-tricore-system and its
check-tcg tests.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
.gitlab-ci.d/buildtest.yml | 11 +++++
.../dockerfiles/debian-tricore-cross.docker | 40 ++++++++++++++++---
2 files changed, 46 insertions(+), 5 deletions(-)
diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml
index 89df51517c..5198b79deb 100644
--- a/.gitlab-ci.d/buildtest.yml
+++ b/.gitlab-ci.d/buildtest.yml
@@ -354,6 +354,17 @@ build-some-softmmu:
TARGETS: xtensa-softmmu arm-softmmu aarch64-softmmu alpha-softmmu
MAKE_CHECK_ARGS: check-tcg
+# We build tricore in a very minimal tricore only container
+build-tricore-softmmu:
+ extends: .native_build_job_template
+ needs:
+ job: tricore-debian-cross-container
+ variables:
+ IMAGE: debian-tricore-cross
+ CONFIGURE_ARGS: --disable-tools --enable-debug
+ TARGETS: tricore-softmmu
+ MAKE_CHECK_ARGS: check-tcg
+
clang-system:
extends: .native_build_job_template
needs:
diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/dockerfiles/debian-tricore-cross.docker
index 985925134c..4ea9112289 100644
--- a/tests/docker/dockerfiles/debian-tricore-cross.docker
+++ b/tests/docker/dockerfiles/debian-tricore-cross.docker
@@ -15,9 +15,39 @@ RUN git clone --single-branch \
https://github.com/bkoppelmann/tricore-binutils.git \
/usr/src/binutils && \
cd /usr/src/binutils && chmod +x missing && \
- CFLAGS=-w ./configure --prefix=/usr --disable-nls --target=tricore && \
- make && make install && \
- rm -rf /usr/src/binutils
+ CFLAGS=-w ./configure --prefix=/usr/local --disable-nls --target=tricore && \
+ make && make install
-# This image isn't designed for building QEMU but building tests
-ENV QEMU_CONFIGURE_OPTS --disable-system --disable-user
+FROM debian:buster-slim
+# Duplicate deb line as deb-src
+RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
+# Install very minimal QEMU build deps for use in CI
+# $ lcitool variables debian-10 qemu+minimal
+RUN apt update && \
+ DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
+ DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \
+ bzip2 \
+ ca-certificates \
+ ccache \
+ g++ \
+ gcc \
+ git \
+ libcapstone-dev \
+ libfdt-dev \
+ libglib2.0-dev \
+ libpixman-1-dev \
+ libtest-harness-perl \
+ locales \
+ make \
+ ninja-build \
+ perl-base \
+ pkgconf \
+ python3-pip \
+ python3-setuptools \
+ python3-wheel
+COPY --from=0 /usr/local /usr/local
+ENV PATH $PATH:/usr/local/bin/
+
+# This image can only build a very minimal QEMU as well as the tests
+ENV DEF_TARGET_LIST tricore-softmmu
+ENV QEMU_CONFIGURE_OPTS --disable-user --disable-tools
--
2.32.0.264.g75ae10bc75
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/2] hw/tricore: fix inclusion of tricore_testboard
2021-07-19 21:48 ` [PATCH v2 1/2] hw/tricore: fix inclusion of tricore_testboard Alex Bennée
@ 2021-07-19 22:47 ` Richard Henderson
0 siblings, 0 replies; 6+ messages in thread
From: Richard Henderson @ 2021-07-19 22:47 UTC (permalink / raw)
To: Alex Bennée, qemu-devel; +Cc: Bastian Koppelmann
On 7/19/21 11:48 AM, Alex Bennée wrote:
> We inadvertently added a symbol clash causing the build not to include
> the testboard needed for check-tcg.
>
> Fixes: f4063f9c31 ("meson: Introduce target-specific Kconfig")
> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
> ---
> configs/devices/tricore-softmmu/default.mak | 1 +
> hw/tricore/Kconfig | 3 +--
> hw/tricore/meson.build | 4 ++--
> 3 files changed, 4 insertions(+), 4 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] gitlab: enable a very minimal build with the tricore container
2021-07-19 21:48 ` [PATCH v2 2/2] gitlab: enable a very minimal build with the tricore container Alex Bennée
@ 2021-07-19 22:52 ` Richard Henderson
2021-07-20 9:14 ` Alex Bennée
0 siblings, 1 reply; 6+ messages in thread
From: Richard Henderson @ 2021-07-19 22:52 UTC (permalink / raw)
To: Alex Bennée, qemu-devel
Cc: Willian Rampazzo, Thomas Huth, Philippe Mathieu-Daudé,
Wainer dos Santos Moschetta
On 7/19/21 11:48 AM, Alex Bennée wrote:
> diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/dockerfiles/debian-tricore-cross.docker
> index 985925134c..4ea9112289 100644
> --- a/tests/docker/dockerfiles/debian-tricore-cross.docker
> +++ b/tests/docker/dockerfiles/debian-tricore-cross.docker
> @@ -15,9 +15,39 @@ RUN git clone --single-branch \
> https://github.com/bkoppelmann/tricore-binutils.git \
> /usr/src/binutils && \
> cd /usr/src/binutils && chmod +x missing && \
> - CFLAGS=-w ./configure --prefix=/usr --disable-nls --target=tricore && \
> - make && make install && \
> - rm -rf /usr/src/binutils
> + CFLAGS=-w ./configure --prefix=/usr/local --disable-nls --target=tricore && \
> + make && make install
>
> -# This image isn't designed for building QEMU but building tests
> -ENV QEMU_CONFIGURE_OPTS --disable-system --disable-user
> +FROM debian:buster-slim
> +# Duplicate deb line as deb-src
> +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
> +# Install very minimal QEMU build deps for use in CI
> +# $ lcitool variables debian-10 qemu+minimal
> +RUN apt update && \
Is there really an advantage here above basing this on debian-amd64?
r~
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v2 2/2] gitlab: enable a very minimal build with the tricore container
2021-07-19 22:52 ` Richard Henderson
@ 2021-07-20 9:14 ` Alex Bennée
0 siblings, 0 replies; 6+ messages in thread
From: Alex Bennée @ 2021-07-20 9:14 UTC (permalink / raw)
To: Richard Henderson
Cc: Willian Rampazzo, Thomas Huth, qemu-devel,
Wainer dos Santos Moschetta, Philippe Mathieu-Daudé
Richard Henderson <richard.henderson@linaro.org> writes:
> On 7/19/21 11:48 AM, Alex Bennée wrote:
>> diff --git a/tests/docker/dockerfiles/debian-tricore-cross.docker b/tests/docker/dockerfiles/debian-tricore-cross.docker
>> index 985925134c..4ea9112289 100644
>> --- a/tests/docker/dockerfiles/debian-tricore-cross.docker
>> +++ b/tests/docker/dockerfiles/debian-tricore-cross.docker
>> @@ -15,9 +15,39 @@ RUN git clone --single-branch \
>> https://github.com/bkoppelmann/tricore-binutils.git \
>> /usr/src/binutils && \
>> cd /usr/src/binutils && chmod +x missing && \
>> - CFLAGS=-w ./configure --prefix=/usr --disable-nls --target=tricore && \
>> - make && make install && \
>> - rm -rf /usr/src/binutils
>> + CFLAGS=-w ./configure --prefix=/usr/local --disable-nls --target=tricore && \
>> + make && make install
>> -# This image isn't designed for building QEMU but building tests
>> -ENV QEMU_CONFIGURE_OPTS --disable-system --disable-user
>> +FROM debian:buster-slim
>> +# Duplicate deb line as deb-src
>> +RUN cat /etc/apt/sources.list | sed "s/^deb\ /deb-src /" >> /etc/apt/sources.list
>> +# Install very minimal QEMU build deps for use in CI
>> +# $ lcitool variables debian-10 qemu+minimal
>> +RUN apt update && \
>
> Is there really an advantage here above basing this on debian-amd64?
It's mostly about reducing size. The current qemu/debian10 based image
takes:
794Mb
and can't even build a simple qemu because of missing dev libraries.
Where as the split build approach results in an image that is:
604Mb
However if I build the whole thing as one I can get it down to:
580MB
#
# Docker TriCore cross-compiler target
#
# This docker target builds on the Debian Buster base image but
# doesn't inherit from the common one to avoid bringing in unneeded
# dependencies.
#
# Copyright (c) 2018 Philippe Mathieu-Daudé
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
FROM docker.io/library/debian:buster-slim
MAINTAINER Philippe Mathieu-Daudé <f4bug@amsat.org>
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \
DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \
bzip2 \
ca-certificates \
ccache \
g++ \
gcc \
git \
libglib2.0-dev \
libpixman-1-dev \
libtest-harness-perl \
locales \
make \
ninja-build \
perl-base \
pkgconf \
python3-pip \
python3-setuptools \
python3-wheel
RUN git clone --single-branch \
https://github.com/bkoppelmann/tricore-binutils.git \
/usr/src/binutils && \
cd /usr/src/binutils && chmod +x missing && \
CFLAGS=-w ./configure --prefix=/usr/local --disable-nls --target=tricore && \
make && make install && \
rm -rf /usr/src/binutils
# This image can only build a very minimal QEMU as well as the tests
ENV DEF_TARGET_LIST tricore-softmmu
ENV QEMU_CONFIGURE_OPTS --disable-user --disable-tools --disable-fdt
>
>
> r~
--
Alex Bennée
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-07-20 9:46 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-19 21:48 [PATCH for 6.1 v2 0/2] tricore fixes Alex Bennée
2021-07-19 21:48 ` [PATCH v2 1/2] hw/tricore: fix inclusion of tricore_testboard Alex Bennée
2021-07-19 22:47 ` Richard Henderson
2021-07-19 21:48 ` [PATCH v2 2/2] gitlab: enable a very minimal build with the tricore container Alex Bennée
2021-07-19 22:52 ` Richard Henderson
2021-07-20 9:14 ` Alex Bennée
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.