lkml.org 
[lkml]   [2008]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 16/22] kbuild: Fixup deb-pkg target to generate separate firmware deb
    2.6.27-stable review patch.  If anyone has any objections, please let us know.

    ------------------

    From: Jonathan McDowell <noodles@earth.li>

    commit bf1b36445dc868cbbde194aa1dd87e38fe24cf16 upstream.

    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>
    Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

    ---
    scripts/package/builddeb | 24 ++++++++++++++++++++++--
    1 file changed, 22 insertions(+), 2 deletions(-)

    --- 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
    --


    \
     
     \ /
      Last update: 2008-11-15 06:33    [W:0.023 / U:0.588 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site