The loading error happened because Forth stack was in the middle of the kernel file being loaded. I moved it away.
Now, with an ELF kernel file as -hda:
2 > boot disk [sparc] Booting file 'disk' with parameters '<NULL>' Unknown filesystem type Loading image... segment 0 addr:0x0 file:0x2780e0 mem:0x2a3828 loading... clearing... clearing checksum... ok Loaded 2588896 bytes entry point is 0x4000 Jumping to entry point... halt, power off
Looking at /tmp/qemu.log we find that Linux mapped itself to 0xf0000000, called a few Openprom functions and because of the bad results decided to halt.
Now we need to implement the Openprom functions for browsing the device tree and others in romvec.c. For example, the sequence Linux uses to find root node properties is something like:
node = nextnode(0); // get handle for "/" ok = getprop(node, NULL, &str); // str should be the first property, for example "compatible"
How can I get this kind of handles from C?
It would be nice to get booting by loading boot sectors working so that instead of Linux we can try SILO.
_________________________________________________________________ Express yourself instantly with MSN Messenger! Download today it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/