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.

Thursday, May 07, 2009

More Updates!

My 3C90X emulation for QEMU works - and by works I mean I tried multiple guest operating systems and they all connected to the internet correctly via my emulation.

You can patch your QEMU 0.10.3 source tree with the patches at http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg00205.html to enable the emulation.

And in Pedigree-related news, I've started work on a basic installer system which uses Python to copy the files to the disk. This will let me create a quick and easy install method which is highly customisable.

The installer will be under Pedigree's license and should be portable enough to apply in numerous other environments.

Friday, May 01, 2009

Something Unusual...

A lot has happened since I last posted here. I've dropped Mattise and rejoined the Pedigree project (http://code.google.com/p/pedigree).

The Pedigree project has allowed me to do some pretty crazy things - writing all sorts of code including a fully functional TCP/IP implementation.

And that's what's brought me back here.

I've got a few 3Com 3C90x NICs lying around the place here, and I thought it'd be nice to write a driver for them so I could test out Pedigree on some of the boxes I have around the house. However, I struck a problem very quickly - no emulator for x86 has a 3Com card emulated!

A quick Google search showed me that PearPC had an emulation of one, but because it's a PPC emulator it wasn't useful to me (our PPC port is still a bit behind, unfortunately). PearPC's emulation is licensed under the GPLv2, as is QEMU's (our emulator of choice). So I thought it'd be fun to port it across.

The first hurdle was that PearPC was in C++ and QEMU in C, and their entire interface to the virtual state was different. After an hour or two I'd fixed that up. However, I ran into a slight problem - the emulation was incomplete. So for the past day and a half I've been reading the specification for the card and updating my emulation code, while also updating my own driver.

So I've been working on a driver for (and an emulation of) this NIC, which has been a huge challenge and all up, a lot of fun!

It's an amazing feeling when you successfully create and close your first TCP connection. You can imagine how much more incredible it is when you watch "lynx" (the text-based browser) running through your NIC driver, controlling your emulated NIC, do a full request and print the page.

I will be submitting the 3C90x emulation as soon as it's more complete, cleaned up a bit, and most importantly - tested!