Skip to content

im bored so lets learn comp arch and make an OS

Notifications You must be signed in to change notification settings

sjalkote/thonkOS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

thonkOS

im bored so lets learn comp arch and make an OS

Notes

The Makefile contains the bulk of the logic for automated builds and runs. The scripts within it can be used to compile the kernel and create a bootable ISO.

Each GitHub actions workflow run also generates an artifact of the ISO image that can be downloaded.

Important

I'm on macOS where the toolchain is missing the ELF binaries for Limine, so I set the Makefile to use the TOOLCHAIN_PREFIX := x86_64-elf- by default (you can install the GCC cross-compiler with brew install x86_64-elf-gcc).

If you are not using macOS you can change this variable or specify the empty prefix in your make commands (e.g. make TOOLCHAIN_PREFIX="" iso).

To create the bootable ISO image:

  1. Run make -C limine if you haven't before to build the limine utility.
  2. Run make iso which will handle the rest and generate the file in out/thonkOS.iso.

To run the OS using QEMU you can use the make run script (automatically rebuilds ISO when necessary).

Tip

I created a really useful run config for CLion that combines gdb and QEMU's built in gdb server with CLion for native debugging in the IDE. The run configuration is located at .run/GDB.run.xml, so take advantage of the goated CLion debugger UI.

firstscreenshot

Using bear you can generate a compile_commands.json file for the clangd language server to use.

make clean; bear -- make

About

im bored so lets learn comp arch and make an OS

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors