Bug 10305 - do_package_qa should not error on 64 bit kernel modules + 32 bit rootfs
Summary: do_package_qa should not error on 64 bit kernel modules + 32 bit rootfs
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: kernel (show other bugs)
Version: unspecified
Hardware: x86 Multiple
: Medium+ normal
Target Milestone: 2.3 M1
Assignee: Robert Yang
QA Contact: David Lopez Barriba
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2016-09-19 15:10 UTC by Zubair Lutfullah Kakakhel
Modified: 2016-12-06 17:26 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Yes (doc changes required)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zubair Lutfullah Kakakhel 2016-09-19 15:10:56 UTC
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'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'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'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('INSANE_SKIP_' + package, True) or "").split()
+        if package.startswith("kernel-module-"):
+              skip = "arch"
         if skip:
             bb.note("Package %s skipping QA tests: %s" % (package, str(skip)))
         warnchecks = []

Thanks
ZubairLK
Comment 1 Ross Burton 2016-09-19 15:13:46 UTC
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.
Comment 2 Randy MacLeod 2016-09-22 14:45:26 UTC
Robert does this also occur on  x86-64 with 32bit userspace? If not may not be as critical to the 2.2 release.
Comment 3 Ross Burton 2016-10-11 10:18:01 UTC
Note that insane already has some exclusions for the kernel:

    elif not ((bits == elf.abiSize()) or  \
        ((("virtual/kernel" in provides) or bb.data.inherits_class("module", d) ) and (target_os == "linux-gnux32" or target_os == "linux-gnun32"))):
        package_qa_add_message(messages, "arch", "Bit size did not match (%d to %d) %s on %s" % \
Comment 4 Zubair Lutfullah Kakakhel 2016-10-11 11:01:30 UTC
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.
Comment 5 Robert Yang 2016-10-14 10:07:22 UTC
I sent a patch to the mailing list just now:

http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/mips