* Booting homebrew ELF kernel on NewWorld OpenFirmware 3.0?
@ 2005-10-10 2:28 Andrei Warkentin
2005-10-10 8:08 ` Olaf Hering
0 siblings, 1 reply; 6+ messages in thread
From: Andrei Warkentin @ 2005-10-10 2:28 UTC (permalink / raw)
To: grub-devel
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
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.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFDSdHZY/rXIPQviuERAoqSAJ9CBBGasgGbTP1daGKIhAOjwJoGTQCgmUKt
hx7Pp0UFf8LtOnx/V9XWNRA=
=Dlgh
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Booting homebrew ELF kernel on NewWorld OpenFirmware 3.0?
2005-10-10 2:28 Booting homebrew ELF kernel on NewWorld OpenFirmware 3.0? Andrei Warkentin
@ 2005-10-10 8:08 ` Olaf Hering
2005-10-10 15:03 ` Andrei Warkentin
2005-10-15 22:35 ` Andrei Warkentin
0 siblings, 2 replies; 6+ messages in thread
From: Olaf Hering @ 2005-10-10 8:08 UTC (permalink / raw)
To: The development of GRUB 2
On Sun, Oct 09, Andrei Warkentin wrote:
> 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.
Noone except IBM CHRP cares about the PT_NOTE.
Proof: yaboot doesnt have one, and yaboot works fine for everyone.
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Booting homebrew ELF kernel on NewWorld OpenFirmware 3.0?
2005-10-10 8:08 ` Olaf Hering
@ 2005-10-10 15:03 ` Andrei Warkentin
2005-10-10 22:01 ` Olaf Hering
2005-10-15 22:35 ` Andrei Warkentin
1 sibling, 1 reply; 6+ messages in thread
From: Andrei Warkentin @ 2005-10-10 15:03 UTC (permalink / raw)
To: The development of GRUB 2
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
Thank you for your reply. Thus, all I need for OF 3.0 to load my
``kernel'' is just a statically-linked ELF file, with proper
endianness, and a _start symbol? Does anyone know how well OF 3.0
deals with different endianness if at all?
Thanks again for the information and have a great day.
On Oct 10, 2005, at 3:08 AM, Olaf Hering wrote:
> On Sun, Oct 09, Andrei Warkentin wrote:
>
>
>> 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.
>>
>
> Noone except IBM CHRP cares about the PT_NOTE.
> Proof: yaboot doesnt have one, and yaboot works fine for everyone.
>
> --
> short story of a lazy sysadmin:
> alias appserv=wotan
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)
iD8DBQFDSoLCY/rXIPQviuERAk9GAJ4tv/4HABaAjQ76tFp+RbyJ95BmtwCaA78t
rkdVPC189DlMz1b2qjQkB9I=
=lqdQ
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Booting homebrew ELF kernel on NewWorld OpenFirmware 3.0?
2005-10-10 15:03 ` Andrei Warkentin
@ 2005-10-10 22:01 ` Olaf Hering
0 siblings, 0 replies; 6+ messages in thread
From: Olaf Hering @ 2005-10-10 22:01 UTC (permalink / raw)
To: The development of GRUB 2
On Mon, Oct 10, Andrei Warkentin wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hello,
>
> Thank you for your reply. Thus, all I need for OF 3.0 to load my
> ``kernel'' is just a statically-linked ELF file, with proper
> endianness, and a _start symbol? Does anyone know how well OF 3.0
> deals with different endianness if at all?
_start is the ELF entry point, it can be anywhere in the file.
I dont know how OF deals with endianess.
--
short story of a lazy sysadmin:
alias appserv=wotan
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Booting homebrew ELF kernel on NewWorld OpenFirmware 3.0?
2005-10-10 8:08 ` Olaf Hering
2005-10-10 15:03 ` Andrei Warkentin
@ 2005-10-15 22:35 ` Andrei Warkentin
2005-10-16 16:19 ` Hollis Blanchard
1 sibling, 1 reply; 6+ messages in thread
From: Andrei Warkentin @ 2005-10-15 22:35 UTC (permalink / raw)
To: The development of GRUB 2
Thanks for your help. Right now I've gotten to the point where I can
print ``hello world'' and exit back to OpenFirmware.
It is interesting though that I cannot ``boot'' it again (or for that
matter launch BootX and procede back into OS X) until I reboot the
machine.
When I boot my own kernel again I get a CLAIM Failed. When I boot
BootX I get ``illegal instruction executed``. As far as I understand,
it is because OF CLAIMed the memory area where it was loading my
image, and after my kernel quit, that area was still CLAIMed by OF,
so it couldn't CLAIM it again. Is there some way of convincing OF to
free up the memory it just gobbled up, after my kernel had exited?
Thanks again.
On Oct 10, 2005, at 3:08 AM, Olaf Hering wrote:
> On Sun, Oct 09, Andrei Warkentin wrote:
>
>
>> 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.
>>
>
> Noone except IBM CHRP cares about the PT_NOTE.
> Proof: yaboot doesnt have one, and yaboot works fine for everyone.
>
> --
> short story of a lazy sysadmin:
> alias appserv=wotan
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Booting homebrew ELF kernel on NewWorld OpenFirmware 3.0?
2005-10-15 22:35 ` Andrei Warkentin
@ 2005-10-16 16:19 ` Hollis Blanchard
0 siblings, 0 replies; 6+ messages in thread
From: Hollis Blanchard @ 2005-10-16 16:19 UTC (permalink / raw)
To: The development of GRUB 2
On Oct 15, 2005, at 5:35 PM, Andrei Warkentin wrote:
> Thanks for your help. Right now I've gotten to the point where I can
> print ``hello world'' and exit back to OpenFirmware.
> It is interesting though that I cannot ``boot'' it again (or for that
> matter launch BootX and procede back into OS X) until I reboot the
> machine.
> When I boot my own kernel again I get a CLAIM Failed. When I boot
> BootX I get ``illegal instruction executed``. As far as I understand,
> it is because OF CLAIMed the memory area where it was loading my
> image, and after my kernel quit, that area was still CLAIMed by OF, so
> it couldn't CLAIM it again. Is there some way of convincing OF to free
> up the memory it just gobbled up, after my kernel had exited?
The real problem is that many firmwares are not well-tested for unusual
cases like this.
It's probably possible to fix this up with a Forth script, but
reset-all isn't too inconvenient...
-Hollis
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-10-16 16:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-10 2:28 Booting homebrew ELF kernel on NewWorld OpenFirmware 3.0? Andrei Warkentin
2005-10-10 8:08 ` Olaf Hering
2005-10-10 15:03 ` Andrei Warkentin
2005-10-10 22:01 ` Olaf Hering
2005-10-15 22:35 ` Andrei Warkentin
2005-10-16 16:19 ` Hollis Blanchard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.