Patchwork insane.bbclass: skip checking arch (machine/bits) for powerpc kernel recipe

login
register
mail settings
Submitter Matthew McClintock
Date Sept. 18, 2012, 10:08 p.m.
Message ID <1348006091-14992-6-git-send-email-msm@freescale.com>
Download mbox | patch
Permalink /patch/36867/
State New
Headers show

Comments

Matthew McClintock - Sept. 18, 2012, 10:08 p.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?

 meta/classes/insane.bbclass |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Khem Raj - Sept. 18, 2012, 10:44 p.m.
On Tue, Sep 18, 2012 at 3:08 PM, Matthew McClintock <msm@freescale.com> wrote:
> 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?
>
>  meta/classes/insane.bbclass |    6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
> index e74eb3f..2ca1b49 100644
> --- a/meta/classes/insane.bbclass
> +++ b/meta/classes/insane.bbclass
> @@ -366,11 +366,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")):

I feel using powerpc target_arch here is a broad brush. Can there be
some other variable in metadata
that could indicate 64bit kernel and a 32bit ppc userspace combo of
some sort ? or may be a variable
stating that this machine's kernel is 64bit and use that here instead.

>          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():
> --
> 1.7.9.7
>
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
McClintock Matthew-B29882 - Sept. 18, 2012, 10:47 p.m.
On Tue, Sep 18, 2012 at 5:44 PM, Khem Raj <raj.khem@gmail.com> wrote:
> On Tue, Sep 18, 2012 at 3:08 PM, Matthew McClintock <msm@freescale.com> wrote:
>> 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?
>>
>>  meta/classes/insane.bbclass |    6 ++++--
>>  1 file changed, 4 insertions(+), 2 deletions(-)
>>
>> diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
>> index e74eb3f..2ca1b49 100644
>> --- a/meta/classes/insane.bbclass
>> +++ b/meta/classes/insane.bbclass
>> @@ -366,11 +366,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")):
>
> I feel using powerpc target_arch here is a broad brush. Can there be
> some other variable in metadata
> that could indicate 64bit kernel and a 32bit ppc userspace combo of
> some sort ? or may be a variable
> stating that this machine's kernel is 64bit and use that here instead.

I added BUILD_64BIT_KERNEL in my layer for building a 64-bit kernel on
a 32-bit machine, we could use this (or another "better" name)

-M

>
>>          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():
>> --
>> 1.7.9.7
>>
>>
>>
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index e74eb3f..2ca1b49 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -366,11 +366,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():