Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Monday, May 11, 2009

The Plot Thickens (and the trail lengthens)

I started work on the Pedigree installer scripts recently, and whilst now I have an extremely powerful Python + ncurses installer script (copies files from a to b with installer pages and destination selection, with MD5 verification of installed files) I have realised that Pedigree isn't quite ready for it yet.

You see, for all of our testing we've been booting the kernel off a floppy disk with an initrd and using the hard disk to store all of our files (applications, config, etc). However, that approach doesn't quite work so well when we don't actually have a Pedigree-ready system state.

So I sat down and whipped up some ISO generation scripts, which means we now have Pedigree installer CDs. However, we don't have any method to read CD disks in Pedigree yet. What started as a simple concept (Python installer) has now developed into developing drivers for the CD drive and the on-disk filesystem format.

There's nothing wrong with that, of course, but it is slightly frustrating to not be able to jump straight into testing my installation scripts on Pedigree. If you're really interested, you can check out the progress of the installation side of Pedigree.

For all those excited about the concept of a Python + ncurses installer (highly customisable too :) ), you can see the most up-to-date scripts here. Keep in mind Pedigree has some unique requirements, and I haven't documented anything at the time of posting, so you're totally on your own if you do try them out.

Saturday, January 26, 2008

OS Development and Debugging

Well, I've finally gotten back into my OS developing - this is now the third rewrite of Mattise (titled "Mattise 3.0") and I'm truly starting from scratch on this one. I'm spending a lot longer getting the basic x86 code implemented (stuff like paging and the descriptor tables) and putting it through a lot of tests to verify that it's ready to do the job. Once I've finished with these tests I can add layers to it, such as context switching (threads and processes, although processes are really just a set of threads) or a driver system.

Debugging all this is proving to be the hardest thing out of all the code I've written. At the moment I have to use a whole bunch of printing calls to output state until I finally figure out the source of the problem (and hope it's not those same printing calls). I've heard of people writing a dprintf interface to the Bochs port E9 hack but I personally think that sounds pretty, well, hacky, and means testing in other emulators is harder. My favorite idea is a debugging system that talks to the kernel via a serial line, but I'd still need to verify that the serial line works properly. A serial driver could even be written inline, not using a proper driver interface, to make life easier.

I'm happy with my first couple of days re-entering the fray that is OS development on the x86 architecture. All I need to do is wait for the Intel Manuals to arrive in the mail and I'm set. I'll make an effort to keep this blog up to date with all that's happening as a reference point not only for everyone else but for myself.

The project page hasn't been modified yet but it's at http://www.sourceforge.net/projects/mattise.