Patchwork [3/6] insane.bbclass: fix elf.arch not matching error for x32 kernel

login
register
mail settings
Submitter Nitin A Kamble
Date Jan. 11, 2012, 2:27 a.m.
Message ID <47a4f77a6a2ecd8078b3dbcdcc47ecec73d793c7.1326248769.git.nitin.a.kamble@intel.com>
Download mbox | patch
Permalink /patch/19003/
State Accepted
Commit 74686edafa241839d3880e06740ee7450ff94fd8
Headers show

Comments

Nitin A Kamble - Jan. 11, 2012, 2:27 a.m.
From: Nitin A Kamble <nitin.a.kamble@intel.com>

For x32 the user space is 32bit and the kernel is 64bit.
So the elf.arch for vmlinuz is x86_64 and not x86. This commit
fixes this QA error thrown for x32 kernel.

| ERROR: QA Issue: Architecture did not match (62 to 3) on
/work/qemux86_64-poky-linux-gnux32/linux-korg-3.1+git1+e2bf8464ddbf5da24d3d320cded5691828a91a0b-r1/packages-split/kernel-vmlinux/boot/vmlinux-3.1.0-yocto-standard-01628-ge2bf846
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
---
 meta/classes/insane.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 8d6b11c..ce21496 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -331,7 +331,8 @@  def package_qa_check_arch(path,name,d, elf, messages):
         = package_qa_get_machine_dict()[target_os][target_arch]
 
     # Check the architecture and endiannes of the binary
-    if not machine == elf.machine():
+    if not ((machine == elf.machine()) or \
+	("virtual/kernel" in provides) and (target_os == "linux-gnux32")):
         messages.append("Architecture did not match (%d to %d) on %s" % \
                  (machine, elf.machine(), package_qa_clean_path(path,d)))
     elif not ((bits == elf.abiSize()) or  \