Custom OS from scratch in C.
Find a file
cowmonk 6d2e453d27 Added Memory Paging + Formating Fixes
Memory paging was "fixed", there was previously a stub because I was
working out some compilation issue. Turns out, I had extern keyword
called to the structs. Stupidly, I forgot to declare the struct in the
header the whole time. Luckily that worked itself out, and now vga
memory is mapped.
2025-10-16 13:53:36 -07:00
isodir/boot/limine Getting rid of binaries and adding the limine boot config 2025-05-23 17:28:43 -07:00
kernel Added Memory Paging + Formating Fixes 2025-10-16 13:53:36 -07:00
scripts QEMU debugging via LLDB or optionally GDB 2025-07-21 14:10:43 -07:00
.gitignore Added Memory Paging + Formating Fixes 2025-10-16 13:53:36 -07:00
LICENSE Initial commit 2025-04-14 12:59:37 -07:00
Makefile QEMU debugging via LLDB or optionally GDB 2025-07-21 14:10:43 -07:00
README.md I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu) 2025-07-24 23:42:20 -07:00

Migrated from Rekketstone/cowos

cowos

Custom OS from scratch in C

Notes

Heavily UNDER DEVELOPMENT

I'm doing a (free) operating system (just a hobby, won't be big and professional like gnu).

BUILDING

You'll need a few things:

  • LLVM/Clang (default C compiler)
  • LLD (linker)
  • xorriso (iso creation)
  • git
  • make

OPTIONAL:

  • qemu (for virtual machine)
  • LLDB (debugging purposes)

After acquiring those just run make and it'll do everything for you:

make

By default the kernel is compiled with debug symbols, if you would like to avoid this, you can simply override the CFLAGS:

cd kernel/ # it is recommended to go to the actual directory yourself
make CFLAGS="-O3 -pipe"
llvm-strip --strip-all ./kernel/bin/cowos # strip everything
cd .. # return to root
make

Eventually in the future this will be changed to be something much more convienent, however for now the inclusion of debug symbols is nessacary for development.

RUNNING

There is now a script to automate running cowos, although it's quite simple right now, this is important for the future as cowos will eventually require a root partition and other things as it grows to userspace slowly. To run, simply run this in the root of the repository:

make run # This will require qemu

For developers, running with the DEBUG flag will launch lldb with qemu to help debug issues with cowos:

make DEBUG=1 run

if you do not like LLDB, I included a script called run-gdb in the scripts/ directory for the gdb fans out there. I personally want to keep this project as gnu-free as possible, since I want cowos to not be GNU/cowos, I want it to just be cowos. And this means that I will even avoid anything as simple as the debugger being used to be non-GNU. Run in the root like so:

./scripts/run-gdb

It will automatically exit qemu if gdb is exited, and by default gdb will run in tui mode.

Credits

  • Limine: modern, advanced, portable, multiprotocol bootloader and boot manager.

People

  • micl: random guy on the interweb in the LHL discord server gave me a free vga driver to use lol