Go to file
2020-08-30 09:44:51 -05:00
.github Update issue templates 2020-08-01 09:00:13 -05:00
devfs Add a tar fs driver and posix_spawn 2020-08-23 14:05:38 -05:00
init Get fgets working and fix fputs 2020-08-23 17:49:43 -05:00
initrd add .gitkeep files for directores whose contents are ignored 2020-07-28 10:34:16 -05:00
initrd_drv initrd driver now properly handles a request to read more data than available 2020-08-23 17:34:24 -05:00
kernel Fix a bug where tasking_block would corrupt the tasking data structures 2020-08-30 09:41:50 -05:00
libc Fix a warning 2020-08-30 09:44:51 -05:00
patches Change stdint to be provided by gcc 2019-08-28 17:33:46 -05:00
pci Untrack compiled binaries 2020-08-23 08:51:33 -05:00
psinfo make debug now uses the plain gdb binary 2020-08-01 09:04:18 -05:00
stuff Remove unnecessary files 2020-07-24 07:14:52 -05:00
sysroot add .gitkeep files for directores whose contents are ignored 2020-07-28 10:34:16 -05:00
tar_fs Fix some memory leaks 2020-08-30 09:43:56 -05:00
vfs Add a tar fs driver and posix_spawn 2020-08-23 14:05:38 -05:00
vga_drv Fix warnings 2020-08-23 08:46:38 -05:00
.gdbinit Add a very basic exit function and fix kmalloc. 2019-08-25 17:32:08 -05:00
.gitignore Untrack compiled binaries 2020-08-23 08:51:33 -05:00
bochsrc.txt Fix vfs saying the message was sent from init's stdio mailbox. 2019-07-27 11:11:28 -05:00
bochsrc.txt.old Fix vfs saying the message was sent from init's stdio mailbox. 2019-07-27 11:11:28 -05:00
docindex.html Add libc documentaion + libc cleanup 2020-07-26 15:38:29 -05:00
ext2.img Essentially merge ext-prog-libc 2019-05-01 09:39:23 -05:00
image.img Add new partitioned image 2019-04-21 07:38:55 -05:00
install.rb Start work on an install script and add a Vagrantfile for a VM to run it 2019-10-20 09:43:17 -05:00
Makefile Add spinlocks 2020-08-30 09:35:12 -05:00
network.rb Remove most code for a blank start 2019-02-09 12:52:45 -06:00
orig_ext2.img actually remove lfs 2019-04-19 10:17:04 -05:00
README.md Update README.md 2020-08-23 09:57:34 -05:00
Vagrantfile Start work on an install script and add a Vagrantfile for a VM to run it 2019-10-20 09:43:17 -05:00

os

This is a hobby OS based on a microkernel. It currently supports:

  1. Basic preemptive multitasking with task states & exiting.
  2. Physical & virtual memory management
  3. Interrupts.
  4. The PIT, used to do preemption.
  5. The serial port, used as an output for logs. (driver in kernel, will eventually be moved out)
  6. RPC as the IPC mechanism
  7. A working VFS and devfs
  8. VGA text mode

Building (on Linux or Mac)

To build the OS, you will need a custom patched GCC cross-compiler targeted for my OS, and GRUB. Installing GRUB on:

  1. Ubuntu. GRUB is already installed.
  2. Another linux distro. GRUB is likely already installed, but if it is not, you will need to use your distribution's package manager to install GRUB.
  3. Mac. You will need to install Homebrew, then install the formula i386-elf-grub.

Building the cross-compiler

The instructions for building a cross compiler are here, though a few changes need to be made. First, you must download GCC 9.2.0 and Binutils 2.32, or the patches may not apply correctly. Next, you need to apply the patches located in the patches/ directory. Set $TARGET to i386-myos, not i686-elf. When running configure for both Binutils and GCC, you must pass --sysroot=<path to cloned github repo>/sysroot as an extra argument, otherwse the compiler will not be able to find the libc headers. Otherwise, the build is as normal.

Once the cross-compiler is built, the OS can be built by simply typing make.

Additional setup for development

To properly develop the OS, you willl need to install QEMU and GDB.

Installing QEMU on

  1. Ubuntu. Run sudo apt get install qemu
  2. Another linux distro. Use your distribution's package manager to install QEMU.
  3. Mac. Run brew install qemu

Installing GDB on

  1. Ubuntu. Run sudo apt get install gdb
  2. Another linux distro. Use your distribution's package manager to install GDB.
  3. Mac. Run brew install gdb (Note: It will warn about an unsigned binary, but this will have no impact on debugging the OS)

After this, you can run the OS in QEMU by typing make run, and start a remote debugging session by typing make debug. The serial port output of the OS is redirected to a file callled serout in the main directory.