<?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>7591</bug_id>
          
          <creation_ts>2015-04-09 15:27:37 +0000</creation_ts>
          <short_desc>More reliable external kernel module selection</short_desc>
          <delta_ts>2015-10-21 19:25:26 +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>1.8</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>enhancement</bug_severity>
          <target_milestone>2.0</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Paul Eggleton">bluelightning</reporter>
          <assigned_to name="California Sullivan">california.l.sullivan</assigned_to>
          <cc>bruce.ashfield</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <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>50187</commentid>
    <comment_count>0</comment_count>
    <who name="Paul Eggleton">bluelightning</who>
    <bug_when>2015-04-09 15:27:37 +0000</bug_when>
    <thetext>If you have an out-of-tree kernel module recipe and simply add kernel-module-xyz to MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS in the machine config, the module may not actually appear in the image - the reason being that the kernel recipe itself claims via PACKAGES_DYNAMIC that it provides kernel-module-.* and thus the dependency is satisfied as far as bitbake is concerned, and since it is a RRECOMMENDS it doesn&apos;t matter that it isn&apos;t satisfied at runtime. The workaround is to explicitly name the external kernel module recipe somewhere (or the main dummy package it builds) such that it is forced to build.

It seems to me at minimum we need to document this in the kernel development manual. Another option would be to document that the user should explicitly add the package names to PACKAGES in their module recipe, which bitbake will take in preference to PACKAGES_DYNAMIC from the kernel - though someone would need to verify that this actually works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52641</commentid>
    <comment_count>1</comment_count>
    <who name="California Sullivan">california.l.sullivan</who>
    <bug_when>2015-07-27 22:04:35 +0000</bug_when>
    <thetext>I did some testing on the other option. It seems to work.

With no changes to any other recipes, adding MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS = &quot;kernel-module-hello&quot; to the machine conf (with &quot;hello&quot; being the module that hello-mod in yocto-skeleton creates), there was no error reported and the module was not put in the image.

After adding PACKAGES = &quot;kernel-module-hello&quot; to the hello-mod_0.1.bb recipe and rebuilding, the module &quot;hello&quot; was added to the image.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55586</commentid>
    <comment_count>2</comment_count>
    <who name="California Sullivan">california.l.sullivan</who>
    <bug_when>2015-10-21 19:25:26 +0000</bug_when>
    <thetext>Documentation updated; see commit 2c51eae23b634cdace5a119ee1a6c8e8ba76dc45 in the yocto-docs repo.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>