Patchwork [1/1] ia32-base.inc: new include file

login
register
mail settings
Submitter Tom Zanussi
Date Aug. 25, 2012, 4:34 a.m.
Message ID <65d8351bbcb9fb6012c296222795f3c938dc5624.1345867875.git.tom.zanussi@intel.com>
Download mbox | patch
Permalink /patch/35339/
State Accepted
Commit 9a8b4fcac639404caa8ac87717118b3380239838
Headers show

Comments

Tom Zanussi - Aug. 25, 2012, 4:34 a.m.
From: Tom Zanussi <tom.zanussi@intel.com>

This is the ia32-base.inc moved over from meta-intel.  See meta-intel
for the complete history of contributions to this file.

Here's the initial commit text that explains the purpose of this file:

  The meta-intel BSPs currently have a number of machine settings common
  to all - factor these out into a common include file.

  Also add several new intel-specific XSERVER variables for building
  XSERVER variables in BSPs.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/conf/machine/include/ia32-base.inc | 58 +++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 meta/conf/machine/include/ia32-base.inc
Richard Purdie - Aug. 25, 2012, 7:35 a.m.
On Fri, 2012-08-24 at 23:34 -0500, tom.zanussi@intel.com wrote:
> From: Tom Zanussi <tom.zanussi@intel.com>
> 
> This is the ia32-base.inc moved over from meta-intel.  See meta-intel
> for the complete history of contributions to this file.
> 
> Here's the initial commit text that explains the purpose of this file:
> 
>   The meta-intel BSPs currently have a number of machine settings common
>   to all - factor these out into a common include file.
> 
>   Also add several new intel-specific XSERVER variables for building
>   XSERVER variables in BSPs.
> 
> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
> ---
>  meta/conf/machine/include/ia32-base.inc | 58 +++++++++++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
>  create mode 100644 meta/conf/machine/include/ia32-base.inc

I'd add that there are several reasons for this. Things like atom-pc
from meta-yocto could do with accessing this file's content for example
so its useful beyond just meta-intel. In the same way we have various
core "tune" files in OE-Core, this one has become something similar for
IA32. There were recently sstate reuse bugs where the lack of a common
include were causing this to get rebuild depending on which machine was
selected.

It also allows the yocto-bsp tools to work with OE-Core where they'd
currently have failures due to recommending this file.

Cheers,

Richard
Koen Kooi - Aug. 25, 2012, 7:45 a.m.
Op 25 aug. 2012, om 06:34 heeft tom.zanussi@intel.com het volgende geschreven:

> From: Tom Zanussi <tom.zanussi@intel.com>
> 
> This is the ia32-base.inc moved over from meta-intel.  See meta-intel
> for the complete history of contributions to this file.
> 
> Here's the initial commit text that explains the purpose of this file:
> 
>  The meta-intel BSPs currently have a number of machine settings common
>  to all - factor these out into a common include file.
> 
>  Also add several new intel-specific XSERVER variables for building
>  XSERVER variables in BSPs.
> 
> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
> ---
> meta/conf/machine/include/ia32-base.inc | 58 +++++++++++++++++++++++++++++++++
> 
> +# glibc-related variables
> +#
> +GLIBC_ADDONS ?= "nptl"

That's a distro setting
Phil Blundell - Aug. 25, 2012, 7:59 a.m.
On Fri, 2012-08-24 at 23:34 -0500, tom.zanussi@intel.com wrote:
> This is the ia32-base.inc moved over from meta-intel.  See meta-intel
> for the complete history of contributions to this file.
> 
> Here's the initial commit text that explains the purpose of this file:
> 
>   The meta-intel BSPs currently have a number of machine settings common
>   to all - factor these out into a common include file.
> 

It doesn't look as though the name "ia32-base" really reflects the
contents of this file very accurately.  Most of the bits in here seem to
have more to do with generic PC architecture and would equally apply to
x86-64 (or indeed any architecture -- e.g. "ext2" which doesn't really
seem to be a machine property in any meaningful sense).  Also, a lot of
the stuff in this file seems rather more like distro policy than
architecture/machine definition.

That's not to say that I think the idea of having an include file to
capture a "PC-type" platform (or, at least, the common use-cases for
one) is a bad idea.  If there are multiple platforms which want to do
that then putting the definitions in a common place does seem sensible,
but I think describing it as "ia32-base" is at the same time too
specific and too generic.

>  Also add several new intel-specific XSERVER variables for building
>  XSERVER variables in BSPs.

If these are really intel-specific (and the i915/i965 bits do look like
they are), shouldn't they stay in meta-intel?  It seems like having
variables defined in oe-core, but not referenced by anything in oe-core,
is possibly a recipe for future confusion.

p.
Khem Raj - Aug. 25, 2012, 8:13 a.m.
On Saturday, August 25, 2012, Koen Kooi <koen@dominion.thruhere.net> wrote:
>
> Op 25 aug. 2012, om 06:34 heeft tom.zanussi@intel.com het volgende
geschreven:
>
>> From: Tom Zanussi <tom.zanussi@intel.com>
>>
>> This is the ia32-base.inc moved over from meta-intel.  See meta-intel
>> for the complete history of contributions to this file.
>>
>> Here's the initial commit text that explains the purpose of this file:
>>
>>  The meta-intel BSPs currently have a number of machine settings common
>>  to all - factor these out into a common include file.
>>
>>  Also add several new intel-specific XSERVER variables for building
>>  XSERVER variables in BSPs.
>>
>> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
>> ---
>> meta/conf/machine/include/ia32-base.inc | 58
+++++++++++++++++++++++++++++++++
>>
>> +# glibc-related variables
>> +#
>> +GLIBC_ADDONS ?= "nptl"
>
> That's a distro setting

And its redundant
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
Richard Purdie - Aug. 25, 2012, 11:50 a.m.
On Sat, 2012-08-25 at 08:59 +0100, Phil Blundell wrote:
> On Fri, 2012-08-24 at 23:34 -0500, tom.zanussi@intel.com wrote:
> > This is the ia32-base.inc moved over from meta-intel.  See meta-intel
> > for the complete history of contributions to this file.
> > 
> > Here's the initial commit text that explains the purpose of this file:
> > 
> >   The meta-intel BSPs currently have a number of machine settings common
> >   to all - factor these out into a common include file.
> > 
> 
> It doesn't look as though the name "ia32-base" really reflects the
> contents of this file very accurately.  Most of the bits in here seem to
> have more to do with generic PC architecture and would equally apply to
> x86-64

Note that IA32 includes both x86 and x86-64 in contrast to IA64 which is
Itanium so the name is actually inclusive. 

>  (or indeed any architecture -- e.g. "ext2" which doesn't really
> seem to be a machine property in any meaningful sense).  Also, a lot of
> the stuff in this file seems rather more like distro policy than
> architecture/machine definition.
> 
> That's not to say that I think the idea of having an include file to
> capture a "PC-type" platform (or, at least, the common use-cases for
> one) is a bad idea.  If there are multiple platforms which want to do
> that then putting the definitions in a common place does seem sensible,
> but I think describing it as "ia32-base" is at the same time too
> specific and too generic.
>
> >  Also add several new intel-specific XSERVER variables for building
> >  XSERVER variables in BSPs.
> 
> If these are really intel-specific (and the i915/i965 bits do look like
> they are), shouldn't they stay in meta-intel?  It seems like having
> variables defined in oe-core, but not referenced by anything in oe-core,
> is possibly a recipe for future confusion.

They are used outside of meta-intel, just like the tune files and other
pieces we already have in OE-Core in the machine include directory. Yes,
they're only used by a subset of the architectures but I don't think
that is a reason to exclude this.

Cheers,

Richard
Richard Purdie - Aug. 25, 2012, 11:53 a.m.
On Sat, 2012-08-25 at 01:13 -0700, Khem Raj wrote:
> 
> 
> On Saturday, August 25, 2012, Koen Kooi <koen@dominion.thruhere.net>
> wrote:
> >
> > Op 25 aug. 2012, om 06:34 heeft tom.zanussi@intel.com het volgende
> geschreven:
> >
> >> From: Tom Zanussi <tom.zanussi@intel.com>
> >>
> >> This is the ia32-base.inc moved over from meta-intel.  See
> meta-intel
> >> for the complete history of contributions to this file.
> >>
> >> Here's the initial commit text that explains the purpose of this
> file:
> >>
> >>  The meta-intel BSPs currently have a number of machine settings
> common
> >>  to all - factor these out into a common include file.
> >>
> >>  Also add several new intel-specific XSERVER variables for building
> >>  XSERVER variables in BSPs.
> >>
> >> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
> >> ---
> >> meta/conf/machine/include/ia32-base.inc | 58
> +++++++++++++++++++++++++++++++++
> >>
> >> +# glibc-related variables
> >> +#
> >> +GLIBC_ADDONS ?= "nptl"
> >
> > That's a distro setting
> 
> And its redundant

I thought you tried removing this and we ran into issues?

Regardless, I think this is reason to have this in one place where we
can clean it up. I tried to untangle the GLIBC_EXTRA_CONF bit that was
here until recently and that was more painful than necessary needing
patches to meta-intel and meta-yocto. If we get one good include file,
we then have one place to clean this kind of thing up and it stops BSP
layers having to do their own things badly.

So in summary I think this is a reason to support this change :)

Cheers,

Richard
Richard Purdie - Aug. 25, 2012, 11:56 a.m.
On Sat, 2012-08-25 at 09:45 +0200, Koen Kooi wrote:
> Op 25 aug. 2012, om 06:34 heeft tom.zanussi@intel.com het volgende geschreven:
> 
> > From: Tom Zanussi <tom.zanussi@intel.com>
> > 
> > This is the ia32-base.inc moved over from meta-intel.  See meta-intel
> > for the complete history of contributions to this file.
> > 
> > Here's the initial commit text that explains the purpose of this file:
> > 
> >  The meta-intel BSPs currently have a number of machine settings common
> >  to all - factor these out into a common include file.
> > 
> >  Also add several new intel-specific XSERVER variables for building
> >  XSERVER variables in BSPs.
> > 
> > Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
> > ---
> > meta/conf/machine/include/ia32-base.inc | 58 +++++++++++++++++++++++++++++++++
> > 
> > +# glibc-related variables
> > +#
> > +GLIBC_ADDONS ?= "nptl"
> 
> That's a distro setting

Yes and no. It makes sense for architectures to have sane defaults and I
class nptl on ia32 as that. We want OE-Core to function distroless but
allow distros to change things where it makes sense to them. So I'd
argue this is reasonable.

I seem to remember a number of issues where ia32 defaulted to something
less sane going back in time and you needed this on every ia32 machine.
As has been pointed out, this is probably redundant now. If that is the
case, great, lets clean it up. As I mention to Khem, having one place to
cleanup is better than a whole load of different places.

So I see more in favour of merging this and working on improvements than
not merging it as things stand.

Cheers,

Richard
Koen Kooi - Aug. 25, 2012, 2:17 p.m.
Op 25 aug. 2012, om 13:56 heeft Richard Purdie <richard.purdie@linuxfoundation.org> het volgende geschreven:

> On Sat, 2012-08-25 at 09:45 +0200, Koen Kooi wrote:
>> Op 25 aug. 2012, om 06:34 heeft tom.zanussi@intel.com het volgende geschreven:
>> 
>>> From: Tom Zanussi <tom.zanussi@intel.com>
>>> 
>>> This is the ia32-base.inc moved over from meta-intel.  See meta-intel
>>> for the complete history of contributions to this file.
>>> 
>>> Here's the initial commit text that explains the purpose of this file:
>>> 
>>> The meta-intel BSPs currently have a number of machine settings common
>>> to all - factor these out into a common include file.
>>> 
>>> Also add several new intel-specific XSERVER variables for building
>>> XSERVER variables in BSPs.
>>> 
>>> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
>>> ---
>>> meta/conf/machine/include/ia32-base.inc | 58 +++++++++++++++++++++++++++++++++
>>> 
>>> +# glibc-related variables
>>> +#
>>> +GLIBC_ADDONS ?= "nptl"
>> 
>> That's a distro setting
> 
> Yes and no. It makes sense for architectures to have sane defaults and I
> class nptl on ia32 as that. We want OE-Core to function distroless but
> allow distros to change things where it makes sense to them. So I'd
> argue this is reasonable.

So put it in default-distrovars, not in a machine 'tune' file.
Richard Purdie - Aug. 25, 2012, 3:51 p.m.
On Sat, 2012-08-25 at 16:17 +0200, Koen Kooi wrote:
> Op 25 aug. 2012, om 13:56 heeft Richard Purdie <richard.purdie@linuxfoundation.org> het volgende geschreven:
> 
> > On Sat, 2012-08-25 at 09:45 +0200, Koen Kooi wrote:
> >> Op 25 aug. 2012, om 06:34 heeft tom.zanussi@intel.com het volgende geschreven:
> >> 
> >>> From: Tom Zanussi <tom.zanussi@intel.com>
> >>> 
> >>> This is the ia32-base.inc moved over from meta-intel.  See meta-intel
> >>> for the complete history of contributions to this file.
> >>> 
> >>> Here's the initial commit text that explains the purpose of this file:
> >>> 
> >>> The meta-intel BSPs currently have a number of machine settings common
> >>> to all - factor these out into a common include file.
> >>> 
> >>> Also add several new intel-specific XSERVER variables for building
> >>> XSERVER variables in BSPs.
> >>> 
> >>> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
> >>> ---
> >>> meta/conf/machine/include/ia32-base.inc | 58 +++++++++++++++++++++++++++++++++
> >>> 
> >>> +# glibc-related variables
> >>> +#
> >>> +GLIBC_ADDONS ?= "nptl"
> >> 
> >> That's a distro setting
> > 
> > Yes and no. It makes sense for architectures to have sane defaults and I
> > class nptl on ia32 as that. We want OE-Core to function distroless but
> > allow distros to change things where it makes sense to them. So I'd
> > argue this is reasonable.
> 
> So put it in default-distrovars, not in a machine 'tune' file.

This was only seemingly needed on x86 for reasons which I no longer
understand and are likely historical and irrelevant now. So yes, we
could add it there with an arch override. The likely outcome is the
thing will just get removed so I'm finding it hard to get worked up
about it though.

Cheers,

Richard
Khem Raj - Aug. 25, 2012, 8:20 p.m.
On Sat, Aug 25, 2012 at 4:53 AM, Richard Purdie
<richard.purdie@linuxfoundation.org> wrote:
> On Sat, 2012-08-25 at 01:13 -0700, Khem Raj wrote:
>>
>>
>> On Saturday, August 25, 2012, Koen Kooi <koen@dominion.thruhere.net>
>> wrote:
>> >
>> > Op 25 aug. 2012, om 06:34 heeft tom.zanussi@intel.com het volgende
>> geschreven:
>> >
>> >> From: Tom Zanussi <tom.zanussi@intel.com>
>> >>
>> >> This is the ia32-base.inc moved over from meta-intel.  See
>> meta-intel
>> >> for the complete history of contributions to this file.
>> >>
>> >> Here's the initial commit text that explains the purpose of this
>> file:
>> >>
>> >>  The meta-intel BSPs currently have a number of machine settings
>> common
>> >>  to all - factor these out into a common include file.
>> >>
>> >>  Also add several new intel-specific XSERVER variables for building
>> >>  XSERVER variables in BSPs.
>> >>
>> >> Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
>> >> ---
>> >> meta/conf/machine/include/ia32-base.inc | 58
>> +++++++++++++++++++++++++++++++++
>> >>
>> >> +# glibc-related variables
>> >> +#
>> >> +GLIBC_ADDONS ?= "nptl"
>> >
>> > That's a distro setting
>>
>> And its redundant
>
> I thought you tried removing this and we ran into issues?

I did not but I guess someone else did and it
was seemingly because of these settings in meta-intel but I will try
to remove it once again and having this in OE core might be beneficial

besides, I think the name of file is misleading as Phil also pointed out


>
> Regardless, I think this is reason to have this in one place where we
> can clean it up. I tried to untangle the GLIBC_EXTRA_CONF bit that was
> here until recently and that was more painful than necessary needing
> patches to meta-intel and meta-yocto. If we get one good include file,
> we then have one place to clean this kind of thing up and it stops BSP
> layers having to do their own things badly.
>
> So in summary I think this is a reason to support this change :)
>
> Cheers,
>
> Richard
>
>
>
>

Patch

diff --git a/meta/conf/machine/include/ia32-base.inc b/meta/conf/machine/include/ia32-base.inc
new file mode 100644
index 0000000..af583ae
--- /dev/null
+++ b/meta/conf/machine/include/ia32-base.inc
@@ -0,0 +1,58 @@ 
+#
+# base machine settings for ia32-architecture BSPs
+#
+
+#
+# common settings for Intel-based machines
+#
+MACHINE_FEATURES += "screen keyboard pci usbhost ext2 ext3 x86 \
+                     acpi serial usbgadget alsa"
+
+MACHINE_EXTRA_RRECOMMENDS += "kernel-modules eee-acpi-scripts"
+MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "grub"
+
+IMAGE_FSTYPES += "ext3 cpio.gz live"
+
+KERNEL_IMAGETYPE ?= "bzImage"
+
+SERIAL_CONSOLE ?= "115200 ttyS0"
+
+#
+# glibc-related variables
+#
+GLIBC_ADDONS ?= "nptl"
+
+#
+# kernel-related variables
+#
+PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto"
+PREFERRED_VERSION_linux-yocto ??= "3.0%"
+
+#
+# XSERVER subcomponents, used to build the XSERVER variable
+#
+XSERVER_IA32_BASE = "xserver-xorg \
+           xf86-input-mouse \
+           xf86-input-keyboard \
+           xf86-input-evdev \
+           xf86-input-synaptics \
+           mesa-dri \
+           "
+
+XSERVER_IA32_EXT = "xserver-xorg-extension-dri \
+           xserver-xorg-extension-dri2 \
+           xserver-xorg-extension-glx \
+           xserver-xorg-extension-extmod \
+           xserver-xorg-extension-dbe \
+           xserver-xorg-module-libint10 \
+           "
+
+XSERVER_IA32_I915 = "xf86-video-intel \
+           mesa-dri-driver-i915 \
+           "
+
+XSERVER_IA32_I965 = "xf86-video-intel \
+           mesa-dri-driver-i965 \
+           "
+
+XSERVER_IA32_VESA = "xf86-video-vesa"