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!
Posted in Development | No Comments »
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.
Posted in Development | No Comments »
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.
Posted in Development | No Comments »
August 30th, 2008
Well, along with the new name, I have just finished the first version of the new Symmetry web site. It is still slightly based on the Kubrick Wordpress theme, but now pretty much the only thing that remains from that is the sidebar.
I really like the site now - it is a lot cleaner than the old site, and I wanted to achieve a really clean look for the front page. I’ve hidden the sidebar on that page, and also made the main focus a big picture. It should be one of the first things you look at, so it contains a very short description of what Symmetry is. There is also more information below in three columns.
Posted in Site News | No Comments »
August 24th, 2008
Symmetry now can shutdown using ACPI! The code is not entirely finished, but there is still enough to shut the computer down. Thanks a lot to kaworu from OSdev.org for the great ACPI code.
Next, maybe I’ll look at standby… But in the meantime, I still have to finish paging and heap management.
It’s all in the latest Git if you want to check it out.
Posted in Development | No Comments »
August 24th, 2008
Well, I fixed the little build error that I was getting… Pretty much the only thing I had to do was to remove the prototype for the main() function, then rename it to _main(). This was because for some reason, the new version of GCC doesn’t let you have a function called main() that doesn’t have either zero or two arguments, and the first one has to be an integer.
Anyway, I suppose it’s back to work then!
Posted in Development | No Comments »
August 23rd, 2008
I haven’t really worked on my operating system lately, but I have done a little in the way of getting paging and some basic ACPI (!) support done.
I have been using Git to manage the project’s source code since I rewrote the C++ version, and today I found a pretty nice Git hosting site for open source development called Gitorious. The main repository will be hosted there now, instead of at the Google Code site as before.
Also, SoS now has a new name - Symmetry. I changed it for a few reasons. First, Stephen’s Operating System is kinda a lame name… Because of that I had been using SoS, but that still isn’t a really good name, because it has weird capitalisation, and names with OS in it are sort of unoriginal. Anyway, the abbreviation will continue to be sos, but the name of the project is now Symmetry.
Lastly, I upgraded to Ubuntu 8.10, which has a new GCC version. Just like last time, the operating system fails to build. Then, it was because it got too many warnings about char*s which should have been const char*s, and now it is that it doesn’t like me having one argument in the main function, and it wants the first argument to be an int. I don’t see why though, since I’m not using any standard libs or builtins or anything… It shouldn’t matter…
Anyway, I’ll try to find a solution for that eventually. But it’s annoying because I can’t really do much until I can build and test it…
Posted in Development, News | No Comments »
July 4th, 2008
Well, I worked today on rewriting the base of the kernel. The design is far better now, with proper architecture separation, and far less classes. So far, I have rewritten the C++ part of kernel.cc (which includes the main function and the kernel initialisation), moved the assembly part to the i386 arch folder, moved the runtime methods over, and ported all my old text-mode video functions to the new kernel.
All that remains now is to port the IDT, GDT keyboard code, timer code etc. over, and then I can continue on my way to implementing paging, a vfs, multitasking, etc.
Also, the makefile system could do with a rewrite, as the i386 target is kind of hard-coded into the build system. It’s not that bad though, and wouldn’t take that long to fix if I researched how to write makefiles properly.
Posted in Development | No Comments »
April 30th, 2008
Well, I’ve fixed all the char * warnings in the kernel, and now I’m going to refactor the code to make it more manageable and easier to port to other architectures. I’m also going to get rid of a lot of the classes I was using, because there isn’t any point in using them if you are going to only use one instance.
I never got around to moving to autotools, because I couldn’t get it to work… My system is working alright though, and I will improve it for more architecture independence.
Posted in Development | No Comments »
March 30th, 2008
I have completely changed the SoS build system recently, moving to Autotools, and currently, it doesn’t compile. Pretty much the only problem is that it tries to link to the standard C library, so I need to fix that, but everything else works fine.
I have also started using the GIT version control system, and I’ll have to use git-svn or something to sync it back to the Google Code SVN server.
The directory layout of the source has completely changed too - now pretty much the only thing that is the same as before is the actual source code! But that will need a big revamp though because the new GCC throws heaps of warnings now that you can’t assign a string to a char * - you have to use const char * instead. Not to hard to fix, but it will be fairly tedious because there are so many of those in the code.
Tags: autoconf, automake, autotools
Posted in Development | No Comments »