Re: Kernel progress
Jean-Baptiste Boric <[email protected]> Sat, 10 Jan 2015 20:10:20 +0100
| Newsgroups | gmane.os.netbsd.ports.playstation2 |
|---|---|
| Message-ID | <CAH69Aie+S5o4XaaX3NKLD3nVKm2VVh+Hab8djfnJv8L5x5=+ig@mail.gmail.com> |
2015-01-10 18:01 GMT+01:00 David Brownlee <[email protected]>: > How its going? Anything that is likely to boot on a standard playstation? :) It already does (for some definition of booting) :-) On the real hardware, the kernel can be booted using kernelloader3.0. I have a standard PlayStation 2 (SCPH-30006, no Network Adapter/Hard Drive/modchip, FreeMCBoot installed on Memory Card) with the serial port mod (see http://www.kanshima.net/mirrors/ee-sio/ps2-ee-sio.html and PS2DEV for details). On PCSX2, it can be booted by directly loading the ELF file. While it is useful for poking around with its integrated debugger, PCSX2 won't be able to support a NetBSD (or Linux) kernel because of various technical limitations (its objective is to run games and homebrews, not a full-blown operating system). For now, the kernel runs up to sysctl_init(), where it chokes on invalid pointers. The exception handler is working (or at least it was last time I stumbled upon an illegal instruction) and the kernel output is sent over the Emotion Engine's serial port. There's no drivers yet (had to comment everything due to bitrot), but if a proper serial port driver is written, I suppose DDB/KGDB might work over it. No drivers also means that without the serial port mod the kernel will boot, but nothing interesting will happen. Strangely enough, the real hardware and PCSX2 do not crash on the same spot. I don't have much time to work on this for now (exams...), but I plan on keep going. (How hard can resurrecting NetBSD ports be, anyway? Turns out pretty darn hard). Random notes : the code is on GitHub mainly for backup, but I can post a patch here if needed. I had to modify the kernel linker script for the gcc-mips-current external toolchain, so I broke every MIPS port. NOGCCERROR=1 is required. About the crash in sysctl_init() : for now I have no idea why it crashes, and no idea why PCSX2 behaves differently from the hardware in this case. For all I know, it can range from a stupid n00b mistake up to a toolchain issue.