Skip to contentSkip to conversation

RFC: install firmware in a kernel-dependent directory

DISCUSSION Michael Riepe 5 participants 7 messages Feb 14, 2009

lore
Share & tools
lore
#0 lore raw

Currently, make firmware_install puts all firmware blobs in /lib/firmware. If you have several kernel versions installed, they will overwrite each other's files, which may lead to problems if the blobs eventually change. I think it would be better to use a separate directory for every kernel version, like /lib/firmware/$(uname -r) or /lib/modules/$(uname -r)/firmware (the latter is my favorite).

In either case, only a minimal modification in /lib/udev/firmware.sh is required to make it look in the new directory first.

Comments?

Signature · 2 lines
Michael "Tired" Riepe <[email protected]>
X-Tired: Each morning I get up I die a little
#1 lore raw
Quoted 11 lines · Michael Riepe

Currently, make firmware_install puts all firmware blobs in /lib/firmware. If you have several kernel versions installed, they will overwrite each other's files, which may lead to problems if the blobs eventually change. I think it would be better to use a separate directory for every kernel version, like /lib/firmware/$(uname -r) or /lib/modules/$(uname -r)/firmware (the latter is my favorite).

In either case, only a minimal modification in /lib/udev/firmware.sh is required to make it look in the new directory first.

Comments?

Seems reasonable to me, it seemed rather bizarre to me that this wasn't done in the first place..

#2 lore raw
In reply to Michael Riepe
Quoted 11 lines · Michael Riepe

Currently, make firmware_install puts all firmware blobs in /lib/firmware. If you have several kernel versions installed, they will overwrite each other's files, which may lead to problems if the blobs eventually change. I think it would be better to use a separate directory for every kernel version, like /lib/firmware/$(uname -r) or /lib/modules/$(uname -r)/firmware (the latter is my favorite).

In either case, only a minimal modification in /lib/udev/firmware.sh is required to make it look in the new directory first.

Comments?

firmware version depends on hardware version not by kernel (software) version.

So /lib/firmware is absolutely OK.

--
JSR

#3 lore raw

Hi!

Quoted 1 line · Jaswinder Singh Rajput

firmware version depends on hardware version not by kernel (software) version.

That means that it shouldn't be delivered with the kernel in the first place, right? Neither built in nor as a separate file. Maybe that's an even better solution: distribute it separately.

Which firmware to use is a matter of policy, in my opinion. I may want to use a modified firmware, for example, and put that into /lib/firmware where it belongs. But each time I install a new kernel, it will be replaced with the standard version.

Signature · 2 lines
Michael "Tired" Riepe <[email protected]>
X-Tired: Each morning I get up I die a little
#4 lore raw
Quoted 4 lines · Michael Riepe

That means that it shouldn't be delivered with the kernel in the first place, right? Neither built in nor as a separate file. Maybe that's an even better solution: distribute it separately.

We do. See the linux-firmware.git repository, which contains a bunch of extra firmware too; not just the bits we've stripped out of legacy drivers.

You can completely ignore the firmware that's shipped with the kernel, and you're right -- it should go away. In time I hope it will.

Signature · 1 line
dwmw2
#5 lore raw
In reply to Jaswinder Singh Rajput
Quoted 9 lines · Jaswinder Singh Rajput
Quoted 7 lines · Michael Riepe

Currently, make firmware_install puts all firmware blobs in /lib/firmware. If you have several kernel versions installed, they will overwrite each other's files, which may lead to problems if the blobs eventually change. I think it would be better to use a separate directory for every kernel version, like /lib/firmware/$(uname -r) or /lib/modules/$(uname -r)/firmware (the latter is my favorite).

Quoted 6 lines
Quoted 4 lines

In either case, only a minimal modification in /lib/udev/firmware.sh is required to make it look in the new directory first.

Comments?

firmware version depends on hardware version not by kernel (software) version.

are you sure? different firmware could have different interfaces for the kernel to use.

I don't know if this is a problem in practice (I think I've heard of this), but there is no reason it couldn't be.

David Lang

Quoted 10 lines

So /lib/firmware is absolutely OK.

--
JSR
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

#6 lore raw
Quoted 5 lines · On Sat, 2009-02-14 at 14:12 -0800, [email protected] wrote:

are you sure? different firmware could have different interfaces for the kernel to use.

I don't know if this is a problem in practice (I think I've heard of this), but there is no reason it couldn't be.

It would need different filenames then anyway (like sonames).

Signature · 1 line
dwmw2