aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2016-10-14 03:08:37 -0700
committerKoen Kooi <koen.kooi@linaro.org>2017-03-17 09:44:56 +0100
commitf6df34b77345026608f0f170b48a7234f6c15f97 (patch)
tree75cdef8d075c074888b4a88319e97816737ec832
parent1bd8b9197155b815c19018c527f5ee90a2398d66 (diff)
insane.bbclass: fix package_qa_check_arch() for mips64-o32
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] Change-Id: Ied0474bc642029a2d1e559db6a637dcd788eab37 Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
-rw-r--r--meta-ilp32/classes/insane.bbclass10
1 files changed, 6 insertions, 4 deletions
diff --git a/meta-ilp32/classes/insane.bbclass b/meta-ilp32/classes/insane.bbclass
index d405f4d6..1db7b8ac 100644
--- a/meta-ilp32/classes/insane.bbclass
+++ b/meta-ilp32/classes/insane.bbclass
@@ -518,6 +518,8 @@ def package_qa_check_arch(path,name,d, elf, messages):
"""
Check if archs are compatible
"""
+ import re
+
if not elf:
return
@@ -546,12 +548,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():