On Wed, Mar 09, 2016 at 03:48:51PM +0000, stefan kratochwil wrote: > I am struggling with integrating some (unfortunately proprietary) wifi kernel > modules, which are build outside the kernel sources. In fact, I only need to > call depmod after the targetinstall step. However, I'm not feeling too lucky > with my results so far. > > The imho most promising way lead me to /etc/rc.once.d, so I created a little > shell script which calls depmod on the first bootup of my target, and added it > to rc.once.d. It turned out that this triggers a reboot (!) after the prelink > step was executed: > > [ 13.747106] systemd-journald[110]: Received SIGTERM from PID 1 > (systemd-shutdow). > > I played around a bit and recognized, that this reboot only occurs if my > depmod > script is executed _after_ the prelink step. If I prepend a '0_' to my depmod > script name, then no reboot occurs. In both cases, modprobe finds my modules > after having the system fully booted up, so depmod was _definitely_ executed. > > I have no explanation for that rebooting behaviour, and I also noticed that > none of my "echo" calls were printed out. Maybe executing depmod during the > system boot process is not the best idea, so I am looking for a more safe way > to do that. > > I had no luck with google, the ptxdist mailing lists and the ptxdist git > history, so does anyone know what to do in such a situation? Is the > rc.once.d-way okay for my purpose, or is there a less blunt option? Could I > somehow call depmod at the postinst stage? [...]
Don't do this during runtime. Take a look at the out-of-tree kernel driver template. You can create a example driver with "ptxdist newpackage src-linux-driver". If you do it this way, then the kernel package will include your driver and run depmod at build-time. Michael -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ ptxdist mailing list [email protected]
