From b4830dbdb19381ab571555d8b7e631442d5b1f8c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Wed, 15 Jul 2009 01:23:53 +0000 Subject: [PATCH] Add firmware-linux-free package containing DFSG-free firmware. Make kernel image packages recommend it. svn path=/dists/trunk/linux-2.6/; revision=13934 --- debian/changelog | 1 + debian/rules.real | 16 +++++++++++++++- debian/templates/control.image.type-plain.in | 1 + debian/templates/control.main.in | 10 ++++++++++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 6780e16f8..f02745c50 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ linux-2.6 (2.6.31~rc3-1~experimental.1) UNRELEASED; urgency=low [ Ben Hutchings ] * mga: remove unnecessary change from firmware-loading patch * cxgb3: remove PHY firmware and use request_firmware() to load it + * Add firmware-linux-free package containing DFSG-free firmware [ Martin Michlmayr ] * [armel/orion5x, armel/kirkwood] Set GPIO_SYSFS=y since these diff --git a/debian/rules.real b/debian/rules.real index 18d5bd723..ed50d86c3 100644 --- a/debian/rules.real +++ b/debian/rules.real @@ -45,6 +45,7 @@ binary-indep: install-patch binary-indep: install-source binary-indep: install-support binary-indep: install-tree +binary-indep: install-firmware build: $(STAMPS_DIR)/build_$(ARCH)_$(FEATURESET)_$(FLAVOUR)_$(TYPE) @@ -312,7 +313,6 @@ ifeq ($(MODULES),True) cp $(DIR)/.config $(PACKAGE_DIR)/boot/config-$(REAL_VERSION) cp $(DIR)/System.map $(PACKAGE_DIR)/boot/System.map-$(REAL_VERSION) rm $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/{build,source,modules.*} - # TODO: Move somewhere else rm $(PACKAGE_DIR)/lib/firmware -rf endif +$(MAKE_SELF) \ @@ -452,4 +452,18 @@ install-tree: DH_OPTIONS = -plinux-tree-$(VERSION) install-tree: +$(MAKE_SELF) install-dummy DH_OPTIONS='$(DH_OPTIONS)' +install-firmware: PACKAGE_NAME = firmware-linux-free +install-firmware: DIR = $(BUILD_DIR)/build-firmware +install-firmware: SOURCE_DIR = $(BUILD_DIR)/source +install-firmware: PACKAGE_DIR = debian/$(PACKAGE_NAME) +install-firmware: DH_OPTIONS := -p$(PACKAGE_NAME) +install-firmware: $(STAMPS_DIR)/source + dh_testdir + dh_testroot + dh_prep + rm -rf '$(DIR)' + mkdir '$(DIR)' + +$(MAKE_CLEAN) -C '$(SOURCE_DIR)' O='$(CURDIR)/$(DIR)' INSTALL_MOD_PATH='$(CURDIR)'/$(PACKAGE_DIR) firmware_install + +$(MAKE_SELF) install-base DH_OPTIONS='$(DH_OPTIONS)' + # vim: filetype=make diff --git a/debian/templates/control.image.type-plain.in b/debian/templates/control.image.type-plain.in index ff3914f21..92a96bacf 100644 --- a/debian/templates/control.image.type-plain.in +++ b/debian/templates/control.image.type-plain.in @@ -2,6 +2,7 @@ Package: linux-image-@upstreamversion@@abiname@@localversion@ Provides: linux-image, linux-image-@major@, linux-modules-@upstreamversion@@abiname@@localversion@ Pre-Depends: debconf | debconf-2.0 Depends: module-init-tools, ${shlibs:Depends} +Recommends: firmware-linux-free (>= @source_upstream@) Suggests: linux-doc-@version@ Description: Linux @upstreamversion@ image on @class@ This package provides the binary image and pre-built loadable modules for diff --git a/debian/templates/control.main.in b/debian/templates/control.main.in index d72e779fd..59adabe7b 100644 --- a/debian/templates/control.main.in +++ b/debian/templates/control.main.in @@ -57,3 +57,13 @@ Description: Debian patches to version @version@ of the Linux kernel Note that these patches do NOT apply against a pristine Linux @version@ kernel but only against the kernel tarball linux-@major@_@source_upstream@.orig.tar.gz from the Debian archive. + +Package: firmware-linux-free +Architecture: all +Description: Binary firmware for various drivers in the Linux kernel + This package contains firmware which was previously included in the + Linux kernel and which is compliant with the Debian Free Software + Guidelines. + . + Most firmware previously included in the Linux kernel is non-free + and has been moved to the firmware-linux-nonfree package.