Changes kernel -> linux in the post-install.in,
which was failing. Made the detection of kernel arch automatic there, based on include/asm symlink. svn path=/branches/kernel-image-2.6.11/; revision=3284
This commit is contained in:
parent
664a7d592f
commit
c78e51fecb
|
@ -197,8 +197,6 @@ $(kdir): post-install-$(subarch) $(controls)
|
||||||
# full build in the directory $(kdir) where kernel-headers are
|
# full build in the directory $(kdir) where kernel-headers are
|
||||||
# built. So, after build we check whether current build arch has
|
# built. So, after build we check whether current build arch has
|
||||||
# such a file and symlink it into the $(kdir) if necessary.
|
# 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)-%
|
build-stamp-$(subarch)-%: build-$(subarch)-%
|
||||||
PATH=$$PWD/bin:$$PATH; \
|
PATH=$$PWD/bin:$$PATH; \
|
||||||
|
|
|
@ -2,5 +2,4 @@
|
||||||
# Variables
|
# Variables
|
||||||
#
|
#
|
||||||
include_common_config := no
|
include_common_config := no
|
||||||
headers_extra := arch/i386/kernel/asm-offsets.s
|
|
||||||
initrd_modules := kernel/drivers/video/vesafb.ko kernel/security/capability.ko
|
initrd_modules := kernel/drivers/video/vesafb.ko kernel/security/capability.ko
|
||||||
|
|
|
@ -199,7 +199,7 @@ clean: unpatch
|
||||||
cd debian; \
|
cd debian; \
|
||||||
rm -f *-stamp-* *-stamp config.* *.kpatches.arch; \
|
rm -f *-stamp-* *-stamp config.* *.kpatches.arch; \
|
||||||
rm -f header-install-* post-install-* bin/touch.orig; \
|
rm -f header-install-* post-install-* bin/touch.orig; \
|
||||||
rm -rf kernel-source-* build-* install-*
|
rm -rf kernel-source-* build-* install-*
|
||||||
dh_clean
|
dh_clean
|
||||||
|
|
||||||
binary-indep: source tree patch-debian doc
|
binary-indep: source tree patch-debian doc
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# This is the hook file executed by make-kpkg in the end of creation
|
# 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
|
# of the linux-image for a particular flavour. The major task it performs
|
||||||
# is the creation of the flavour-specific kernel-headers package.
|
# is the creation of the flavour-specific linux-headers package.
|
||||||
#
|
#
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -28,37 +28,29 @@ debhelper_post() {
|
||||||
# prefix=$(version)-$(abiname)
|
# prefix=$(version)-$(abiname)
|
||||||
# prefix is then used to form a destination directory
|
# prefix is then used to form a destination directory
|
||||||
# to link to. For cases with subarch we need to link
|
# to link to. For cases with subarch we need to link
|
||||||
# to kernel-headers-$(subarch)-$(version)-$(abiname),
|
# to linux-headers-$(subarch)-$(version)-$(abiname),
|
||||||
# not just kernel-headers-$(version)-$(abiname). Note
|
# not just linux-headers-$(version)-$(abiname). Note
|
||||||
# that the append_subarch substitution must contain a
|
# that the append_subarch substitution must contain a
|
||||||
# trailing dash, if it is non-empty.
|
# trailing dash, if it is non-empty.
|
||||||
#
|
#
|
||||||
append='@append_subarch@'
|
append='@append_subarch@'
|
||||||
suffix=${version#*$debnum-}
|
suffix=${version#*$debnum-}
|
||||||
prefix=${append}${version%%-*}${debnum}
|
prefix=${append}${version%%-*}${debnum}
|
||||||
pkg=kernel-headers-$version
|
pkg=linux-headers-$version
|
||||||
top=$PWD/debian/$pkg
|
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
|
# Here we need to find the kernel architecture which
|
||||||
# is appropriate for the current flavour. It is available
|
# is appropriate for the current flavour. It is available
|
||||||
# in kernel-package as KERNEL_ARCH. Cleanest way is to get
|
# in kernel-package as KERNEL_ARCH. Cleanest way is to get
|
||||||
# make-kpkg export it to this script.
|
# make-kpkg export it to this script.
|
||||||
#
|
#
|
||||||
# Currently we'll have to do some fiddling here For
|
# Currently we just use the fact that in the build directory
|
||||||
# example for sparc we need to map sparc32* to 'sparc'
|
# the symlink include/asm must point to include/asm-${arch}
|
||||||
# and sparc64* to 'sparc64'. The default for other
|
|
||||||
# arches is the name of the architecture.
|
|
||||||
#
|
#
|
||||||
case ${DEB_HOST_ARCH} in
|
arch=$(readlink include/asm)
|
||||||
sparc*)
|
arch=$(basename "${arch}")
|
||||||
KERNEL_ARCH=${suffix%-smp}
|
arch="$${arch#asm-}"
|
||||||
KERNEL_ARCH=${KERNEL_ARCH%32}
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
KERNEL_ARCH=${DEB_HOST_ARCH}
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
debhelper_pre $pkg
|
debhelper_pre $pkg
|
||||||
|
|
||||||
|
@ -75,27 +67,27 @@ find . -mindepth 1 -maxdepth 1 \
|
||||||
! -name debian -a ! -name Documentation -a ! -name include -a \
|
! -name debian -a ! -name Documentation -a ! -name include -a \
|
||||||
! -name '.*' -a \( \
|
! -name '.*' -a \( \
|
||||||
-name Makefile -o -type d \) \
|
-name Makefile -o -type d \) \
|
||||||
-printf "../kernel-headers-$prefix/%f\n" |
|
-printf "../linux-headers-$prefix/%f\n" |
|
||||||
xargs ln -s --target-directory="$dir"
|
xargs ln -s --target-directory="$dir"
|
||||||
|
|
||||||
cd include
|
cd include
|
||||||
find . -mindepth 1 -maxdepth 1 \
|
find . -mindepth 1 -maxdepth 1 \
|
||||||
! -name config -a ! -name linux -a \( \
|
! -name config -a ! -name linux -a \( \
|
||||||
! -name 'asm-*' -o -name asm-generic -o -name asm-${KERNEL_ARCH} \) \
|
! -name 'asm-*' -o -name asm-generic -o -name asm-${arch} \) \
|
||||||
-printf "../../kernel-headers-$prefix/include/%f\n" |
|
-printf "../../linux-headers-$prefix/include/%f\n" |
|
||||||
xargs ln -s --target-directory=$dir/include
|
xargs ln -s --target-directory=$dir/include
|
||||||
cp -a config $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 \
|
find linux -mindepth 1 -maxdepth 1 \
|
||||||
! -name autoconf.h -a ! -name compile.h -a ! -name version.h \
|
! -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
|
xargs ln -s --target-directory=$dir/include/linux
|
||||||
cp -a linux/autoconf.h linux/compile.h \
|
cp -a linux/autoconf.h linux/compile.h \
|
||||||
linux/version.h $dir/include/linux
|
linux/version.h $dir/include/linux
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
mkdir -p $top/lib/modules/$version
|
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
|
debhelper_post $pkg
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue