[Buildroot] [PATCH/master 6/7] package/qemu: add BR2_PACKAGE_HOST_QEMU_USER_MODE_ARGS string

Adam Duskett aduskett at gmail.com
Fri Sep 10 17:42:06 UTC 2021


Hey Thomas;

As briefly discussed on IRC, this is mostly due to x86 discrepancies,
however, as I do not have access to * every * CPU
that buildroot + GOI supports, it's better to commit these changes
now, and if others find issues with their CPU/GOI
builds, they can submit a patch far easier thanks to this patch series!

Adam

On Fri, Sep 3, 2021 at 3:37 PM Thomas Petazzoni
<thomas.petazzoni at bootlin.com> wrote:
>
> Hello Adam,
>
> On Fri,  3 Sep 2021 09:20:26 -0700
> Adam Duskett <aduskett at gmail.com> wrote:
>
> > For specific architectures, running qemu in user mode without any additional
> > options may fail if the host processor does not have the necessary instructions
> > to properly run qemu in user mode, which results in the following error:
> > "qemu: uncaught target signal 4 (Illegal instruction) - core dumped"
> >
> > CoreI7 is one such architecture that has had consistent auto-build failures.
> >
> > Add a new string in qemu/Config.in.host: BR2_PACKAGE_HOST_QEMU_USER_MODE_ARGS.
> > The default for the Corei7 architecture is directly from the OpenEmbedded
> > project found in meta/conf/machine/include/x86/tune-corei7.inc:
> > "-cpu Nehalem,check=false." Other architectures may be added to this string at
> > a later date if other failures occure.
> >
> > Signed-off-by: Adam Duskett <aduskett at gmail.com>
>
> So on the principle, I'm obviously OK as this is something I have
> suggested. However, what bothers me here is that we are handling only
> the Core i7 case, because it caused some issue in the autobuilder.
>
> What is qemu doing when no -cpu is provided? Does it emulate the host
> CPU in this case? If so, then it is going to be wrong in a lot of other
> cases than Core i7, no?
>
> Or put differently, shouldn't we essentially have a value for
> BR2_PACKAGE_HOST_QEMU_USER_MODE_ARGS for pretty much all CPU
> architectures that we want to support for this use-case ?
>
> Thomas
> --
> Thomas Petazzoni, co-owner and CEO, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com


More information about the buildroot mailing list