mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] Running depmod after deploying some extra kernel modules
Date: Fri, 11 Mar 2016 12:09:44 +0100	[thread overview]
Message-ID: <20160311110944.GG11418@pengutronix.de> (raw)
In-Reply-To: <00056508.56E053F2@mail.ino.local>

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
ptxdist@pengutronix.de

      reply	other threads:[~2016-03-11 11:09 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-09 15:48 stefan kratochwil
2016-03-11 11:09 ` Michael Olbrich [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160311110944.GG11418@pengutronix.de \
    --to=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox