Hi, As discussed on irc, here is my new patch, sorry for misrepresenting the import of it, and letting myself be carried away in my previous reply.
The patch does : * add new powerpc and powerpc64 subarch targets on both powerpc ands powerpc64 architectures, used to build official powerpc kernels, as well as user kernel .debs which work for yaboot, quik as well as mkvmlinuz. * Allow to build 64 bit kernels on 32bit hardware and vice-versa. * Allow to have user built kernels packages including mkvmlinuz support like all 2.6 kernels have supported since they first entered the archive. This is only needed on 32bit kernels. This does only work however for kernels including the right patch, which is only available since debian kernel 2.6.12. It will just work without generating those files if this patch is not present though. Friendly, Sven Luther
--- zzz/kernel-package/kernel/rules 2005-06-13 06:11:32.000000000 +0000 +++ kernel-package-9.001.sven1/kernel/rules 2005-07-15 23:44:00.000000000 +0000 @@ -327,15 +327,33 @@ ##### PowerPC64 ifeq ($(strip $(architecture)), powerpc64) - KERNEL_ARCH=ppc64 - kimage := vmlinux - loader=NoLoader - target = $(kimage) - kimagesrc = vmlinux - kimagedest = $(INT_IMAGE_DESTDIR)/vmlinux-$(version) - DEBCONFIG= $(CONFDIR)/config.$(KPKG_SUBARCH) - kelfimagesrc = vmlinux - kelfimagedest = $(INT_IMAGE_DESTDIR)/vmlinux-$(version) + ifneq (,$(findstring $(KPKG_SUBARCH), powerpc powerpc64)) + ifneq (,$(findstring $(KPKG_SUBARCH), powerpc64)) + KERNEL_ARCH:=ppc64 + endif + ifneq (,$(findstring $(KPKG_SUBARCH), powerpc)) + KERNEL_ARCH:=ppc + NEED_POWERPC_MKVMLINUZ_SUPPORT = YES + INSTALL_MKVMLINUZ_PATH = $(SRCTOP)/$(IMAGE_TOP)/usr/lib/kernel-image-${version} + endif + target := zImage + loaderdep=mkvmlinuz + loader=NoLoader + kimagesrc = vmlinux + kimage := vmlinux + kimagedest = $(INT_IMAGE_DESTDIR)/vmlinux-$(version) + DEBCONFIG= $(CONFDIR)/config.$(KPKG_SUBARCH) + else + KERNEL_ARCH=ppc64 + kimage := vmlinux + loader=NoLoader + target = $(kimage) + kimagesrc = vmlinux + kimagedest = $(INT_IMAGE_DESTDIR)/vmlinux-$(version) + DEBCONFIG= $(CONFDIR)/config.$(KPKG_SUBARCH) + kelfimagesrc = vmlinux + kelfimagedest = $(INT_IMAGE_DESTDIR)/vmlinux-$(version) + endif endif ### PowerPC @@ -363,12 +381,29 @@ #endif endif - ifeq (,$(findstring $(KPKG_SUBARCH),apus prpmc chrp mbx pmac prep Amiga APUs CHRP MBX PReP chrp-rs6k nubus )) + ifeq (,$(findstring $(KPKG_SUBARCH),apus prpmc chrp mbx pmac prep Amiga APUs CHRP MBX PReP chrp-rs6k nubus powerpc powerpc64 )) KPKG_SUBARCH:=$(GUESS_SUBARCH) endif KERNEL_ARCH:=ppc + ifneq (,$(findstring $(KPKG_SUBARCH), powerpc powerpc64)) + ifneq (,$(findstring $(KPKG_SUBARCH), powerpc64)) + KERNEL_ARCH:=ppc64 + endif + ifneq (,$(findstring $(KPKG_SUBARCH), powerpc)) + KERNEL_ARCH:=ppc + NEED_POWERPC_MKVMLINUZ_SUPPORT = YES + INSTALL_MKVMLINUZ_PATH = $(SRCTOP)/$(IMAGE_TOP)/usr/lib/kernel-image-${version} + endif + target := zImage + loaderdep=mkvmlinuz + kimagesrc = vmlinux + kimage := vmlinux + kimagedest = $(INT_IMAGE_DESTDIR)/vmlinux-$(version) + DEBCONFIG= $(CONFDIR)/config.$(KPKG_SUBARCH) + endif + ifneq (,$(findstring $(KPKG_SUBARCH),APUs apus Amiga)) KPKG_SUBARCH:=apus loader := NoLoader @@ -2503,6 +2538,12 @@ IMAGE_TOP=$(IMAGE_TOP) STEM=$(INT_STEM) version=$(version) \ debian/post-install; \ fi +ifeq ($(strip $(NEED_POWERPC_MKVMLINUZ_SUPPORT)),YES) + if test grep mkvmlinuz_support_install arch/ppc/boot/Makefile 2>/dev/null >/dev/null; then \ + $(MAKE) INSTALL_MKVMLINUZ=$(INSTALL_MKVMLINUZ_PATH) \ + ARCH=$(KERNEL_ARCH) -C arch/ppc/boot mkvmlinuz_support_install \ + fi +endif ifneq ($(strip $(image_clean_hook)),) (cd $(IMAGE_TOP); \ test -x $(image_clean_hook) && $(image_clean_hook))