r3044 - in branches/kernel-image-2.6.11: . arch/i386 debian
Jurij Smakov
jurij-guest@costa.debian.org
Thu, 12 May 2005 05:58:57 +0000
Author: jurij-guest
Date: 2005-05-12 05:58:57 +0000 (Thu, 12 May 2005)
New Revision: 3044
Modified:
branches/kernel-image-2.6.11/README
branches/kernel-image-2.6.11/arch/i386/Makefile.inc
branches/kernel-image-2.6.11/debian/rules
Log:
* 'build' target implemented.
* Additional variables which can be defined
on per-arch basis (in Makefile.inc) introduced
and documented in README.
Modified: branches/kernel-image-2.6.11/README
===================================================================
--- branches/kernel-image-2.6.11/README 2005-05-12 03:58:25 UTC (rev 3043)
+++ branches/kernel-image-2.6.11/README 2005-05-12 05:58:57 UTC (rev 3044)
@@ -56,3 +56,32 @@
above). For sparc, for example, if will have to be set to
'sparc | sparc64' for the correct packages to be generated. See
headers-install file for details.
+
+arch_makeflags
+
+ This variable may contain the make flags settings for the
+ make-kpkg invocation in the 'build' target. Currently it is
+ only used by amd64, where it should be set to something like
+
+ arch_makeflags = 'CC=amd64-linux-gcc V=1"
+
+added_patches
+
+ Setting this variable to non-empty value will cause an option
+ --added_patches to be added to the make-kpkg call in 'build'
+ target, followed by the contents of this variable. Currently
+ hppa is using it and it looks like ia64 have used it before.
+
+arch_with_subarch
+
+ Setting this variable to non-empty value will cause an option
+ --subarch to be added to make-kpkg call in 'build' target,
+ followed by the flavour for which the kernel is built. NOTE
+ that the contents of this variable are completely ignored,
+ any non-empty value indicates that --subarch option should
+ be added. In general, if you wish to add subarch support for
+ your architecture, you should contact kernel-package maintainer
+ to ensure that the flavour name correctly maps onto a kernel
+ subarch name. Currently only mips and sparc are using this
+ facility, and both of them should be fine.
+
Modified: branches/kernel-image-2.6.11/arch/i386/Makefile.inc
===================================================================
--- branches/kernel-image-2.6.11/arch/i386/Makefile.inc 2005-05-12 03:58:25 UTC (rev 3043)
+++ branches/kernel-image-2.6.11/arch/i386/Makefile.inc 2005-05-12 05:58:57 UTC (rev 3044)
@@ -2,3 +2,6 @@
# Variables
#
include_common_config = no
+added_patches = blah
+arch_with_subarch = yes
+arch_makeflags = 'CC=gcc-2.95'
Modified: branches/kernel-image-2.6.11/debian/rules
===================================================================
--- branches/kernel-image-2.6.11/debian/rules 2005-05-12 03:58:25 UTC (rev 3043)
+++ branches/kernel-image-2.6.11/debian/rules 2005-05-12 05:58:57 UTC (rev 3044)
@@ -37,7 +37,10 @@
header_dirs = $(karch)
endif
-
+#
+# Unresolved issues:
+# Where does the default config comes from?
+#
unpack: unpack-stamp
unpack-stamp: $(kdir) $(configs) header-install.out
for i in $(flavours); do \
@@ -45,16 +48,48 @@
cp config.$$i build-$$i/.config; \
make -C build-$$i ARCH=$(karch) oldconfig; \
done
-# Have to figure out what to do with that one
# cp default $(kdir)/.config
ln -s $$(command -v touch) bin/touch.orig
- touch $@
+ touch unpack-stamp
+#
+# Subarch usage:
+# Currently only mips and sparc are calling make-kpkg
+# with --subarch. mips is just using the names of the
+# flavours, while for sparc it is more complicated.
+# After looking at /usr/share/kernel-package/rules, I
+# believe that everything will work correctly in sparc
+# if use flavour as an argument to subarch.
+#
+# Unresolved issues:
+# m68k,mips have no-op build targets
+# How to handle subarch (mips, sparc)?
+# What's the deal with sparc trying to strip
+# the kernel and copy System.map?
+#
+build: build-stamp
+build-stamp: unpack-stamp
+ dh_testdir
+ PATH=$$PWD/bin:$$PATH; \
+ for i in $(flavours); do \
+ cd build-$$i; \
+ OPTS="--append_to_version $(debnum)-$$i"; \
+ if [ -n '$(added_patches)' ]; then \
+ OPTS="$${OPTS} --added_patches $(added_patches)"; \
+ fi; \
+ if [ -n '$(arch_with_subarch)' ]; then \
+ OPTS="$${OPTS} --subarch $$i"; \
+ fi; \
+ MAKEFLAGS='$(arch_makeflags)' make-kpkg $${OPTS}; \
+ cd ..; \
+ done
+ touch build-stamp
+
clean:
rm -f *-stamp header-install.out config.*
rm -rf $(kdir) build-* install-* bin/touch.orig
dh_clean
-
+
header-install.out: header-install
sed -e 's/@kbpkg@/$(kbpkg)/g' \
-e 's/@karch@/$(karch)/g' \