<?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>1002</bug_id>
          
          <creation_ts>2011-04-21 23:18:07 +0000</creation_ts>
          <short_desc>automatically modprobe kernel module</short_desc>
          <delta_ts>2011-05-08 23:07:50 +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>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>unspecified</version>
          <rep_platform>Other</rep_platform>
          <op_sys>arm</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>NOTABUG</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.1</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Gerard van den Bosch">gvandenbosch</reporter>
          <assigned_to name="Darren Hart">dvhart</assigned_to>
          <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>sgw</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>13380</commentid>
    <comment_count>0</comment_count>
    <who name="Gerard van den Bosch">gvandenbosch</who>
    <bug_when>2011-04-21 23:18:07 +0000</bug_when>
    <thetext>Hope-for result:
Automatically modprobe a kernel module at startup

Poky version: 4.0

Problem:

The &quot;/etc/modules&quot; file that is not created when generating the rootfs, this is done during first boot by the update-modules script located in recipes-kernel, as far as I can understand from that script it looks in /etc/modutils for configuration of kernel modules to load but that directory is missing too.

On the mailinglist got pointed to kernel.bbclass where modules get autoloaded.
Tried adding my module with the following line in the bbclass file:
module_autoload_libertas-sdio = &quot;libertas-sdio&quot; 

After that I rebuilded the kernel and generated the image but didn&apos;t get the modutils file and it didn&apos;t autoload either.
Also tried adding the line inside my kernel recipe after &quot;inherit kernel&quot; but I didn&apos;t get that to work either.

On the mailinglist it was requested to file a bug, the thread for reference can be found here:
https://lists.yoctoproject.org/pipermail/poky/2011-April/005324.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13579</commentid>
    <comment_count>1</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-05-04 17:05:53 +0000</bug_when>
    <thetext>Gerard, have you tried a clean build after modifying the kernel.bbclass? If not, it might be worth trying while I dig into the dependency chain to make sure the image is running the necessary bits to reflect the change you made. This has been a bit nebulous for me in the past, so I build from scratch more frequently than I should. Good opportunity to clarify it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13585</commentid>
    <comment_count>2</comment_count>
    <who name="Gerard van den Bosch">gvandenbosch</who>
    <bug_when>2011-05-05 02:00:39 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; Gerard, have you tried a clean build after modifying the kernel.bbclass? If
&gt; not, it might be worth trying while I dig into the dependency chain to make
&gt; sure the image is running the necessary bits to reflect the change you made.
&gt; This has been a bit nebulous for me in the past, so I build from scratch more
&gt; frequently than I should. Good opportunity to clarify it.

Didn&apos;t try that yet, I will try it now and give an update as soon as possible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13610</commentid>
    <comment_count>3</comment_count>
    <who name="Gerard van den Bosch">gvandenbosch</who>
    <bug_when>2011-05-06 01:14:02 +0000</bug_when>
    <thetext>Ok, I have tried a clean build but it didn&apos;t work, I have done the following steps:
- Removed the entire build directory
- Added the line module_autoload_libertas-sdio = &quot;libertas-sdio&quot; to kernel.bbclass between the other module_autload_xxx lines.
- source poky-init-build-env
- bitbake poky-image-myimage

When I boot-up the driver isn&apos;t modprobed automatically.

If you have some direction for debugging/searching I could try to get more information or if it currently isn&apos;t possible I could compile the module as part of the kernel to let it work (with that I mean * instead of M in the menuconfig) until it is possible.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13611</commentid>
    <comment_count>4</comment_count>
    <who name="Gerard van den Bosch">gvandenbosch</who>
    <bug_when>2011-05-06 02:17:09 +0000</bug_when>
    <thetext>I dug some more into it and have been able to resolve my problem by adding module_autoload_libertas_sdio = &quot;libertas-sdio&quot; to my machine configuration file.
I discovered in an other machine file they were doing it so I gave it a try.

Probably ignores the one in kernel.bbclass because I shouldn&apos;t put them there but in the machine configuration file.

It modprobes automatically now, thanks for helping me out :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13612</commentid>
    <comment_count>5</comment_count>
    <who name="Darren Hart">dvhart</who>
    <bug_when>2011-05-06 07:24:28 +0000</bug_when>
    <thetext>I noticed in one comment you used:

module_autoload_libertas-sdio = &quot;libertas-sdio&quot;

and in the other you used:

module_autoload_libertas_sdio = &quot;libertas-sdio&quot;

bitbake is rather particular about the use of underscores. Can you confirm that the latter one (with an underscore before sdio) doesn&apos;t work in kernel.bbclass?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>13637</commentid>
    <comment_count>6</comment_count>
    <who name="Gerard van den Bosch">gvandenbosch</who>
    <bug_when>2011-05-08 23:07:50 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; I noticed in one comment you used:
&gt; 
&gt; module_autoload_libertas-sdio = &quot;libertas-sdio&quot;
&gt; 
&gt; and in the other you used:
&gt; 
&gt; module_autoload_libertas_sdio = &quot;libertas-sdio&quot;
&gt; 
&gt; bitbake is rather particular about the use of underscores. Can you confirm that
&gt; the latter one (with an underscore before sdio) doesn&apos;t work in kernel.bbclass?

I can&apos;t confirm if the second one works in kernel.bbclass, I can confirm the first one doesn&apos;t.

I used underscores in the machine file because I looked at an example from the &quot;htcuniversal.conf&quot; file and there was the autoload line underscore so I did the same.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>