mkinitrd unification across distributions
 help / color / mirror / Atom feed
From: Harald Hoyer <harald-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Konrad Rzeszutek Wilk
	<konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [dracut] Loading of modules that don't have a uevent or pci	device: ideas?
Date: Tue, 22 Dec 2009 15:28:47 +0100	[thread overview]
Message-ID: <4B30D79F.9080506@redhat.com> (raw)
In-Reply-To: <20091221212600.GA7132-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>

On 12/21/2009 10:26 PM, Konrad Rzeszutek Wilk wrote:
> Hey Harald and initramfs mailing list,
>
> I am working on de-coupling a lot of Xen modules from the PV-OPS
> kernel (git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git)
> so that it is not neccessary to have them compiled in.
>
> I've gotten to the point that all of the drivers (fbfront, kbdfront,
> netfront, blkfront, pcifront) can be loaded on demand. Some of them
> can't be unloaded (still working on that).
>
> The next stage is to make the loading automatic, and detect if the kernel
> is running under Xen (PV) and if so load the neccesssary modules.
>
> To solve that, my thought was to:
>
> a) Write udev rules that would be act up if the kernel emitted such
> rules. But the kernel does not emit any uevents for this purpose and
> it does not emit any virtualization ones until the virtualization modules
> are loaded.  I could write up code that would emit this
> information and be generic enough that it would do so for anything
> that uses the paravirt strutures. So basically a SysFS interface for
> the paravirt interface.
>
> b) Or utilize xen-detect and load the appropiate modules if we are
> running in Xen PV land. The second is by far much simpler but I don't
> know if more appropiate. I am attaching an example patch to demonstrate
> what I had in mind. (Caveat: I didn't include the pre-requisite for
> xen-tools yet).
>
> c). Another way? Any ideas would be much appreciated.
>

I would favor "modalias" files in /sys, which will be used to modprobe the 
modules with the modalias.
Have a look at this:
$ find /sys -name modalias

I am sure this could be automated in the kernel without the need of extra 
special xen handling with scripts.

> +xen-detect
> +RC=$?
> +if [ "$RC" = "1" ] ; then

why not?

if xen-detect ; then ...; fi

  parent reply	other threads:[~2009-12-22 14:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-21 21:26 [dracut] Loading of modules that don't have a uevent or pci device: ideas? Konrad Rzeszutek Wilk
     [not found] ` <20091221212600.GA7132-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2009-12-22 14:28   ` Harald Hoyer [this message]
     [not found]     ` <4B30D79F.9080506-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2009-12-22 15:22       ` Konrad Rzeszutek Wilk
     [not found]         ` <20091222152221.GC2785-6K5HmflnPlqSPmnEAIUT9EEOCMrvLtNR@public.gmane.org>
2010-01-11 15:40           ` Hannes Reinecke
     [not found]             ` <4B4B465E.4000308-l3A5Bk7waGM@public.gmane.org>
2010-01-13  7:39               ` Luca Berra
2010-01-18  9:12   ` Harald Hoyer

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=4B30D79F.9080506@redhat.com \
    --to=harald-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
    --cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@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