* [PATCH] Prefer kernel-versioned firmware directory. @ 2011-08-17 3:19 linux 2011-08-18 10:12 ` Takashi Iwai 0 siblings, 1 reply; 4+ messages in thread From: linux @ 2011-08-17 3:19 UTC (permalink / raw) To: patch; +Cc: tiwai, Eliot Blennerhassett, alsa-devel From: Eliot Blennerhassett <eblennerhassett@audioscience.com> Different kernel versions may have different driver versions installed, which in turn require different firmware versions. If /lib/firmware/$(uname -r) exists, use it in preference to the generic /lib/firmware. Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> --- configure.in | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/configure.in b/configure.in index c278987..ac9ee52 100644 --- a/configure.in +++ b/configure.in @@ -33,7 +33,9 @@ AM_CONDITIONAL(BUILD_FW, test "$buildfw" = "yes") AC_MSG_CHECKING(firmware installation directory) # where to put the firmware. If none of these is right, can specify where # --with-hotplug-dir -if test -d /lib/firmware ; then +if test -d /lib/firmware/$(uname -r) ; then + detected_fwdir="/lib/firmware/$(uname -r)" +elif test -d /lib/firmware ; then detected_fwdir="/lib/firmware" elif test -d /lib/hotplug/firmware ; then detected_fwdir="/lib/hotplug/firmware" -- 1.7.0.4 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Prefer kernel-versioned firmware directory. 2011-08-17 3:19 [PATCH] Prefer kernel-versioned firmware directory linux @ 2011-08-18 10:12 ` Takashi Iwai 2011-08-18 21:57 ` Eliot Blennerhassett 0 siblings, 1 reply; 4+ messages in thread From: Takashi Iwai @ 2011-08-18 10:12 UTC (permalink / raw) To: linux; +Cc: Eliot Blennerhassett, alsa-devel At Wed, 17 Aug 2011 15:19:23 +1200, linux@audioscience.com wrote: > > From: Eliot Blennerhassett <eblennerhassett@audioscience.com> > > Different kernel versions may have different driver versions installed, > which in turn require different firmware versions. > > If /lib/firmware/$(uname -r) exists, use it in preference to the > generic /lib/firmware. It's no good idea. The installation of the firmware has nothing to do with the running kernel version. The firmware in kernel-tree may be installed in the kernel-version specific directory, but it's basically not for external firmware. In principle, if a firmware is compatible, you must rename it, e.g. with a version suffix, etc. Or, if a firmware is backward compatible, we may keep using the same name. thanks, Takashi > Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com> > --- > configure.in | 4 +++- > 1 files changed, 3 insertions(+), 1 deletions(-) > > diff --git a/configure.in b/configure.in > index c278987..ac9ee52 100644 > --- a/configure.in > +++ b/configure.in > @@ -33,7 +33,9 @@ AM_CONDITIONAL(BUILD_FW, test "$buildfw" = "yes") > AC_MSG_CHECKING(firmware installation directory) > # where to put the firmware. If none of these is right, can specify where > # --with-hotplug-dir > -if test -d /lib/firmware ; then > +if test -d /lib/firmware/$(uname -r) ; then > + detected_fwdir="/lib/firmware/$(uname -r)" > +elif test -d /lib/firmware ; then > detected_fwdir="/lib/firmware" > elif test -d /lib/hotplug/firmware ; then > detected_fwdir="/lib/hotplug/firmware" > -- > 1.7.0.4 > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Prefer kernel-versioned firmware directory. 2011-08-18 10:12 ` Takashi Iwai @ 2011-08-18 21:57 ` Eliot Blennerhassett 2011-08-19 5:29 ` Takashi Iwai 0 siblings, 1 reply; 4+ messages in thread From: Eliot Blennerhassett @ 2011-08-18 21:57 UTC (permalink / raw) To: Takashi Iwai; +Cc: alsa-devel On 18/08/11 22:12, Takashi Iwai wrote: >> From: Eliot Blennerhassett <eblennerhassett@audioscience.com> >> >> Different kernel versions may have different driver versions installed, >> which in turn require different firmware versions. >> >> If /lib/firmware/$(uname -r) exists, use it in preference to the >> generic /lib/firmware. > > It's no good idea. The installation of the firmware has nothing to > do with the running kernel version. But running version of the kernel module may depend on a particular firmware version. > The firmware in kernel-tree may > be installed in the kernel-version specific directory, but it's > basically not for external firmware. External modules are not renamed, they are put in a kernel-versioned directory, so why not the firmware that they need? On this ubuntu installation, there is all sorts of firmware in /lib/firmware/$(uname -r) and in /lib/firmare Some files are duplicated in these locations, some aren't. The former is searched before the latter when firmware is requested. Now, if the system has installed firmware in a versioned directory, and the someone 'updates' from alsa-firmware, they won't get the expected result because the old firmware will be used in preference to the new. > > In principle, if a firmware is not? > compatible, you must rename it, e.g. > with a version suffix, etc. Or, if a firmware is backward compatible, > we may keep using the same name. -- Eliot -- Eliot Blennerhassett AudioScience Inc. ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Prefer kernel-versioned firmware directory. 2011-08-18 21:57 ` Eliot Blennerhassett @ 2011-08-19 5:29 ` Takashi Iwai 0 siblings, 0 replies; 4+ messages in thread From: Takashi Iwai @ 2011-08-19 5:29 UTC (permalink / raw) To: Eliot Blennerhassett; +Cc: alsa-devel At Fri, 19 Aug 2011 09:57:05 +1200, Eliot Blennerhassett wrote: > > On 18/08/11 22:12, Takashi Iwai wrote: > >> From: Eliot Blennerhassett <eblennerhassett@audioscience.com> > >> > >> Different kernel versions may have different driver versions installed, > >> which in turn require different firmware versions. > >> > >> If /lib/firmware/$(uname -r) exists, use it in preference to the > >> generic /lib/firmware. > > > > It's no good idea. The installation of the firmware has nothing to > > do with the running kernel version. > > But running version of the kernel module may depend on a particular > firmware version. Yes, but the files there are installed directly from the kernel tree ($LINUX/firmware/*), not from linux-firmware, alsa-firmware or other external firmware trees. The latter is supposed to be generic to any version, thus installed in /lib/firmware. > > The firmware in kernel-tree may > > be installed in the kernel-version specific directory, but it's > > basically not for external firmware. > > External modules are not renamed, they are put in a kernel-versioned > directory, This is a wrong assumption. > so why not the firmware that they need? > > On this ubuntu installation, there is all sorts of firmware in > /lib/firmware/$(uname -r) and in /lib/firmare > Some files are duplicated in these locations, some aren't. It's because the firmware is included in both trees, kernel and kernel-firmware. > The former is searched before the latter when firmware is requested. Yes, that's the exact reason -- if a conflict happens with the kernel-tree's and external firmware files, prefer the kernel-tree's. > Now, if the system has installed firmware in a versioned directory, and > the someone 'updates' from alsa-firmware, they won't get the expected > result because the old firmware will be used in preference to the new. In your case, there is no firmware files in the kernel tree, thus there is no such conflict. thanks, Takashi > > > > > In principle, if a firmware is > not? > > compatible, you must rename it, e.g. > > with a version suffix, etc. Or, if a firmware is backward compatible, > > we may keep using the same name. > > -- > Eliot > > > > -- > Eliot Blennerhassett > AudioScience Inc. > ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-08-19 5:29 UTC | newest] Thread overview: 4+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-08-17 3:19 [PATCH] Prefer kernel-versioned firmware directory linux 2011-08-18 10:12 ` Takashi Iwai 2011-08-18 21:57 ` Eliot Blennerhassett 2011-08-19 5:29 ` Takashi Iwai
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.