Page 1 of 1

fuze2 - Hobby OS

Posted: Tue Oct 14, 2008 2:03 pm
by dosfan
Hi

After many years of reading the forums, I've finally registered an account and thought I'd introduce myself and my latest kernel project 'fuze2'. This is my 2nd significant attempt at a monolithic unix-like kernel for x86 (how many people stopped reading after that line ;)).

After a couple of months of playing with it on/off it is able to execute a statically linked ELF binary from an ext2 filesystem.

Features all the usual stuff, demand paging (with C-O-W), VFS with ext2 read-only support etc etc.... It's a hobby project so progress is slow. My main aim is to get it self-hosting as quickly as possible with minimal legacy stuff implemented. Long term aim is stable kernel + GUI.

I have no idea when I'll release source and binaries, but it will be GPL'd.

The screenshow below shows it demand paging a 'Hello, world!' binary.

Re: fuze2 - Hobby OS

Posted: Tue Oct 14, 2008 3:36 pm
by AJ
Hi and welcome!

Looks like you've got a lot of the support/background stuff done thoroughly and thought about the design - I'll be interested in following your project.

Cheers,
Adam

Re: fuze2 - Hobby OS

Posted: Mon Nov 03, 2008 3:50 pm
by dosfan
After much head scratching.. I've got GNU Bash running!!!

The problem is I don't have a keyboard driver (yet). I ghetto rigged my 'pccon' tty driver to return 'echo $PATH' in the buffer :)

Code: Select all

char *st = "echo $PATH";
int pccon_read(struct device_t *dev, off_t offset, uint32 count, uint8 *buf, int *bytes_read)
{

	if(st[boo]=='\0')
		return 0;
		
	buf[0] = st[boo];
	*bytes_read = count;

	boo++;
	return 0;
	

}
The screenshot below is really messy. Black text is kernel output, green/blue is userland. If you look closely you can see the bash prompt and the result of 'echo $PATH'. The GPF at the end is because exit() returns as it's not implemented (I'm so lazy....)

Re: fuze2 - Hobby OS

Posted: Wed Nov 05, 2008 1:57 am
by xyzzy
Looks good! To make output a bit less messy, why don't you push kernel output onto a serial port or something? I have most of my kernel's output going to serial port, in particular debug output. Only important kernel messages go to the screen.

Re: fuze2 - Hobby OS

Posted: Wed Nov 05, 2008 11:04 am
by dosfan
I've suppressed most of the output now.

I hacked together a keyboard driver in about 5 minutes. Likely won't work on RH, but I want to continue on more important things.


Right now bash can fork and execve another binary. The shell hangs because no waitpid.

PDKsh also runs :) If I get the time I plan to create a bridge between bochs and a simple telnet server for a laugh...

Re: fuze2 - Hobby OS

Posted: Fri Nov 14, 2008 2:54 pm
by dosfan
I've been banging out code recently and implemented a few more features.

Newlib's getcwd() can now work out the working directory via sys_stat/sys_getdents calls. Bash is also able to fork/execve/wait and return successfully. I'm trying to debug a race after a fork that's causing the child to die immediately (sometimes)

I've decided the first public release will be when the kernel is able to compile itself. I was also considering releasing the source into the public domain. The reason being there are already more than enough (better) Unix kernels under various licenses. In order for this to be the slightest bit useful it might as well be unencumbered.....I do it only for the love ;)

On a side note, has anyone succesfully compiled the GNU coreutils package with newlib??