Patchwork [v2,08/10] insane.bbclass: skip checking arch (machine/bits) for powerpc kernel recipe

login
register
mail settings
Submitter Matthew McClintock
Date Sept. 28, 2012, 1:33 a.m.
Message ID <1348795994-21695-8-git-send-email-msm@freescale.com>
Download mbox | patch
Permalink /patch/37389/
State New
Headers show

Comments

Matthew McClintock - Sept. 28, 2012, 1:33 a.m.
For a 32-bit machine, we still might always (or optionally) want to build a
64-bit kernel so we add an exception.

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
Not sure if we should just skip for all virtual/kernel's?

Should we use some variable for this instead?
-BUILD_64BIT_KERNEL? PROMOTE_TO_64BIT_KERNEL?

 meta/classes/insane.bbclass |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 1fb8970..173b71f 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -402,11 +402,13 @@  def package_qa_check_arch(path,name,d, elf, messages):
 
     # Check the architecture and endiannes of the binary
     if not ((machine == elf.machine()) or \
-	("virtual/kernel" in provides) and (target_os == "linux-gnux32")):
+	("virtual/kernel" in provides) and (target_os == "linux-gnux32") or \
+	("virtual/kernel" in provides) and (target_arch == "powerpc")):
         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  \
-	("virtual/kernel" in provides) and (target_os == "linux-gnux32")):
+	("virtual/kernel" in provides) and (target_os == "linux-gnux32") or \
+	("virtual/kernel" in provides) and (target_arch == "powerpc")):
         messages.append("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():