Skip to contentSkip to conversation

Add $KERNELRELEASE to firmware install path

PATCH In review Arun Sharma 3 participants 9 messages May 5, 2011 – May 17, 2011 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add $KERNELRELEASE to firmware install path

Useful in the presence of multiple kernels with different firmware versions.

Makefile +1 -1
index e712243..cb715df 100644
@@ -997,7 +997,7 @@ depend dep:
 
 # ---------------------------------------------------------------------------
 # Firmware install
-INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware
+INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware/$(KERNELRELEASE)
 export INSTALL_FW_PATH
 
 PHONY += firmware_install
Acked-by on v1 1/1
#1 lore raw

(Adding David Woodhouse and lkml to CC, in general it's usually better to CC topic lists in addition to lkml, rather than instead of lkml.)

Quoted 2 lines · Arun Sharma

Useful in the presence of multiple kernels with different firmware versions.

The changelog should also include the udev version that is able to find the firmware there (v127, August 2008). FWIW, SUSE has been using this patch since about that time, but we forgot to push this :-|. Anyway

Quoted 19 lines
Makefile +1 -2
index e712243..cb715df 100644
@@ -997,7 +997,7 @@ depend dep:
 
  # ---------------------------------------------------------------------------
  # Firmware install
-INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware
+INSTALL_FW_PATH=$(INSTALL_MOD_PATH)/lib/firmware/$(KERNELRELEASE)
  export INSTALL_FW_PATH
 
  PHONY += firmware_install
--

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

#2 lore raw
Quoted 8 lines · Michal Marek
Quoted 2 lines · Arun Sharma

Useful in the presence of multiple kernels with different firmware versions.

The changelog should also include the udev version that is able to find the firmware there (v127, August 2008). FWIW, SUSE has been using this patch since about that time, but we forgot to push this :-|. Anyway

No, this is fundamentally broken. Do not do it.

The firmware lives in /lib/firmware, not in /lib/firmware/$KERNELVERSION

There is *no* reason to move it there. If a given firmware file changes in an incompatible way, it needs to have had a new filename *anyway* (think of it like a new soname on a shared library).

And we shouldn't be updating the legacy firmware images in the kernel *anyway*; nobody should be using those any more. They were *purely* for backward compatibility. Everyone should be shipping the linux-firmware.git images instead.

Signature · 1 line
dwmw2
#3 lore raw
Quoted 6 lines · David Woodhouse
Quoted 5 lines · Michal Marek
Quoted 2 lines · Arun Sharma

Useful in the presence of multiple kernels with different firmware versions.

Quoted 7 lines
Quoted 3 lines

The changelog should also include the udev version that is able to find the firmware there (v127, August 2008). FWIW, SUSE has been using this patch since about that time, but we forgot to push this :-|. Anyway

No, this is fundamentally broken. Do not do it.

The firmware lives in /lib/firmware, not in /lib/firmware/$KERNELVERSION

I'm not trying to change the way the kernel deals with firmware or anything. Just trying to make the vanilla kernel packaging scripts more usable for us.

Without this change, if you have two kernel rpms/debs from different kernel versions installed, they'll result in a namespace conflict (rpm/deb install will fail), which gets resolved by this patch.

-Arun

#4 lore raw
Quoted 4 lines · Arun Sharma

Without this change, if you have two kernel rpms/debs from different kernel versions installed, they'll result in a namespace conflict (rpm/deb install will fail), which gets resolved by this patch.

The packages are broken then. They shouldn't include *any* files in /lib/firmware.

Fix *that*, and the problem goes away.

Signature · 1 line
dwmw2
#5 lore raw
Quoted 10 lines · David Woodhouse
Quoted 4 lines · Arun Sharma

Without this change, if you have two kernel rpms/debs from different kernel versions installed, they'll result in a namespace conflict (rpm/deb install will fail), which gets resolved by this patch.

The packages are broken then. They shouldn't include *any* files in /lib/firmware.

Fix *that*, and the problem goes away.

Sounds good.

Michal: Should I send you a patch that drops /lib/firmware?

-Arun

#6 lore raw
Quoted 7 lines · Arun Sharma
Quoted 6 lines · David Woodhouse
Quoted 4 lines · Arun Sharma

Without this change, if you have two kernel rpms/debs from different kernel versions installed, they'll result in a namespace conflict (rpm/deb install will fail), which gets resolved by this patch.

Quoted 8 lines
Quoted 4 lines

The packages are broken then. They shouldn't include *any* files in /lib/firmware.

Fix *that*, and the problem goes away.

Sounds good.

Michal: Should I send you a patch that drops /lib/firmware?

make deb-pkg generates a separate package with the firmware files. I would suggest we do the same for rpm.

Michal

#7 lore raw
Quoted 3 lines · Michal Marek

make deb-pkg generates a separate package with the firmware files. I would suggest we do the same for rpm.

No. You should ignore the firmware files *completely*.

Signature · 1 line
dwmw2
#8 lore raw
Quoted 6 lines · David Woodhouse
Quoted 3 lines · Michal Marek

make deb-pkg generates a separate package with the firmware files. I would suggest we do the same for rpm.

No. You should ignore the firmware files *completely*.

make modules_install should ignore them completely. Whether the files are installed directly in /lib/{modules,firmware} or packaged in a rpm and transferred to another machine does not make any difference.

Michal