cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
petervuto
Observer
Observer
1,962 Views
Registered: ‎07-08-2017

Automatically load kernel module on 2016.4

Jump to solution

Currently my workflow is:

- boot petalinux

- "modprobe blink" [blink being a kernel module]

- "myapp" [myapp being a test app]

 

 

I want to skip the second step. As per this thread, I tried adding "$(TARGETINST) -d -a blink /etc/modules" to my makefile's install goal, but the resulting petalinux does not have an etc/modules folder and the module is definitely not loaded.

 

https://forums.xilinx.com/t5/Embedded-Linux/Petalinux-2016-4-BB-Install-module-to-etc-modules/m-p/746222#M18333 suggests to add "KERNEL_MODULE_AUTOLOAD+="modulename" to some .bb recipe, but I am unsure which .bb file to add it to or even if he is solving the same problem.

 

In short: How do make it so I don't have to write "modprobe blink" after booting?

0 Kudos
1 Solution

Accepted Solutions
sandeepg
Moderator
Moderator
2,330 Views
Registered: ‎04-24-2017

Hi @petervuto,

 

You can add KERNEL_MODULE_AUTOLOAD += "module_name" in distribution configuration file an append file for the module recipe, or the module recipe itself.

 

distribution config files path

 

2017.1 or later:<plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf

 

2016.4: <plnx-proj-root>/build/conf/local.conf

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

2 Replies
sandeepg
Moderator
Moderator
2,331 Views
Registered: ‎04-24-2017

Hi @petervuto,

 

You can add KERNEL_MODULE_AUTOLOAD += "module_name" in distribution configuration file an append file for the module recipe, or the module recipe itself.

 

distribution config files path

 

2017.1 or later:<plnx-proj-root>/project-spec/meta-user/conf/petalinuxbsp.conf

 

2016.4: <plnx-proj-root>/build/conf/local.conf

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------

View solution in original post

petervuto
Observer
Observer
1,935 Views
Registered: ‎07-08-2017

Thank you, that worked.

0 Kudos