January 19, 2008

Status 2008-01-19

The development of Punix is still hobbling along. It still needs a few things implemented before it can boot up completely; the three major components it needs are a memory allocator, a file system, and a Flash ROM block device driver. It already has most of the upper and middle layers of the file system written, but it lacks the low-level code to read and write an actual file system on a block device.

In the last month I've been adding a lot of support code for the file system, mostly taking code from UNIX V6 and V7 and re-writing it for Punix. I've been adding this and other low-level driver code (including a new and improved virtual terminal driver!) without testing each time. In fact, until last night it wouldn't completely link because it had some unresolved symbols.

A few nights ago I resolved the symbols (either by implementing the missing functions or by commenting out each reference to them) and linked it all together. Then I ran it in TiEmu to test it. I could step through it instruction-by-instruction, but at one point it tries to write to an illegal address and goes to the "address error" exception. At this point I discovered that the vector table containing the "address error" and other vectors is partially corrupted! See http://p094.ezboard.com/ftichessteamhqfrm5.showMessage?topicID=3486.topic, starting at the third post. I tried moving symbols around, even inserting literal values in the vector table, but those incorrect values (which Lionel Debroux suggests may be a certificate field) still appear there in the TIB file, even before it's loaded onto the calculator.

Today I reduced the test program to one file. I found that if the vectors table contains a symbol reference (even to a symbol in the same file), the certificate field appears. However, if the values are all hard-coded, the certificate field does not appear. This probably means it's a bug, or at least an undocumented feature, in the TIGCC linker.

Last, I'd like to mention that someone has volunteered to help work on some of the missing components, so hopefully this means development will pick up pace.

No comments: