Date: Tue, 10 Apr 2007 18:33:30 +0200 From: Philip Schulz <ph.schulz@gmx.de> To: vinay hegde <thisismevinay@yahoo.co.in> Cc: freebsd-ppc@freebsd.org Subject: Re: Help regarding the second stage loader Message-ID: <461BBC5A.80005@gmx.de> In-Reply-To: <4084.50499.qm@web8407.mail.in.yahoo.com> References: <4084.50499.qm@web8407.mail.in.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, on 10.04.2007 16:59 Uhr vinay hegde said the following: > Can someone please let me know the place of the second > stage bootloader for FreeBSD PPC kernel under the > source trunk? I believe, it'll be something similar to > what linux does (under arch/ppc/boot/simple, > arch/ppc/boot/common and arch/ppc/kernel directories). I don't know how Linux "officially" boots on PowerPC, however I load yaboot which in turn loads the kernel. I don't think yaboot is maintained with the kernel but rather as a separate project. > I browsed thru' the FreeBSD boot directories > (sys/boot/powerpc/loader directory), but couldn't find > any second stage loader code. > FreeBSD's loader code is spread under sys/boot. Relevant parts are not only sys/boot/powerpc/loader, but also the Forth-interpreter in sys/boot/ficl. Additionally, the files in sys/boot/ofw contain code to talk to Open Firmware, used for example to load the kernel, e.g. from disk or network. The sys/boot/common directory seems to contain the parts relevant for all platforms like the ELF loader. The way FreeBSD/powerpc boots is slightly different from how FreeBSD boots on a PC. 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.). So in short: There is no second stage bootloader, only the loader and the kernel. Someone please correct me if I'm wrong. HTH, Phil. -- Don't fix it if it ain't broke.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?461BBC5A.80005>