Skip to content

A primitive demo of Clang being used to compile a super simple 'kernel' (loose term) for the i686 architecture.

License

Notifications You must be signed in to change notification settings

enumouse/clang-kernel-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

clang-kernel-demo

A primitive demo of Clang being used to compile a super simple 'kernel' (loose term) for the i686 (x86) architecture. While this is not a full kernel, this demo shows a super minimal example of getting bare-metal software to compile using Clang. This demo is based on this project to help me focus purely on build aspects.

Screenshot

Building

This sample uses only Clang, making it easy to build. The build process is simply a script to keep things simple, but of course this should not be done in a full project.

sh build.sh

If you are also a macOS user, I would avoid using Apple Clang and instead opt for a standard copy of Clang: I sourced mine via Homebrew. (brew install llvm)

Run it!

This can be executed in Qemu without a bootloader via -kernel bin/kernel.elf

Useful Resources

Here are some external resources which may help you further in your journey :)

About

A primitive demo of Clang being used to compile a super simple 'kernel' (loose term) for the i686 architecture.

Topics

Resources

License

Stars

Watchers

Forks