Skip to content

en0/rpos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

87 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rpos

Research Project Operating System.

I have made many attempts and building an operating system and never achieved my goal to satisfaction. After a significant amount of leanring and continuously misplacing my code, I have decided to keep it as simple as possible.

Link to docs

Goals

  • Kernel loads in higher half
  • Create flat GDT in kernel .text space
  • IDT gate install system where other code can install handlers
  • IRQ dispatch system where hardware handlers can install int handers.
  • Serial debuging on COM1
  • Coredump on FAULT/TRAP
  • RTC via PIT Channel 0
  • Setup physical memory manager
  • Setup Virtual memory manager
  • 8MB Stack just under the kernel in the virtual address space.
  • Kernel will pull from it's own small heap at 0xC0400000

Round 1 Feature Set

  • Kernel will not support multi-tasking but it will so plan on it.
  • Kernel will use an in memory ramdisk loaded as a modual.
  • Kernel will use multiboot loader (grub or other existing solution).
  • SYSENTER will be facilitated by NEWLIB but some functions will be stubbed.
  • No real driver system. Keyboard and 0x000b8000 video memory are the only requirements.
  • Kernel will EXEC from boot-time args. The intention is the in-ram-disk path to the shell.
  • Kernel will facilitate EXECs at runtime but will always fall back to the shell specified in the boot arguments.
  • Kernel EXEC will expect a staticly linked ELF executable.

Known Issues To Fix

  • END flag is not pointing to the correct spot in ram.

Example:

(GRUB) kernel (hd0,0)/boot/x86-elf-kernel shell=/bin/sh

  • This will execute the shell in user mode.
  • The shell can execute other programs but will not multi-task.
  • Shell will be re-executed when the program exits.

Required Tools

Configuration

config.mk contains most of the build directives that you can manipulate.

Building

To build the system you must first install or build the required tools and configure your enviroment.

  1. Building toolchain.

    The toolchain is, in this case, is GNU GCC and BINUTILS that will not link against GLIBC and targeting i686-elf binaries.

    There is a bash file in the scripts directory to build the toolchain for you. Please read through the config.sh file to make sure your folder structure is correct and download the 2 files in download.lst before running the build script. If you run into trouble, take a look at this guid: GCC_Cross-Compiler

  2. Configure build.

    Open configure.mk. Verify the compiler names match the ones you just created. Also, feel free to tweek any other settings.

    Also, verify that your compiler is in your path. There is a bash script in the scripts directory to add it for you assuming the compiler name is the default.

    $ . scripts/env.sh

  3. Review Options.

    You can look at the current env by running make info.

    You can also see what targets are available by running make options.

  4. Build the project.

    $ make

  5. Run the project.

    $ make run-src/kernel.

    You can run other targets the same way. run make options for more details.

About

Research Project Operating System.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published