[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

ppc64 boot images



This is what I've been using to generate ppc64 boot images for G5.

Comments welcome.  I guess we could use a single boot.iso for 32/64 bit, I think this is what yellowdog use - I think possibly there CHRP script detects if it is 32 or 64 bit machine (probably by doing some device tree walking)

Paul
Index: mk-images.ppc
===================================================================
RCS file: /usr/local/CVS/anaconda/scripts/mk-images.ppc,v
retrieving revision 1.26
diff -u -r1.26 mk-images.ppc
--- mk-images.ppc	4 Jun 2004 16:45:10 -0000	1.26
+++ mk-images.ppc	5 Jul 2004 11:43:30 -0000
@@ -80,6 +80,31 @@
 	$IMGPATH/usr/sbin/addSystemMap $TOPDESTPATH/ppc/iSeries/System.map $TOPDESTPATH/ppc/iSeries/vmlinux $TOPDESTPATH/ppc/iSeries/vmlinux.sm
 	$IMGPATH/usr/sbin/addRamDisk $TOPDESTPATH/ppc/iSeries/ramdisk.image.gz $TOPDESTPATH/ppc/iSeries/System.map $TOPDESTPATH/ppc/iSeries/vmlinux.sm $TOPDESTPATH/ppc/iSeries/boot.img
 	rm -f $TOPDESTPATH/ppc/iSeries/vmlinux.sm
+     elif [ "$KERNELARCH" = "ppc64" ]; then
+	FAKEARCH="ppc"
+	mkdir -p $TOPDESTPATH/ppc64/mac $TOPDESTPATH/images/mac
+
+        echo "Building ppc64 initrd"
+        makeinitrd --initrdto $TOPDESTPATH/ppc64/mac/ramdisk.image.gz \
+            --initrdsize 8192 \
+            --loaderbin loader \
+            --modules "$COMMONMODULES $NETMODULES $SCSIMODULES $SCSIMODS $IDEMODS $ISOMODULES $USBMODS =scsi =net"
+
+        mkdir -p $TOPDESTPATH/ppc64/mac
+        cp $KERNELROOT/boot/vmlinuz-* $TOPDESTPATH/ppc64/mac/vmlinuz
+        cp $BOOTDISKDIR/yaboot.conf.mac $TOPDESTPATH/ppc64/mac/yaboot.conf
+	perl -pi -e 's/ppc/ppc64/g' $TOPDESTPATH/ppc64/mac/yaboot.conf
+        cp $BOOTDISKDIR/ofboot.b $TOPDESTPATH/ppc64/mac/ofboot.b
+        cp $IMGPATH/usr/lib/yaboot/yaboot $TOPDESTPATH/ppc64/mac/
+
+        # we also want to make a boot.iso here 
+        mkdir -p $TOPDESTPATH/isopath/ppc64/mac
+        cp $TOPDESTPATH/ppc64/mac/* $TOPDESTPATH/isopath/ppc64/mac/
+
+        # Create the boot.iso
+	mkisofs -o $TOPDESTPATH/images/mac/boot64.iso -part -hfs -T -r -l -J -A "$PRODUCT $VERSION" -sysid PPC -V "PBOOT" -volset "$VERSION" -volset-size 2 -volset-seqno 1 -hfs-volid "$VERSION" -hfs-bless "$TOPDESTPATH/isopath/ppc64/mac" -map $BOOTDISKDIR/mapping -magic $BOOTDISKDIR/magic -no-desktop -allow-multidot $TOPDESTPATH/isopath
+        rm -rf $TOPDESTPATH/isopath/
+	
     elif [ "$KERNELARCH" = "ppc" ]; then
 	FAKEARCH="ppc"
 	mkdir -p $TOPDESTPATH/ppc/mac $TOPDESTPATH/images/mac

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]