From owner-freebsd-ppc@FreeBSD.ORG Sun Mar 11 15:48:02 2012 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A10811065670 for ; Sun, 11 Mar 2012 15:48:02 +0000 (UTC) (envelope-from nwhitehorn@freebsd.org) Received: from agogare.doit.wisc.edu (agogare.doit.wisc.edu [144.92.197.211]) by mx1.freebsd.org (Postfix) with ESMTP id 74CE18FC15 for ; Sun, 11 Mar 2012 15:48:02 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII; format=flowed Received: from avs-daemon.smtpauth2.wiscmail.wisc.edu by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) id <0M0Q00A02981UL00@smtpauth2.wiscmail.wisc.edu> for freebsd-ppc@freebsd.org; Sun, 11 Mar 2012 10:48:01 -0500 (CDT) Received: from comporellon.tachypleus.net ([unknown] [76.210.73.151]) by smtpauth2.wiscmail.wisc.edu (Sun Java(tm) System Messaging Server 7u2-7.05 32bit (built Jul 30 2009)) with ESMTPSA id <0M0Q00K41980DY20@smtpauth2.wiscmail.wisc.edu> for freebsd-ppc@freebsd.org; Sun, 11 Mar 2012 10:48:00 -0500 (CDT) Date: Sun, 11 Mar 2012 10:48:00 -0500 From: Nathan Whitehorn In-reply-to: To: Rob Ballantyne Message-id: <4F5CC930.9060001@freebsd.org> X-Spam-Report: AuthenticatedSender=yes, SenderIP=76.210.73.151 X-Spam-PmxInfo: Server=avs-15, Version=5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.11.153914, SenderIP=76.210.73.151 References: User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:10.0) Gecko/20120212 Thunderbird/10.0 Cc: freebsd-ppc@freebsd.org Subject: Re: Question about bootup X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Mar 2012 15:48:02 -0000 [Not replying to the top bits, since the others covered that correctly] On 03/06/12 00:24, Rob Ballantyne wrote: > Hi All, > > I've been poking around trying to understand the boot up process of > a ppc64 G5 machine. > > I was slightly surprised to still find an Apple Partition map disk. > I would have thought it was an ordinary fdisk (PC) partition setup. > > Let me see if I have it right: > > 1 - OpenFirmware (OFW) load Apple_Bootstrap/boot1.elf > 2 - boot1.elf runs to gain enough to understand UFS filesystems and > loads FreeBSD UFS partition /boot/loader > 3 - loader loads /boot/kernel/kernel > > ... and we're off to the races. > > This strikes me as fairly simplistic so I'm sure there are more > details. I'm curious about /boot/*.4th OpenFirmware forth code, for > example. Is it involved in a substantial way? > > The other thing I'm curious about is the Apple_Bootstrap partition. > How is it written? I've discovered parteditor within the bsdinstall > installer. I suspect that does it but it doesn't appear to let one > write their own bootloader code image. > It is written by the installer, in the partition editor. You can see what it does by looking at /usr/src/usr.sbin/bsdinstall/partedit/partedit_powerpc.c. It just dd's a preformatted HFS partition from /boot/boot1.hfs onto the bootstrap partition. -Nathan