[Lucid-lbm] SRU: Make thinkpad-acpi work with lbm-alsa
Andy Whitcroft
apw at canonical.com
Fri Jul 2 08:30:28 UTC 2010
On Mon, Jun 28, 2010 at 09:41:03PM +0200, Stefan Bader wrote:
> SRU justification:
>
> Impact: As we were "asked" to go ahead and get a very recent thinkpad-acpi
> driver enabled in Lucid, which exports an alsa mixer for the hw mixer that only
> exists for ThinkPads. we now have a problem when people with TPs are asked to
> try the latest ALSA from LBM. After installing LBM-alsa the thinkpad-acpi module
> refuses to load as it wants the other symbol versions from the kernel.
>
> Fix: I don't know of any better way than to put the thinkpad-acpi driver as it
> is in Lucid into LBM and build it against the LBM-alsa core. It is then thrown
> into the alsa package which mixes things a bit but I did not want to create a
> new package for that.
>
> Testcase: Verified that after installing lbm-alsa before caused thinkpad-acpi
> not to be loaded. With the new version this works (and at least the wireless
> card in that machine also still works with lbm-wireless installed.
>
> From 942e7a532fe0674e3c84973a985d3a626e22d0c9 Mon Sep 17 00:00:00 2001
> From: Stefan Bader <stefan.bader at canonical.com>
> Date: Mon, 28 Jun 2010 17:26:47 +0200
> Subject: [PATCH] UBUNTU: SAUCE: Add thinkpad-acpi to modules in the ALSA subpackage
>
> BugLink: http://bugs.launchpad.net/bugs/599527
>
> The thinkpad-acpi driver links against ALSA to provide a mixer interface
> for the hardware mixer of ThinkPads. Without this module being rebuild
> against the LBM ALSA driver it will not load.
>
> This patch takes the version of the thinkpad-acpi driver from Lucid (which
> is a 2.6.34 version anyway) and modifies the build system to build it with
> the updated symbol versions from the LBM ALSA drivers.
>
> Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
> ---
> debian/rules.d/2-binary-arch.mk | 4 +
> updates/BOM | 3 +
> updates/Makefile | 7 +
> updates/thinkpad-acpi/Makefile | 5 +
> updates/thinkpad-acpi/thinkpad_acpi.c | 9126 +++++++++++++++++++++++++++++++++
> 5 files changed, 9145 insertions(+), 0 deletions(-)
> create mode 100644 updates/thinkpad-acpi/Makefile
> create mode 100644 updates/thinkpad-acpi/thinkpad_acpi.c
>
> diff --git a/debian/rules.d/2-binary-arch.mk b/debian/rules.d/2-binary-arch.mk
> index 4dce885..c30c70c 100644
> --- a/debian/rules.d/2-binary-arch.mk
> +++ b/debian/rules.d/2-binary-arch.mk
> @@ -131,6 +131,10 @@ install-%: $(stampdir)/stamp-build-%
> find $(builddir)/build-$*/alsa-driver -type f -name '*.ko' | while read f ; do cp -v $${f} $(csmoddir)/updates/alsa/`basename $${f}`; done
>
> find $(cspkgdir)/ -type f -name \*.ko -print | xargs -r strip --strip-debug
> + # This platform driver needs to be included as it links to ALSA
> + cp $(builddir)/build-$*/thinkpad-acpi/thinkpad_acpi.ko \
> + $(csmoddir)/updates/alsa
> + strip --strip-debug $(csmoddir)/updates/alsa/thinkpad_acpi.ko
>
> install -d $(cspkgdir)/DEBIAN
> for script in postinst postrm; do \
> diff --git a/updates/BOM b/updates/BOM
> index eb490fb..08a0abb 100644
> --- a/updates/BOM
> +++ b/updates/BOM
> @@ -1,6 +1,9 @@
> ALSA:
> ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.23.tar.bz2
>
> +thinkpad-acpi (related to ALSA as it implements a mixer device):
> +git://kernel.ubuntu.com/ubuntu/ubuntu-lucid.git (backported from 2.6.34)
> +
> WIRELESS:
> http://www.orbit-lab.org/kernel/compat-wireless-2.6-stable/v2.6.34/compat-wireless-2.6.34.tar.bz2
>
> diff --git a/updates/Makefile b/updates/Makefile
> index 2a49c26..e6e25b5 100644
> --- a/updates/Makefile
> +++ b/updates/Makefile
> @@ -4,4 +4,11 @@
>
> include $(src)/.config
>
> +#
> +# Declare to have additional module symbol versions.
> +# Must be here as it does not seem to have effect from a sub-directory.
> +#
> +KBUILD_EXTMOD := $(src)/alsa-driver
> +
> obj-y += wireless-staging/
> +obj-y += thinkpad-acpi/
> diff --git a/updates/thinkpad-acpi/Makefile b/updates/thinkpad-acpi/Makefile
> new file mode 100644
> index 0000000..f047a49
> --- /dev/null
> +++ b/updates/thinkpad-acpi/Makefile
> @@ -0,0 +1,5 @@
> +include $(src)/../alsa-driver/Makefile.conf
> +
> +NOSTDINC_FLAGS += -include alsa-autoconf.h
> +
> +obj-m += thinkpad_acpi.o
> diff --git a/updates/thinkpad-acpi/thinkpad_acpi.c b/updates/thinkpad-acpi/thinkpad_acpi.c
> new file mode 100644
> index 0000000..9bb245b
> --- /dev/null
> +++ b/updates/thinkpad-acpi/thinkpad_acpi.c
> @@ -0,0 +1,9126 @@
> +/*
> + * thinkpad_acpi.c - ThinkPad ACPI Extras
> + *
[...]
Looks ok. My only reservation is that the source is now duplicated into
LBM and will have to be maintained in both. As its one file I guess we
can track it by hand. As a side task we could consider getting these
files out of the linux-source tarball which being a binary package
generated by the linux package we could depend on.
Acked-by: Andy Whitcroft <apw at canonical.com>
-apw
More information about the kernel-team
mailing list