Archive for September, 2008

Updated Downloads

Tuesday, September 30th, 2008

I updated the CD image and the binaries archive in the downloads section today to the latest build. This features the newly improved keyboard driver (which was previously disabled, as an optimisation error produced a general page fault).

The screenshot of this version has also been updated, as the new version looks slightly different. While updating this, I also put the lightbox script back into the new theme.

New Screenshot

Sunday, September 28th, 2008

I posted a new screenshot of Symmetry running in Virtualbox, just after I finished the basic initrd support today. I also moved the older screenshots into the screenshot archive, because the main screenshot page was getting far too big.

I will probably post a screenshot of the GRUB splash as well, but I should alter it first because it still says “Stephen’s Operating System” on it instead of the new name… Afterwards, I will also make a new CD image and post it in the downloads.

Symmetry’s VFS

Sunday, September 28th, 2008

I finished Symmetry’s basic virtual file system today. Right now, the only thing that gets mounted on it is the dev directory, and a few files off the ramdisk. The ramdisk (or initrd) is just a tar archive that GRUB loads, and Symmetry parses and mounts on the filesystem. I chose a tar archive over a custom tutorial (as is used in JamesM’s tutorials, which my VFS was somewhat based on), because this way I don’t have to make a program to write the initrd, parsing it is almost as simple as a basic custom FS, and most people would have tar installed, so I can use it in the makefile.

The code, as always, is in our repository at Gitorious.

Heap management

Sunday, September 21st, 2008

I’m working on heap management at the moment with Symmetry - now I can dynamically allocate memory, and I have the necessary infrastructure to free it as well - I just have to finish off that function.

I also added a PIT driver (as I will need that for multitasking) and I also did a quick keyboard manager (the callback just prints out a word), but that isn’t working too well - as soon as a key is pressed, I get a general protection fault…

Speaking of general protection faults, my ACPI code triggers one on my computer (when running it as the main OS) but not in Virtualbox, QEMU or Bochs… So, I have to fix that, although it could be quite hard to track down, not being able to test it in an emulator… I also get a GPF when enabling memory management in Bochs, so I will also have to see if that happens on real hardware…

Standard Output Stream Implementation

Tuesday, September 16th, 2008

Today I wrote an ostream implementation for Symmetry that uses the existing textmode functions. Now, instead of using textmode::write(text), you can just use cout << “text” like you do in normal C++. It has some non-standard additions (like the ability to set the colour of the text) and doesn’t implement many of the standards, but that doesn’t matter - this implementation is just for the kernel (not general userspace programs).

I’m still working on the ramdisk and vfs, but I’m having a problem with my memory allocator… Right now, if I try to use allocated memory, I just get a page fault. It’s probably because I haven’t made my heap management able to deal with paging. So I suppose I’ll work on that next - I do (as I’ve been saying for a while) need a better heap manager anyway!

The start of a VFS

Saturday, September 6th, 2008

I just pushed some code into master that can parse a tar archive. I decided to use tar as the format for Symmetry’s ramdisks because it means that I can have the ramdisk generated by just putting one line in a makefile (instead of having to make a custom utility to make it), and because it makes it far easier to edit the ramdisk again without needing a custom tool.

Right now, the names and contents of the files on the ramdisk are just printed out at startup, but eventually the files on the ramdisk will be added to the VFS (which I am yet to write). After I’ve got the VFS going, (and written some better heap management), I’m probably going to have a crack at putting elf executables on the ramdisk and have Symmetry parse and execute them! I’ll also do multitasking and user mode then, so I can run more than one executable at once, and run them at lower privileges than the kernel.

Paging Done

Monday, September 1st, 2008

Well, I finished paging at last… I’m not sure what I’m going to do now - I do need proper heap management, but it would probably be more fun to get multitasking done.

I should probably get my paging code to use the amount of memory reported by Grub rather than assuming a number like 16 MB…

I’d also like to start porting Newlib to my OS. It is kind of useless as long as I don’t have a VFS and ramdisk to load some executables from, and I will need to work out how to load ELF executables as well. Maybe I’ll get the C library and ELF parser working, and then just load a statically linked executable (like a shell) as a module with Grub just for fun at first…

But once I do have a VFS and multitasking working, Symmetry might actually be usable… I’ll port a shell like Bash or Dash, and then maybe an editor like nano. These will have to be run from a ramdisk until I get a CD-ROM driver and support for some filesystems.