Subject: Cross-building installation media
To: None <>
From: Christopher SEKIYA <>
List: port-sgimips
Date: 11/13/2003 18:17:33

I've just committed changes that permit cross-building sgimips installation
media.  Here's how it works:

* install cdrtools,
* build the distribution,
* place $DESTDIR/usr/mdec/*boot into a temporary directory (here, we'll
  use /tmp/sgiboot)
* uncompress and copy $RELDIR/sgimips/binary/kernel/netbsd-INSTALL*.gz into
  a work directory (here, we'll use /tmp/sgi)
* copy $RELDIR/sgimips to the work directory (/tmp/sgi)
* dd if=/dev/zero of=/tmp/sgimips.img bs=1m count=30
* vnconfig vnd0 sgimips.img
* $TOOLDIR/bin/nbsgivol -i vnd0 (make note of the starting block for the
  first partition -- should be 3135)
* $TOOLDIR/bin/nbsgivol -w aoutboot /tmp/sgiboot/aoutboot vnd0
* $TOOLDIR/bin/nbsgivol -w ip2xboot /tmp/sgiboot/ip2xboot vnd0
* $TOOLDIR/bin/nbsgivol -w ip3xboot /tmp/sgiboot/ip3xboot vnd0
* mkisofs -r -J -o /tmp/sgi.iso /tmp/sgi
* dd if=/tmp/sgi.iso of=/tmp/sgimips.img bs=512 seek=3135 (the seek parameter
  should match the starting block for the first partition)
* vnconfig -u vnd0 ; sync

/tmp/sgimips.img should now contain a bootable image that can be written to

On an ip2x-class machine (Indy/Indigo2), one should be able to bootstrap from
the ARCS prompt thusly:

	boot -f scsi(0)cdrom(4)rdisk(0)partition(8)ip2xboot

... the bootloader should/might take notice that it's booting from CD and
invoke the proper kernel.

ip3x-class machines (O2) should use:

	boot -f pci(0)scsi(0)cdrom(4)rdisk(0)partition(8)ip3xboot

-- Chris
	GPG key FEB9DE7F (91AF 4534 4529 4BCC 31A5  938E 023E EEFB FEB9 DE7F)