2003-11-16 13:09:33

by Pavel Machek

[permalink] [raw]
Subject: Fix firmware loader docs

Hi!

AFAICS, sysfs should be mounted on /sys these days...

--- tmp/linux/Documentation/firmware_class/README 2003-08-27 12:00:01.000000000 +0200
+++ linux/Documentation/firmware_class/README 2003-11-06 13:50:58.000000000 +0100
@@ -60,9 +60,9 @@

HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/

- echo 1 > /sysfs/$DEVPATH/loading
+ echo 1 > /sys/$DEVPATH/loading
cat $HOTPLUG_FW_DIR/$FIRMWARE > /sysfs/$DEVPATH/data
- echo 0 > /sysfs/$DEVPATH/loading
+ echo 0 > /sys/$DEVPATH/loading

Random notes:
============
--- tmp/linux/Documentation/firmware_class/hotplug-script 2003-06-24 12:27:38.000000000 +0200
+++ linux/Documentation/firmware_class/hotplug-script 2003-11-06 13:50:55.000000000 +0100
@@ -6,9 +6,9 @@

HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/

-echo 1 > /sysfs/$DEVPATH/loading
+echo 1 > /sys/$DEVPATH/loading
cat $HOTPLUG_FW_DIR/$FIRMWARE > /sysfs/$DEVPATH/data
-echo 0 > /sysfs/$DEVPATH/loading
+echo 0 > /sys/$DEVPATH/loading

# To cancel the load in case of error:
#

--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


2003-11-16 13:30:41

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Fix firmware loader docs

Hi Pavel,

> AFAICS, sysfs should be mounted on /sys these days...

we can remove the hotplug-script from 2.4 and 2.6 completly, because the
firmware.agent script is now part of the linux-hotplug scripts and there
is no need to write one. You only have to put the firmware file into the
firmware directory, which is by default /usr/lib/hotplug/firmware/ and
everything works as expected.

Regards

Marcel


2003-11-16 13:37:50

by Pavel Machek

[permalink] [raw]
Subject: Re: Fix firmware loader docs

Hi!

> > AFAICS, sysfs should be mounted on /sys these days...
>
> we can remove the hotplug-script from 2.4 and 2.6 completly, because the
> firmware.agent script is now part of the linux-hotplug scripts and there
> is no need to write one. You only have to put the firmware file into the
> firmware directory, which is by default /usr/lib/hotplug/firmware/ and
> everything works as expected.

Well, I'd keep them for a while... To stop people wondering "WTF is
this"?
Pavel
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]

2003-11-16 13:52:44

by Marcel Holtmann

[permalink] [raw]
Subject: Re: Fix firmware loader docs

Hi Pavel,

> > we can remove the hotplug-script from 2.4 and 2.6 completly, because the
> > firmware.agent script is now part of the linux-hotplug scripts and there
> > is no need to write one. You only have to put the firmware file into the
> > firmware directory, which is by default /usr/lib/hotplug/firmware/ and
> > everything works as expected.
>
> Well, I'd keep them for a while... To stop people wondering "WTF is
> this"?

I don't think so. There is a README that should explain this and the
example hotplug-script should go away, because it confuses more than it
helps. The current one looks very different and is working fine for 2.4
and 2.6. If people don't have a firmware.agent script on their system
they can either update the hotplug utils or use the Internet to find
one.

Regards

Marcel


2003-11-16 15:38:47

by Pascal Schmidt

[permalink] [raw]
Subject: Re: Fix firmware loader docs

On Sun, 16 Nov 2003 14:20:15 +0100, you wrote in linux.kernel:

> AFAICS, sysfs should be mounted on /sys these days...
>
> --- tmp/linux/Documentation/firmware_class/README 2003-08-27 12:00:01.000000000 +0200
> +++ linux/Documentation/firmware_class/README 2003-11-06 13:50:58.000000000 +0100
> @@ -60,9 +60,9 @@
>
> HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/
>
> - echo 1 > /sysfs/$DEVPATH/loading
> + echo 1 > /sys/$DEVPATH/loading
> cat $HOTPLUG_FW_DIR/$FIRMWARE > /sysfs/$DEVPATH/data
> - echo 0 > /sysfs/$DEVPATH/loading
> + echo 0 > /sys/$DEVPATH/loading

You need more coffee. You forgot the /sysfs/ on the line with cat. ;)

--
Ciao,
Pascal

2003-11-16 16:57:30

by Pavel Machek

[permalink] [raw]
Subject: Re: Fix firmware loader docs

Hi!

> > AFAICS, sysfs should be mounted on /sys these days...
> >
> > --- tmp/linux/Documentation/firmware_class/README 2003-08-27 12:00:01.000000000 +0200
> > +++ linux/Documentation/firmware_class/README 2003-11-06 13:50:58.000000000 +0100
> > @@ -60,9 +60,9 @@
> >
> > HOTPLUG_FW_DIR=/usr/lib/hotplug/firmware/
> >
> > - echo 1 > /sysfs/$DEVPATH/loading
> > + echo 1 > /sys/$DEVPATH/loading
> > cat $HOTPLUG_FW_DIR/$FIRMWARE > /sysfs/$DEVPATH/data
> > - echo 0 > /sysfs/$DEVPATH/loading
> > + echo 0 > /sys/$DEVPATH/loading
>
> You need more coffee. You forgot the /sysfs/ on the line with cat. ;)

Heh, maybe thats why it did not work for me ;-).
Pavel

--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]