[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Booting homebrew ELF kernel on NewWorld OpenFirmware 3.0?

From: Andrei Warkentin
Subject: Booting homebrew ELF kernel on NewWorld OpenFirmware 3.0?
Date: Sun, 9 Oct 2005 21:28:35 -0500

Hash: SHA1


I trying to cobble together a simple Hello World ``kernel'' on the mac, and have a question concerning the booting specifics. I understand that OF 3.0 groks ELF, but the ELF file should contain some special information in the note section (and have the PT_NOTE thing). This special information entails the values for load-base and real-base (among other things) that are to be used. Here is where I become confused.

There are plenty of warnings on the web (*BSD sites, usually) to not mess with load-base and real-base in OF 3.0, since doing so can inadvertently result in overwriting OF in flash, thus bricking the computer. I don't want to do that to my new iBook :-). Yet, looking at BSD's ofwboot, yaboot, and NewWorld booting code in Linux, I see that all of these mess with the load-base in the note descriptor - setting it to 0x4000 (which, interestingly enough is the default load- base in OF 1.0.5, and not a good one for linux at that) or 0x3000. Is there a reason for not leaving this at 0xffffffff thus using whatever the default OF 3.0 one is? (The BSD bootloader sites assure me it's a good one).

I'm sorry if this a tad OT, but I realized this is probably the best place to ask this question (to which I can't find an answer anywhere) since you guys probably eat this stuff for lunch :-).

Thank you very much and have a good day.
Version: GnuPG v1.2.4 (Darwin)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]