2011-05-06 10:15:24

by Michal Marek

[permalink] [raw]
Subject: Re: [PATCH] Add $KERNELRELEASE to firmware install path

(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.)

On 5.5.2011 19:39, Arun Sharma wrote:
> 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

Acked-by: Michal Marek <[email protected]>


> Signed-off-by: Arun Sharma<[email protected]>
>
> diff --git a/Makefile b/Makefile
> index e712243..cb715df 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -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


2011-05-06 10:18:39

by David Woodhouse

[permalink] [raw]
Subject: Re: [PATCH] Add $KERNELRELEASE to firmware install path

On Fri, 2011-05-06 at 12:15 +0200, Michal Marek wrote:
>
> On 5.5.2011 19:39, Arun Sharma wrote:
> > 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.

--
dwmw2

2011-05-06 18:49:44

by Arun Sharma

[permalink] [raw]
Subject: Re: [PATCH] Add $KERNELRELEASE to firmware install path

On Fri, May 06, 2011 at 11:18:32AM +0100, David Woodhouse wrote:
> On Fri, 2011-05-06 at 12:15 +0200, Michal Marek wrote:
> >
> > On 5.5.2011 19:39, Arun Sharma wrote:
> > > 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

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

2011-05-06 19:02:41

by David Woodhouse

[permalink] [raw]
Subject: Re: [PATCH] Add $KERNELRELEASE to firmware install path

On Fri, 2011-05-06 at 11:44 -0700, Arun Sharma wrote:
>
> 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.


--
dwmw2

2011-05-06 22:37:29

by Arun Sharma

[permalink] [raw]
Subject: Re: [PATCH] Add $KERNELRELEASE to firmware install path

On Fri, May 06, 2011 at 08:02:36PM +0100, David Woodhouse wrote:
> On Fri, 2011-05-06 at 11:44 -0700, Arun Sharma wrote:
> >
> > 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

2011-05-16 14:21:22

by Michal Marek

[permalink] [raw]
Subject: Re: [PATCH] Add $KERNELRELEASE to firmware install path

On Fri, May 06, 2011 at 03:37:27PM -0700, Arun Sharma wrote:
> On Fri, May 06, 2011 at 08:02:36PM +0100, David Woodhouse wrote:
> > On Fri, 2011-05-06 at 11:44 -0700, Arun Sharma wrote:
> > >
> > > 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?

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

Michal

2011-05-17 11:23:43

by David Woodhouse

[permalink] [raw]
Subject: Re: [PATCH] Add $KERNELRELEASE to firmware install path

On Mon, 2011-05-16 at 16:21 +0200, Michal Marek wrote:
>
> 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*.

--
dwmw2

2011-05-17 11:37:33

by Michal Marek

[permalink] [raw]
Subject: Re: [PATCH] Add $KERNELRELEASE to firmware install path

On 17.5.2011 13:23, David Woodhouse wrote:
> On Mon, 2011-05-16 at 16:21 +0200, Michal Marek wrote:
>>
>> 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