RSB Couverture-Qemu build queries

Chris Johns chrisj at rtems.org
Sun Jun 18 02:23:04 UTC 2017


On 17/6/17 6:38 am, Joel Sherrill wrote:
> 
> 
> On Fri, Jun 16, 2017 at 2:13 PM, Cillian O'Donnell <cpodonnell8 at gmail.com
> <mailto:cpodonnell8 at gmail.com>> wrote:
> 
>     Hi,
> 
>     I am getting the RSB to build Couverture-Qemu and I just want to check
>     a few things I have done so far.
> 
>     1. There are about 5 patches applied to the current qemu build. Only
>     one of which applies cleanly to the Couverture build. Do you want me
>     to try and fix these up, comment them out and leave a note for
>     whoever wants to fix them or remove them completely? The patches that
>     don't work are:
> 
>     %patch add qemu
>     pw://patchwork.ozlabs.org/patch/406903/raw/Provide-the-missing-LIBUSB_LOG_LEVEL_-for-older-libusb-or-FreeBSD.-Providing-just-the-needed-value-as-a-defined..patch
>     <http://patchwork.ozlabs.org/patch/406903/raw/Provide-the-missing-LIBUSB_LOG_LEVEL_-for-older-libusb-or-FreeBSD.-Providing-just-the-needed-value-as-a-defined..patch>
> 
>     %patch add qemu
>     https://gaisler.org/qemu/0001-LEON3-Add-emulation-of-AMBA-plug-
>     <https://gaisler.org/qemu/0001-LEON3-Add-emulation-of-AMBA-plug->
>     play.patch
> 
>     %patch add qemu
>     https://gaisler.org/qemu/0002-LEON3-Build-AMBA-plug-and-play-records-from-high-lev.patch
>     <https://gaisler.org/qemu/0002-LEON3-Build-AMBA-plug-and-play-records-from-high-lev.patch>
> 
>     %patch add qemu
>     https://gaisler.org/qemu/0003-LEON3-Init-UART-timers-and-CPU-if-we-run-a-RAM-image.patch
>     <https://gaisler.org/qemu/0003-LEON3-Init-UART-timers-and-CPU-if-we-run-a-RAM-image.patch>
> 
> 
> 
> I think they need to be proposed to the Couverture project to be evaluated. They
> should
> be OK with the Gaisler ones without too much trouble. We can bring in Gaisler folks.
> The other is a portability one. 
> 
> So at least make the project aware of them.
> 
> https://forge.open-do.org/projects/couverture-qemu/
> 
> Make sure myself and chrisj@ are on any issue/email you file.
>  
> 
>     2. For this source setting section, is the first part just dealing
>     with the case were this a packaged release so a tar of the download is
>     already included with it?
> 
>     %if %{rsb_released} && %{!defined without_release_url}
>         %source set qemu
>     %{rtems_release_url}/%{rtems_version}/sources/qemu-git-42d58e7.tar.xz
>     %else
>         %source set qemu
>     https://github.com/AdaCore/qemu/archive/%{qemu_version}.tar.gz
>     <https://github.com/AdaCore/qemu/archive/%{qemu_version}.tar.gz>
>     %endif
> 
> 
> I think so but Chris should confirm that. 

I think the release process should handle this. I suggest you make this as
simple as possible and remove the release check. I can look at this if this
breaks the release scripts when we start the 4.12 release process.

> 
>     3. What does the -q option do in the %prep section of the build, this
>     option shows up in examples in the docs but there is no description of
>     what it does?
> 
>     %source setup qemu -q -n qemu-%{qemu_version}
> 
> 
> Chris will have to answer this.
> 

It is a spec file compatible option that is not used. You can remove the -q.

https://docs.fedoraproject.org/ro/Fedora_Draft_Documentation/0.1/html/RPM_Guide/ch09s04.html

>     4. The current qemu build is configured with the default setting to
>     build for all architectures but most of the arch's aren't used by
>     RTEMS and/or don't have machine support for same bsps, so I've added a
>     --target-list to only build the targets that have a corresponding bsp
>     (sparc64-softmmu is missing as it runs into build issues, I forgot to
>     mention in the initial results). However the list spills over 80 lines
>     so should I make a %{qemu_targets} macro and if so where should I put
>     it?
> 
> I like the idea of limiting the targets built. You are right that we don't 
> care about the others.

Makes sense. We should only provide what we know works.

> The style and variable name are Chris questions.
>  
>      --make=%{__make} \
>      72   
>      --target-list=arm-softmmu,i386-softmmu,lm32-softmmu,mips-softmmu,ppc-softmmu,sparc-softmmu
>     \
>      73     ${VDE_CONFIG} \
>      74     --disable-smartcard-nss \
> 

If the line is part of a script fragment the shell line continuation character
(\) can be used.

I would try and see if something like this works:

%define qemu_archs arm-softmmu,i386-softmmu,lm32-softmmu
%define qemu_archs %{qemu_archs},mips-softmmu,ppc-softmmu,sparc-softmmu

  ....

--target-list=%{?with_qemu_archs:%{with_qemu_archs}}%{!?with_threads:%{qemu_archs}}
\
  ...

We can then override the defaults with '--with-qemu-archs=mips-softmmu' or what
ever you want to build and test something different.

Use '--trace --dry-run' to debug until you get the command line you want.

Chris


More information about the devel mailing list