From owner-freebsd-ppc@FreeBSD.ORG Tue Mar 6 07:01:03 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 16059106566C for ; Tue, 6 Mar 2012 07:01:03 +0000 (UTC) (envelope-from freebsd-ppc@dino.sk) Received: from loki.netlab.sk (loki.netlab.sk [84.245.65.11]) by mx1.freebsd.org (Postfix) with ESMTP id 7967B8FC13 for ; Tue, 6 Mar 2012 07:01:02 +0000 (UTC) Received: from zeta.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: LOGIN milan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by loki.netlab.sk with ESMTPSA; Tue, 06 Mar 2012 07:50:21 +0100 id 00033C0D.4F55B3AD.000141DE Date: Tue, 6 Mar 2012 07:50:45 +0100 From: Milan Obuch To: Rob Ballantyne Message-ID: <20120306075045.5be555b9@zeta.dino.sk> In-Reply-To: References: X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX+/v7++v6YOTrq8PCcuIX989UvOSj++v0BNCbpAAAAB3RJTUUHsQwfFzs7RBhzUQAAAhJJREFUOI1dU8GOqzAMNKIoV1bvwD1i0ysqrHplIdBrVSX7ATSbd03VVvn9tQNtQy0hjAdn7LED4AAcPtWm9RV+MPSfxhBLx9ajd6X/ngB6/mTwnRSZua7i7Ca+0ctZKo4Qmz+JY13X6I3nFZBxIYW1PbgfQ5RP8g0XlltEWGf3cV03joYpRnFbvYDKbXjZlXyyhEZA4lI+cN3NaVXE4VKjSwTExO10eTEkkJVqIAD5z0nUBQJluQDRSQjcrBiHAJxZlAH5CUMBMC7OcJ4LMQNnxhZ1HYPscMc6J4UlWRMNwzOpCcAHKSICd1EDn83abdREIbXsHkD1OinP1aCUCOEVRaa1lMcvywUWdYgk13JQUpYNKmvXQ8Kw5ML9YI5h8SakctBc7E/IYuLhYd/zZIk+1gM1vNweQBvHE0j+oYah3sMqAytQYlZk6+ANaaawJdu3OFzYGMZ3iGpa3qMlq9ZH0VZTgrCtw/ngdYkEIIpSbP1bWQAdFdX9vocBdkH2qVjVmuMu3gI5rjs814EUdrCZgWlPaxZZ3RiLFUtr+ud0PXwp2dnQSNXgePt6AZpBj6UMJ7VQkzN4utVeaSW1Dhn/kblGrKeMvNGnzwX4zuEDarYz1KdPtR60Gul0Gued+515SJXhCsl+Tx/3kY/UDvicPll9mfu50t3tvQ/thZpJYgeuwdSKNJ6tCD98MCgoxLDaPxbwqqwPWaWiAAAAAElFTkSuQmCC X-Face: ak5rwz4-aUa>hPFZlcg,bXxn.(TN}e9DGFrKU\.i_'B[&5=pAd9o"j)5VSUYW:BRQG#^42Ev$Il|; Ztn=,C X-Operating-System: FreeBSD/amd64 8.2-STABLE Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: Tue, 06 Mar 2012 07:01:03 -0000 On Mon, 5 Mar 2012 22:24:36 -0800 Rob Ballantyne wrote: > Hi All, > > I've been poking around trying to understand the boot up process of > a ppc64 G5 machine. > Hi, I think it is basically the same for G4 too :) > I was slightly surprised to still find an Apple Partition map disk. > I would have thought it was an ordinary fdisk (PC) partition setup. > This is most probably OpenFirmware (or implementation on machine in question) dependency - at least on Apple's boxes ability to load kernel from UFS filesystem in some newer version was removed. > Let me see if I have it right: > > 1 - OpenFirmware (OFW) load Apple_Bootstrap/boot1.elf Actually, there is Apple_Bootstrap/bootinfo.txt, a Forth wrapper script which is loaded first and it loads 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? > I did not investigate here much, but as soon as /boot/kernel/loader is called, it should work 'the usual way' as on any other platform, i. e. /boot/*.4th files are used accordingly. Just a nit-pick, they have no relation to OpenFirmware, all they have in common is they are written in the same language. At least that's the way I understand it. > 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 small partition in Apple's HFS format or whatever the acronym is because it is the only format Apple's OpenFirmware understands now. Basically, there are two files in it - bootinfo.txt and boot1.elf, in a ppc directory. Both are already mentioned above. > As I said mostly curiosity and trying to understand. If anyone has > a few words of confirmation/advice I would be glad to hear them. > Well, I am not an expert, I am interested in this area too, trying to understand, and be able to modify the boot process too. But as there are some differences with what I already know, sometimes it is not easy :) Regards, Milan