All of lore.kernel.org
 help / color / mirror / Atom feed
From: Warren Togami <wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: initramfs <initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: kernel modules scanning
Date: Tue, 30 Jun 2009 01:34:39 -0400	[thread overview]
Message-ID: <4A49A3EF.2040504@redhat.com> (raw)

Seewer mentioned that instmods =block is failing to pull in block device 
drivers on Debian.  Debian lacks the modules.* lists.  The following 
code is used to generate these lists on Fedora.

kernel.spec:
     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'
     collect_modules_list drm \
                          'drm_open|drm_init'
     collect_modules_list modesetting \
                          'drm_crtc_init'

Under the assumption that we cannot rely on modules.* list files since 
it is not shipped by other distributions, the next best thing is to do a 
similar scanning during dracut runtime.  This is a bit slower than 
simply reading the modules.* files but it seems we have no choice.

I had implemented the equivalent of "modesetting" and the important 
subset of "networking" that we require in dracut.  The equivalent for 
"block" however is a bit more complex given the long list of alternative 
symbol names.

I had considered implementing the equivalent of collect_modules_list in 
dracut.  Perhaps we could implement the equivalent with an additional 
parameter of base directory so it does not bother scanning the entire 
directory tree looking for modules.

Just a thought.

Warren Togami
wtogami-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org
--
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

             reply	other threads:[~2009-06-30  5:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30  5:34 Warren Togami [this message]
     [not found] ` <4A49A3EF.2040504-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-30 11:07   ` kernel modules scanning Seewer Philippe

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=4A49A3EF.2040504@redhat.com \
    --to=wtogami-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@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.