diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2016-10-14 03:08:37 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-10-15 10:01:44 +0100 |
commit | 901e632a492bd85067f34e8734b151718594c00f (patch) | |
tree | 0b0e5ee23eb57e74d5b9c82f5922eb306c3a0699 /meta/classes/insane.bbclass | |
parent | 34b16fea567684ba30aea4d28ff55cd2b3a3d5b1 (diff) | |
download | poky-901e632a492bd85067f34e8734b151718594c00f.tar.gz |
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]
(From OE-Core rev: 4e61d8d6f4619dbfaeb5ca642449de7cf4b3e92d)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/insane.bbclass')
-rw-r--r-- | meta/classes/insane.bbclass | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass index 29687d0a39..1d73778255 100644 --- a/meta/classes/insane.bbclass +++ b/meta/classes/insane.bbclass | |||
@@ -515,6 +515,8 @@ def package_qa_check_arch(path,name,d, elf, messages): | |||
515 | """ | 515 | """ |
516 | Check if archs are compatible | 516 | Check if archs are compatible |
517 | """ | 517 | """ |
518 | import re | ||
519 | |||
518 | if not elf: | 520 | if not elf: |
519 | return | 521 | return |
520 | 522 | ||
@@ -543,12 +545,12 @@ def package_qa_check_arch(path,name,d, elf, messages): | |||
543 | = package_qa_get_machine_dict(d)[target_os][target_arch] | 545 | = package_qa_get_machine_dict(d)[target_os][target_arch] |
544 | 546 | ||
545 | # Check the architecture and endiannes of the binary | 547 | # Check the architecture and endiannes of the binary |
546 | if not ((machine == elf.machine()) or \ | 548 | is_32 = (("virtual/kernel" in provides) or bb.data.inherits_class("module", d)) and \ |
547 | ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))): | 549 | (target_os == "linux-gnux32" or re.match('mips64.*32', d.getVar('DEFAULTTUNE', True))) |
550 | if not ((machine == elf.machine()) or is_32): | ||
548 | package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \ | 551 | package_qa_add_message(messages, "arch", "Architecture did not match (%s, expected %s) on %s" % \ |
549 | (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d))) | 552 | (oe.qa.elf_machine_to_string(elf.machine()), oe.qa.elf_machine_to_string(machine), package_qa_clean_path(path,d))) |
550 | elif not ((bits == elf.abiSize()) or \ | 553 | elif not ((bits == elf.abiSize()) or is_32): |
551 | ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))): | ||
552 | package_qa_add_message(messages, "arch", "Bit size did not match (%d to %d) %s on %s" % \ | 554 | package_qa_add_message(messages, "arch", "Bit size did not match (%d to %d) %s on %s" % \ |
553 | (bits, elf.abiSize(), bpn, package_qa_clean_path(path,d))) | 555 | (bits, elf.abiSize(), bpn, package_qa_clean_path(path,d))) |
554 | elif not littleendian == elf.isLittleEndian(): | 556 | elif not littleendian == elf.isLittleEndian(): |