[PATCH 1/3] source-builder/config: Add couverture-qemu general config & build instructions.
Cillian O'Donnell
cpodonnell8 at gmail.com
Tue May 1 06:31:13 UTC 2018
On Tue, 1 May 2018, 00:52 Chris Johns, <chrisj at rtems.org> wrote:
> On 28/04/2018 20:18, Cillian O'Donnell wrote:
> > ---
> > source-builder/config/couverture-qemu-2-1.cfg | 104
> ++++++++++++++++++++++++++
>
> Why a new file? Could the existing qemu config be used?
>
We were thinking at the time that this would eventually replace the qemu
that's there so it was best if it was self contained. They are identical in
places so yes a lot of overlap.
>
> I would prefer to have as few of the global configs as possible and share
> them
> as much as possible.
>
> > 1 file changed, 104 insertions(+)
> > create mode 100644 source-builder/config/couverture-qemu-2-1.cfg
> >
> > diff --git a/source-builder/config/couverture-qemu-2-1.cfg
> b/source-builder/config/couverture-qemu-2-1.cfg
> > new file mode 100644
> > index 0000000..b0a31bb
> > --- /dev/null
> > +++ b/source-builder/config/couverture-qemu-2-1.cfg
> > @@ -0,0 +1,104 @@
> > +#
> > +# This configuration file configure's, make's and install's
> Couverture-QEMU.
> > +#
> > +
> > +%if %{release} == %{nil}
> > + %define release 1
> > +%endif
> > +
> > +#
> > +# The description.
> > +#
> > +Name: couverture-qemu-%{qemu_version}-%{_host}-%{release}
> > +Summary: Couverture-Qemu is a processor simulator with extra trace
> ability.
>
> I do not mind we have just the QEMU name and summary.
>
> > +Version: %{qemu_version}
> > +Release: %{release}
> > +URL: https://github.com/AdaCore/qemu
> > +BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
> > +
> > +#
> > +# List of architectures to be built
> > +#
> > +%define qemu_archs arm-softmmu,i386-softmmu,lm32-softmmu,mips-softmmu
> > +%define qemu_archs %{qemu_archs},ppc-softmmu,sparc-softmmu
>
> Why limit the archs?
>
These are the ones I tested that produced same results with rtems tester to
the existing qemu. I think there is also ones that aren't relevant to rtems.
>
> > +
> > +#
> > +# Prepare the source code.
> > +#
> > +%prep
> > + build_top=$(pwd)
> > +
> > + source_dir_qemu="qemu-%{qemu_version}"
> > + %source setup qemu -n qemu-%{qemu_version}
>
> Why remove the -q?
>
>From our discussion last year
> 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}
It is a spec file compatible option that is not used. You can remove the -q.
>
> > + %patch setup qemu -p1
> > +
> > + cd ${build_top}
> > +
> > +%build
> > + build_top=$(pwd)
> > +
> > + %{build_directory}
> > +
> > + mkdir -p ${build_dir}
> > + cd ${build_dir}
> > +
> > + %if %{pkgconfig check vdeplug}
> > + VDE_CONFIG="--enable-vde"
> > + VDE_CFLAGS="%{pkgconfig cflags vdeplug}"
> > + VDE_LDFLAGS="%{pkgconfig ldflags vdeplug} %{pkgconfig libs vdeplug}"
> > + %endif
> > +
> > + %{host_build_flags}
> > +
> > + if test "%{_build}" != "%{_host}" ; then
> > + CROSS_PREFIX_OPTION="--cross-prefix=%{_host}-"
> > + fi
> > +
> > + SYSROOT=$SB_TMPPREFIX
> > +
> > + #
> > + # The --extra-cflags and --extra-ldflags do not work as expected.
> > + #
> > + # Hack warning: MSYS2 does not seem to convert the path to
> > + # a shell path from Windows so we keep them
> > + # separate and handle it in the pkgconfig tool.
> > + #
> > + PKG_CONFIG_DEFAULT_PATH=${PKG_CONFIG_PATH} \
> > + PKG_CONFIG_PATH=$SYSROOT/lib/pkgconfig \
> > + PKG_CONFIG_BUILD_TOP_DIR=$SB_TMPROOT \
> > + %{_ld_library_path}=$SYSROOT/lib \
> > + LDFLAGS="-Wl,-rpath -Wl,/$SB_PREFIX_CLEAN/lib ${VDE_LDFLAGS}" \
> > + CFLAGS="${CFLAGS} ${VDE_CFLAGS}" \
> > + ../${source_dir_qemu}/configure \
> > + --prefix=%{_prefix} \
> > + ${CROSS_PREFIX_OPTION} \
> > + --make=%{__make} \
> > + --target-list=%{?with_qemu_archs:%{with_qemu_archs}}\
> > + %{!?with_qemu_archs:%{qemu_archs}} \
> > + ${VDE_CONFIG} \
> > + --disable-smartcard-nss \
> > + --disable-tools \
> > + --disable-pie \
> > + --disable-vnc \
> > + --disable-sdl \
> > + --disable-gtk \
> > + --disable-opengl \
> > + --disable-netmap \
> > + --disable-werror \
>
> Some of these lines have white space at the end which seems wrong.
>
> > + --disable-virtfs \
> > + --disable-docs
>
> Does the standard qemu build with these added?
>
Not sure, didn't test that.
>
> Chris
>
> > +
> > + %{_ld_library_path}=$SYSROOT/lib \
> > + %{__make} %{?_smp_mflags} all
> > +
> > + cd ${build_top}
> > +
> > +%install
> > + build_top=$(pwd)
> > +
> > + %{__rmdir} $SB_BUILD_ROOT
> > +
> > + cd ${build_dir}
> > + %{_ld_library_path}=$SYSROOT/lib \
> > + %{__make} DESTDIR=$SB_BUILD_ROOT install
> > + cd ${build_top}
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20180501/9231a07c/attachment-0002.html>
More information about the devel
mailing list