commit c4738462a36beaf983df50c504b7d1c211f1b579 Author: Jurij Smakov Date: Tue May 10 04:16:53 2005 +0000 Initial commit of common kernel-image infrastructure. So far it can only unpack the source. svn path=/branches/kernel-image-2.6.11/; revision=3025 diff --git a/arch/i386/Makefile.inc b/arch/i386/Makefile.inc new file mode 100644 index 000000000..46773432d --- /dev/null +++ b/arch/i386/Makefile.inc @@ -0,0 +1,3 @@ +# +# Variables +# diff --git a/arch/i386/config.686 b/arch/i386/config.686 new file mode 100644 index 000000000..e69de29bb diff --git a/arch/i386/config.686-smp b/arch/i386/config.686-smp new file mode 100644 index 000000000..e69de29bb diff --git a/arch/i386/config.common b/arch/i386/config.common new file mode 100644 index 000000000..e69de29bb diff --git a/arch/i386/control.in b/arch/i386/control.in new file mode 100644 index 000000000..b29efe1e6 --- /dev/null +++ b/arch/i386/control.in @@ -0,0 +1,100 @@ +Package: kernel-headers-@version@-@abiname@-sparc32 +Architecture: sparc +Section: devel +Priority: optional +Depends: coreutils | fileutils (>= 4.0), kernel-headers-@version@-@abiname@ +Provides: kernel-headers, kernel-headers-2.6 +Description: Header files for Linux kernel @version@ on uniprocessor 32-bit SPARC + This package provides kernel header files for version @version@ on the 32-bit + SPARC architecture, used to build out-of-tree kernel modules. If you have + more than one processor, you want the kernel-headers-@version@-@abiname@-sparc64-smp + package. + +Package: kernel-image-@version@-@abiname@-sparc32 +Section: base +Architecture: sparc +Priority: optional +Provides: kernel-image, kernel-image-2.6 +Suggests: silo, fdutils, kernel-doc-@version@ +Depends: module-init-tools, initrd-tools (>= 0.1.74) +Description: Linux kernel binary image for UltraSPARC (sparc32) systems + This package contains the Linux kernel image, the System.map file, + and the modules built by the packager. It also contains scripts that + try to ensure that the system is not left in a unbootable state + after an update. + . + Kernel image packages are generally produced using kernel-package, + and it is suggested that you install that package if you wish to + create a custom kernel from the sources. + . + NOTE: This kernel is strictly for 32-bit Super/HyperSPARC (sun4m) class + systems. If you do not have a SuperSPARC or HyperSPARC CPU, then most likely + you want the sparc64 image. See kernel-image-@version@-@abiname@-sparc64. + +Package: kernel-headers-@version@-@abiname@-sparc64 +Architecture: sparc +Section: devel +Priority: optional +Depends: coreutils | fileutils (>= 4.0), kernel-headers-@version@-@abiname@ +Provides: kernel-headers, kernel-headers-2.6 +Description: Header files for Linux kernel @version@ on uniprocessor 64-bit SPARC + This package provides kernel header files for version @version@ on the 64-bit + SPARC architecture, used to build out-of-tree kernel modules. If you have + more than one processor, you want the kernel-headers-@version@-@abiname@-sparc64-smp + package. + +Package: kernel-image-@version@-@abiname@-sparc64 +Section: base +Architecture: sparc +Priority: optional +Provides: kernel-image, kernel-image-2.6 +Suggests: silo, fdutils, kernel-doc-@version@ +Depends: module-init-tools, initrd-tools (>= 0.1.63) +Description: Linux kernel binary image for UltraSPARC (sparc64) systems + This package contains the Linux kernel image, the System.map file, + and the modules built by the packager. It also contains scripts that + try to ensure that the system is not left in a unbootable state + after an update. + . + Kernel image packages are generally produced using kernel-package, + and it is suggested that you install that package if you wish to + create a custom kernel from the sources. + . + NOTE: This kernel is strictly for UltraSPARC (sparc64) class systems. If you + do not have an UltraSPARC, then most likely you want the sparc32 image. See + kernel-image-@version@-@abiname@-sparc32. + +Package: kernel-headers-@version@-@abiname@-sparc64-smp +Architecture: sparc +Section: devel +Priority: optional +Depends: coreutils | fileutils (>= 4.0), kernel-headers-@version@-@abiname@ +Provides: kernel-headers, kernel-headers-2.6 +Description: Header files for Linux kernel @version@ on multiprocessor 64-bit SPARC + This package provides kernel header files for version @version@ on the 64-bit + SPARC architecture, used to build out-of-tree kernel modules. If you only + have one processor, you want the kernel-headers-@version@-@abiname@-sparc64 package + instead. + +Package: kernel-image-@version@-@abiname@-sparc64-smp +Section: base +Architecture: sparc +Priority: optional +Provides: kernel-image, kernel-image-2.6 +Suggests: silo, fdutils, kernel-doc-@version@ +Depends: module-init-tools, initrd-tools (>= 0.1.63) +Description: Linux kernel binary image for SMP UltraSPARC (sparc64) systems + This package contains the Linux kernel image, the System.map file, + and the modules built by the packager. It also contains scripts that + try to ensure that the system is not left in a unbootable state + after an update. + . + Kernel image packages are generally produced using kernel-package, + and it is suggested that you install that package if you wish to + create a custom kernel from the sources. + . + NOTE: This kernel is strictly for UltraSPARC (sparc64) class systems. If you + do not have an UltraSPARC, then most likely you want the sparc32 image. + See kernel-image-@version@-@abiname@-sparc32. Also, this kernel is + specifically for SMP (multiple processors) systems. If you do not have more + than one CPU, then choose the non-SMP kernel image. diff --git a/arch/sparc/Makefile.inc b/arch/sparc/Makefile.inc new file mode 100644 index 000000000..cadcac0a2 --- /dev/null +++ b/arch/sparc/Makefile.inc @@ -0,0 +1,4 @@ +# +# Variables +# +karch_deps = sparc-utils diff --git a/arch/sparc/config.common b/arch/sparc/config.common new file mode 100644 index 000000000..e69de29bb diff --git a/arch/sparc/config.sparc32 b/arch/sparc/config.sparc32 new file mode 100644 index 000000000..e69de29bb diff --git a/arch/sparc/config.sparc64 b/arch/sparc/config.sparc64 new file mode 100644 index 000000000..e69de29bb diff --git a/arch/sparc/control.in b/arch/sparc/control.in new file mode 100644 index 000000000..b29efe1e6 --- /dev/null +++ b/arch/sparc/control.in @@ -0,0 +1,100 @@ +Package: kernel-headers-@version@-@abiname@-sparc32 +Architecture: sparc +Section: devel +Priority: optional +Depends: coreutils | fileutils (>= 4.0), kernel-headers-@version@-@abiname@ +Provides: kernel-headers, kernel-headers-2.6 +Description: Header files for Linux kernel @version@ on uniprocessor 32-bit SPARC + This package provides kernel header files for version @version@ on the 32-bit + SPARC architecture, used to build out-of-tree kernel modules. If you have + more than one processor, you want the kernel-headers-@version@-@abiname@-sparc64-smp + package. + +Package: kernel-image-@version@-@abiname@-sparc32 +Section: base +Architecture: sparc +Priority: optional +Provides: kernel-image, kernel-image-2.6 +Suggests: silo, fdutils, kernel-doc-@version@ +Depends: module-init-tools, initrd-tools (>= 0.1.74) +Description: Linux kernel binary image for UltraSPARC (sparc32) systems + This package contains the Linux kernel image, the System.map file, + and the modules built by the packager. It also contains scripts that + try to ensure that the system is not left in a unbootable state + after an update. + . + Kernel image packages are generally produced using kernel-package, + and it is suggested that you install that package if you wish to + create a custom kernel from the sources. + . + NOTE: This kernel is strictly for 32-bit Super/HyperSPARC (sun4m) class + systems. If you do not have a SuperSPARC or HyperSPARC CPU, then most likely + you want the sparc64 image. See kernel-image-@version@-@abiname@-sparc64. + +Package: kernel-headers-@version@-@abiname@-sparc64 +Architecture: sparc +Section: devel +Priority: optional +Depends: coreutils | fileutils (>= 4.0), kernel-headers-@version@-@abiname@ +Provides: kernel-headers, kernel-headers-2.6 +Description: Header files for Linux kernel @version@ on uniprocessor 64-bit SPARC + This package provides kernel header files for version @version@ on the 64-bit + SPARC architecture, used to build out-of-tree kernel modules. If you have + more than one processor, you want the kernel-headers-@version@-@abiname@-sparc64-smp + package. + +Package: kernel-image-@version@-@abiname@-sparc64 +Section: base +Architecture: sparc +Priority: optional +Provides: kernel-image, kernel-image-2.6 +Suggests: silo, fdutils, kernel-doc-@version@ +Depends: module-init-tools, initrd-tools (>= 0.1.63) +Description: Linux kernel binary image for UltraSPARC (sparc64) systems + This package contains the Linux kernel image, the System.map file, + and the modules built by the packager. It also contains scripts that + try to ensure that the system is not left in a unbootable state + after an update. + . + Kernel image packages are generally produced using kernel-package, + and it is suggested that you install that package if you wish to + create a custom kernel from the sources. + . + NOTE: This kernel is strictly for UltraSPARC (sparc64) class systems. If you + do not have an UltraSPARC, then most likely you want the sparc32 image. See + kernel-image-@version@-@abiname@-sparc32. + +Package: kernel-headers-@version@-@abiname@-sparc64-smp +Architecture: sparc +Section: devel +Priority: optional +Depends: coreutils | fileutils (>= 4.0), kernel-headers-@version@-@abiname@ +Provides: kernel-headers, kernel-headers-2.6 +Description: Header files for Linux kernel @version@ on multiprocessor 64-bit SPARC + This package provides kernel header files for version @version@ on the 64-bit + SPARC architecture, used to build out-of-tree kernel modules. If you only + have one processor, you want the kernel-headers-@version@-@abiname@-sparc64 package + instead. + +Package: kernel-image-@version@-@abiname@-sparc64-smp +Section: base +Architecture: sparc +Priority: optional +Provides: kernel-image, kernel-image-2.6 +Suggests: silo, fdutils, kernel-doc-@version@ +Depends: module-init-tools, initrd-tools (>= 0.1.63) +Description: Linux kernel binary image for SMP UltraSPARC (sparc64) systems + This package contains the Linux kernel image, the System.map file, + and the modules built by the packager. It also contains scripts that + try to ensure that the system is not left in a unbootable state + after an update. + . + Kernel image packages are generally produced using kernel-package, + and it is suggested that you install that package if you wish to + create a custom kernel from the sources. + . + NOTE: This kernel is strictly for UltraSPARC (sparc64) class systems. If you + do not have an UltraSPARC, then most likely you want the sparc32 image. + See kernel-image-@version@-@abiname@-sparc32. Also, this kernel is + specifically for SMP (multiple processors) systems. If you do not have more + than one CPU, then choose the non-SMP kernel image. diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..180000854 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +kernel-image-2.6.11 (2.6.11-2) UNRELEASED; urgency=low + + * New upstream release. + * Build against kernel-tree-2.6.11-2. + + -- Jurij Smakov Sun, 6 Mar 2005 14:15:03 -0500 diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..b8626c4cf --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control.in b/debian/control.in new file mode 100644 index 000000000..3a5926cf2 --- /dev/null +++ b/debian/control.in @@ -0,0 +1,36 @@ +Source: kernel-image-@version@ +Section: devel +Priority: optional +Maintainer: Debian Kernel Team +Uploaders: Joshua Kwan , Ben Collins +Standards-Version: 3.6.1.0 +Build-Depends: @karch_deps@ gcc (>= 4:3.3), kernel-tree-@version@-@ktver@, debhelper (>= 4), kernel-package, module-init-tools + +Package: kernel-build-@version@-@abiname@ +Architecture: @karch@ +Section: devel +Priority: optional +Depends: coreutils | fileutils (>= 4.0), @kbuild_deps@ +Description: Headers for building modules for Linux @version@ + This package provides kernel header files for building modules for the + precompiled kernel images on the @karch@ architecture. + +Package: kernel-headers-@version@-@abiname@ +Architecture: @karch@ +Section: devel +Priority: optional +Depends: coreutils | fileutils (>= 4.0), kernel-kbuild-2.6-3 (>= 2.6.8-2) +Provides: kernel-headers, kernel-headers-2.6 +Description: Header files related to Linux kernel version @version@ + This package provides kernel header files for version @version@, generally + used for building out-of-tree kernel modules. See the 'module-assistant' + package for more information. + . + This package consists mostly of the common files between the subarchitecture + specific header packages, which should be used for building modules (would + be nice to find a way to include the names of all subarch-specific header + packages here) + . + For more information you can also read: + /usr/share/doc/kernel-headers-@version@-@abiname@/debian.README.gz. + diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..6a76e9654 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,36 @@ +This is the Debian GNU/Linux prepackaged version of the Linux kernel. +Linux was written by Linus Torvalds +and others. + +This package was put together by Simon Shapiro , from +sources retrieved from directories under +ftp.cs.helsinki.fi:/pub/Software/Linux/Kernel/ +The sources may be found at most Linux ftp sites, including +ftp://ftp.kernel.org/pub/linux/kernel/ + +This package was then maintained by Sven Rudolph and subsequently +David Huggins-Daines. + +This package has been maintained by Herbert Xu +since March 1997. + +Now, it is maintained by Joshua Kwan . + +Linux is copyrighted by Linus Torvalds and others. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + 02111-1307, USA. + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL'. diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..19de5300e --- /dev/null +++ b/debian/rules @@ -0,0 +1,54 @@ +#!/usr/bin/make -f +# +version = 2.6.11 +abiname = 1 +ktver = 2 +kbuildver = 2.6-3 +# +# Generally nothing needs to be modified below this line +# +debver = $(version)-$(abiname) +debnum = -$(abiname) +appvan = --append_to_version $(debnum) +bpkg = kernel-build-$(debver) +kdir = kernel-source-$(version) +kbpkg = kernel-kbuild-$(kbuildver) +kpatch = /usr/src/kernel-patches/all/$(version)/apply/debian +DEBIAN_SRCTOP = $(CURDIR)/$(kdir) +DEBIAN_UPSTREAM_VERSION = $(version) +ifeq (,$(DEB_HOST_ARCH)) + DEB_HOST_ARCH = $(shell dpkg-architecture -qDEB_HOST_ARCH) + DEB_BUILD_ARCH = $(shell dpkg-architecture -qDEB_BUILD_ARCH) +endif +ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH)) + CROSS = $(DEB_HOST_ARCH)-linux- +endif +karch = $(DEB_HOST_ARCH) + +configs = $(notdir $(wildcard arch/$(karch)/config.*)) +ifndef flavours + flavours = $(filter-out common, $(patsubst config.%,%,$(configs))) +endif +-include arch/$(karch)/Makefile.inc + +unpack: unpack-stamp +unpack-stamp: debian/control $(kdir) + +debian/control: + cat debian/control.in arch/$(karch)/control.in | \ + sed -e 's/@karch@/$(karch)/g' \ + -e 's/@version@/$(version)/g' \ + -e 's/@karch_deps@/$(karch_deps)/g' \ + -e 's/@ktver@/$(ktver)/g' \ + -e 's/@abiname@/$(abiname)/g' \ + -e 's/@kbuild_deps@/$(kbuild_deps)/g' > debian/control + +$(kdir): + tar jxf /usr/src/kernel-source-$(version).tar.bz2 + cd $(kdir) && $(kpatch) $(version)-$(ktver) + mkdir -p $(kdir)/debian + cp debian/changelog $(kdir)/debian + cp debian/control $(kdir)/debian + cp debian/copyright $(kdir)/debian + touch $(kdir)/debian/official + install post-install $(kdir)/debian diff --git a/header-install b/header-install new file mode 100644 index 000000000..08eb27b6b --- /dev/null +++ b/header-install @@ -0,0 +1,29 @@ +#!/bin/sh + +set -e + +kbpkg=@kbpkg@ + +cd $DEBIAN_SRCTOP +{ + find . -path './scripts/*' -prune -o \ + -path './Documentation/*' -prune -o \ + -path './debian/*' -prune -o \ + -type f \( -name Makefile -o -name 'Kconfig*' \) -print + echo arch/sparc/kernel/asm-offsets.s +} | cpio -pd --preserve-modification-time $OLDPWD +cd - > /dev/null +ln -s ../$kbpkg/scripts . + +remove= +cd include +for i in asm-*; do + case ${i#asm-} in + generic | sparc | sparc64) + ;; + *) + remove="$remove $i" + ;; + esac +done +${remove:+rm -r $remove} diff --git a/post-install b/post-install new file mode 100644 index 000000000..43ccaf22a --- /dev/null +++ b/post-install @@ -0,0 +1,70 @@ +#!/bin/sh + +set -e + +debhelper_pre() { + dh_clean -k --package="$1" + dh_installdirs --package="$1" +} + +debhelper_post() { + dh_installdocs --package="$1" + dh_installchangelogs --package="$1" + dh_compress --package="$1" + dh_fixperms --package="$1" + dh_installdeb --package="$1" + dh_gencontrol --package="$1" + dh_md5sums --package="$1" + dh_builddeb --package="$1" +} + + +suffix=${version#*$debnum-} +prefix=${version%%-*}$debnum +pkg=kernel-headers-$version +top=$PWD/debian/$pkg +dir=$top/usr/src/kernel-headers-$version + +karch=${suffix%-smp} +karch=${karch%32} + +debhelper_pre $pkg + +mkdir -p $dir/include/linux +cp -a .config $dir +echo $debnum-$suffix > $dir/.extraversion +cp -a Module.symvers $dir + +find . -mindepth 1 -maxdepth 1 \ + ! -name debian -a ! -name Documentation -a ! -name include -a \ + ! -name '.*' -a \( \ + -name Makefile -o -type d \) \ + -printf "../kernel-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-$karch \) \ + -printf "../../kernel-headers-$prefix/include/%f\n" | + xargs ln -s --target-directory=$dir/include +cp -a config $dir/include +ln -sf asm-$karch $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" | + 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 + +debhelper_post $pkg + +bpkg=kernel-build-$prefix +top=$PWD/../debian/$bpkg + +[ -d $top/usr/src/$bpkg ] || mkdir -p $top/usr/src/$bpkg +ln -s ../kernel-headers-$version $top/usr/src/$bpkg/$suffix