Commit c0319b50 authored by Anisse Astier's avatar Anisse Astier Committed by Ben Hutchings

deb-pkg: use KCONFIG_CONFIG instead of .config file directly

commit d2091767 upstream.
Signed-off-by: default avatarAnisse Astier <anisse@astier.eu>
Reviewed-by: default avatarBen Hutchings <ben@decadent.org.uk>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent caa53449
...@@ -41,9 +41,9 @@ create_package() { ...@@ -41,9 +41,9 @@ create_package() {
parisc*) parisc*)
debarch=hppa ;; debarch=hppa ;;
mips*) mips*)
debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y .config && echo el) ;; debarch=mips$(grep -q CPU_LITTLE_ENDIAN=y $KCONFIG_CONFIG && echo el) ;;
arm*) arm*)
debarch=arm$(grep -q CONFIG_AEABI=y .config && echo el) ;; debarch=arm$(grep -q CONFIG_AEABI=y $KCONFIG_CONFIG && echo el) ;;
*) *)
echo "" >&2 echo "" >&2
echo "** ** ** WARNING ** ** **" >&2 echo "** ** ** WARNING ** ** **" >&2
...@@ -105,12 +105,12 @@ fi ...@@ -105,12 +105,12 @@ fi
if [ "$ARCH" = "um" ] ; then if [ "$ARCH" = "um" ] ; then
$MAKE linux $MAKE linux
cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map" cp System.map "$tmpdir/usr/lib/uml/modules/$version/System.map"
cp .config "$tmpdir/usr/share/doc/$packagename/config" cp $KCONFIG_CONFIG "$tmpdir/usr/share/doc/$packagename/config"
gzip "$tmpdir/usr/share/doc/$packagename/config" gzip "$tmpdir/usr/share/doc/$packagename/config"
cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version" cp $KBUILD_IMAGE "$tmpdir/usr/bin/linux-$version"
else else
cp System.map "$tmpdir/boot/System.map-$version" cp System.map "$tmpdir/boot/System.map-$version"
cp .config "$tmpdir/boot/config-$version" cp $KCONFIG_CONFIG "$tmpdir/boot/config-$version"
# Not all arches include the boot path in KBUILD_IMAGE # Not all arches include the boot path in KBUILD_IMAGE
if [ -e $KBUILD_IMAGE ]; then if [ -e $KBUILD_IMAGE ]; then
cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version" cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
...@@ -119,7 +119,7 @@ else ...@@ -119,7 +119,7 @@ else
fi fi
fi fi
if grep -q '^CONFIG_MODULES=y' .config ; then if grep -q '^CONFIG_MODULES=y' $KCONFIG_CONFIG ; then
INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install INSTALL_MOD_PATH="$tmpdir" make KBUILD_SRC= modules_install
if [ "$ARCH" = "um" ] ; then if [ "$ARCH" = "um" ] ; then
mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/" mv "$tmpdir/lib/modules/$version"/* "$tmpdir/usr/lib/uml/modules/$version/"
...@@ -240,11 +240,12 @@ fi ...@@ -240,11 +240,12 @@ fi
# Build header package # Build header package
(cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles") (cd $srctree; find . -name Makefile -o -name Kconfig\* -o -name \*.pl > "$objtree/debian/hdrsrcfiles")
(cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles") (cd $srctree; find arch/$SRCARCH/include include scripts -type f >> "$objtree/debian/hdrsrcfiles")
(cd $objtree; find .config Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles") (cd $objtree; find Module.symvers include scripts -type f >> "$objtree/debian/hdrobjfiles")
destdir=$kernel_headers_dir/usr/src/linux-headers-$version destdir=$kernel_headers_dir/usr/src/linux-headers-$version
mkdir -p "$destdir" mkdir -p "$destdir"
(cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -) (cd $srctree; tar -c -f - -T "$objtree/debian/hdrsrcfiles") | (cd $destdir; tar -xf -)
(cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -)
(cd $objtree; cp $KCONFIG_CONFIG $destdir/.config) # copy .config manually to be where it's expected to be
rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles"
arch=$(dpkg --print-architecture) arch=$(dpkg --print-architecture)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment