r2073 - in trunk/utils/kernel-kbuild-2.6-3: . debian
Joshua Kwan
joshk@haydn.debian.org
Mon, 27 Dec 2004 15:44:54 -0700
Author: joshk
Date: 2004-12-27 15:44:41 -0700 (Mon, 27 Dec 2004)
New Revision: 2073
Added:
trunk/utils/kernel-kbuild-2.6-3/decide.sh
Modified:
trunk/utils/kernel-kbuild-2.6-3/debian/changelog
trunk/utils/kernel-kbuild-2.6-3/debian/rules
Log:
first stab at making kbuild multiarch-compatilble for sparc
Modified: trunk/utils/kernel-kbuild-2.6-3/debian/changelog
===================================================================
--- trunk/utils/kernel-kbuild-2.6-3/debian/changelog 2004-12-27 21:19:08 UTC (rev 2072)
+++ trunk/utils/kernel-kbuild-2.6-3/debian/changelog 2004-12-27 22:44:41 UTC (rev 2073)
@@ -1,5 +1,13 @@
-kernel-kbuild-2.6-3 (2.6.8-1) UNRELEASED; urgency=low
+kernel-kbuild-2.6-3 (2.6.8-2) unstable; urgency=low
+ * Add huge workarounds to get it to work on both sparc and sparc64 within
+ the same package, like a script to decide whether to use sparc or sparc64
+ versions of things.
+
+ -- Joshua Kwan <joshk@triplehelix.org> Mon, 27 Dec 2004 14:38:38 -0800
+
+kernel-kbuild-2.6-3 (2.6.8-1) unstable; urgency=low
+
* Updated revison
* Changed maintainer to Debian kernel team <debian-kernel@lists.debian.org>
* Added myself as an uploader. Other members of the kernel-team,
Modified: trunk/utils/kernel-kbuild-2.6-3/debian/rules
===================================================================
--- trunk/utils/kernel-kbuild-2.6-3/debian/rules 2004-12-27 21:19:08 UTC (rev 2072)
+++ trunk/utils/kernel-kbuild-2.6-3/debian/rules 2004-12-27 22:44:41 UTC (rev 2073)
@@ -22,22 +22,39 @@
kbpkg := kernel-kbuild-$(kbver)
kbtarget := $(CURDIR)/debian/$(kbpkg)/usr/src/$(kbpkg)
+DEB_HOST_ARCH := $(shell dpkg-architecture -qDEB_HOST_ARCH)
unpack: unpack-stamp
unpack-stamp:
dh_testdir
tar jxf /usr/src/kernel-source-$(version).tar.bz2
+ sed 's/@kbuild@/$(kbpkg)/' decide.sh > decide.sh.out
+ chmod +x decide.sh.out
touch unpack-stamp
build: unpack-stamp
dh_testdir
+ifneq ($(DEB_HOST_ARCH),sparc)
cd kernel-source-$(version); \
make defconfig; \
mv .config .config.old; \
sed 's/^# \(CONFIG_MODVERSIONS\) is not set$$/\1=y/' \
.config.old > .config; \
make prepare
+else
+ cd kernel-source-$(version); \
+ for karch in sparc sparc64; \
+ make ARCH=$$karch defconfig; \
+ mv .config .config.old; \
+ sed 's/^# \(CONFIG_MODVERSIONS\) is not set$$/\1=y/' \
+ .config.old > .config; \
+ make ARCH=$$karch prepare; \
+ mkdir -p scripts/mod/$$karch; \
+ cp -a scripts/mod/mk_elfconfig scripts/mod/modpost scripts/mod/$$karch/; \
+ rm scripts/mod/modpost scripts/mod/mk_elfconfig scripts/mod/*.o; \
+ done
+endif
clean:
dh_testdir
Added: trunk/utils/kernel-kbuild-2.6-3/decide.sh
===================================================================
--- trunk/utils/kernel-kbuild-2.6-3/decide.sh 2004-12-27 21:19:08 UTC (rev 2072)
+++ trunk/utils/kernel-kbuild-2.6-3/decide.sh 2004-12-27 22:44:41 UTC (rev 2073)
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+arch="$(uname -m)"
+
+case "$arch" in
+ sparc | sparc64) ;;
+ *)
+ echo "You shouldn't be using this program!" >&2
+ exit 1
+ ;;
+esac
+
+path=/usr/src/@kbuild@/scripts/mod
+
+program=$(basename $0)
+
+exec "$path/$(uname -m)/$program" "$@"
Property changes on: trunk/utils/kernel-kbuild-2.6-3/decide.sh
___________________________________________________________________
Name: svn:executable
+ *