All of lore.kernel.org
 help / color / mirror / Atom feed
* kernel modules scanning
@ 2009-06-30  5:34 Warren Togami
       [not found] ` <4A49A3EF.2040504-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Warren Togami @ 2009-06-30  5:34 UTC (permalink / raw)
  To: initramfs

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: kernel modules scanning
       [not found] ` <4A49A3EF.2040504-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
@ 2009-06-30 11:07   ` Seewer Philippe
  0 siblings, 0 replies; 2+ messages in thread
From: Seewer Philippe @ 2009-06-30 11:07 UTC (permalink / raw)
  To: Warren Togami; +Cc: initramfs

Warren Togami wrote:
> 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.

All I can say here is yes please!

Regards,
Philippe
--
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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-06-30 11:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-30  5:34 kernel modules scanning Warren Togami
     [not found] ` <4A49A3EF.2040504-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-06-30 11:07   ` Seewer Philippe

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.