aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan McDowell <noodles@earth.li>2008-09-13 12:08:31 -0400
committerSam Ravnborg <sam@ravnborg.org>2008-11-09 17:02:58 -0500
commitbf1b36445dc868cbbde194aa1dd87e38fe24cf16 (patch)
treef298decccf3eebf70ad3c104319f27191db168ee
parent15a2ee74d22674c58f347b16b3af5601fa4e15db (diff)
kbuild: Fixup deb-pkg target to generate separate firmware deb
The below is a simplistic fix for "make deb-pkg"; it splits the firmware out to a linux-firmware-image package and adds an (unversioned) Suggests to the linux package for this firmware. Signed-Off-By: Jonathan McDowell <noodles@earth.li> Acked-by: Frans Pop <elendil@planet.nl> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r--scripts/package/builddeb24
1 files changed, 22 insertions, 2 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index ba6bf5d5abf9..1264b8e2829d 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -15,15 +15,18 @@ set -e
15version=$KERNELRELEASE 15version=$KERNELRELEASE
16revision=`cat .version` 16revision=`cat .version`
17tmpdir="$objtree/debian/tmp" 17tmpdir="$objtree/debian/tmp"
18fwdir="$objtree/debian/fwtmp"
18packagename=linux-$version 19packagename=linux-$version
20fwpackagename=linux-firmware-image
19 21
20if [ "$ARCH" == "um" ] ; then 22if [ "$ARCH" == "um" ] ; then
21 packagename=user-mode-linux-$version 23 packagename=user-mode-linux-$version
22fi 24fi
23 25
24# Setup the directory structure 26# Setup the directory structure
25rm -rf "$tmpdir" 27rm -rf "$tmpdir" "$fwdir"
26mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" 28mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot"
29mkdir -p "$fwdir/DEBIAN" "$fwdir/lib"
27if [ "$ARCH" == "um" ] ; then 30if [ "$ARCH" == "um" ] ; then
28 mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin" 31 mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin"
29fi 32fi
@@ -107,6 +110,7 @@ Standards-Version: 3.6.1
107 110
108Package: $packagename 111Package: $packagename
109Provides: kernel-image-$version, linux-image-$version 112Provides: kernel-image-$version, linux-image-$version
113Suggests: $fwpackagename
110Architecture: any 114Architecture: any
111Description: Linux kernel, version $version 115Description: Linux kernel, version $version
112 This package contains the Linux kernel, modules and corresponding other 116 This package contains the Linux kernel, modules and corresponding other
@@ -118,8 +122,24 @@ fi
118chown -R root:root "$tmpdir" 122chown -R root:root "$tmpdir"
119chmod -R go-w "$tmpdir" 123chmod -R go-w "$tmpdir"
120 124
125# Do we have firmware? Move it out of the way and build it into a package.
126if [ -e "$tmpdir/lib/firmware" ]; then
127 mv "$tmpdir/lib/firmware" "$fwdir/lib/"
128
129 cat <<EOF >> debian/control
130
131Package: $fwpackagename
132Architecture: all
133Description: Linux kernel firmware, version $version
134 This package contains firmware from the Linux kernel, version $version
135EOF
136
137 dpkg-gencontrol -isp -p$fwpackagename -P"$fwdir"
138 dpkg --build "$fwdir" ..
139fi
140
121# Perform the final magic 141# Perform the final magic
122dpkg-gencontrol -isp 142dpkg-gencontrol -isp -p$packagename
123dpkg --build "$tmpdir" .. 143dpkg --build "$tmpdir" ..
124 144
125exit 0 145exit 0