From owner-freebsd-ppc@FreeBSD.ORG Tue Apr 10 17:28:03 2007 Return-Path: X-Original-To: freebsd-ppc@freebsd.org Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7078D16A402 for ; Tue, 10 Apr 2007 17:28:03 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by mx1.freebsd.org (Postfix) with ESMTP id 0848313C4C1 for ; Tue, 10 Apr 2007 17:28:02 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from [10.33.24.110] (nat-198-95-226-228.netapp.com [198.95.226.228]) by dommail.onthenet.com.au (MOS 3.7.5a-GA) with ESMTP id CRQ25399 (AUTH peterg@ptree32.com.au); Wed, 11 Apr 2007 03:27:57 +1000 (EST) Message-ID: <461BC8FF.1010506@freebsd.org> Date: Tue, 10 Apr 2007 10:27:27 -0700 From: Peter Grehan User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.8b) Gecko/20051014 MIME-Version: 1.0 To: Philip Schulz References: <4084.50499.qm@web8407.mail.in.yahoo.com> <461BBC5A.80005@gmx.de> In-Reply-To: <461BBC5A.80005@gmx.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ppc@freebsd.org Subject: Re: Help regarding the second stage loader 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: Tue, 10 Apr 2007 17:28:03 -0000 Hi Philip, > You can load and start the kernel directly from Open > Firmware since it's an ELF file. However, that only works if the kernel > resides on a filesystem the Open Firmware implementation understands and > if you don't need to set any boot flags. Unfortunately, the > implementation found on Apples computers does not know UFS(2). So a > different approach (and I think that one is recommended) is to start the > loader which will be able load the kernel, also from the / filesystem, > and set boot flags (verbose boot, boot to single user, etc.). That's right. Booting the kernel directly from OpenFirmware happens to work, mainly because that's the boot path used with gdb/psim. The big downside is that there is no metadata, so things like boot flags, the root mount, modules, ramdisks and other goodies enabled by the loader can't be used. > So in short: There is no second stage bootloader, only the loader and > the kernel. Someone please correct me if I'm wrong. Depends on terminology :) If you count OpenFirmware as the first-stage bootloader then the FreeBSD loader is a second-stage loader, though it's the first in the FreeBSD boot process. later, Peter.