Re: Newbie looking to figure out how to do a port!
[email protected] (Peter Seebach) Wed, 15 Feb 2006 11:28:40 -0600
| Newsgroups | gmane.os.netbsd.devel.ports |
|---|---|
| Message-ID | <[email protected]> |
In message <[email protected]>, "Nathan J. Willia ms" writes: >For systems like this, there generally isn't a "native bootloader" in >the sense of /boot on an i386 system; just have RedBoot load and jump >to the kernel. You need to pick an address above where RedBoot is, as >it doesn't relocate itself or anything like that. Okay, I'm with that so far. And I can find a safe address by using elf tools to look at my eCos binaries, which are just big ELF files too. :) (I ported Frotz to this; I now have a very nice embedded system that, uhm, plays Zork.) >__start, actually. Look in obs200_locore.S and read from there; there >are a couple of obvious addresses that may need tweaking, and from >there it jumps into initppc() in obs200_machdep.c. You should be able >to walk the code from there and find the bits that are >obs-specific. Once you have the console going (consinit()), you should >be able to debug your way to happiness; before that, you may need a >couple of debugging aids to figure out where your code is. LEDs can be >helpful here, as can hand-crafted routines to dump a few bytes on the >serial port in the state RedBoot left it in before consinit() runs. Ahh! So those would be the files to clone, then modify. Excellent! Now that I know which code to read, I can probably get some traction on this. -s