All of lore.kernel.org
 help / color / mirror / Atom feed
* Mounting sysfs early
@ 2009-06-19 11:15 Will Newton
  2009-06-19 13:26 ` jim owens
  0 siblings, 1 reply; 3+ messages in thread
From: Will Newton @ 2009-06-19 11:15 UTC (permalink / raw)
  To: Linux Kernel list

Hi all,

I currently have a problem with a driver that loads firmware from
userland. The boot process happens in this order:

1. Extract initramfs
2. Load drivers
3. Run init

Unfortunately it appears that step 2 is calling the hotplug helper
which tries to load firmware via sysfs, but sysfs is not mounted until
I have run init so the driver fails to initialise. What is the
recommended way to avoid this situation? Do I have to somehow build
the firmware into the kernel or can I get sysfs mounted before drivers
begin loading?

Thanks,

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

* Re: Mounting sysfs early
  2009-06-19 11:15 Mounting sysfs early Will Newton
@ 2009-06-19 13:26 ` jim owens
  2009-06-19 13:36   ` Will Newton
  0 siblings, 1 reply; 3+ messages in thread
From: jim owens @ 2009-06-19 13:26 UTC (permalink / raw)
  To: Will Newton; +Cc: Linux Kernel list

Will Newton wrote:
> Hi all,
> 
> I currently have a problem with a driver that loads firmware from
> userland. The boot process happens in this order:
> 
> 1. Extract initramfs
> 2. Load drivers
> 3. Run init
> 
> Unfortunately it appears that step 2 is calling the hotplug helper
> which tries to load firmware via sysfs, but sysfs is not mounted until
> I have run init so the driver fails to initialise. What is the
> recommended way to avoid this situation? Do I have to somehow build
> the firmware into the kernel or can I get sysfs mounted before drivers
> begin loading?

you did not say what distro and kernel, but I would expect
sysfs is mounted before step 2 by the intrd.  this is what I
see in a rhel 4.3 I am testing.

what you might be really seeing is

http://bugzilla.kernel.org/show_bug.cgi?id=13178

which I am currently debugging.

jim

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

* Re: Mounting sysfs early
  2009-06-19 13:26 ` jim owens
@ 2009-06-19 13:36   ` Will Newton
  0 siblings, 0 replies; 3+ messages in thread
From: Will Newton @ 2009-06-19 13:36 UTC (permalink / raw)
  To: jim owens; +Cc: Linux Kernel list

On Fri, Jun 19, 2009 at 2:26 PM, jim owens<jowens@hp.com> wrote:
> Will Newton wrote:
>>
>> Hi all,
>>
>> I currently have a problem with a driver that loads firmware from
>> userland. The boot process happens in this order:
>>
>> 1. Extract initramfs
>> 2. Load drivers
>> 3. Run init
>>
>> Unfortunately it appears that step 2 is calling the hotplug helper
>> which tries to load firmware via sysfs, but sysfs is not mounted until
>> I have run init so the driver fails to initialise. What is the
>> recommended way to avoid this situation? Do I have to somehow build
>> the firmware into the kernel or can I get sysfs mounted before drivers
>> begin loading?
>
> you did not say what distro and kernel, but I would expect
> sysfs is mounted before step 2 by the intrd.  this is what I
> see in a rhel 4.3 I am testing.

I'm on an embedded board with kernel 2.6.30 booting with only an
initramfs. I should have been clearer by load drivers I mean run the
device initcalls, for example the rootfs is unpacked at initcall level
"rootfs", which is followed by device initcalls at level 6, which is
followed later by init being run. It's at this last stage that I get
sysfs mounted, which is too late, I'd like it mounted in time for
running initcall level 6. Is this possible?

> what you might be really seeing is
>
> http://bugzilla.kernel.org/show_bug.cgi?id=13178
>
> which I am currently debugging.

I don't think it's the same issue. I actually have no sysfs mounted on
/sys, it's empty.

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

end of thread, other threads:[~2009-06-19 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-19 11:15 Mounting sysfs early Will Newton
2009-06-19 13:26 ` jim owens
2009-06-19 13:36   ` Will Newton

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.