All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dennis Schridde <devurandom-hi6Y0CQ0nG0@public.gmane.org>
To: John Reiser <jreiser-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: build initramfs faster
Date: Tue, 28 Feb 2012 21:20:42 +0100	[thread overview]
Message-ID: <1805855.DzVeY6ZoDO@ernie> (raw)
In-Reply-To: <4F4D30C7.2030305-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1766 bytes --]

Hi John and list!

Am Dienstag, 28. Februar 2012, 11:53:43 schrieb John Reiser:
> I suggest that modprobe could be extended with a command-line flag
> to read driver names from stdin, and to label the output lines with
> the input driver name (suggested syntax: a prefix line  :<driver>\n
> before any output corresponding to an input <driver>.)  Then a single
> invocation of modprobe could process all drivers.
Since libkmod exists (I don't know how much of modprobe it implements), can't 
you just write a small dedicated tool using it, that does the dependency 
discovery? That should be as fast and small as you can get.

In case modinfo could be used, I think it could also ease things a little, 
since it already does formatted output:
# modinfo unix doesnotexist btrfs
filename:       /lib/modules/3.2.6-gentoo/kernel/net/unix/unix.ko
alias:          net-pf-1
license:        GPL
depends:        
intree:         Y
vermagic:       3.2.6-gentoo SMP mod_unload modversions 
ERROR: Module doesnotexist not found.
filename:       /lib/modules/3.2.6-gentoo/kernel/fs/btrfs/btrfs.ko
license:        GPL
alias:          devname:btrfs-control
alias:          char-major-10-234
depends:        libcrc32c,zlib_deflate
intree:         Y
vermagic:       3.2.6-gentoo SMP mod_unload modversions 

Dunno if that is enough error reporting for your case, but certainly you can 
destinguish the different drivers by either a "filename:" line, or an ERROR 
line. And since modinfo does not consider the /etc/modprobe.d files, as was 
recently pointed out, you can maybe extend modinfo to do so based on a 
commandline flag - code copied from modprobe (or maybe already existing in 
libkmod)? That would still require you to write the read-from-stdin code, 
though...

--Dennis

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

      parent reply	other threads:[~2012-02-28 20:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-28 19:53 build initramfs faster John Reiser
     [not found] ` <4F4D30C7.2030305-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org>
2012-02-28 20:20   ` Dennis Schridde [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=1805855.DzVeY6ZoDO@ernie \
    --to=devurandom-hi6y0cq0ng0@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jreiser-Po6cBsTGB2ZWk0Htik3J/w@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.