Skip to contentSkip to conversation

conf/machine: Add x86_64 machine.

PATCH In review Khem Raj 6 participants 12 messages Dec 17, 2009 – Dec 21, 2009

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 conf/machine: Add x86_64 machine.

* This is not supporting multilib
* Only 64-bit userspace can be built.

---
 conf/machine/include/tune-x86_64.inc |    4 ++++
 conf/machine/x86_64-generic.conf     |   31 +++++++++++++++++++++++++++++++
 recipes/gcc/gcc-common.inc           |    4 ++++
 3 files changed, 39 insertions(+), 0 deletions(-)
 create mode 100644 conf/machine/include/tune-x86_64.inc
 create mode 100644 conf/machine/x86_64-generic.conf
conf/machine/include/tune-x86_64.inc new file +4 -0
new file mode 100644
index 0000000..db2a560
@@ -0,0 +1,4 @@
+TARGET_CC_ARCH = "-mtune=generic"
+BASE_PACKAGE_ARCH = "x86_64"
+FEED_ARCH = "x86_64"
+PACKAGE_EXTRA_ARCHS += "x86 i386 i486 i586 i686"
conf/machine/x86_64-generic.conf new file +31 -0
new file mode 100644
index 0000000..0dad0ff
@@ -0,0 +1,31 @@
+# Copyright (C) 2007,2009 Stelios Koroneos - Digital OPSiS, All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+#@TYPE: Machine
+#@NAME: x86_64-generic
+#@DESCRIPTION: Machine configuration for a generic x86_64 machine
+
+
+TARGET_ARCH = "x86_64"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux"
+PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
+XSERVER="xserver-kdrive-vesa"
+
+KERNEL_IMAGETYPE = "bzImage"
+
+GLIBC_ADDONS = "nptl"
+GLIBC_EXTRA_OECONF = "--with-tls"
+
+IMAGE_FSTYPES ?= "ext2.gz"
+IMAGE_DEVICE_TABLES = " \
+  files/device_table-minimal.txt \
+  files/device_table_add-loop.txt \
+  files/device_table_add-scsi.txt \
+"
+
+MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost acpi ext2 x86"
+MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
+
+#tune for x86_64
+require conf/machine/include/tune-x86_64.inc
+
recipes/gcc/gcc-common.inc +4 -0
index 6e777e6..772e7a7 100644
@@ -15,6 +15,10 @@ def get_gcc_fpu_setting(bb, d):
         return "--with-float=soft"
     return ""
 
+EXTRA_OECONF_append_x86_64	= " --disable-multilib"
+EXTRA_OECONF_append_mips64	= " --disable-multilib"
+EXTRA_OECONF_append_powerpc64	= " --disable-multilib"
+
 # We really need HOST_SYS here for some packages and TARGET_SYS for others.
 # For now, libgcc is most important so we fix for that - RP.
 SHLIBSDIR = "${STAGING_DIR_TARGET}/shlibs"
Signature · 1 line
1.5.4.3
#1 lore raw

conf/machine/include/tune-x86_64.inc line 4

Quoted 10 lines · Khem Raj

* This is not supporting multilib
* Only 64-bit userspace can be built.

conf/machine/include/tune-x86_64.inc new file +4 -0
@@ -0,0 +1,4 @@
+TARGET_CC_ARCH = "-mtune=generic"
+BASE_PACKAGE_ARCH = "x86_64"
+FEED_ARCH = "x86_64"
+PACKAGE_EXTRA_ARCHS += "x86 i386 i486 i586 i686"

If this is a pure 64-bit environment, surely you don't want that stuff in PACKAGE_EXTRA_ARCHS.

It's also not completely obvious to me that this stuff belongs in a tune-* file at all, or indeed that it makes much sense to talk about "tuning" for generic x86-64 in the first place.

p.

author
#2 lore raw
Quoted 4 lines · Phil Blundell
Quoted 3 lines · Khem Raj

* This is not supporting multilib
* Only 64-bit userspace can be built.

Quoted 10 lines

conf/machine/include/tune-x86_64.inc line 4

Quoted 7 lines
conf/machine/include/tune-x86_64.inc new file +4 -0
@@ -0,0 +1,4 @@
+TARGET_CC_ARCH = "-mtune=generic"
+BASE_PACKAGE_ARCH = "x86_64"
+FEED_ARCH = "x86_64"
+PACKAGE_EXTRA_ARCHS += "x86 i386 i486 i586 i686"

If this is a pure 64-bit environment, surely you don't want that stuff in PACKAGE_EXTRA_ARCHS.

right I will remove it.

Quoted 4 lines

It's also not completely obvious to me that this stuff belongs in a tune-* file at all, or indeed that it makes much sense to talk about "tuning" for generic x86-64 in the first place.

most of tune files have PACKAGE_EXTRA_ARCHS so it could be another cleaning which needs in tune files.

as the machine is for x86_64 generic I think tuning for generic is a good match infact chosing mcpu=generic should be done too.

Quoted 10 lines

p.

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#3 lore raw
In reply to Phil Blundell

Dnia czwartek, 17 grudnia 2009 o 21:22:58 Phil Blundell napisał(a):

Quoted 15 lines · Khem Raj

conf/machine/include/tune-x86_64.inc line 4

Quoted 10 lines

* This is not supporting multilib
* Only 64-bit userspace can be built.

conf/machine/include/tune-x86_64.inc new file +4 -0
@@ -0,0 +1,4 @@
+TARGET_CC_ARCH = "-mtune=generic"
+BASE_PACKAGE_ARCH = "x86_64"
+FEED_ARCH = "x86_64"
+PACKAGE_EXTRA_ARCHS += "x86 i386 i486 i586 i686"

If this is a pure 64-bit environment, surely you don't want that stuff in PACKAGE_EXTRA_ARCHS.

Quoted 2 lines

It's also not completely obvious to me that this stuff belongs in a tune-* file at all

We moved PACKAGE_EXTRA_ARCHS from machine configs to tune-* files to cleanup situation where some machines lacked working archs or had them just wrong.

Regards,

Signature · 3 lines
JID:      [email protected]
Website:  http://marcin.juszkiewicz.com.pl/
LinkedIn: http://www.linkedin.com/in/marcinjuszkiewicz
#4 lore raw
In reply to Phil Blundell
Quoted 11 lines · Khem Raj

conf/machine/include/tune-x86_64.inc line 4

Quoted 10 lines

* This is not supporting multilib
* Only 64-bit userspace can be built.

conf/machine/include/tune-x86_64.inc new file +4 -0
@@ -0,0 +1,4 @@
+TARGET_CC_ARCH = "-mtune=generic"
+BASE_PACKAGE_ARCH = "x86_64"
+FEED_ARCH = "x86_64"
+PACKAGE_EXTRA_ARCHS += "x86 i386 i486 i586 i686"

NAK! Don't use underscores in machine names since it's what bitbake is using to mark overrides. I fell into that trap twice already :(

Also, please explain to me what you plan to do with 'FEED_ARCH'.

regards,

Koen

author
#5 lore raw
Quoted 16 lines · Koen Kooi
Quoted 5 lines · Khem Raj
Quoted 4 lines

* This is not supporting multilib
* Only 64-bit userspace can be built.

Quoted 7 lines

conf/machine/include/tune-x86_64.inc line 4

Quoted 7 lines
conf/machine/include/tune-x86_64.inc new file +4 -0
@@ -0,0 +1,4 @@
+TARGET_CC_ARCH = "-mtune=generic"
+BASE_PACKAGE_ARCH = "x86_64"
+FEED_ARCH = "x86_64"
+PACKAGE_EXTRA_ARCHS += "x86 i386 i486 i586 i686"

NAK! Don't use underscores in machine names since it's what bitbake is using to mark overrides. I fell into that trap twice already :(

Quoted 1 line

Also, please explain to me what you plan to do with 'FEED_ARCH'.

I was thinking of using amd64 but ARCH has to be x86_64 at least for gcc so I think we can not avoid it. may be we should make bitbake ignore certain overrides like x86_64 if thats possible at all.

Quoted 11 lines

regards,

Koen

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#6 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 17 lines · Khem Raj
Quoted 16 lines · Koen Kooi
Quoted 5 lines · Khem Raj
Quoted 4 lines

* This is not supporting multilib
* Only 64-bit userspace can be built.

Quoted 7 lines

conf/machine/include/tune-x86_64.inc line 4

Quoted 7 lines
conf/machine/include/tune-x86_64.inc new file +4 -0
@@ -0,0 +1,4 @@
+TARGET_CC_ARCH = "-mtune=generic"
+BASE_PACKAGE_ARCH = "x86_64"
+FEED_ARCH = "x86_64"
+PACKAGE_EXTRA_ARCHS += "x86 i386 i486 i586 i686"

NAK! Don't use underscores in machine names since it's what bitbake is using to mark overrides. I fell into that trap twice already :(

Quoted 6 lines
Quoted 1 line

Also, please explain to me what you plan to do with 'FEED_ARCH'.

I was thinking of using amd64 but ARCH has to be x86_64 at least for gcc so I think we can not avoid it. may be we should make bitbake ignore certain overrides like x86_64 if thats possible at all.

We re-write arch already for kernel recipes, so why can't we do the same for gcc?

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLLzqAMkyGM64RGpERAtuHAJ9YxU54qCR7lAiUbjkxRqBi7ISycACeOkMG yrR9wiUNLhHC4im/yz7j92s=
=Lk4J
-----END PGP SIGNATURE-----

author
#7 lore raw
Quoted 23 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 19 lines · Khem Raj
Quoted 17 lines · Koen Kooi
Quoted 5 lines · Khem Raj
Quoted 4 lines

* This is not supporting multilib
* Only 64-bit userspace can be built.

Quoted 7 lines

conf/machine/include/tune-x86_64.inc line 4

Quoted 7 lines
conf/machine/include/tune-x86_64.inc new file +4 -0
@@ -0,0 +1,4 @@
+TARGET_CC_ARCH = "-mtune=generic"
+BASE_PACKAGE_ARCH = "x86_64"
+FEED_ARCH = "x86_64"
+PACKAGE_EXTRA_ARCHS += "x86 i386 i486 i586 i686"

NAK! Don't use underscores in machine names since it's what bitbake is using to mark overrides. I fell into that trap twice already :(

Also, please explain to me what you plan to do with 'FEED_ARCH'.

Quoted 7 lines
Quoted 4 lines

I was thinking of using amd64 but ARCH has to be x86_64 at least for gcc so I think we can not avoid it. may be we should make bitbake ignore certain overrides like x86_64 if thats possible at all.

We re-write arch already for kernel recipes, so why can't we do the same for gcc?

Good point. If gcc was the only one then yes it was relatively ok. But here we are talking about gcc and some other packages which have x86_64 for target architecture in their configure scripts. I thought of writing a class for target arch mapping but the recipes which
depend upon TARGET_ARCH in some way will need to be taken care of. If this approach sounds reasonable I can try a bit more on amd64

Thanks
-Khem

Quoted 18 lines

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLLzqAMkyGM64RGpERAtuHAJ9YxU54qCR7lAiUbjkxRqBi7ISycACeOkMG yrR9wiUNLhHC4im/yz7j92s=
=Lk4J
-----END PGP SIGNATURE-----

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#8 lore raw
In reply to Khem Raj
Quoted 4 lines · Khem Raj

I was thinking of using amd64 but ARCH has to be x86_64 at least for gcc so I think we can not avoid it. may be we should make bitbake ignore certain overrides like x86_64 if thats possible at all.

I guess the primary variable that gcc actually cares about is ${TARGET_SYS} (which isn't, itself, an OVERRIDE). It isn't strictly necessary for the first part of ${TARGET_SYS} to match ${TARGET_ARCH}:
you could, in theory, set TARGET_SYS to "x86_64-unknown-linux-gnu" while having TARGET_ARCH = "x86-64" or some other, non-underscore-containing, value.

All that said, I'm not sure that TARGET_ARCH=x86_64 will be much of an issue in practice. The only situation where I can immediately think that it would be problematic would be if both "x86" and "64" were individually to appear in OVERRIDES for some other reason, and this doesn't sound especially likely. There are already plenty of situations where you can, at least in theory, run into namespace collisions and it isn't obvious to me that the x86_64 one is especially egregious.

p.

#9 lore raw
In reply to Khem Raj

conf/machine/x86_64-generic.conf

Quoted 27 lines · Khem Raj

* This is not supporting multilib
* Only 64-bit userspace can be built.

---
  conf/machine/include/tune-x86_64.inc |    4 ++++
  conf/machine/x86_64-generic.conf     |   31 +++++++++++++++++++++++++++++++
  recipes/gcc/gcc-common.inc           |    4 ++++
  3 files changed, 39 insertions(+), 0 deletions(-)

create mode 100644 conf/machine/include/tune-x86_64.inc create mode 100644 conf/machine/x86_64-generic.conf

conf/machine/include/tune-x86_64.inc new file +4 -0
new file mode 100644
index 0000000..db2a560
@@ -0,0 +1,4 @@
+TARGET_CC_ARCH = "-mtune=generic"
+BASE_PACKAGE_ARCH = "x86_64"
+FEED_ARCH = "x86_64"
+PACKAGE_EXTRA_ARCHS += "x86 i386 i486 i586 i686"
conf/machine/x86_64-generic.conf new file +0 -0
new file mode 100644
index 0000000..0dad0ff

Any chance bitbake will find the underscore confusing in the machine name?

Philip

Quoted 47 lines
conf/machine/x86_64-generic.conf new file +31 -0
@@ -0,0 +1,31 @@
+# Copyright (C) 2007,2009 Stelios Koroneos - Digital OPSiS, All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+#@TYPE: Machine
+#@NAME: x86_64-generic
+#@DESCRIPTION: Machine configuration for a generic x86_64 machine
+
+
+TARGET_ARCH = "x86_64"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux"
+PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
+XSERVER="xserver-kdrive-vesa"
+
+KERNEL_IMAGETYPE = "bzImage"
+
+GLIBC_ADDONS = "nptl"
+GLIBC_EXTRA_OECONF = "--with-tls"
+
+IMAGE_FSTYPES ?= "ext2.gz"
+IMAGE_DEVICE_TABLES = " \
+  files/device_table-minimal.txt \
+  files/device_table_add-loop.txt \
+  files/device_table_add-scsi.txt \
+"
+
+MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost acpi ext2 x86"
+MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
+
+#tune for x86_64
+require conf/machine/include/tune-x86_64.inc
+
recipes/gcc/gcc-common.inc +4 -0
index 6e777e6..772e7a7 100644
@@ -15,6 +15,10 @@ def get_gcc_fpu_setting(bb, d):
          return "--with-float=soft"
      return ""
 
+EXTRA_OECONF_append_x86_64	= " --disable-multilib"
+EXTRA_OECONF_append_mips64	= " --disable-multilib"
+EXTRA_OECONF_append_powerpc64	= " --disable-multilib"
+
  # We really need HOST_SYS here for some packages and TARGET_SYS for others.
  # For now, libgcc is most important so we fix for that - RP.
  SHLIBSDIR = "${STAGING_DIR_TARGET}/shlibs"
author
#10 lore raw
Quoted 27 lines · Philip Balister
Quoted 26 lines · Khem Raj

* This is not supporting multilib
* Only 64-bit userspace can be built.

---
 conf/machine/include/tune-x86_64.inc |    4 ++++
 conf/machine/x86_64-generic.conf     |   31
+++++++++++++++++++++++++++++++
 recipes/gcc/gcc-common.inc           |    4 ++++

 3 files changed, 39 insertions(+), 0 deletions(-)

 create mode 100644 conf/machine/include/tune-x86_64.inc create mode 100644 conf/machine/x86_64-generic.conf

conf/machine/include/tune-x86_64.inc new file +4 -0
new file mode 100644
index 0000000..db2a560
@@ -0,0 +1,4 @@
+TARGET_CC_ARCH = "-mtune=generic"
+BASE_PACKAGE_ARCH = "x86_64"
+FEED_ARCH = "x86_64"
+PACKAGE_EXTRA_ARCHS += "x86 i386 i486 i586 i686"
(quoted diff) +0 -0
Quoted 8 lines

conf/machine/x86_64-generic.conf

Quoted 5 lines

b/conf/machine/x86_64-generic.conf
new file mode 100644
index 0000000..0dad0ff

conf/machine/x86_64-generic.conf new file +0 -0

Any chance bitbake will find the underscore confusing in the machine name?

if there was an override for 64 which does not exist as of now

Quoted 59 lines

Philip

Quoted 45 lines
conf/machine/x86_64-generic.conf new file +1 -0
@@ -0,0 +1,31 @@
+# Copyright (C) 2007,2009 Stelios Koroneos - Digital OPSiS, All Rights

Reserved

conf/machine/x86_64-generic.conf new file +30 -0
+# Released under the MIT license (see packages/COPYING)
+#@TYPE: Machine
+#@NAME: x86_64-generic
+#@DESCRIPTION: Machine configuration for a generic x86_64 machine
+
+
+TARGET_ARCH = "x86_64"
+
+PREFERRED_PROVIDER_virtual/kernel = "linux"
+PREFERRED_PROVIDER_virtual/xserver = "xserver-kdrive"
+XSERVER="xserver-kdrive-vesa"
+
+KERNEL_IMAGETYPE = "bzImage"
+
+GLIBC_ADDONS = "nptl"
+GLIBC_EXTRA_OECONF = "--with-tls"
+
+IMAGE_FSTYPES ?= "ext2.gz"
+IMAGE_DEVICE_TABLES = " \
+  files/device_table-minimal.txt \
+  files/device_table_add-loop.txt \
+  files/device_table_add-scsi.txt \
+"
+
+MACHINE_FEATURES = "kernel26 screen keyboard pci usbhost acpi ext2 x86"
+MACHINE_EXTRA_RRECOMMENDS = " kernel-modules"
+
+#tune for x86_64
+require conf/machine/include/tune-x86_64.inc
+
recipes/gcc/gcc-common.inc +0 -0
index 6e777e6..772e7a7 100644
@@ -15,6 +15,10 @@ def get_gcc_fpu_setting(bb, d):

         return "--with-float=soft"
     return ""

recipes/gcc/gcc-common.inc +4 -0
+EXTRA_OECONF_append_x86_64     = " --disable-multilib"
+EXTRA_OECONF_append_mips64     = " --disable-multilib"
+EXTRA_OECONF_append_powerpc64  = " --disable-multilib"
+
Quoted 4 lines

 # We really need HOST_SYS here for some packages and TARGET_SYS for others.
 # For now, libgcc is most important so we fix for that - RP. SHLIBSDIR = "${STAGING_DIR_TARGET}/shlibs"

_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

#11 lore raw
In reply to Khem Raj

Am Donnerstag, den 17.12.2009, 12:07 -0800 schrieb Khem Raj:

Quoted 11 lines

* This is not supporting multilib
* Only 64-bit userspace can be built.

---
 conf/machine/include/tune-x86_64.inc |    4 ++++
 conf/machine/x86_64-generic.conf     |   31 +++++++++++++++++++++++++++++++
 recipes/gcc/gcc-common.inc           |    4 ++++
 3 files changed, 39 insertions(+), 0 deletions(-)
 create mode 100644 conf/machine/include/tune-x86_64.inc
 create mode 100644 conf/machine/x86_64-generic.conf

I do not know how OE handles it, but is there a list of available machines where this new machine has to be added? That means keep documentation up to date. I guess I can add this new machine to local.conf (MACHINE = "x86_64-generic")?

[…]

conf/machine/x86_64-generic.conf line 1

Quoted 7 lines
conf/machine/x86_64-generic.conf new file +1 -0
new file mode 100644
index 0000000..0dad0ff
@@ -0,0 +1,31 @@
+# Copyright (C) 2007,2009 Stelios Koroneos - Digital OPSiS, All Rights Reserved

Since this is a new file, is this copyright correct?

[…]

Thanks and sorry if my question are nonsense,

Paul