Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes

* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: Fixup deb-pkg target to generate separate firmware deb
This commit is contained in:
Linus Torvalds 2008-11-09 16:20:49 -08:00
commit 6f1e94031f
1 changed files with 22 additions and 2 deletions

View File

@ -15,15 +15,18 @@ set -e
version=$KERNELRELEASE version=$KERNELRELEASE
revision=`cat .version` revision=`cat .version`
tmpdir="$objtree/debian/tmp" tmpdir="$objtree/debian/tmp"
fwdir="$objtree/debian/fwtmp"
packagename=linux-$version packagename=linux-$version
fwpackagename=linux-firmware-image
if [ "$ARCH" == "um" ] ; then if [ "$ARCH" == "um" ] ; then
packagename=user-mode-linux-$version packagename=user-mode-linux-$version
fi fi
# Setup the directory structure # Setup the directory structure
rm -rf "$tmpdir" rm -rf "$tmpdir" "$fwdir"
mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot" mkdir -p "$tmpdir/DEBIAN" "$tmpdir/lib" "$tmpdir/boot"
mkdir -p "$fwdir/DEBIAN" "$fwdir/lib"
if [ "$ARCH" == "um" ] ; then if [ "$ARCH" == "um" ] ; then
mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin" mkdir -p "$tmpdir/usr/lib/uml/modules/$version" "$tmpdir/usr/share/doc/$packagename" "$tmpdir/usr/bin"
fi fi
@ -107,6 +110,7 @@ Standards-Version: 3.6.1
Package: $packagename Package: $packagename
Provides: kernel-image-$version, linux-image-$version Provides: kernel-image-$version, linux-image-$version
Suggests: $fwpackagename
Architecture: any Architecture: any
Description: Linux kernel, version $version Description: Linux kernel, version $version
This package contains the Linux kernel, modules and corresponding other This package contains the Linux kernel, modules and corresponding other
@ -118,8 +122,24 @@ fi
chown -R root:root "$tmpdir" chown -R root:root "$tmpdir"
chmod -R go-w "$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 # Perform the final magic
dpkg-gencontrol -isp dpkg-gencontrol -isp -p$packagename
dpkg --build "$tmpdir" .. dpkg --build "$tmpdir" ..
exit 0 exit 0