How do you organize your kernel's code?
How do you organize your kernel's code?
I'm talking structurally here - how does everybody structure their code? This could mean directory structures, namespacing, etc. I'm curious as to what seems to be the most common ways used here.
- BrightLight
- Member
- Posts: 901
- Joined: Sat Dec 27, 2014 9:11 am
- Location: Maadi, Cairo, Egypt
- Contact:
Re: How do you organize your kernel's code?
My kernel is in assembly. The source code is structured like this:
Code: Select all
boot/
os/
drivers/
ex86/
You know your OS is advanced when you stop using the Intel programming guide as a reference.
- moondeck
- Member
- Posts: 56
- Joined: Sat Dec 19, 2015 12:18 pm
- Libera.chat IRC: moondeck
- Location: The Zone, Chernobyl
Re: How do you organize your kernel's code?
I have my kernel written in C, and i only have a /kernelio directory and a /power directory. Will make some subdirectories in /kernelio thou.
My operating system https://github.com/moondeck/hydrogen/
Re: How do you organize your kernel's code?
My operating system is composed of multiple modules, which may interact with eachother. It's implemented in C++.
- CorruptedByCPU
- Member
- Posts: 79
- Joined: Tue Feb 11, 2014 4:59 pm
Re: How do you organize your kernel's code?
assembly:
https://github.com/akasei/Cyjon
simply for me
Code: Select all
/bootloader
/build
/disk with omega.raw
/kernel.bin
/engine
/drivers
/network
/daemons
/library
/locale
/software
config.asm
kernel.asm
simply for me
https://blackdev.org/ - system programming, my own 64 bit kernel and software.
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: How do you organize your kernel's code?
Unless you want to rewrite an existing OS for the sake of it, there's always something specific to your OS that will be reflected in your folder structure. Most important thing here is not to be afraid to refactor your structure when you notice something doesn't quite work anymore.
I notice the above folder listings are for relatively smaller projects. Here's a larger example, but I don't expect you to make yours like that straight away.
I notice the above folder listings are for relatively smaller projects. Here's a larger example, but I don't expect you to make yours like that straight away.