May it be of some use for the oldworld plagued, specifically Beige G3
Hi list,
I put together a Makefile to build an oldworld boot+utility cd, but it's, unfortunately, only for those having a proprietary Mac OS Install CD .. It's tested, but not thoroughly, so please consider it alpha ..
cat > Makefile <<EOF
# This is a convenience Makefile to add SystemDisk, BootX and
# a couple of current linux kernels to a bootable Mac OS CD.
# It tries to do the right thing (tm) ;-)
#
#
# $name: Makefile$
# $author: Christian Mueller <cmue81 at gmx dot de>$
# $copyright: Copyright (C) 1999 by Christian Mueller$
# $license: http://www.gnu.org/licenses/gpl.html - licensed under GNU GPL version 2$
# $date: 2007-01-09$
#
#
# Dependencies: hfsutils, cdr-tools
#
# Usage: The only thing you should need to adjust is the
# BOOTABLE_MAC_CD variable or *URL if the URLs listed
# deliver a "404 not found".
#
# Motivation: Even in the lucky case you get bootloaders for
# a Beige G3 working (miboot, quik, etc.) you
# would still need a booting Mac OS System to
# apply the System Disk patches in case they
# get screwed up. So if you're the owner of a
# proprietary Mac OS CD let this Makefile convert
# it to a useful utility CD in case you get stuck
# with stand-alone-linux on your Mac-Box.
#
# WARNING: The image given with BOOTABLE_MAC_CD will get
# modified! It might not work, so do backups !!
#
# Tested on a Beige G3 with OpenFirmware 2.4, might work on
# other models. Hopefully we will not need this anymore
# some day, when support for Apple's oldworld machines has
# grown up ;-) Ciao ..
#
BOOTABLE_MAC_CD = /media/hdb1/macos8.iso
CDBURNER = ATAPI:0,0,0
SYSDISK = SystemDisk2.3.1.smi.bin
STUFFIT = stuffit520.611linux-i386.tar.gz
UNSTUFF = bin/unstuff
BOOTX = BootX_1.2.2.sit
BOOTX_DIR = BootX_1.2.2
BOOTX_DIR_KRNL = $(BOOTX_DIR)/Linux_Kernels
GEN_IMG = install-ppc-minimal-2006.1.iso
SYSDISKURL = ftp://ftp.apple.com/developer/macosxserver/utilities/$(SYSDISK)
STUFFITURL = http://www.allume.com/downloads/files/$(STUFFIT)
BOOTXURL = http://penguinppc.org/historical/benh/$(BOOTX)
DEBURL = http://people.debian.org/~wouter/d-i/powerpc/daily/powerpc
GENURL = ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo/releases/ppc/current/ppc32/installcd/$(GEN_IMG)
modimage: mount \
$(SYSDISK).copy \
debianstuff \
gentoostuff \
$(BOOTX_DIR).treecopy \
umount
cd: modimage
cdrecord -dao $(CDBURNER) $(BOOTABLE_MAC_CD)
cdclean:
cdrecord $(CDBURNER) blank=fast
clean:
umount -d genloop || exit 0
rm -rf bin/ genloop/ "$(BOOTX_DIR)" *irdmerge .*irdmerge
distclean: clean
rm $(SYSDISK) $(STUFFIT) $(BOOTX) $(GEN_IMG)
$(SYSDISK):
wget $(SYSDISKURL)
$(STUFFIT):
wget $(STUFFITURL)
$(UNSTUFF): $(STUFFIT)
tar xzf $(STUFFIT) $(UNSTUFF)
touch $(UNSTUFF)
$(BOOTX):
wget $(BOOTXURL)
$(BOOTX_DIR): $(UNSTUFF) $(BOOTX)
$(UNSTUFF) -m=on $(BOOTX)
mv "$(subst _, ,$@)" "$@"
$(BOOTX_DIR_KRNL): $(BOOTX_DIR)
mv "$(subst Linux_,Linux ,$@)" "$@"
%.irdmerge:
test -e "$*" || { \
mkdir -p "$(suffix $*).irdmerge" && \
cd "$(suffix $*).irdmerge" && \
gunzip -c "../$(BOOTX_DIR_KRNL)/$(subst .,,$(suffix $*))$(patsubst %$(suffix $*),%,$*)ird.gz" > "initrd.tmp" && \
cpio -i < "initrd.tmp" 2> /dev/null && \
rm "initrd.tmp" && \
cd .. \
touch "$*" ; }
%.irdbuild:
test -e "$(patsubst %$(suffix $*),%,$*).gz" || { \
cd $(suffix $*).irdmerge && \
find > ../files$(suffix $*).irdmerge && \
cpio -o < ../files$(suffix $*).irdmerge > "../$(patsubst %$(suffix $*),%,$*)" && \
cd .. ; }
%.gz: %
test -e "$@" || gzip -9 "$*"
$(BOOTX_DIR_KRNL)/deb%ird.gz:
wget -O "$@" $(DEBURL)/$*/initrd.gz
$(BOOTX_DIR_KRNL)/deballinitrd: $(BOOTX_DIR_KRNL)/debnetbootird.gz $(BOOTX_DIR_KRNL)/debcdromird.gz $(BOOTX_DIR_KRNL)/debhd-mediaird.gz netboot.deb.irdmerge cdrom.deb.irdmerge hd-media.deb.irdmerge $(BOOTX_DIR_KRNL)/deballinitrd.deb.irdbuild
$(BOOTX_DIR_KRNL)/debvmlinux:
test -e "$@.gz" || wget -O "$@" $(DEBURL)/cdrom/vmlinux
debianstuff: $(BOOTX_DIR_KRNL) $(BOOTX_DIR_KRNL)/debnetbootird.gz $(BOOTX_DIR_KRNL)/debcdromird.gz $(BOOTX_DIR_KRNL)/debhd-mediaird.gz $(BOOTX_DIR_KRNL)/deballinitrd.gz $(BOOTX_DIR_KRNL)/debvmlinux.gz
$(GEN_IMG):
wget $(GENURL)
$(GEN_IMG).mount: $(GEN_IMG)
mkdir -p genloop && \
mount -o loop $(GEN_IMG) genloop
$(BOOTX_DIR_KRNL)/genliveird.gz: $(GEN_IMG).mount
cp genloop/boot/apple.igz "$@"
$(BOOTX_DIR_KRNL)/genallinitrd.gen.preirdbuild:
cp "genloop/image.squashfs" ".gen.irdmerge/image.squashfs"
$(BOOTX_DIR_KRNL)/genallinitrd: $(GEN_IMG).mount $(BOOTX_DIR_KRNL)/genliveird.gz live.gen.irdmerge $(BOOTX_DIR_KRNL)/genallinitrd.gen.preirdbuild $(BOOTX_DIR_KRNL)/genallinitrd.gen.irdbuild
$(BOOTX_DIR_KRNL)/genvmlinux: $(GEN_IMG).mount
test -e "$@.gz" || cp genloop/boot/apple "$@"
gentoostuff: $(BOOTX_DIR_KRNL) $(BOOTX_DIR_KRNL)/genliveird.gz $(BOOTX_DIR_KRNL)/genallinitrd.gz $(BOOTX_DIR_KRNL)/genvmlinux.gz
umount -d genloop
mount:
hmount $(BOOTABLE_MAC_CD)
umount:
humount
TREECOPYSPECIALS = s|hcopy -m\(.*$(BOOTX_DIR_KRNL)\)|hcopy -r\1|;
%.treecopy: mount %
echo "#!/bin/sh" > "$*.dirs" && chmod +x "$*.dirs"
echo "#!/bin/sh" > "$*.files" && chmod +x "$*.files"
find "$*" -type d -printf 'hmkdir "/%p"\n' | sed -e 's/\//:/g' >> "$*.dirs"
find "$*" -not -type d -printf " '%p'\n" | sed -ne "h;s/^ '/ ':/;s/\//:/g;H;g;s/\n//;s/^/hcopy -m/;$(TREECOPYSPECIALS)p" >> "$*.files"
"./$*.dirs" 2>/dev/null || exit 0
"./$*.files" || exit 0
rm -f "./$*.dirs"
rm -f "./$*.files"
%.copy: mount %
hcopy -m "$*" ":"
EOF
Have fun,
cmuelle8
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer
Reply to: