new powerpc subarch: newpmac (using 2.4 kernel)
So, currently woody (using a 2.2 kernel on powerpc) doesn't support
most newer PowerPC Apple Macintosh hardware. So, here are the
initial patches to create a new subarchitecture, which I modeled
after the sun4u stuff.
We still need to get a special 2.4 kernel image (as well as the pcmcia
modules) into woody if this is going to work. I'm sorry I didn't do
this earlier, but it took me a LONG time to realize that the reason my
loopback device didn't work was because I use tmpfs on /tmp.
Comments appreciated; I am just getting my feet wet with b-f.
(Note; this patch also removes the pointless "special PowerPC losetup
stuff", as well as changing the "tempfile" calls to make temporary
files in /var/tmp, which is where the rest of the b-f stuff happens
anyways, so it seems like a good idea to me.)
Index: config
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/config,v
retrieving revision 1.117
diff -u -u -r1.117 config
--- config 2001/12/07 22:46:08 1.117
+++ config 2001/12/08 04:58:33
@@ -26,6 +26,8 @@
kver := 2.2.19
pcmcia_kver := 2.2.19-pmac
apuskver := 2.2.10
+ # NewWorld powermacs really need a 2.4 kernel
+ kver_newpmac := 2.4.17-pre5-benh20011207
endif
ifeq "$(architecture)" "sparc"
kver := 2.2.20
Index: kernel.sh
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/kernel.sh,v
retrieving revision 1.37
diff -u -r1.37 kernel.sh
--- kernel.sh 2001/11/19 07:57:42 1.37
+++ kernel.sh 2001/12/08 04:42:44
@@ -28,7 +28,7 @@
shift 3
# whether this arch supports PCMCIA
-if [ "$arch" = i386 -o "$subarch" = pmac ]; then
+if [ "$arch" = i386 -o "$subarch" = pmac -o "$subarch" = newpmac ]; then
HAS_PCMCIA=true
else
HAS_PCMCIA=false
@@ -103,18 +103,20 @@
fi
info "creating 'linux$subarch'"
-if [ "$subarch" = pmac ]; then
- # vmlinux-<version> is the 'work' kernel
- # vmlinux.coff-<version> is the kernel for OF booting
- cp $extractdir/boot/vmlinux-* linux$subarch
- cp $extractdir/boot/vmlinux.coff-* linux$subarch.coff
-else
- if [ "$arch" = hppa ]; then
+case "$arch/$subarch" in
+ */*pmac)
+ # vmlinux-<version> is the 'work' kernel
+ # vmlinux.coff-<version> is the kernel for OF booting
+ cp $extractdir/boot/vmlinux-* linux$subarch
+ cp $extractdir/boot/vmlinux.coff-* linux$subarch.coff
+ ;;
+ hppa/*)
cp $extractdir/boot/vmlinux* linux$subarch
- else
+ ;;
+ *)
cp $extractdir/boot/vmlinuz* linux$subarch
- fi
-fi
+ ;;
+esac
info "creating 'sys_map$subarch.gz'"
cat $extractdir/boot/System.map-* | gzip --no-name -9 > sys_map$subarch.gz
mount -o loop $fsopts -t $fstype $floppy $mnt
@@ -509,7 +496,7 @@
relax
-if [ "$arch" = powerpc -a "$subarch" = pmac ]; then
+if [ "$arch" = powerpc -a \( "$subarch" = pmac -o "$subarch" = newpmac \) ]; then
info "compressing and installing kernel 'linux$subarch'"
gzip -9f linux$subarch
cp linux$subarch.gz $mnt/linux.gz
@@ -615,7 +602,7 @@
# no bootloader yet, write out install.sh like m68k
write_m68kinfo
;;
- pmac)
+ pmac|newpmac)
# boot from vmlinux.coff installer for now.
# write_powerpc
write_m68kinfo
Index: rootdisk.sh
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/rootdisk.sh,v
retrieving revision 1.299
diff -u -r1.299 rootdisk.sh
--- rootdisk.sh 2001/12/05 09:12:50 1.299
+++ rootdisk.sh 2001/12/08 04:55:24
@@ -901,21 +901,6 @@
# make an ext2 filesystem
mke2fs -O none -F -q -N $inodes -m 0 $floppy
-case "$arch" in
- powerpc)
- relax
- sync
-
- info "doing special PowerPC losetup stuff (why?)"
- losetup /dev/loop7 $floppy
- mke2fs -O none -F -q -N $inodes -m 0 /dev/loop7
- losetup -d /dev/loop7
-
- relax
- sync
- ;;
-esac
-
grep -q loop /proc/devices || insmod loop
info "mounting loop file $floppy on '$mnt'"
Index: make/powerpc.rules
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/make/powerpc.rules,v
retrieving revision 1.2
diff -u -r1.2 powerpc.rules
--- make/powerpc.rules 2001/05/09 21:51:14 1.2
+++ make/powerpc.rules 2001/12/08 04:56:56
@@ -13,6 +13,14 @@
modulesapus.tgz sys_mapapus.gz configapus.gz linuxapus modcontapus: kernel.sh
$(ROOTCMD) ./kernel.sh $(archive) $(apuskver) "apus"
+ # The pmacnew images use a different kernel version than the pmac ones
+modulesnewpmac.tgz sys_mapnewpmac.gz confignewpmac.gz linuxnewpmac modcontnewpmac: kernel.sh
+ $(ROOTCMD) ./kernel.sh $(archive) $(kver_newpmac) newpmac $(packages_with_modules)
+
+resc1440newpmac.bin: $(root_for_rescue) rescue.sh $(arch_rescue_deps) linuxnewpmac
+ $(ROOTCMD) ./rescue.sh $(archive) newpmac $(kver_newpmac) rootpmac.bin \
+ 1440 $(debianversion) "" $(LINGUA) $(SFONT)
+
#Local variables:
#mode: Makefile
#End:
Index: Makefile
===================================================================
RCS file: /cvs/debian-boot/boot-floppies/Makefile,v
retrieving revision 1.402
diff -u -u -r1.402 Makefile
--- Makefile 2001/11/22 05:03:41 1.402
+++ Makefile 2001/12/08 04:58:11
@@ -92,6 +92,7 @@
$(MAKE) resc1440chrp.bin driverschrp.tgz
# $(MAKE) resc1440mbx.bin driversmbx.tgz
$(MAKE) resc1440pmac.bin driverspmac.tgz
+ $(MAKE) resc1440newpmac.bin driversnewpmac.tgz
$(MAKE) resc1440prep.bin driversprep.tgz bootprep.bin
#-----------------------------------------------------
# $(MAKE) resc1440apus-fb.bin
Reply to: