From owner-freebsd-sparc Tue Aug 20 6: 4:41 2002 Delivered-To: freebsd-sparc@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 13A3B37B401 for ; Tue, 20 Aug 2002 06:04:37 -0700 (PDT) Received: from mail.gmx.net (mail.gmx.net [213.165.64.20]) by mx1.FreeBSD.org (Postfix) with SMTP id 81A4843E7B for ; Tue, 20 Aug 2002 06:04:35 -0700 (PDT) (envelope-from tmoestl@gmx.net) Received: (qmail 11013 invoked by uid 0); 20 Aug 2002 13:04:33 -0000 Received: from p5086f012.dip.t-dialin.net (HELO forge.local) (80.134.240.18) by mail.gmx.net (mp008-rz3) with SMTP; 20 Aug 2002 13:04:33 -0000 Received: from tmm by forge.local with local (Exim 3.36 #1) id 17h8hL-0000kS-00; Tue, 20 Aug 2002 15:05:27 +0200 Date: Tue, 20 Aug 2002 15:05:27 +0200 From: Thomas Moestl To: Evren Yurtesen Cc: sparc@freebsd.org Subject: Re: sparc64 bootable CD Message-ID: <20020820130526.GA1130@crow.dom2ip.de> Mail-Followup-To: Evren Yurtesen , sparc@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="lrZ03NoBR/3+SXJZ" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i Sender: owner-freebsd-sparc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, 2002/08/20 at 15:37:35 +0300, Evren Yurtesen wrote: > How is it possible to make a bootable CD for sparc64? I have ultra10 > I figured out its something with mkisofs and mksunbootcd program mkisofs can do this itself, but you first need to create a boot slice to put into the image. I've attached a Makefile that I wrote some time back and that was used to create the first bootable FreeBSD/sparc64 iso images. It should still work, but is a bit outdated now, in particular, you should be able to delete the 'boot1' and 'bootslice.sun4u' targets (replacing the latter with 'bootfs.sun4u') now by using 'disklabel -B' when building 'bootfs.sun4u', the zeroing mentioned in the Makefile does not seem to be required by the frimware. Note that you need to do most of the building on the sparc64 box (due to file system endianess issues, and of course to get the sparc64 toolchain). The mkisofs step is an exception, you can just copy over the files it needs and do it anywhere. - thomas -- Thomas Moestl http://www.tu-bs.de/~y0015675/ http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C --lrZ03NoBR/3+SXJZ Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename=Makefile # $Id: Makefile,v 1.5 2002/03/19 17:17:57 tmm Exp tmm $ # Location of the tree to be burned onto CD-ROM ISOTREE?= /home/tmm/cdfs/isotree # Location of the src/sys tree to be used for building the boot block SYSTREE?= /mnt/tmm/sparc64/sys BOOT1DIR= ${SYSTREE}/boot/sparc64/boot1 BOOT1= boot1 LOADERDIR= ${SYSTREE}/boot/sparc64/loader LOADER= loader # Size of the boot file system in 512-byte blocks, including a disk label BOOTFSSZ?= 4096 MOUNTPT= fsmnt ALLTARGETS= boot1 loader boot.sun4u bootslice.sun4u sparc64.iso .PHONY: all clean all: sparc64.iso boot1: cd ${BOOT1DIR} && ${MAKE} all cp -f ${BOOT1DIR}/${BOOT1} $@ # XXX: non-standard options, dependency is bogus, so always do a full rebuild # for now. loader: cd ${LOADERDIR} && \ ${MAKE} clean all LOADER_DISK_SUPPORT=yes LOADER_NET_SUPPORT=no \ LOADER_NFS_SUPPORT=no LOADER_TFTP_SUPPORT=no \ LOADER_CD9660_SUPPORT=yes cp -f ${LOADERDIR}/${LOADER} $@ # Build the boot file system. This needs to be done natively to get the correct # FS endianess! bootfs.sun4u: loader dd if=/dev/zero of=$@ bs=512 count=${BOOTFSSZ} -mkdir ${MOUNTPT} MD=$$(mdconfig -a -t vnode -f $@) ; \ DEV=/dev/$${MD}c ; \ disklabel -w -r $$MD auto ; \ newfs $$DEV ; \ mount $$DEV ${MOUNTPT} ; \ mkdir ${MOUNTPT}/boot ; \ cp loader ${MOUNTPT}/boot/ ; \ umount ${MOUNTPT} ; \ mdconfig -d -u $${MD#md} # The UFS slice on the CD-ROM is prepended by a pseudo disk label. The first # (512-byte) block is zeroed out on Sun disks, so we do so, too. # The next 15 sectors contain the boot code. # Since a FreeBSD disk label is also 16 sectors in size, we can just overwrite # it with with our boot1, which has the disk label portions zeroed out and is of # the size of a label, leaving the file system that follows it intact. bootslice.sun4u: bootfs.sun4u boot1 cp -f bootfs.sun4u $@ dd if=boot1 of=$@ bs=512 conv=notrunc # Create the ISO image, including the boot slice generated above. # To make sure that the kernel will use the cd9660 file system as root fs # there should be a /boot/loader.conf with boot_cdrom set to "YES". sparc64.iso: bootslice.sun4u mkisofs -B ,,,,bootslice.sun4u -r -o $@ ${ISOTREE} clean: -rm -f ${ALLTARGETS} --lrZ03NoBR/3+SXJZ-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-sparc" in the body of the message