Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-ppc-dev
Lists: gentoo-ppc-dev: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-ppc-user@g.o, gentoo-ppc-dev@g.o, debian-powerpc@...
From: "Christian Müller" <cmue81@...>
Subject: Re: May it be of some use for the oldworld plagued, specifically Beige G3 (REVISED)
Date: Tue, 09 Jan 2007 23:38:48 +0100

here is a revised version of my previous post.  Due to gnu make's inability to handle spaces in paths there is a showstopper in my previous Makefile. Since BootX expects the kernels in "Linux Kernels" this is kind of severe.  Please use this revised version.  Best is to put it in an empty dir and type make or "make cd" if you want the image burned right afterwards.  You have to modify the variables BOOTABLE_MAC_CD and CDBURNER to reflect your setup.

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) 2007 by Christian Mueller$
# $license:$
# $license-version: 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".  If you have a rewritable
#        cd handy, adjust CDBURNER and try make cdrw.
# 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 !!
# NOTE: You cannot compress your kernels if you want to use
#       them with BootX ;-(
# 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

SELF = Makefile

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

GEN_IMG = install-ppc-minimal-2006.1.iso

GENURL = $(GENMIRROR)/releases/ppc/current/ppc32/installcd/$(GEN_IMG)

modimage: hfsmount \
	$(SELF).treecopy \
	$(SYSDISK).treecopy \
	debianstuff \
	gentoostuff \
	$(BOOTX_DIR).treecopy \

cd: modimage
	cdrecord -dao dev=$(CDBURNER) $(BOOTABLE_MAC_CD)

	cdrecord dev=$(CDBURNER) blank=fast

cdrw: cdclean cd

	umount -d genloop || exit 0
	rm -rf bin/ genloop/ "$(BOOTX_DIR)" \
          *.dirs *.files *irdbuild *irdmerge .*irdmerge

distclean: clean


	hmount $(BOOTABLE_MAC_CD)

TCSPEC1 = s|hcopy -m\(.*$(BOOTX_DIR_KRNL)\)|hcopy -r\1|
TCSPEC2 = s|hcopy -m\(.*$(SELF)\)|hcopy -t\1|
CPLSED = h;s|/|:|g;s|_| |g;s|^ '\(.*:\)\?.*| ':\1'|;H;g;s/\n//;s/^/hcopy -m/;
%.treecopy: hfsmount %
	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;s|_| |g;$(TREECOPYSPECIALS)" >> "$*.dirs"
	find "$*" -not -type d -printf " '%p'\n" | \
          sed -ne "$(CPLSED)$(TREECOPYSPECIALS);p" >> "$*.files"
	"./$*.dirs" 2>/dev/null || exit 0
	"./$*.files" || exit 0

	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 "$@"

	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 "$*"


	tar xzf $(STUFFIT) $(UNSTUFF)
	touch $(UNSTUFF)

	wget $(BOOTXURL)

	$(UNSTUFF) -m=on $(BOOTX)
	mv "$(subst _, ,$@)" "$@"

	mv "$(subst Linux_,Linux ,$@)" "$@"

	wget $(GENURL)

$(GEN_IMG).mount: $(GEN_IMG)
	mkdir -p genloop && \
	mount -o loop $(GEN_IMG) genloop

$(BOOTX_DIR_KRNL)/genliveird.gz: genloop/boot/apple.igz
	cp "genloop/boot/apple.igz" "$@"

 .gen.irdmerge/image.squashfs: genloop/image.squashfs
	cp "genloop/image.squashfs" "$@"

$(BOOTX_DIR_KRNL)/genallinitrd: $(BOOTX_DIR_KRNL)/genliveird.gz \
        live.gen.irdmerge \
        .gen.irdmerge/image.squashfs \

$(BOOTX_DIR_KRNL)/genvmlinux: genloop/boot/apple
	test -e "$@.gz" || cp "genloop/boot/apple" "$@"

gentoostuff: $(GEN_IMG).mount \
        $(BOOTX_DIR_KRNL) \
        $(BOOTX_DIR_KRNL)/genliveird.gz \
        $(BOOTX_DIR_KRNL)/genallinitrd.gz \
	umount -d genloop

	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 \

	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 \



Live well,

Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN:
Makefile (Binary data)
Lists: gentoo-ppc-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Efika efourts
Next by thread:
Updated Makefile to produce a utility cd for Linux installations for OldWorld from an Original MacOS CD
Previous by date:
Efika efourts
Next by date:
Updated Makefile to produce a utility cd for Linux installations for OldWorld from an Original MacOS CD

Updated Jun 17, 2009

Summary: Archive of the gentoo-ppc-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.