Skip to content

derbuihan/sampleos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SampleOS

SampleOS is a simple operating system that I am developing for educational purposes. It is written in C and Assembly and is based on the x86 architecture.

Requirements

  • CLion
  • Docker
  • qemu
  • nasm
  • i686-elf-binutils
  • i686-elf-gcc

Build

$ docker build -f .devcontainer/Dockerfile -t clion/ubuntu/cpp-env:1.0 .
$ docker run --privileged --rm -it -v "$(pwd):/tmp/sampleos" -w /tmp/sampleos clion/ubuntu/cpp-env:1.0 /bin/bash -c "make clean; make all"

Run

$ qemu-system-x86_64 -hda bin/os.bin

Debug

$ i386-elf-gdb
(gdb) add-symbol-file ./build/kernelfull.o 0x100000
(gdb) substitute-path /tmp/sampleos /path/to/sampleos # If you are using a different path
(gdb) target remote | qemu-system-i386 -hda ./bin/os.bin -S -gdb stdio
(gdb) break kernel.c:86 # Breakpoint at the kernel main function
(gdb) c
(gdb) layout asm
(gdb) stepi

References

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published