[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 03/23] scripts: add script to generate C header files fro
From: |
Daniel P . Berrangé |
Subject: |
Re: [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files |
Date: |
Fri, 9 Aug 2024 10:59:46 +0100 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
On Fri, Aug 09, 2024 at 11:42:38AM +0200, Paolo Bonzini wrote:
> On Fri, Aug 9, 2024 at 11:30 AM Philippe Mathieu-Daudé
> <philmd@linaro.org> wrote:
> >
> > On 9/8/24 00:30, Octavian Purdila wrote:
> > > On Thu, Aug 8, 2024 at 2:56 PM John Snow <jsnow@redhat.com> wrote:
> >
> >
> > >>> diff --git a/configure b/configure
> > >>> index 5ad1674ca5..811bfa5d54 100755
> > >>> --- a/configure
> > >>> +++ b/configure
> > >>> @@ -956,7 +956,7 @@ mkvenv="$python
> > >>> ${source_path}/python/scripts/mkvenv.py"
> > >>> # Finish preparing the virtual environment using vendored .whl files
> > >>>
> > >>> $mkvenv ensuregroup --dir "${source_path}/python/wheels" \
> > >>> - ${source_path}/pythondeps.toml meson || exit 1
> > >>> + ${source_path}/pythondeps.toml meson svd-gen-header || exit 1
> > >>
> > >
> > > Hi John,
> > >
> > > Thanks for reviewing!
> > >
> > >>
> > >> I haven't read the rest of this series; I'm chiming in solely from the
> > >> build/python maintainer angle. Do we *always* need pysvd, no matter how
> > >> QEMU was configured? Adding it to the meson line here is a very big
> > >> hammer.
> > >>
> > >
> > > I think the minimum we can do is to install it only if CONFIG_ARM is
> > > enabled. That might change in the future if the models we create with
> > > pysvd are enabled for other architectures.
> >
> > Similarly on how we manage libfdt, you can have meson defines
> > SVDGEN as:
> >
> > config_host_data.set('CONFIG_SVDGEN', svd_gen_header.found())
> >
> > Then declare SVDGEN in Kconfig.host, and finally use in the Kconfigs:
>
> That would force people to install pysvd on the host, which is a pity
> for such a small and little-known library. We have used submodules
> in the past for much larger and common dependencies, for example
> capstone.
As mentioned elsewhere in thsi threads, IMHO we shoud not be running
this generator during the build at all. It should be run once to
create the headers needed for a particular device & the output committed
to QEMU. There after any changes to the header (if any) need reviewing
to ensure they don't imply an impact on guest ABI. This avoids having
the 8.6 MB XML file in QEMU git too, as well as the pysvd dep on the
host. Only the very rare times when we create a new device would need
to have the pysvd code & XML.
With 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 :|
- [RFC PATCH 00/23] NXP i.MX RT595, ARM SVD and device model unit tests, Octavian Purdila, 2024/08/05
- [RFC PATCH 01/23] fifo32: add peek function, Octavian Purdila, 2024/08/05
- [RFC PATCH 02/23] tests/unit: add fifo test, Octavian Purdila, 2024/08/05
- [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files, Octavian Purdila, 2024/08/05
- Re: [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files, John Snow, 2024/08/08
- Re: [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files, Octavian Purdila, 2024/08/08
- Re: [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files, John Snow, 2024/08/08
- Re: [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files, Philippe Mathieu-Daudé, 2024/08/09
- Re: [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files, Paolo Bonzini, 2024/08/09
- Re: [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files,
Daniel P . Berrangé <=
- Re: [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files, Philippe Mathieu-Daudé, 2024/08/13
- Re: [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files, Paolo Bonzini, 2024/08/09
- Re: [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files, Octavian Purdila, 2024/08/09
Re: [RFC PATCH 03/23] scripts: add script to generate C header files from SVD XML files, Peter Maydell, 2024/08/12
[RFC PATCH 05/23] hw: add register access utility functions, Octavian Purdila, 2024/08/05