[yocto] Autoload kernel module works only once

Khem Raj raj.khem at gmail.com
Mon Mar 13 13:28:37 PDT 2017



On 3/13/17 7:36 AM, Andrea Laini wrote:
> Hi everybody,
> 
>  
> 
> I’m getting some errors after building my Linux distro with the use of
> KERNEL_MODULE_AUTOLOAD to allow autoloading 2 of my custom out-of-tree
> device at boot time. We’ve a Poky 1.7 version.
> 
>  
> 
> So, before building the new image with the Yocto keyword
> KERNEL_MODULE_AUTOLOAD, I was able to load and open (and, obviously,
> use) my devices simply by calling ‘modprobe mydevice’ after logging in.
> Restarting the board, everything was still working well.
> 
> Since I’ve rebuild a new image enabling module autoload at boot time,
> modules are always loaded, but I’m able to open (and use) them only
> really first time I switched on the board after downloading new image.
> After the first reboot, LKMs are still loaded (calling ‘lsmod’ show
> them) but I can’t open them, neither from my C program nor
> reading/writing them from ‘/dev/mydevice’.

look out for any race conditions for dependencies. Since it will now
autoload the modules and its possible that you were depending on some
system behavior that was enabled late in boot process, but it worked
since you did it after logging in and manually doing modprobe.

> 
>  
> 
> To me it sound a very strange behavior.
> 
>  
> 
> Hope anyone can help,
> 
> Many thanks
> 
>  
> 
> Andrea
> 
>  
> 
> 
> *Andrea Laini
> 
> *Email: andrea.laini at claypaky.it <mailto:andrea.laini at claypaky.it>
> *_________________________________*
> *Clay Paky S.p.A.
> *AN OSRAM BUSINESS
> Via Pastrengo, 3/b - 24068 Seriate (BG) - ITALY
> Phone: +39 - 035.654.311 - Fax: +39 - 035.30.18.76
> Web: www.claypaky.it <http://www.claypaky.it/>
> *_________________________________*
> Read our Disclaimer @  www.claypaky.it/disclaimer
> <http://www.claypaky.it/disclaimer/index.html>
> 
>  
> 
> 
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: OpenPGP digital signature
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170313/b62f4ece/attachment.pgp>


More information about the yocto mailing list