diff -Naur kernel-package-5.04.orig/kernel/image.postinst kernel-package-5.04/kernel/image.postinst
--- kernel-package-5.04.orig/kernel/image.postinst	Thu Jun 11 20:24:21 1998
+++ kernel-package-5.04/kernel/image.postinst	Mon Jul 27 06:50:28 1998
@@ -621,9 +621,12 @@
 	last MKBOOT if $ret;
 	$ret = system '/usr/sbin/rdev', '-R', "/dev/fd$drive", '1';
       }
-      else {
+      else if ($loader =~ /silo/io) {
 	$ret = &silo_floppy( $drive );
       }
+      else if ($loader =~ /quik/io) {
+	$ret = &pmac_floppy( $drive );
+      }
       last MKBOOT if $ret;
       $done = 1;
       print "\n";
@@ -649,6 +652,30 @@
   }
 }
 
+sub pmac_floppy {
+  my $drive = shift;
+  my $mountpoint = "/var/lib/kernel.mntpoint.$$";
+  $ret = system '/usr/bin/hformat', "/dev/fd$drive";
+  return $ret if $ret;
+  $ret = mkdir $mountpoint, 0755;
+  return $ret if $ret;
+  $ret = system '/bin/mount', '-t', 'hfs', "/dev/fd$drive", $mountpoint;
+  do { rmdir $mountpoint; return $ret } if $ret;
+  do {
+    if ($no_symlink || $reverse_symlink) {
+      $ret = system '/bin/cp', $imagedir . $kimage, $mountpoint . '/vmlinux.coff';
+    }
+    else {
+      $ret = system '/bin/cp', "$realimageloc" . "$kimage-$version",
+			$mountpoint . '/vmlinux.coff';
+    }
+  last if $ret;
+  };
+  system '/bin/umount', $mountpoint;
+  rmdir $mountpoint;
+  return $ret;
+}
+
 sub silo_floppy {
   my $drive = shift;
   my $mountpoint = "/var/lib/kernel.mntpoint.$$";
@@ -703,8 +730,11 @@
     print CONF "boot=".$bootdevice, "\n", "root=".$rootdevice, "\n", 
                @boilerplate;
   }
-  else {
+  else if ($loader =~ /silo/io) {
     print CONF @silotemplate;
+  }
+  else if ($loader =~ /quik/io) {
+    print CONF @quiktemplate;
   }
   close(CONF);
   chmod("/etc/$loader.conf", 0644);
diff -Naur kernel-package-5.04.orig/kernel/rules kernel-package-5.04/kernel/rules
--- kernel-package-5.04.orig/kernel/rules	Thu Jul 23 06:20:08 1998
+++ kernel-package-5.04/kernel/rules	Mon Jul 27 06:55:26 1998
@@ -51,8 +51,12 @@
 # The default architecture (all if architecture independent)
 architecture:=$(shell dpkg --print-architecture)
 
+ifeq ($(strip $(architecture)),powerpc)
+PPC_SUBARCH:=$(shell awk '/machine/ { print $3 }' /proc/cpuinfo)
+endif
+
 # The kernel image type (i.e. zImage or bzImage)
-ifneq ($(strip $(filter m68k ppc powerpc,$(architecture))),)
+ifneq ($(strip $(filter m68k powerpc,$(architecture))),)
 kimage := zImage
 else
 ifneq ($(strip $(filter sparc,$(architecture))),)
@@ -76,9 +80,11 @@
 loaderdoc=SiloDefault
 else
 ifeq ($(strip $(architecture)),powerpc)
+ifeq ($(strip $(PPC_SUBARCH)),PowerMac)
 loaderdep=quik
 loader=quik
 loaderdoc=QuikDefault
+endif
 else
 ifeq ($(strip $(architecture)),m68k)
 loaderdep=
@@ -172,7 +178,7 @@
 h_package := kernel-headers-$(version)
 i_package := kernel-image-$(version)$(INT_SUBARCH)
 d_package := kernel-doc-$(version)
-l_package := libc-kheaders
+#l_package := libc-kheaders
 
 FILES_TO_CLEAN = modules/modversions.h modules/ksyms.ver debian/files
 STAMPS_TO_CLEAN = stamp-build stamp-configure stamp-source stamp-image \
@@ -266,9 +272,9 @@
 patch_the_kernel = $(PATCH_THE_KERNEL)
 endif
 
-ifneq ($(strip $(MAKE_LIBC_HEADERS)),)
-make_libc_headers = $(MAKE_LIBC_HEADERS)
-endif
+#ifneq ($(strip $(MAKE_LIBC_HEADERS)),)
+#make_libc_headers = $(MAKE_LIBC_HEADERS)
+#endif
 
 ifneq ($(strip $(ROOT_CMD)),)
 root_cmd = $(ROOT_CMD)
@@ -296,8 +302,8 @@
 # Hah! Not in kernel directory!!
 build configure clean binary kernel_source kernel-source kernel-headers\
 stamp-source kernel_headers stamp-headers kernel_image stamp-image \
-kernel-image kernel-doc kernel_doc stamp-doc buildpackage \
-libc_kheaders libc-kheaders stamp-libc-kheaders:
+kernel-image kernel-doc kernel_doc stamp-doc buildpackage:
+#libc_kheaders libc-kheaders stamp-libc-kheaders:
 	@echo "You should invoke this command from the top level directory of"
 	@echo "a linux kernel source directory tree, and as far as I can tell,"
 	@echo "the current directory:"
@@ -363,10 +369,10 @@
                -e 's/=L/$(int_loaderdep) /g' \
                -e 's/=M/$(maintainer) <$(email)>/g'  \
 		         $(DEBDIR)/Control > debian/control
-ifeq ($(strip $(make_libc_headers)),YES)
-	-test ! -f stamp-configure && \
-	   cat $(DEBDIR)/Control.libc >> debian/control
-endif
+#ifeq ($(strip $(make_libc_headers)),YES)
+#	-test ! -f stamp-configure && \
+#	   cat $(DEBDIR)/Control.libc >> debian/control
+#endif
 	-test ! -f stamp-configure && test ! -f debian/official && \
 	   sed -e 's/=V/$(version)/g' -e 's/=D/$(debian)/g' \
 	    -e 's/=A/$(architecture)/g' -e 's/=M/$(maintainer) <$(email)>/g' \
@@ -654,18 +660,35 @@
 	         debian/tmp-image/boot/config-$(version)
 # SILO can boot gzip'ed kernel; m68k has vmlinuz, just the kernel makefiles
 # don't seem to realise it.
-#ifneq ($(strip $(architecture)),m68k)
-ifeq ($(strip $(filter m68k ppc powerpc,$(architecture))),)
-	cp arch/$(architecture)/boot/$(kimage) \
-                   debian/tmp-image/boot/vmlinuz-$(version)
-	chmod 644 debian/tmp-image/boot/vmlinuz-$(version)
+ifeq ($(strip $(architecture)),m68k)
+        gzip -9vc vmlinux > debian/tmp-image/boot/vmlinuz-$(version)
+        chmod 644 debian/tmp-image/boot/vmlinuz-$(version)
 else
-ifneq ($(strip $(filter ppc powerpc,$(architecture))),)
-	cp arch/$(KERNEL_ARCH)/$(SUBARCH)/boot/$(kimage) \
-                   debian/tmp-image/boot/vmlinuz-$(version)
+ifeq ($(strip $(architecture)),powerpc)
+PPC_SUBARCH:=$(shell awk '/machine/ { print $3 }' /proc/cpuinfo)
+        ifeq ($(strip $(PPC_SUBARCH)),CHRP)
+	cp arch/$(KERNEL_ARCH)/chrpboot/$(kimage) \
+		debian/tmp-image/boot/vmlinuz-$(version)
+	chmod 644 debian/tmp-image/boot/vmlinuz-$(version)
+	else
+	ifeq ($(strip $(PPC_SUBARCH)),PReP)
+	cp arch/$(KERNEL_ARCH)/coffboot/$(kimage) \
+		debian/tmp-image/boot/vmlinuz-$(version)
 	chmod 644 debian/tmp-image/boot/vmlinuz-$(version)
+	endif
+	ifeq ($(strip $(PPC_SUBARCH)),PowerMac)
+	# Quik can't boot compressed kernels yet, so install the
+	# uncompressed image.
+	# Booting from floppy or the network needs a kernel in COFF format,
+	# so install it too.
+	cp vmlinux debian/tmp-image/boot/vmlinux-$(version)
+	cp arch/$(KERNEL_ARCH)/coffboot/$(kimage) \
+		debian/tmp-image/boot/vmlinux.coff-$(version)
+	chmod 644 debian/tmp-image/boot/vmlinux*-$(version)
+	endif
 else
-	gzip -9vc vmlinux > debian/tmp-image/boot/vmlinuz-$(version)
+	cp arch/$(KERNEL_ARCH)/boot/$(kimage) \
+		debian/tmp-image/boot/vmlinuz-$(version)
 	chmod 644 debian/tmp-image/boot/vmlinuz-$(version)
 endif
 endif

