r3284 - in branches/kernel-image-2.6.11/debian: . arch/i386 templates

Jurij Smakov jurij-guest@costa.debian.org
Tue, 31 May 2005 05:49:18 +0000


Author: jurij-guest
Date: 2005-05-31 05:49:17 +0000 (Tue, 31 May 2005)
New Revision: 3284

Modified:
   branches/kernel-image-2.6.11/debian/Makefile
   branches/kernel-image-2.6.11/debian/arch/i386/Makefile.inc
   branches/kernel-image-2.6.11/debian/rules
   branches/kernel-image-2.6.11/debian/templates/post-install.in
Log:
Changes kernel -> linux in the post-install.in,
which was failing. Made the detection of kernel
arch automatic there, based on include/asm symlink.


Modified: branches/kernel-image-2.6.11/debian/Makefile
===================================================================
--- branches/kernel-image-2.6.11/debian/Makefile	2005-05-31 05:12:59 UTC (rev 3283)
+++ branches/kernel-image-2.6.11/debian/Makefile	2005-05-31 05:49:17 UTC (rev 3284)
@@ -197,8 +197,6 @@
 # full build in the directory $(kdir) where kernel-headers are
 # built. So, after build we check whether current build arch has
 # such a file and symlink it into the $(kdir) if necessary.
-# Note that to get into the kernel-headers package the arch/subarch
-# still needs variables headers_dirs and headers_extra set.
 #
 build-stamp-$(subarch)-%: build-$(subarch)-%
 	PATH=$$PWD/bin:$$PATH;					\

Modified: branches/kernel-image-2.6.11/debian/arch/i386/Makefile.inc
===================================================================
--- branches/kernel-image-2.6.11/debian/arch/i386/Makefile.inc	2005-05-31 05:12:59 UTC (rev 3283)
+++ branches/kernel-image-2.6.11/debian/arch/i386/Makefile.inc	2005-05-31 05:49:17 UTC (rev 3284)
@@ -2,5 +2,4 @@
 # Variables 
 #
 include_common_config := no
-headers_extra := arch/i386/kernel/asm-offsets.s
 initrd_modules := kernel/drivers/video/vesafb.ko kernel/security/capability.ko

Modified: branches/kernel-image-2.6.11/debian/rules
===================================================================
--- branches/kernel-image-2.6.11/debian/rules	2005-05-31 05:12:59 UTC (rev 3283)
+++ branches/kernel-image-2.6.11/debian/rules	2005-05-31 05:49:17 UTC (rev 3284)
@@ -199,7 +199,7 @@
 	cd debian;						\
 	rm -f *-stamp-* *-stamp config.* *.kpatches.arch; 	\
 	rm -f header-install-* post-install-* bin/touch.orig;	\
-	rm -rf kernel-source-* build-* install-*		
+	rm -rf kernel-source-* build-* install-*
 	dh_clean
 
 binary-indep: source tree patch-debian doc

Modified: branches/kernel-image-2.6.11/debian/templates/post-install.in
===================================================================
--- branches/kernel-image-2.6.11/debian/templates/post-install.in	2005-05-31 05:12:59 UTC (rev 3283)
+++ branches/kernel-image-2.6.11/debian/templates/post-install.in	2005-05-31 05:49:17 UTC (rev 3284)
@@ -1,8 +1,8 @@
 #!/bin/sh
 #
 # This is the hook file executed by make-kpkg in the end of creation
-# of the kernel-image for a particular flavour. The major task it performs
-# is the creation of the flavour-specific kernel-headers package.
+# of the linux-image for a particular flavour. The major task it performs
+# is the creation of the flavour-specific linux-headers package.
 #
 set -e
 
@@ -28,37 +28,29 @@
 # prefix=$(version)-$(abiname)
 # prefix is then used to form a destination directory
 # to link to. For cases with subarch we need to link
-# to kernel-headers-$(subarch)-$(version)-$(abiname),
-# not just kernel-headers-$(version)-$(abiname). Note
+# to linux-headers-$(subarch)-$(version)-$(abiname),
+# not just linux-headers-$(version)-$(abiname). Note
 # that the append_subarch substitution must contain a
 # trailing dash, if it is non-empty.
 #
 append='@append_subarch@'
 suffix=${version#*$debnum-}
 prefix=${append}${version%%-*}${debnum}
-pkg=kernel-headers-$version
+pkg=linux-headers-$version
 top=$PWD/debian/$pkg
-dir=$top/usr/src/kernel-headers-$version
+dir=$top/usr/src/linux-headers-$version
 #
 # Here we need to find the kernel architecture which
 # is appropriate for the current flavour. It is available
 # in kernel-package as KERNEL_ARCH. Cleanest way is to get
 # make-kpkg export it to this script. 
 # 
-# Currently we'll have to do some fiddling here For
-# example for sparc we need to map sparc32* to 'sparc'
-# and sparc64* to 'sparc64'. The default for other
-# arches is the name of the architecture.
+# Currently we just use the fact that in the build directory
+# the symlink include/asm must point to include/asm-${arch}
 #
-case ${DEB_HOST_ARCH} in
-  sparc*)
-    KERNEL_ARCH=${suffix%-smp}
-    KERNEL_ARCH=${KERNEL_ARCH%32}
-    ;;
-  *)
-    KERNEL_ARCH=${DEB_HOST_ARCH}
-    ;;
-esac
+arch=$(readlink include/asm)
+arch=$(basename "${arch}")
+arch="$${arch#asm-}"
 
 debhelper_pre $pkg
 
@@ -75,27 +67,27 @@
 	! -name debian -a ! -name Documentation -a ! -name include -a \
 	! -name '.*' -a \( \
 	-name Makefile -o -type d \) \
-	-printf "../kernel-headers-$prefix/%f\n" |
+	-printf "../linux-headers-$prefix/%f\n" |
 	xargs ln -s --target-directory="$dir"
 
 cd include
 find . -mindepth 1 -maxdepth 1 \
 	! -name config -a ! -name linux -a \( \
-	! -name 'asm-*' -o -name asm-generic -o -name asm-${KERNEL_ARCH} \) \
-	-printf "../../kernel-headers-$prefix/include/%f\n" |
+	! -name 'asm-*' -o -name asm-generic -o -name asm-${arch} \) \
+	-printf "../../linux-headers-$prefix/include/%f\n" |
 	xargs ln -s --target-directory=$dir/include
 cp -a config $dir/include
-ln -sf asm-${KERNEL_ARCH} $dir/include/asm
+ln -sf asm-${arch} $dir/include/asm
 find linux -mindepth 1 -maxdepth 1 \
 	! -name autoconf.h -a ! -name compile.h -a ! -name version.h \
-	-printf "../../../kernel-headers-$prefix/include/linux/%f\n" |
+	-printf "../../../linux-headers-$prefix/include/linux/%f\n" |
 	xargs ln -s --target-directory=$dir/include/linux
 cp -a linux/autoconf.h linux/compile.h \
 	linux/version.h $dir/include/linux
 cd ..
 
 mkdir -p $top/lib/modules/$version
-ln -s /usr/src/kernel-headers-$version $top/lib/modules/$version/build
+ln -s /usr/src/linux-headers-$version $top/lib/modules/$version/build
 
 debhelper_post $pkg