Various Misc tweaks
cover Various Misc tweaks
The following series is for a few things I've noticed needed fixing as various patches have gone by:
git://git.openembedded.org/openembedded-core-contrib rpurdie/misc2
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rpurdie/misc2
Richard Purdie (4):
base.bbclass: Add compatibility package name mapping handler
gcc: Drop part of the 64bithack patch which is no longer used
module-init-tools-cross: Drop static binaries patch as a better fix
has been merged
base.bbclass: Fix PACKAGE_ARCH typo
meta/classes/base.bbclass | 10 +++++++- .../recipes-devtools/gcc/gcc-4.5.1/64bithack.patch | 13 ---------- meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch | 13 ---------- .../files/no-static-binaries.patch | 25 -------------------- .../module-init-tools-cross_3.16.bb | 2 - 5 files changed, 9 insertions(+), 54 deletions(-) delete mode 100644 meta/recipes-kernel/module-init-tools/files/no-static-binaries.patch
Signature · 1 line
1.7.4.1
PATCH 1/4 base.bbclass: Add compatibility package name mapping handler
This means if PKGARCHCOMPAT_ARMV7A is set, "armv7a-vfp-neon" is renamed to be "armv7a". Other compatibility mappings can be added as needed.
--- meta/classes/base.bbclass | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
meta/classes/base.bbclass +8 -0
@@ -133,6 +133,13 @@ def generate_git_config(e): f.write(proxy_command) f.close +def pkgarch_mapping(d): + # Compatibility mappings of TUNE_PKGARCH (opt in) + if d.getVar("PKGARCHCOMPAT_ARMV7A", True): + if d.getVar("TUNE_PKGARCH", True) == "armv7a-vfp-neon": + d.setVar("TUNE_PKGARCH", "armv7a") + + addhandler base_eventhandler python base_eventhandler() { from bb import note, error, data
@@ -203,6 +210,7 @@ python base_eventhandler() { if name == "ConfigParsed": generate_git_config(e) + pkgarch_mapping(e.data) if not data in e.__dict__: return
Signature · 1 line
1.7.4.1
PATCH 2/4 gcc: Drop part of the 64bithack patch which is no longer used
Since we now handle GLIBC_DYNAMIC_LINKER in gcc-configure-common.inc:
's#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'
we can drop the patch which changes a hardcoded value for this.
No PR bump since there is no code change resulting from this, its just a cleanup.
There is still a valid question over the remainder of this patch and its interaction with multilib configurations.
--- .../recipes-devtools/gcc/gcc-4.5.1/64bithack.patch | 13 ------------- meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch | 13 ------------- 2 files changed, 0 insertions(+), 26 deletions(-)
meta/recipes-devtools/gcc/gcc-4.5.1/64bithack.patch +0 -13
@@ -20,16 +20,3 @@ Index: gcc-4.5.0/gcc/config/i386/t-linux64 LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib -Index: gcc-4.5.0/gcc/config/i386/linux64.h -=================================================================== ---- gcc-4.5.0.orig/gcc/config/i386/linux64.h 2010-08-10 15:49:06.000000000 +0100 -+++ gcc-4.5.0/gcc/config/i386/linux64.h 2010-08-10 15:49:16.000000000 +0100 -@@ -59,7 +59,7 @@ - done. */ - - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" -+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2" - - #if TARGET_64BIT_DEFAULT - #define SPEC_32 "m32"
meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch +0 -13
@@ -20,16 +20,3 @@ Index: gcc-4.6.0/gcc/config/i386/t-linux64 LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib -Index: gcc-4.6.0/gcc/config/i386/linux64.h -=================================================================== ---- gcc-4.6.0.orig/gcc/config/i386/linux64.h -+++ gcc-4.6.0/gcc/config/i386/linux64.h -@@ -63,7 +63,7 @@ see the files COPYING3 and COPYING.RUNTI - done. */ - - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" -+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2" - - #if TARGET_64BIT_DEFAULT - #define SPEC_32 "m32"
Signature · 1 line
1.7.4.1
Re: [PATCH 2/4] gcc: Drop part of the 64bithack patch which is no longer used
Richard Purdie wrote on 2011-07-27:
Quoted 4 lines
Since we now handle
GLIBC_DYNAMIC_LINKERin gcc-configure-common.inc:'s#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'
It seems to me that this patch may not be removed. The above code in gcc-configure-common.inc said it only useful for SDK. For gcc-cross, it doesn't change /lib64/ld-linux-x86-64.so.2 to /lib/ld-linux-x86-64.so.2 as what the 64bithack.patch does.
-Lianhao
Quoted 13 lines
we can drop the patch which changes a hardcoded value for this.
No PR bump since there is no code change resulting from this, its just a cleanup.
There is still a valid question over the remainder of this patch and its interaction with multilib configurations.
Signed-off-by Richard Purdie <[email protected]>--- .../recipes-devtools/gcc/gcc-4.5.1/64bithack.patch | 13 ------------- meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch | 13 ------------- 2 files changed, 0 insertions(+), 26 deletions(-)
Re: [PATCH 2/4] gcc: Drop part of the 64bithack patch which is no longer used
Quoted 9 lines · Lianhao
Richard Purdie wrote on 2011-07-27:
Quoted 4 lines
Since we now handle
GLIBC_DYNAMIC_LINKERin gcc-configure-common.inc:'s#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'
It seems to me that this patch may not be removed. The above code in gcc-configure-common.inc said it only useful for SDK. For gcc-cross, it doesn't change
/lib64/ld-linux-x86-64.so.2to/lib/ld-linux-x86-64.so.2as what the 64bithack.patch does.-Lianhao
Agreed, seeing similar issues on ppc64. I think the sed line might not be doing with Richard intended.
We get:
./i386/linux.h:#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "/lib/ld-linux.so.2" ./i386/linux64.h:#define GLIBC_DYNAMIC_LINKER32 SYSTEMLIBS_DIR "/lib/ld-linux.so.2" ./i386/linux64.h:#define GLIBC_DYNAMIC_LINKER64 SYSTEMLIBS_DIR "/lib64/ld-linux-x86-64.so.2"
- k
Quoted 21 lines
Quoted 6 lines
we can drop the patch which changes a hardcoded value for this.
No PR bump since there is no code change resulting from this, its just a cleanup.
Quoted 8 lines
There is still a valid question over the remainder of this patch and its interaction with multilib configurations.
Signed-off-by Richard Purdie <[email protected]>---
.../recipes-devtools/gcc/gcc-4.5.1/64bithack.patch | 13 ------------- meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch | 13 ------------- 2 files changed, 0 insertions(+), 26 deletions(-)_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 2/4] gcc: Drop part of the 64bithack patch which is no longer used
In reply to Richard PurdieQuoted 26 lines · Richard Purdie
Since we now handle
GLIBC_DYNAMIC_LINKERin gcc-configure-common.inc:'s#\(GLIBC_DYNAMIC_LINKER[^ ]*\)\( *"/lib.*\)#\1 SYSTEMLIBS_DIR\2#'
we can drop the patch which changes a hardcoded value for this.
No PR bump since there is no code change resulting from this, its just a cleanup.
There is still a valid question over the remainder of this patch and its interaction with multilib configurations.
Signed-off-by Richard Purdie <[email protected]>--- .../recipes-devtools/gcc/gcc-4.5.1/64bithack.patch | 13 ------------- meta/recipes-devtools/gcc/gcc-4.6/64bithack.patch | 13 ------------- 2 files changed, 0 insertions(+), 26 deletions(-)meta/recipes-devtools/gcc/gcc-4.5.1/64bithack.patch +0
-0@@ -20,16 +20,3 @@ Index: gcc-4.5.0/gcc/config/i386/t-linux64 LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib
meta/recipes-devtools/gcc/gcc-4.5.1/64bithack.patch Index: gcc-4.5.0/gcc/config/i386/t-linux64 · line 32
Quoted 10 lines
meta/recipes-devtools/gcc/gcc-4.5.1/64bithack.patch +0
-10-Index: gcc-4.5.0/gcc/config/i386/linux64.h -=================================================================== ---- gcc-4.5.0.orig/gcc/config/i386/linux64.h 2010-08-10 15:49:06.000000000 +0100 -+++ gcc-4.5.0/gcc/config/i386/linux64.h 2010-08-10 15:49:16.000000000 +0100 -@@ -59,7 +59,7 @@ - done. */ - - #define GLIBC_DYNAMIC_LINKER32 "/lib/ld-linux.so.2" --#define GLIBC_DYNAMIC_LINKER64 "/lib64/ld-linux-x86-64.so.2" -+#define GLIBC_DYNAMIC_LINKER64 "/lib/ld-linux-x86-64.so.2"
This change while I like it that we are moving to use default will now emit /lib64/ld-linux-x86-64.so.2 into INTERP section but I dont see a corresponding patch to fix root file systems where the defualt libdir for x86-64 is changed to be lib64
So this will end up in userspace not booting at all since init wont find the dynamic linker to start with.
Thanks
-Khem
PATCH 3/4 module-init-tools-cross: Drop static binaries patch as a better fix has been merged
In reply to Richard Purdie--- .../files/no-static-binaries.patch | 25 -------------------- .../module-init-tools-cross_3.16.bb | 2 - 2 files changed, 0 insertions(+), 27 deletions(-) delete mode 100644 meta/recipes-kernel/module-init-tools/files/no-static-binaries.patch
meta/recipes-kernel/module-init-tools/files/no-static-binaries.patch deleted +0 -25
@@ -1,25 +0,0 @@ -# Building a native, statically-linked insmod can result in ld failing because -# it can't find a static libc. A native, static insmod is unnecessary anyway, -# so this patch just removes it. -# -# - [email protected] -# -# Change to a simpler method by just disabling static link flag, since even -# removing those lines don't prevent insmod.static from compile -# -# by Kevin Tian <[email protected]>, 2010-07-21 - -Upstream-Status: Pending - -Index: module-init-tools-3.2.2/Makefile.am -=================================================================== ---- module-init-tools-3.2.2.orig/Makefile.am 2010-05-26 15:43:16.000000000 -0400 -+++ module-init-tools-3.2.2/Makefile.am 2010-05-26 16:04:06.232990785 -0400 -@@ -10,7 +10,6 @@ - modindex_SOURCES = modindex.c zlibsupport.c zlibsupport.h testing.h - - insmod_static_SOURCES = insmod.c --insmod_static_LDFLAGS = -static - # We don't want the $(zlib_flags) here: that makes a dynamic executable - insmod_static_LDADD = libmodtools.a -
meta/recipes-kernel/module-init-tools/module-init-tools-cross_3.16.bb +0 -2
@@ -3,8 +3,6 @@ PR = "r0" inherit cross PROVIDES += "virtual/${TARGET_PREFIX}depmod" -SRC_URI += "file://no-static-binaries.patch" - SRC_URI[md5sum] = "bc44832c6e41707b8447e2847d2019f5" SRC_URI[sha256sum] = "e1f2cdcae64a8effc25e545a5e0bdaf312f816ebbcd0916e4e87450755fab64b"
Signature · 1 line
1.7.4.1
PATCH 4/4 base.bbclass: Fix PACKAGE_ARCH typo
In reply to Richard Purdie--- meta/classes/base.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
meta/classes/base.bbclass +1 -1
@@ -407,7 +407,7 @@ python () { # if multiple differences are present? # Look through PACKAGE_ARCHS for the priority order? if pkgarch and pkgarch == mach_arch: - bb.data.setVar('PACAKGE_ARCH', "${MACHINE_ARCH}", d) + bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d) bb.warn("Recipe %s is marked as only being architecture specific but seems to have machine specific packages?! The recipe may as well mark itself as machine specific directly." % d.getVar("PN", True)) }
Signature · 1 line
1.7.4.1
Re: [PATCH 4/4] base.bbclass: Fix PACKAGE_ARCH typo
Quoted 10 lines · Richard Purdie
Signed-off-by Richard Purdie <[email protected]>--- meta/classes/base.bbclass | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)meta/classes/base.bbclass +0
-0
meta/classes/base.bbclass python () { · line 410
Quoted 5 lines
meta/classes/base.bbclass +1
-1@@ -407,7 +407,7 @@ python () { # if multiple differences are present? # Look through PACKAGE_ARCHS for the priority order? if pkgarch and pkgarch == mach_arch: - bb.data.setVar('PACAKGE_ARCH', "${MACHINE_ARCH}", d) + bb.data.setVar('PACKAGE_ARCH', "${MACHINE_ARCH}", d)
nice I was wondering this warning in my builds
Quoted 3 lines
meta/classes/base.bbclass +0
-0bb.warn("Recipe %s is marked as only being architecturespecific but seems to have machine specific packages?! The recipe may as well mark itself as machine specific directly." %
d.getVar("PN", True)) }
Signature · 1 line
Khem Raj
Re: [PATCH 1/4] base.bbclass: Add compatibility package name mapping handler
In reply to Richard PurdieQuoted 2 lines · Richard Purdie
This means if
PKGARCHCOMPAT_ARMV7Ais set, "armv7a-vfp-neon" is renamed to be "armv7a". Other compatibility mappings can be added as needed.
There are multiple armv7 cores without neon... I think there might even be one or two custom cores w/o VFP. (Yes I know this violates the core spec from ARM, but people do that all of the time.)
--Mark
Quoted 31 lines
Signed-off-by Richard Purdie <[email protected]>--- meta/classes/base.bbclass | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)meta/classes/base.bbclass +8
-0@@ -133,6 +133,13 @@ def generate_git_config(e): f.write(proxy_command) f.close +def pkgarch_mapping(d): + # Compatibility mappings of TUNE_PKGARCH (opt in) + if d.getVar("PKGARCHCOMPAT_ARMV7A", True): + if d.getVar("TUNE_PKGARCH", True) == "armv7a-vfp-neon": + d.setVar("TUNE_PKGARCH", "armv7a") + + addhandler base_eventhandler python base_eventhandler() { from bb import note, error, data@@ -203,6 +210,7 @@ python base_eventhandler() { if name == "ConfigParsed": generate_git_config(e) + pkgarch_mapping(e.data) if not data in e.__dict__: return
Re: [PATCH 1/4] base.bbclass: Add compatibility package name mapping handler
Quoted 7 lines · Mark Hatle
Quoted 2 lines · Richard Purdie
This means if
PKGARCHCOMPAT_ARMV7Ais set, "armv7a-vfp-neon" is renamed to be "armv7a". Other compatibility mappings can be added as needed.There are multiple armv7 cores without neon... I think there might even be one or two custom cores w/o VFP. (Yes I know this violates the core spec from ARM, but people do that all of the time.)
I know there are but for some distros in OE have established "armv7a" with a specific meaning. This gives us some way of merging the tune code yet defer fixing those conflicts which can then happen at a time of their choosing.
Its assumed anyone enabling the option knows what it means (which Angstrom does and is where the request came from).
FWIW I have just merged the tune changes and this workaround flag.
Cheers,
Richard
Re: [PATCH 1/4] base.bbclass: Add compatibility package name mapping handler
Op 27 jul. 2011, om 16:50 heeft Richard Purdie het volgende geschreven:
Quoted 14 lines · Mark Hatle
Quoted 7 lines · Richard Purdie
Quoted 2 lines
This means if
PKGARCHCOMPAT_ARMV7Ais set, "armv7a-vfp-neon" is renamed to be "armv7a". Other compatibility mappings can be added as needed.There are multiple armv7 cores without neon... I think there might even be one or two custom cores w/o VFP. (Yes I know this violates the core spec from ARM, but people do that all of the time.)
I know there are but for some distros in OE have established "armv7a" with a specific meaning. This gives us some way of merging the tune code yet defer fixing those conflicts which can then happen at a time of their choosing.
Quoted 4 lines
Its assumed anyone enabling the option knows what it means (which Angstrom does and is where the request came from).
FWIW I have just merged the tune changes and this workaround flag.
I think we might need a armv5e -> armv5te one and a slightly more tricky armv4 -> armv4t.
The armv4t without thumb case is interesting since we do want to use the EABI bx,lr but not other thumb instructions. My main reason for avoiding t1 is that the toolchain is perpetually broken for it. If gcc fixes a bug binutils will introduce a new one.
regards,
Koen
Re: [PATCH 1/4] base.bbclass: Add compatibility package name mapping handler
In reply to Mark HatleQuoted 7 lines · Mark Hatle
Quoted 2 lines · Richard Purdie
This means if
PKGARCHCOMPAT_ARMV7Ais set, "armv7a-vfp-neon" is renamed to be "armv7a". Other compatibility mappings can be added as needed.There are multiple armv7 cores without neon... I think there might even be one or two custom cores w/o VFP. (Yes I know this violates the core spec from ARM, but people do that all of the time.)
Which spec are you thinking of? As far as I know, VFP has always been optional for both ARM11 and Cortex.
p.
Re: [PATCH 1/4] base.bbclass: Add compatibility package name mapping handler
Quoted 11 lines · Phil Blundell
Quoted 7 lines · Mark Hatle
Quoted 2 lines · Richard Purdie
This means if
PKGARCHCOMPAT_ARMV7Ais set, "armv7a-vfp-neon" is renamed to be "armv7a". Other compatibility mappings can be added as needed.There are multiple armv7 cores without neon... I think there might even be one or two custom cores w/o VFP. (Yes I know this violates the core spec from ARM, but people do that all of the time.)
Which spec are you thinking of? As far as I know, VFP has always been optional for both ARM11 and Cortex.
I thought VFP was part of the instruction set as of ARMv7. Neon is recommended but options. As I mentioned though, I know of chips in design that don't have Neon, and I suspect also don't have VFP -- but they're ARMv7.. (they also have stripped out the thumb2 part as well..)
--Mark
Quoted 8 lines
p.
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Re: [PATCH 1/4] base.bbclass: Add compatibility package name mapping handler
In reply to Phil BlundellOp 27 jul. 2011, om 17:02 heeft Phil Blundell het volgende geschreven:
Quoted 11 lines · Mark Hatle
Quoted 7 lines · Richard Purdie
Quoted 2 lines
This means if
PKGARCHCOMPAT_ARMV7Ais set, "armv7a-vfp-neon" is renamed to be "armv7a". Other compatibility mappings can be added as needed.There are multiple armv7 cores without neon... I think there might even be one or two custom cores w/o VFP. (Yes I know this violates the core spec from ARM, but people do that all of the time.)
Which spec are you thinking of? As far as I know, VFP has always been optional for both ARM11 and Cortex.
From the conversations I had with ARM they implied that it isn't optional for cortex a8/9/15, only neon is (e.g. marvell dove, nvidia tegra2). I haven't seen any black on white contracts saying that, though :)
regards,
Koen
Re: [PATCH 1/4] base.bbclass: Add compatibility package name mapping handler
Quoted 1 line · Koen Kooi
From the conversations I had with ARM they implied that it isn't optional for cortex a8/9/15, only neon is (e.g. marvell dove, nvidia tegra2). I haven't seen any black on white contracts saying that, though :)
The spec on the web seems to say fairly clearly that it's optional, at least in theory. I guess they might have commercial reasons for not wanting to sell it without VFP in any given situation.
See:
http://www.arm.com/products/processors/cortex-a/cortex-a5.php?tab=Specifications
for example
p.
Re: [PATCH 1/4] base.bbclass: Add compatibility package name mapping handler
Quoted 9 lines · Phil Blundell
Quoted 4 lines · Koen Kooi
From the conversations I had with ARM they implied that it isn't optional for cortex a8/9/15, only neon is (e.g. marvell dove, nvidia tegra2). I haven't seen any black on white contracts saying that, though :)
The spec on the web seems to say fairly clearly that it's optional, at least in theory. I guess they might have commercial reasons for not wanting to sell it without VFP in any given situation.
Quoted 6 lines
See:
http://www.arm.com/products/processors/cortex-a/cortex-a5.php?tab=Specificat
ionsfor example
thats only for for a5. For procesors koen mentioned VFP is mandatory
Quoted 9 lines
p.
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Khem Raj
Re: [PATCH 1/4] base.bbclass: Add compatibility package name mapping handler
Quoted 10 lines · Khem Raj
Quoted 9 lines · Phil Blundell
Quoted 4 lines · Koen Kooi
From the conversations I had with ARM they implied that it isn't optional for cortex a8/9/15, only neon is (e.g. marvell dove, nvidia tegra2). I haven't seen any black on white contracts saying that, though :)
The spec on the web seems to say fairly clearly that it's optional, at least in theory. I guess they might have commercial reasons for not wanting to sell it without VFP in any given situation.
Quoted 8 lines
Quoted 6 lines
See:
http://www.arm.com/products/processors/cortex-a/cortex-a5.php?tab=Specificat
ionsfor example
thats only for for a5. For procesors koen mentioned VFP is mandatory
Oh yeah, you're right. Sorry, I didn't read his email carefully enough.
The original question, though, was whether VFP is mandatory for the ARMv7-A architecture. Irrespective of what the situation is with A8/A9/A15, Cortex-A5 is still an ARMv7-A processor and hence VFP can't be mandatory for the architecture as a whole.
p.