* Preferred way to load non-free firmware
@ 2003-03-26 1:32 Pavel Roskin
2003-03-26 4:11 ` Greg KH
2003-03-26 10:51 ` Erik Hensema
0 siblings, 2 replies; 8+ messages in thread
From: Pavel Roskin @ 2003-03-26 1:32 UTC (permalink / raw)
To: linux-kernel
Hello!
I'm writing a Linux device driver for a device that requires non-free
firmware in order to function. The firmware can be easily extracted from
the Windows driver for that device. The device is a PCMCIA wireless card.
The firmware is about 60k in size, and it mostly consists of executable
code for ARM processor. Reimplementing it is out of question for me.
What would be the best approach to handle this situation:
1) Register a file on procfs and use "cat" to load the firmware into the
kernel.
2) Register a device for the same purpose.
3) Register a device, but use ioctl().
4) Open a network socket and use ioctl() on it (like ifconfig does).
5) Use one of the the above ways to send the filename to the module and
let the module load the firmware from file using do_generic_file_read().
6) Provide a script to wrap firmware into a module and load it using
modprobe.
7) Encode the firmware into a header file, add it to the driver and
pretend that the copyright issue doesn't exist (like it's done in the
Keyspan USB driver).
Better ideas?
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Preferred way to load non-free firmware
2003-03-26 1:32 Preferred way to load non-free firmware Pavel Roskin
@ 2003-03-26 4:11 ` Greg KH
2003-03-26 10:48 ` Nick Craig-Wood
2003-03-26 10:51 ` Erik Hensema
1 sibling, 1 reply; 8+ messages in thread
From: Greg KH @ 2003-03-26 4:11 UTC (permalink / raw)
To: Pavel Roskin; +Cc: linux-kernel
On Tue, Mar 25, 2003 at 08:32:50PM -0500, Pavel Roskin wrote:
>
> 1) Register a file on procfs and use "cat" to load the firmware into the
> kernel.
That would work.
> 2) Register a device for the same purpose.
>
> 3) Register a device, but use ioctl().
>
> 4) Open a network socket and use ioctl() on it (like ifconfig does).
That's a nice way, as you don't need to register a device.
> 5) Use one of the the above ways to send the filename to the module and
> let the module load the firmware from file using do_generic_file_read().
Ick, I wouldn't recommend having the kernel do this, it's nicer to have
userspace do the firmware send.
> 6) Provide a script to wrap firmware into a module and load it using
> modprobe.
I don't think that this would be accepted into the main kernel tree, and
vendors might have a problem with it.
> 7) Encode the firmware into a header file, add it to the driver and
> pretend that the copyright issue doesn't exist (like it's done in the
> Keyspan USB driver).
Hey, that's the way I like doing this stuff :)
Almost any of the above would probably work well, and I think all except
#5 and #6 are currently done in the main kernel tree.
Good luck,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Preferred way to load non-free firmware
2003-03-26 4:11 ` Greg KH
@ 2003-03-26 10:48 ` Nick Craig-Wood
2003-03-26 12:47 ` Oliver Neukum
0 siblings, 1 reply; 8+ messages in thread
From: Nick Craig-Wood @ 2003-03-26 10:48 UTC (permalink / raw)
To: Greg KH; +Cc: Pavel Roskin, linux-kernel
On Tue, Mar 25, 2003 at 08:11:46PM -0800, Greg KH wrote:
> > 7) Encode the firmware into a header file, add it to the driver and
> > pretend that the copyright issue doesn't exist (like it's done in the
> > Keyspan USB driver).
>
> Hey, that's the way I like doing this stuff :)
If you do this the Debian kernel mainainers will mercilessly rip your
non-free driver firmware from the standard Debian kernel. At least
that is what happened with the Keyspan :-(
--
Nick Craig-Wood
ncw1@axis.demon.co.uk
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Preferred way to load non-free firmware
2003-03-26 10:48 ` Nick Craig-Wood
@ 2003-03-26 12:47 ` Oliver Neukum
2003-03-26 13:52 ` Jeremy Jackson
0 siblings, 1 reply; 8+ messages in thread
From: Oliver Neukum @ 2003-03-26 12:47 UTC (permalink / raw)
To: Nick Craig-Wood, Greg KH; +Cc: Pavel Roskin, linux-kernel
Am Mittwoch, 26. März 2003 11:48 schrieb Nick Craig-Wood:
> On Tue, Mar 25, 2003 at 08:11:46PM -0800, Greg KH wrote:
> > > 7) Encode the firmware into a header file, add it to the driver and
> > > pretend that the copyright issue doesn't exist (like it's done in the
> > > Keyspan USB driver).
> >
> > Hey, that's the way I like doing this stuff :)
>
> If you do this the Debian kernel mainainers will mercilessly rip your
> non-free driver firmware from the standard Debian kernel. At least
> that is what happened with the Keyspan :-(
That's their problem then. Or rather their users.
IMHO a maintainer's responsibility ends at kernel.org.
>From a technical point of view the firmware needs to be
in ram when you resume from sleep. If you don't care about
updating it, having it in the kernel image uses somewhat less
resources. So I'd say go for it.
Regards
Oliver
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Preferred way to load non-free firmware
2003-03-26 12:47 ` Oliver Neukum
@ 2003-03-26 13:52 ` Jeremy Jackson
2003-03-26 16:19 ` Oliver Neukum
0 siblings, 1 reply; 8+ messages in thread
From: Jeremy Jackson @ 2003-03-26 13:52 UTC (permalink / raw)
To: oliver; +Cc: Nick Craig-Wood, Greg KH, Pavel Roskin, linux-kernel
Check the list archive, there was someone telling about support they
added for binary blobs in /proc (or was it sysfs?) for this (among
others) very purpose.
Please don't make the situation any worse. I'd like to have some hope
that Debian my publish their kernel-source package with a
linux-x.x.x.tar.bz2 that matches the md5sum of the one on kernel.org
some day.
Regards,
Jeremy
On Wed, 2003-03-26 at 07:47, Oliver Neukum wrote:
> Am Mittwoch, 26. März 2003 11:48 schrieb Nick Craig-Wood:
> > On Tue, Mar 25, 2003 at 08:11:46PM -0800, Greg KH wrote:
> > > > 7) Encode the firmware into a header file, add it to the driver and
> > > > pretend that the copyright issue doesn't exist (like it's done in the
> > > > Keyspan USB driver).
> > >
> > > Hey, that's the way I like doing this stuff :)
> >
> > If you do this the Debian kernel mainainers will mercilessly rip your
> > non-free driver firmware from the standard Debian kernel. At least
> > that is what happened with the Keyspan :-(
>
> That's their problem then. Or rather their users.
> IMHO a maintainer's responsibility ends at kernel.org.
> >From a technical point of view the firmware needs to be
> in ram when you resume from sleep. If you don't care about
> updating it, having it in the kernel image uses somewhat less
> resources. So I'd say go for it.
>
> Regards
> Oliver
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Preferred way to load non-free firmware
2003-03-26 13:52 ` Jeremy Jackson
@ 2003-03-26 16:19 ` Oliver Neukum
0 siblings, 0 replies; 8+ messages in thread
From: Oliver Neukum @ 2003-03-26 16:19 UTC (permalink / raw)
To: Jeremy Jackson; +Cc: Nick Craig-Wood, Greg KH, Pavel Roskin, linux-kernel
Am Mittwoch, 26. März 2003 14:52 schrieb Jeremy Jackson:
> Check the list archive, there was someone telling about support they
> added for binary blobs in /proc (or was it sysfs?) for this (among
> others) very purpose.
>
> Please don't make the situation any worse. I'd like to have some hope
> that Debian my publish their kernel-source package with a
> linux-x.x.x.tar.bz2 that matches the md5sum of the one on kernel.org
> some day.
I am sure such a patch, if the Debian people would get it into the
mainline kernel, would find its use.
But failing that I see no reason why any coder should jump through
hoops for the nontechnical concerns of any distribution, including Debian.
Using procfs for this is messier than including it in a header file.
Regards
Oliver
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Preferred way to load non-free firmware
2003-03-26 1:32 Preferred way to load non-free firmware Pavel Roskin
2003-03-26 4:11 ` Greg KH
@ 2003-03-26 10:51 ` Erik Hensema
1 sibling, 0 replies; 8+ messages in thread
From: Erik Hensema @ 2003-03-26 10:51 UTC (permalink / raw)
To: linux-kernel
Pavel Roskin (proski@gnu.org) wrote:
> 7) Encode the firmware into a header file, add it to the driver and
> pretend that the copyright issue doesn't exist (like it's done in the
> Keyspan USB driver).
It doesn't exist. At lost, not on the part of Linux. The license of the
firmware may prohibit it.
The way I interpret the GPL you may link _any_ _data_ into a GPL'ed
program. Since this firmware is _data_ from the point of view of the kernel
(eg. the stream of execution never enters the firmware and it isn't mapped
to a text segment) there shouldn't be any problem.
It may still be preferable to choose another option, but linking the
firmware into a module has the advantage of the user being able to do
module autoloading without further configuration (eg. post-install lines in
modules.conf).
--
Erik Hensema <erik@hensema.net>
^ permalink raw reply [flat|nested] 8+ messages in thread
[parent not found: <Pine.LNX.4.50.0303252007420.6656-100000@marabou.research.a tt.com>]
* Re: Preferred way to load non-free firmware
[not found] <Pine.LNX.4.50.0303252007420.6656-100000@marabou.research.a tt.com>
@ 2003-03-27 1:38 ` Max Krasnyansky
0 siblings, 0 replies; 8+ messages in thread
From: Max Krasnyansky @ 2003-03-27 1:38 UTC (permalink / raw)
To: Pavel Roskin, linux-kernel
At 05:32 PM 3/25/2003, Pavel Roskin wrote:
>Hello!
>
>I'm writing a Linux device driver for a device that requires non-free
>firmware in order to function. The firmware can be easily extracted from
>the Windows driver for that device. The device is a PCMCIA wireless card.
>
>The firmware is about 60k in size, and it mostly consists of executable
>code for ARM processor. Reimplementing it is out of question for me.
>
>What would be the best approach to handle this situation:
>
>1) Register a file on procfs and use "cat" to load the firmware into the
>kernel.
>
>2) Register a device for the same purpose.
>
>3) Register a device, but use ioctl().
>
>4) Open a network socket and use ioctl() on it (like ifconfig does).
>
>5) Use one of the the above ways to send the filename to the module and
>let the module load the firmware from file using do_generic_file_read().
>
>6) Provide a script to wrap firmware into a module and load it using
>modprobe.
>
>7) Encode the firmware into a header file, add it to the driver and
>pretend that the copyright issue doesn't exist (like it's done in the
>Keyspan USB driver).
>
>Better ideas?
8) Have the driver call external user-space firmware loader that uses
either iopl/outb/inb or mmap(/dev/mem) and loads firmware directly.
Max
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-03-27 1:27 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-03-26 1:32 Preferred way to load non-free firmware Pavel Roskin
2003-03-26 4:11 ` Greg KH
2003-03-26 10:48 ` Nick Craig-Wood
2003-03-26 12:47 ` Oliver Neukum
2003-03-26 13:52 ` Jeremy Jackson
2003-03-26 16:19 ` Oliver Neukum
2003-03-26 10:51 ` Erik Hensema
[not found] <Pine.LNX.4.50.0303252007420.6656-100000@marabou.research.a tt.com>
2003-03-27 1:38 ` Max Krasnyansky
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.