From: Dave Jones <davej-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Seewer Philippe <philippe.seewer-omB+W0Dpw2o@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: Dracut on different distros?
Date: Wed, 4 Mar 2009 13:12:17 -0500 [thread overview]
Message-ID: <20090304181217.GA27961@redhat.com> (raw)
In-Reply-To: <49AE99D2.1000501-omB+W0Dpw2o@public.gmane.org>
On Wed, Mar 04, 2009 at 04:10:10PM +0100, Seewer Philippe wrote:
> And another example: Yes, Debian and Ubuntu don't provide
> modules.{block,net,...} Can we really find a way of finding all block
> drivers? Certainly stupid me can't think of a way to be sure we "really
> really" have all block drivers without including every single .ko. Leave
> it to the user to specifically set drivers or the Distro to tell Dracut
> which drivers to include.
It's not really that difficult.
Those files are created in Fedora by the kernel rpm %post, which does this..
find $RPM_BUILD_ROOT/lib/modules/$KernelVer -name "*.ko" -type f >modnames
fgrep /drivers/ modnames | xargs --no-run-if-empty nm -upA |
sed -n 's,^.*/\([^/]*\.ko\): *U \(.*\)$,\1 \2,p' > drivers.undef
collect_modules_list()
{
sed -r -n -e "s/^([^ ]+) \\.?($2)\$/\\1/p" drivers.undef |
LC_ALL=C sort -u > $RPM_BUILD_ROOT/lib/modules/$KernelVer/modules.$1
}
collect_modules_list networking \
'register_netdev|ieee80211_register_hw|usbnet_probe'
collect_modules_list block \
'ata_scsi_ioctl|scsi_add_host|blk_init_queue|register_mtd_blktrans|scsi_esp_register'
This looks complicated, but it really boils down to
"create a list of modules that use these symbols"
Rather than add this to every distros kernel packages though, it could
be done as part of depmod, and moved to module-init-tools.
Dave
--
http://www.codemonkey.org.uk
--
To unsubscribe from this list: send the line "unsubscribe initramfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-03-04 18:12 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-04 15:10 Dracut on different distros? Seewer Philippe
[not found] ` <49AE99D2.1000501-omB+W0Dpw2o@public.gmane.org>
2009-03-04 16:05 ` Victor Lowther
[not found] ` <0227279C-8C23-4501-B163-04470D0C0F35-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-03-04 16:20 ` Thiago Galesi
[not found] ` <82ecf08e0903040820t42775dd8s56e32d9d5dd53c36-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-03-04 16:44 ` Seewer Philippe
2009-03-04 16:40 ` Seewer Philippe
[not found] ` <49AEAF16.6010008-omB+W0Dpw2o@public.gmane.org>
2009-03-04 17:28 ` Victor Lowther
[not found] ` <14BAD8D9-B114-4979-B9CE-BA20CEEF768D-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2009-03-05 7:23 ` Harald Hoyer
2009-03-04 18:12 ` Dave Jones [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=20090304181217.GA27961@redhat.com \
--to=davej-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=philippe.seewer-omB+W0Dpw2o@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox