patch for building powerpc bootable cd
Hi
I made a patch for build/Makefile to add support for bootable cd's on
apple powerpc computers. Currently this works only for newworld-roms
(computers built after ca. 2001 are newworld). In addition to my patch 4
files need to be added to the build directory. They are needed for
yaboot, the powerpc boot loader. These text-files in special versions
for cd-booting. hfs.map is needed to create the hfs file system on the
cd. The cd has to contain a hybrid hfs/iso9660 file system.
Probably it would by best to create a new subdirectory in build for
these files (eg. boot/powerpc, syslinux could then be moved to
boot/i386). But because this is my first post to this list, I don't want
to make my patch to intrusive.
- gaudenz
patch:
===================================================================
RCS file: /cvs/debian-boot/debian-installer/build/Makefile,v
retrieving revision 1.157
diff -u -r1.157 Makefile
--- Makefile 27 Apr 2003 08:55:09 -0000 1.157
+++ Makefile 2 May 2003 19:51:17 -0000
@@ -469,6 +469,26 @@
mkisofs -r -J -b `basename $(FLOPPY_IMAGE)` -o $(TYPE).iso
$(DEST)
mv $(TYPE).iso $(DEST)
+#cd content for powerpc, includes yaboot for booting apple powerpc
(newworld)
+#computers
+cd_content_powerpc: initrd
+ mkdir -p $(DEST)/boot
+
+ $(foreach NAME,$(KERNELNAME), \
+ cp -f $(TEMP)/$(NAME) $(DEST)/boot/$(TYPE)-linux; )
+
+ #New-world bootability
+ cp -f ofboot.b $(DEST)/boot/
+ cp -f /usr/lib/yaboot/yaboot $(DEST)/boot/
+ cp -f boot.msg $(DEST)/boot/
+ cp -f yaboot.conf $(DEST)/boot/
+
+
+#creates a bootable cd image for powerpc
+cd_image_powerpc: cd_content_powerpc
+ mkisofs --netatalk -hfs -probe -map hfs.map -part -no-desktop
-hfs-bless $(DEST)/boot -hfs-volid Debian-Installer/PPC -o $(TYPE).iso
$(DEST)
+ mv $(TYPE).iso $(DEST)
+
# Write image to floppy
boot_floppy: floppy_image
install -d $(DEST)
Welcome to Debian GNU/Linux PowerPC (CODENAME)
Additionally ot the default 'install' option,
there is 'install-safe' which you should try if
the system fails to boot at all (the typical
symptom is a white screen which doesn't go away).
************************************
If in doubt, just choose 'install', and if that doesn't work, try
'install-safe'.
************************************
# ext. xlate creator type comment
.hqx Ascii 'BnHx' 'TEXT' "BinHex file"
.mov Raw 'TVOD' 'MooV' "QuickTime Movie"
.deb Raw 'Debn' 'bina' "Debian package"
.bin Raw 'ddsk' 'DDim' "Floppy or ramdisk image"
.img Raw 'ddsk' 'DDim' "Floppy or ramdisk image"
.b Raw 'UNIX' 'tbxi' "bootstrap"
yaboot Raw 'UNIX' 'boot' "bootstrap"
vmlinux Raw 'UNIX' 'boot' "bootstrap"
.conf Raw 'UNIX' 'conf' "bootstrap"
* Ascii '????' '????' "Text file"
<CHRP-BOOT>
<COMPATIBLE>
MacRISC
</COMPATIBLE>
<DESCRIPTION>
Debian GNU/Linux PowerPC first stage CDROM bootloader
</DESCRIPTION>
<BOOT-SCRIPT>
" screen" output
load-base release-load-area
boot cd:,\boot\yaboot
</BOOT-SCRIPT>
</CHRP-BOOT>
## This yaboot.conf is for CD booting only, do not use as reference.
## Debian GNU/Linux PowerPC (woody)
# It is important not to have a comma after cd:
device=cd:
default=install
timeout=100
# FIXME: will this be the correct path?
message=/boot/boot.msg
image=/boot/cdrom-linux
label=install
initrd=cdrom-initrd.gz
initrd-size=8192
read-only
# some machines have wonky framebuffer support
image=/boot/cdrom-linux
label=install-safe
initrd=cdrom-initrd.gz
initrd-size=8192
append="video=ofonly"
read-only
Reply to: