<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>10305</bug_id>
          
          <creation_ts>2016-09-19 15:10:56 +0000</creation_ts>
          <short_desc>do_package_qa should not error on 64 bit kernel modules + 32 bit rootfs</short_desc>
          <delta_ts>2016-12-06 17:26:45 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>kernel</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.3 M1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Zubair Lutfullah Kakakhel">Zubair.Kakakhel</reporter>
          <assigned_to name="Robert Yang">liezhi.yang</assigned_to>
          <cc>jose.perez.carranza</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tom.zanussi</cc>
          
          <qa_contact name="David Lopez Barriba">davidx.lopez.barriba</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>66328</commentid>
    <comment_count>0</comment_count>
    <who name="Zubair Lutfullah Kakakhel">Zubair.Kakakhel</who>
    <bug_when>2016-09-19 15:10:56 +0000</bug_when>
    <thetext>Hi,

If I use a 64 bit kernel + 32 bit rootfs configuration, the kernel modules are compiled as 64 bit.

But do_package_qa doesn&apos;t like that in the rootfs and gives an error like this

ERROR: linux-yocto-4.4+gitAUTOINC+6ec93aaa70_628bf62756-r0.1 do_package_qa: QA Issue: Bit size did not match (32 to 64) linux-yocto on work/qemumips64r2el_nf_o32-poky-linux/linux-yocto/4.4+gitAUTOINC+6ec93aaa70_628bf62756-r0.1/packages-split/kernel-module-nls-base/lib/modules/4.4.11-yocto-standard/kernel/fs/nls/nls_base.ko [arch]
ERROR: linux-yocto-4.4+gitAUTOINC+6ec93aaa70_628bf62756-r0.1 do_package_qa: QA Issue: Bit size did not match (32 to 64) linux-yocto on work/qemumips64r2el_nf_o32-poky-linux/linux-yocto/4.4+gitAUTOINC+6ec93aaa70_628bf62756-r0.1/packages-split/kernel-module-ip-vs-lc/lib/modules/4.4.11-yocto-standard/kernel/net/netfilter/ipvs/ip_vs_lc.ko [arch]
ERROR: linux-yocto-4.4+gitAUTOINC+6ec93aaa70_628bf62756-r0.1 do_package_qa: QA Issue: Bit size did not match (32 to 64) linux-yocto on work/qemumips64r2el_nf_o32-poky-linux/linux-yocto/4.4+gitAUTOINC+6ec93aaa70_628bf62756-r0.1/packages-split/kernel-module-nls-cp936/lib/modules/4.4.11-yocto-standard/kernel/fs/nls/nls_cp936.ko [arch]
ERROR: linux-yocto-4.4+gitAUTOINC+6ec93aaa70_628bf62756-r0.1 do_package_qa: QA Issue: Bit size did not match (32 to 64) linux-yocto on work/qemumips64r2el_nf_o32-poky-linux/linux-yocto/4.4+gitAUTOINC+6ec93aaa70_628bf62756-r0.1/packages-split/kernel-module-ebt-mark/lib/modules/4.4.11-yocto-standard/kernel/net/bridge/netfilter/ebt_mark.ko [arch]
ERROR: linux-yocto-4.4+gitAUTOINC+6ec93aaa70_628bf62756-r0.1 do_package_qa: QA Issue: Bit size did not match (32 to 64) linux-yocto on work/qemumips64r2el_nf_o32-poky-linux/linux-yocto/4.4+gitAUTOINC+6ec93aaa70_628bf62756-r0.1/packages-split/kernel-module-crc-itu-t/lib/modules/4.4.11-yocto-standard/kernel/lib/crc-itu-t.ko [arch]

I couldn&apos;t seem to use INSANE_SKIP_[pkg] for kernel-modules.

It would be nice if the arch check would be skipped.

Perhaps something like this. Although, I&apos;m not too familiar with internals. Maybe there is a better way.

--- /tmp/vdoyDS_insane.bbclass
+++ /home/zkakakhel/poky/meta/classes/insane.bbclass
@@ -1101,6 +1101,8 @@
     g = globals()
     for package in packages:
         skip = (d.getVar(&apos;INSANE_SKIP_&apos; + package, True) or &quot;&quot;).split()
+        if package.startswith(&quot;kernel-module-&quot;):
+              skip = &quot;arch&quot;
         if skip:
             bb.note(&quot;Package %s skipping QA tests: %s&quot; % (package, str(skip)))
         warnchecks = []

Thanks
ZubairLK</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66329</commentid>
    <comment_count>1</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-09-19 15:13:46 +0000</bug_when>
    <thetext>One solution I can see would be for the kernel classes to detect 32-bit host and 64-bit kernel and add the INSANE_SKIP assignments as it splits the kernel modules out.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66490</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2016-09-22 14:45:26 +0000</bug_when>
    <thetext>Robert does this also occur on  x86-64 with 32bit userspace? If not may not be as critical to the 2.2 release.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67127</commentid>
    <comment_count>3</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-10-11 10:18:01 +0000</bug_when>
    <thetext>Note that insane already has some exclusions for the kernel:

    elif not ((bits == elf.abiSize()) or  \
        (((&quot;virtual/kernel&quot; in provides) or bb.data.inherits_class(&quot;module&quot;, d) ) and (target_os == &quot;linux-gnux32&quot; or target_os == &quot;linux-gnun32&quot;))):
        package_qa_add_message(messages, &quot;arch&quot;, &quot;Bit size did not match (%d to %d) %s on %s&quot; % \</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67129</commentid>
    <comment_count>4</comment_count>
    <who name="Zubair Lutfullah Kakakhel">Zubair.Kakakhel</who>
    <bug_when>2016-10-11 11:01:30 +0000</bug_when>
    <thetext>That check seems to be handling n32 options correctly.

This happens with a purely 32 bit rootfs (o32 in MIPS) and a 64 bit kernel.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>67259</commentid>
    <comment_count>5</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2016-10-14 10:07:22 +0000</bug_when>
    <thetext>I sent a patch to the mailing list just now:

http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/mips</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68668</commentid>
    <comment_count>6</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2016-11-29 01:47:26 +0000</bug_when>
    <thetext>Merged into master:
http://git.openembedded.org/openembedded-core/commit/?id=4e61d8d6f4619dbfaeb5ca642449de7cf4b3e92d</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>