Re: Newbie looking to figure out how to do a port!
[email protected] (Peter Seebach) Fri, 17 Feb 2006 08:44:37 -0600
| Newsgroups | gmane.os.netbsd.devel.ports |
|---|---|
| Message-ID | <[email protected]> |
In message <[email protected]>, Jachym Holecek writes: >Next step after you're done with ${foo}_start.S would be machdep.c, >you'll need to write an initppc()/bootstrap() alike. Can't comment >on RedBoot specific bits, though. Okay, I've gotten as far as compiling. I figured I'd make a kernel which crashed, then fill in the missing bits. Perfect success so far; instant reboot trying to run my kernel. The first thing that I'm having trouble with (no, really, it's not gonna be this bad ALL the way through) is in locore.S. RIGHT up at the top of the file. /* Get the board_config_data from openbios */ //lis %r3,BOARD_CFG_FP@h //ori %r3,%r3,BOARD_CFG_FP@l //mr %r31,%r3 /* Save value in r31 */ The problem here is that, while I am pretty sure there is no board_config_data, and no openbios... I do not know whether I should just leave this commented out, or should also replace it with something else, because I don't know what this is doing. It looks like it's grabbing a single value from an address BOARD_CFG_FP into r31, but I don't see anything USING this. It looks almost as though it was only used to grab memsize, in which case I can happily ignore it (fixed memory size on this system). Anyway, if there's any obvious points to look at for "machine reboots long before console attach", I wouldn't mind pointers. I am pretty sure this kernel shouldn't work, because all I've done so far is comment out the things that clearly depend on openbios, and clean up some macro names and such for the consinit code, which OUGHT to be the same on all 405GPr systems, since the UART is on-chip. -s