diff options
author | Jonathan McDowell <noodles@earth.li> | 2008-09-13 12:08:31 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2008-11-09 17:02:58 -0500 |
commit | bf1b36445dc868cbbde194aa1dd87e38fe24cf16 (patch) | |
tree | f298decccf3eebf70ad3c104319f27191db168ee /scripts | |
parent | 15a2ee74d22674c58f347b16b3af5601fa4e15db (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>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/package/builddeb | 24 |
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 | |||
15 | version=$KERNELRELEASE | 15 | version=$KERNELRELEASE |
16 | revision=`cat .version` | 16 | revision=`cat .version` |
17 | tmpdir="$objtree/debian/tmp" | 17 | tmpdir="$objtree/debian/tmp" |
18 | fwdir="$objtree/debian/fwtmp" | ||
18 | packagename=linux-$version | 19 | packagename=linux-$version |
20 | fwpackagename=linux-firmware-image | ||
19 | 21 | ||
20 | if [ "$ARCH" == "um" ] ; then | 22 | if [ "$ARCH" == "um" ] ; then |
21 | packagename=user-mode-linux-$version | 23 | packagename=user-mode-linux-$version |
22 | fi | 24 | fi |
23 | 25 | ||
24 | # Setup the directory structure | 26 | # Setup the directory structure |
25 | rm -rf "$tmpdir" | 27 | rm -rf "$tmpdir" "$fwdir" |
26 | mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" | 28 | mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" |
29 | mkdir -p "$fwdir/DEBIAN" "$fwdir/lib" | ||
27 | if [ "$ARCH" == "um" ] ; then | 30 | if [ "$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" |
29 | fi | 32 | fi |
@@ -107,6 +110,7 @@ Standards-Version: 3.6.1 | |||
107 | 110 | ||
108 | Package: $packagename | 111 | Package: $packagename |
109 | Provides: kernel-image-$version, linux-image-$version | 112 | Provides: kernel-image-$version, linux-image-$version |
113 | Suggests: $fwpackagename | ||
110 | Architecture: any | 114 | Architecture: any |
111 | Description: Linux kernel, version $version | 115 | Description: 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 | |||
118 | chown -R root:root "$tmpdir" | 122 | chown -R root:root "$tmpdir" |
119 | chmod -R go-w "$tmpdir" | 123 | chmod -R go-w "$tmpdir" |
120 | 124 | ||
125 | # Do we have firmware? Move it out of the way and build it into a package. | ||
126 | if [ -e "$tmpdir/lib/firmware" ]; then | ||
127 | mv "$tmpdir/lib/firmware" "$fwdir/lib/" | ||
128 | |||
129 | cat <<EOF >> debian/control | ||
130 | |||
131 | Package: $fwpackagename | ||
132 | Architecture: all | ||
133 | Description: Linux kernel firmware, version $version | ||
134 | This package contains firmware from the Linux kernel, version $version | ||
135 | EOF | ||
136 | |||
137 | dpkg-gencontrol -isp -p$fwpackagename -P"$fwdir" | ||
138 | dpkg --build "$fwdir" .. | ||
139 | fi | ||
140 | |||
121 | # Perform the final magic | 141 | # Perform the final magic |
122 | dpkg-gencontrol -isp | 142 | dpkg-gencontrol -isp -p$packagename |
123 | dpkg --build "$tmpdir" .. | 143 | dpkg --build "$tmpdir" .. |
124 | 144 | ||
125 | exit 0 | 145 | exit 0 |