Subject: Re: Where to put firmware?
To: Lennart Augustsson <lennart@augustsson.net>
From: Jason R Thorpe <thorpej@wasabisystems.com>
List: tech-kern
Date: 08/22/2002 19:11:01
On Fri, Aug 23, 2002 at 03:46:27AM +0200, Lennart Augustsson wrote:

 > The firmware is 100kbyte, so I don't want to bloat the kernel
 > with it.  The firmware loader itself can happily live in the
 > kernel (it's easier for various reasons).
 > So this leads to my question: where in the file system should
 > I put the firmware?  I'd prefer to have it in the root file system,
 > but there's not good a place for it.  I guess /usr/lib/libdata might do,
 > if I don't insist on keeping it in the root.

There's another problem with dynamically loaded firmware -- a proliferation
of *ctl programs to load it.

If we're going to go down this road of dynamically loaded firmware (and,
hey, let's face it -- the cz driver's firmware is pretty big, too), then
we should try to come up with some sort of "abstract-enough" interface
for doing it.

There are a few problems here, of course:

	1. Different device vendors use different formats for their
	   firmware.

	2. Firmware can have metadata assocaited with it.

We will need something that can describe the potentially multiple
sections that the firmware will have.

At first thought, we could hijack ELF for this ... have special programs
that take the firmware contents and wrap it up in ELF program headers.  Then
a simple ELF parser in the kernel to separate out the chunks as needed.

-- 
        -- Jason R. Thorpe <thorpej@wasabisystems.com>