tricore fixes
cover tricore fixes
Hi,
This fixes check-tcg for tricore and adds a test to the gitlab matrix so we don't miss it breaking again.
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 | 48 +++++++++++++++++-- 5 files changed, 58 insertions(+), 9 deletions(-)
Signature · 1 line
2.32.0.264.g75ae10bc75
PATCH 1/2 hw/tricore: fix inclusion of tricore_testboard
We inadvertently added a symbol clash causing the build not to include the testboard needed for check-tcg.
--- configs/devices/tricore-softmmu/default.mak | 1 + hw/tricore/Kconfig | 3 +-- hw/tricore/meson.build | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
configs/devices/tricore-softmmu/default.mak +1 -0
@@ -1 +1,2 @@ +CONFIG_TRITEST=y CONFIG_TRIBOARD=y
hw/tricore/Kconfig +1 -2
@@ -1,9 +1,8 @@ -config TRICORE +config TRITEST bool config TRIBOARD bool - select TRICORE select TC27X_SOC config TC27X_SOC
hw/tricore/meson.build +2 -2
@@ -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'))
Signature · 1 line
2.32.0.264.g75ae10bc75
Re: [PATCH v1 1/2] hw/tricore: fix inclusion of tricore_testboard
Quoted 11 lines · 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 <[email protected]>--- configs/devices/tricore-softmmu/default.mak | 1 + hw/tricore/Kconfig | 3 +-- hw/tricore/meson.build | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
as far as this fix goes (though maybe CONFIG_TRICORE_TESTBOARD would be better?)
But I still don't understand and would like to know:
(1) why doesn't CONFIG_TRICORE get set by Kconfig anyway, as f4063f9c31 claims to be doing?
(2) what are the CONFIG_$ARCH flags for? Apart from this, we don't seem to be using any of them, as demonstrated by the fact that nothing else broke :-)
thanks
-- PMM
Re: [PATCH v1 1/2] hw/tricore: fix inclusion of tricore_testboard
Quoted 13 lines · Peter Maydell
Quoted 11 lines · 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 <[email protected]>--- configs/devices/tricore-softmmu/default.mak | 1 + hw/tricore/Kconfig | 3 +-- hw/tricore/meson.build | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
Quoted 6 lines
Reviewed-by Peter Maydell <[email protected]>as far as this fix goes (though maybe
CONFIG_TRICORE_TESTBOARDwould be better?)But I still don't understand and would like to know:
(1) why doesn'tCONFIG_TRICOREget set byKconfiganyway, asf4063f9c31claims to be doing?
It does (or should) thanks to meson:
'CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'
Quoted 3 lines
(2) what are the CONFIG_$ARCH flags for? Apart from this, we don't seem to be using any of them, as demonstrated by the fact that nothing else broke :-)
They need to be declared in Kconfig otherwise minikconf complains about them not being defined when you pass it in. This is part of minikconf's sanity checking code.
Quoted 3 lines
thanks
-- PMM
Signature · 1 line
Alex Bennée
Re: [PATCH v1 1/2] hw/tricore: fix inclusion of tricore_testboard
Quoted 20 lines · Alex Bennée
Quoted 16 lines · Peter Maydell
Quoted 11 lines · 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 <[email protected]>--- 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 Peter Maydell <[email protected]>as far as this fix goes (though maybe
CONFIG_TRICORE_TESTBOARDwould be better?)
Quoted 7 lines
Quoted 3 lines
But I still don't understand and would like to know:
(1) why doesn'tCONFIG_TRICOREget set byKconfiganyway, asf4063f9c31claims to be doing?It does (or should) thanks to meson:
'
CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'
Yeah, but it doesn't, as you can see if you look at the meson build
log: we do pass CONFIG_TRICORE=y on the minikconf command line, but it doesn't appear in minikconf's output!
Quoted 7 lines
Quoted 3 lines
(2) what are the CONFIG_$ARCH flags for? Apart from this, we don't seem to be using any of them, as demonstrated by the fact that nothing else broke :-)
They need to be declared in
Kconfigotherwise minikconf complains about them not being defined when you pass it in. This is part of minikconf's sanity checking code.
No, I mean, if nothing anywhere in the build system is conditional on these flags, why do we have them at all ? We know we don't have anything that cares about them, because right now we have a bug where they're never set...
-- PMM
Re: [PATCH v1 1/2] hw/tricore: fix inclusion of tricore_testboard
Quoted 37 lines · Peter Maydell
Quoted 20 lines · Alex Bennée
Quoted 16 lines · Peter Maydell
Quoted 11 lines · 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 <[email protected]>--- 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 Peter Maydell <[email protected]>as far as this fix goes (though maybe
CONFIG_TRICORE_TESTBOARDwould be better?)Quoted 7 lines
Quoted 3 lines
But I still don't understand and would like to know:
(1) why doesn'tCONFIG_TRICOREget set byKconfiganyway, asf4063f9c31claims to be doing?It does (or should) thanks to meson:
'
CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'Yeah, but it doesn't, as you can see if you look at the meson build
log: we do passCONFIG_TRICORE=yon the minikconf command line, but it doesn't appear in minikconf's output!Quoted 4 lines
Quoted 3 lines
(2) what are the CONFIG_$ARCH flags for? Apart from this, we don't seem to be using any of them, as demonstrated by the fact that nothing else broke :-)
Quoted 8 lines
Quoted 3 lines
They need to be declared in
Kconfigotherwise minikconf complains about them not being defined when you pass it in. This is part of minikconf's sanity checking code.No, I mean, if nothing anywhere in the build system is conditional on these flags, why do we have them at all ? We know we don't have anything that cares about them, because right now we have a bug where they're never set...
Well we have one place at the moment to ensure v7m gets included even if you don't include the various M profile boards:
default y if TCG && (ARM || AARCH64)
which is because translate.c still currently has a dependency on those bits. Without that you'll get a linker failure with the following build:
'../../configure' '--without-default-features' '--target-list=arm-softmmu,aarch64-softmmu' '--with-devices-aarch64=minimal'
I thought I'd added that to the build matrix but I can't find it now.
Quoted 2 lines
-- PMM
Signature · 1 line
Alex Bennée
Re: [PATCH v1 1/2] hw/tricore: fix inclusion of tricore_testboard
Quoted 51 lines · Alex Bennée
Quoted 37 lines · Peter Maydell
Quoted 20 lines · Alex Bennée
Quoted 16 lines · Peter Maydell
Quoted 11 lines · 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 <[email protected]>--- 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 Peter Maydell <[email protected]>as far as this fix goes (though maybe
CONFIG_TRICORE_TESTBOARDwould be better?)Quoted 7 lines
Quoted 3 lines
But I still don't understand and would like to know:
(1) why doesn'tCONFIG_TRICOREget set byKconfiganyway, asf4063f9c31claims to be doing?It does (or should) thanks to meson:
'
CONFIG_' + config_target['TARGET_ARCH'].to_upper() + '=y'Yeah, but it doesn't, as you can see if you look at the meson build
log: we do passCONFIG_TRICORE=yon the minikconf command line, but it doesn't appear in minikconf's output!Quoted 4 lines
Quoted 3 lines
(2) what are the CONFIG_$ARCH flags for? Apart from this, we don't seem to be using any of them, as demonstrated by the fact that nothing else broke :-)
Quoted 8 lines
Quoted 3 lines
They need to be declared in
Kconfigotherwise minikconf complains about them not being defined when you pass it in. This is part of minikconf's sanity checking code.No, I mean, if nothing anywhere in the build system is conditional on these flags, why do we have them at all ? We know we don't have anything that cares about them, because right now we have a bug where they're never set...
Well we have one place at the moment to ensure v7m gets included even if you don't include the various M profile boards:
Quoted 8 lines
default y if TCG && (ARM || AARCH64)
which is because
translate.cstill currently has a dependency on those bits. Without that you'll get a linker failure with the following build:'../../configure' '--without-default-features' '--target-list=arm-softmmu,aarch64-softmmu' '--with-devices-aarch64=minimal'
I thought I'd added that to the build matrix but I can't find it now.
Ahh still part of the larger series:
Subject: [PATCH v16 99/99] gitlab: defend the new stripped down arm64 configs
Date: Fri, 4 Jun 2021 16:53:12 +0100
Message-Id: <[email protected]>
Quoted 3 lines
Quoted 3 lines
-- PMM
Signature · 1 line
Alex Bennée
Re: [PATCH v1 1/2] hw/tricore: fix inclusion of tricore_testboard
In reply to Alex BennéeQuoted 4 lines · 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")
Sorry for the mess, I remember having tested this carefully.
OK, so my patch was sent/tested first:
commit f4063f9c319e3924b0c6d09dfe43e94d01253ee0
Message-Id: <[email protected]>
but got merged *after* Bastian's series:
commit 582079c9d27fc8cfff9f495072300416e0e4aafe
Message-Id: <[email protected]>
Quoted 43 lines
Signed-off-by Alex Bennée <[email protected]>--- configs/devices/tricore-softmmu/default.mak | 1 + hw/tricore/Kconfig | 3 +-- hw/tricore/meson.build | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)configs/devices/tricore-softmmu/default.mak +1
-0@@ -1 +1,2 @@ +CONFIG_TRITEST=y CONFIG_TRIBOARD=yhw/tricore/Kconfig +1
-2@@ -1,9 +1,8 @@ -config TRICORE +config TRITEST bool config TRIBOARD bool - select TRICORE select TC27X_SOC config TC27X_SOChw/tricore/meson.build +2
-2@@ -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'))
PATCH 2/2 gitlab: enable a very minimal build with the tricore container
In reply to Alex BennéeWe do the same thing as hexagon and do a two stage build that provides the minimal dependencies to build qemu-tricore-system and it's check-tcg tests.
--- .gitlab-ci.d/buildtest.yml | 11 +++++ .../dockerfiles/debian-tricore-cross.docker | 48 +++++++++++++++++-- 2 files changed, 54 insertions(+), 5 deletions(-)
.gitlab-ci.d/buildtest.yml +11 -0
@@ -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: debian-tricore-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:
tests/docker/dockerfiles/debian-tricore-cross.docker +43 -5
52 lines not on this page · raw message
Signature · 1 line
2.32.0.264.g75ae10bc75
Re: [PATCH v1 2/2] gitlab: enable a very minimal build with the tricore container
Quoted 73 lines · Alex Bennée
We do the same thing as hexagon and do a two stage build that provides the minimal dependencies to build qemu-tricore-system and it's check-tcg tests.
Signed-off-by Alex Bennée <[email protected]>--- .gitlab-ci.d/buildtest.yml | 11 +++++ .../dockerfiles/debian-tricore-cross.docker | 48 +++++++++++++++++-- 2 files changed, 54 insertions(+), 5 deletions(-).gitlab-ci.d/buildtest.yml +11
-0@@ -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: debian-tricore-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:tests/docker/dockerfiles/debian-tricore-cross.docker +27
-5@@ -15,9 +15,47 @@ 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 QEMU build deps for use in CI +RUN apt update && \ + DEBIAN_FRONTEND=noninteractive apt install -yy eatmydata && \ + DEBIAN_FRONTEND=noninteractive eatmydata apt install -yy \ + build-essential \ + git \ + libglib2.0-dev \ + libpixman-1-dev \ + ninja-build \ + python3 \ + pkg-config + bzip2 \ + ca-certificates \ + ccache \ + diffutils \ + findutils \ + g++ \ + gcc \ + git \ + libcapstone-dev \ + libfdt-dev \ + libglib2.0-dev \
tests/docker/dockerfiles/debian-tricore-cross.docker RUN git clone --single-branch \ · line 55
Quoted 10 lines
tests/docker/dockerfiles/debian-tricore-cross.docker +10
-0+ libpixman-1-dev \ + libtest-harness-perl \ + locales \ + make \ + ninja-build \ + perl-base \ + pkgconf \ + python3-pip \ + python3-setuptools \ + python3-wheel
Oops that combined the two lists, it should be:
# 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-wheelQuoted 6 lines
tests/docker/dockerfiles/debian-tricore-cross.docker +6
-0+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
Signature · 1 line
Alex Bennée