Skip to contentSkip to conversation

fixes for mips64-o32

PATCH New Robert Yang 1 participant 3 messages Oct 14, 2016

lore
Share & tools
lore
#0 lore raw

cover fixes for mips64-o32

The following changes since commit d976454406adea2edd738096227ad53d600783ad:

source-highlight: use with-boost-libdir (2016-10-12 20:17:35 -0700)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/mips
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/mips

Robert Yang (2):
arch-mips.inc: remove duplicates from PACKAGE_ARCHS insane.bbclass: fix package_qa_check_arch() for mips64-o32

 meta/classes/insane.bbclass                  | 10 ++++++----
 meta/conf/machine/include/mips/arch-mips.inc |  2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)
Signature · 1 line
2.9.0
#1 lore raw

PATCH 1/2 arch-mips.inc: remove duplicates from PACKAGE_ARCHS

Fixed:
MACHINE = "qemumips64"
DEFAULTTUNE = "mips64-o32"

$ bitbake linux-yocto
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:

Error, the PACKAGE_ARCHS variable contains duplicates. The following archs are listed more than once: mips64-o32

---
 meta/conf/machine/include/mips/arch-mips.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/machine/include/mips/arch-mips.inc +1 -1
index 50c4c82..6069ca1 100644
@@ -118,7 +118,7 @@ AVAILTUNES += "mips64-o32 mips64el-o32"
 TUNE_FEATURES_tune-mips64-o32 = "o32 bigendian fpu-hard"
 BASE_LIB_tune-mips64-o32 = "lib"
 MIPSPKGSFX_VARIANT_tune-mips64-o32 = "${TUNE_ARCH}"
-PACKAGE_EXTRA_ARCHS_tune-mips64-o32 = "mips mips64-o32 mips64-o32"
+PACKAGE_EXTRA_ARCHS_tune-mips64-o32 = "mips mips64-o32"
 
 TUNE_FEATURES_tune-mips64el-o32 = "o32 fpu-hard"
 BASE_LIB_tune-mips64el-o32 = "lib"
Signature · 1 line
2.9.0
#2 lore raw

PATCH 2/2 insane.bbclass: fix package_qa_check_arch() for mips64-o32

In reply to Robert Yang

Fixed:
MACHINE = "qemumips64"
DEFAULTTUNE = "mips64-o32"

$ bitbake linux-yocto
ERROR: linux-yocto-4.8+gitAUTOINC+03bf3dd731_674818dad5-r0 do_package_qa: QA Issue: Bit size did not match (32 to 64) linux-yocto on
    /work/qemumips64-poky-linux/linux-yocto/4.8+gitAUTOINC+03bf3dd731_674818dad5-r0/packages-split/kernel-module-parport/lib/modules/4.8.0-yocto-standard/kernel/drivers/parport/parport.ko [arch]

The mips64-n32 works since it would set ABIEXTENSION to "n32" so that TARGET_OS is linux-gnun32, and it will skip the check, but "mips64-o32" doesn't set ABIEXTENSION to "o32", "n32" or "32", so the error happend.

Skip the check if mips64.*32 matches DEFAULTTUNE can fix the problem. Another way to fix the problem is define ABIEXTENSION to "o32" or "32" for mips64-o32, but that may make things confused since "o32" is purely 32 bit.

[YOCTO #10305]

---
 meta/classes/insane.bbclass | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
meta/classes/insane.bbclass +6 -4
index 17c9284..ff2bcfe 100644
@@ -513,6 +513,8 @@ def package_qa_check_arch(path,name,d, elf, messages):
     """
     Check if archs are compatible
     """
+    import re
+
     if not elf:
         return
 
@@ -541,12 +543,12 @@ def package_qa_check_arch(path,name,d, elf, messages):
         = package_qa_get_machine_dict(d)[target_os][target_arch]
 
     # Check the architecture and endiannes of the binary
-    if not ((machine == elf.machine()) or \
-        ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
+    is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \
+            (target_os == "linux-gnux32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE', True)))
+    if not ((machine == elf.machine()) or is_32):
         package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \
                  (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d)))
-    elif not ((bits == elf.abiSize()) or  \
-        ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
+    elif not ((bits == elf.abiSize()) or is_32):
         package_qa_add_message(messages, "arch", "Bit size did not match (%d to %d) %s on %s" % \
                  (bits, elf.abiSize(), bpn, package_qa_clean_path(path,d)))
     elif not littleendian == elf.isLittleEndian():
Signature · 1 line
2.9.0