title: Yocto: Adding kernel module recipe to image, but it doesn't load on boot
body: <p>For testing purposes, I am using the example recipe provided by yocto to demonstrate how to build kernel modules.</p>
  
  <pre><code>SUMMARY = "Example of how to build an external Linux kernel module"
  LICENSE = "GPLv2"
  LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
  
  inherit module
  
  PR = "r0"
  PV = "0.1"
  
  SRC_URI = "file://Makefile \
             file://hello.c \
             file://COPYING \
            "
  
  S = "${WORKDIR}"
  
  # The inherit of module.bbclass will automatically name module packages with
  # "kernel-module-" prefix as required by the oe-core build environment.
  </code></pre>
  
  <p>The <code>hello.c</code> file is very simple.</p>
  
  <pre><code>#include &lt;linux/module.h&gt;
  
  int init_module(void)
  {
      printk("Hello World!\n");
      return 0;
  }
  
  void cleanup_module(void)
  {
      printk("Goodbye Cruel World!\n");
  }
  
  MODULE_LICENSE("GPL");
  </code></pre>
  
  <p>Now, I added this module to my image recipe.</p>
  
  <pre><code>SUMMARY = "A console-only image that fully supports the target device \
  hardware."
  
  IMAGE_FEATURES += "splash package-management"
  
  IMAGE_INSTALL += "test-mod autoconf automake binutils make busybox"
  
  LICENSE = "MIT"
  
  inherit core-image
  </code></pre>
  
  <p>When I boot the image, I see the test "hello.ko" in the /lib/modules directory, but when I check <code>dmesg</code>, I don't see the output indicating the kernel module loaded.</p>
  
  <p>When I manually run <code>insmod</code> on <code>hello.ko</code>, I get the output. Also, when I run <code>rmmod</code>, I get the output.</p>
  
  <p>What am I doing wrong? I need this module to auto load on boot.</p>
  
  <p><strong>edit</strong>:</p>
  
  <p>Here the output, verifying that the module isn't loaded on boot, but it is a valid module.</p>
  
  <pre><code>/ # dmesg | grep "Hello"
  / # insmod hello.ko 
  [   68.503689] Hello World!
  / # rmmod hello.ko 
  [   72.702035] Goodbye Cruel World!
  </code></pre>