aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-11-11 09:40:18 +0100
committerIngo Molnar <mingo@elte.hu>2008-11-11 09:40:18 +0100
commite0cb4ebcd9e5b4ddd8216c20f54445c91b1fa4b9 (patch)
treed1c3b22b7e9f02fb56927da530da09c6ee7ce0b9 /scripts
parenta309720c876d7ad2e224bfd1982c92ae4364c82e (diff)
parent45b86a96f17cb2900f291129b0e67287400e45b2 (diff)
Merge branch 'tracing/urgent' into tracing/ftrace
Conflicts: kernel/trace/trace.c
Diffstat (limited to 'scripts')
-rw-r--r--scripts/package/builddeb24
1 files changed, 22 insertions, 2 deletions
diff --git a/scripts/package/builddeb b/scripts/package/builddeb
index ba6bf5d5abf..1264b8e2829 100644
--- a/scripts/package/builddeb
+++ b/scripts/package/builddeb
@@ -15,15 +15,18 @@ set -e
version=$KERNELRELEASE
revision=`cat .version`
tmpdir="$objtree/debian/tmp"
+fwdir="$objtree/debian/fwtmp"
packagename=linux-$version
+fwpackagename=linux-firmware-image
if [ "$ARCH" == "um" ] ; then
packagename=user-mode-linux-$version
fi
# Setup the directory structure
-rm -rf "$tmpdir"
+rm -rf "$tmpdir" "$fwdir"
mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot"
+mkdir -p "$fwdir/DEBIAN" "$fwdir/lib"
if [ "$ARCH" == "um" ] ; then
mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin"
fi
@@ -107,6 +110,7 @@ Standards-Version: 3.6.1
Package: $packagename
Provides: kernel-image-$version, linux-image-$version
+Suggests: $fwpackagename
Architecture: any
Description: Linux kernel, version $version
This package contains the Linux kernel, modules and corresponding other
@@ -118,8 +122,24 @@ fi
chown -R root:root "$tmpdir"
chmod -R go-w "$tmpdir"
+# Do we have firmware? Move it out of the way and build it into a package.
+if [ -e "$tmpdir/lib/firmware" ]; then
+ mv "$tmpdir/lib/firmware" "$fwdir/lib/"
+
+ cat <<EOF >> debian/control
+
+Package: $fwpackagename
+Architecture: all
+Description: Linux kernel firmware, version $version
+ This package contains firmware from the Linux kernel, version $version
+EOF
+
+ dpkg-gencontrol -isp -p$fwpackagename -P"$fwdir"
+ dpkg --build "$fwdir" ..
+fi
+
# Perform the final magic
-dpkg-gencontrol -isp
+dpkg-gencontrol -isp -p$packagename
dpkg --build "$tmpdir" ..
exit 0