Skip to contentSkip to conversation

ANNOUNCE: User-space System Device Enumation (uSDE)

DISCUSSION David Dodge 2 participants 3 messages Oct 31, 2003 MD RAID

lore
Share & tools
lore
#0 lore raw
Quoted 2 lines · Greg KH
Quoted 1 line · Min

2.For non-hotplug device

[...]

Quoted 6 lines
Quoted 2 lines

uDEV:
not deal with it

See Robert Love's very simple script to populate stuff from sysfs. It can run from initscript just like SDE. But in the end, udev will end up in initramfs and we will not need to do this.

So the intent is to have compiled-in drivers for already-attached devices (framebuffer, system disks, loop, whatever) generate calls to /sbin/hotplug within initramfs?

Mainly I'm asking because I did try putting a hotplug script into an initramfs a few weeks ago (using -test7), and it didn't appear to be invoked for e.g. the VESA framebuffer. So I want to make sure this is a "future" capability and not something that should have worked :-)

#1 lore raw
Quoted 11 lines · David Dodge
Quoted 2 lines · Greg KH
Quoted 1 line · Min

2.For non-hotplug device

[...]

Quoted 6 lines
Quoted 2 lines

uDEV:
not deal with it

See Robert Love's very simple script to populate stuff from sysfs. It can run from initscript just like SDE. But in the end, udev will end up in initramfs and we will not need to do this.

Quoted 8 lines

So the intent is to have compiled-in drivers for already-attached devices (framebuffer, system disks, loop, whatever) generate calls to /sbin/hotplug within initramfs?

Mainly I'm asking because I did try putting a hotplug script into an initramfs a few weeks ago (using -test7), and it didn't appear to be invoked for e.g. the VESA framebuffer. So I want to make sure this is a "future" capability and not something that should have worked :-)

This is something that should have worked for you today, /sbin/hotplug does get called during early boot, before init is started up.

thanks,

greg k-h

author
#2 lore raw
Quoted 1 line · Greg KH

On Thu, Oct 30, 2003 at 07:45:08PM -0500, David Dodge wrote:

[...]

Quoted 7 lines
Quoted 4 lines

Mainly I'm asking because I did try putting a hotplug script into an initramfs a few weeks ago (using -test7), and it didn't appear to be invoked for e.g. the VESA framebuffer. So I want to make sure this is a "future" capability and not something that should have worked :-)

This is something that should have worked for you today, /sbin/hotplug does get called during early boot, before init is started up.

Okay, I'll keep working at it. Unfortunately my main test system has since had a major hardware failure and I haven't gotten a replacement set up yet.

In the meantime, from a quick look at the kernel code I see this:

- invocations of /sbin/hotplug normally go through call_usermodehelper.

- kernel/kmod.c: call_usermodehelper does this prior to scheduling

    any work:

        if (!system_running)
                return -EBUSY;

- init/main.c: system_running is not set non-zero until just prior to starting init.

So it looks like calls to hotplug are dropped while compiled-in drivers are initializing. Or am I missing something obvious? I needed a one-line patch to be able to boot into initramfs; do I need another to enable call_usermodehelper earlier?