3

Our system is NXP fsl-image-auto and build with Yocto project. Now we have a 3rd party ko "apex.ko", rootfs Path is /s32v/apex.ko

This module need load on linux boot, so we add "insmod /s32v/apex.ko" line into rcS.d to do this job.

Can this function be done with Yocto?

I tried "KERNEL_MODULE_AUTOLOAD += apex" but it seems can't work. And I tried "module_do_install()", but bitbake has "make: *** No targets specified and no makefile found. Stop. ERROR: oe_runmake failed" error massage.

How can I do this? Thanks...

Eric Fan
  • 31
  • 1
  • 3

2 Answers2

1

The way we use to add a kernel module at startup is by adding KERNEL_MODULE_AUTOLOAD variable:

KERNEL_MODULE_AUTOLOAD += "mymodule"

But you need to add it in your machine.conf, or in a recipe (not an image), as described in the documentation:

You can use the KERNEL_MODULE_AUTOLOAD variable anywhere that it can be recognized by the kernel recipe or by an out-of-tree kernel module recipe (e.g. a machine configuration file, a distribution configuration file, an append file for the recipe, or the recipe itself).

[...]

Including KERNEL_MODULE_AUTOLOAD causes the OpenEmbedded build system to populate the /etc/modules-load.d/modname.conf file with the list of modules to be auto-loaded on boot. The modules appear one-per-line in the file.

PierreOlivier
  • 1,387
  • 9
  • 23
0

I think you should add prefix to name of your module:

 KERNEL_MODULE_AUTOLOAD += "module_name"

https://docs.yoctoproject.org/ref-manual/variables.html?highlight=kernel_module_autoload#term-KERNEL_MODULE_AUTOLOAD

Ziegfried
  • 121
  • 2
  • 15