Page 1 of 1
How do you organize your kernel's code?
Posted: Mon May 09, 2016 6:03 pm
by riparoony
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.
Re: How do you organize your kernel's code?
Posted: Tue May 10, 2016 5:13 am
by BrightLight
My kernel is in assembly. The source code is structured like this:
Re: How do you organize your kernel's code?
Posted: Tue May 10, 2016 5:26 am
by moondeck
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.
Re: How do you organize your kernel's code?
Posted: Tue May 10, 2016 5:35 am
by Techel
My operating system is composed of multiple modules, which may interact with eachother. It's implemented in C++.
Re: How do you organize your kernel's code?
Posted: Tue May 10, 2016 10:46 am
by CorruptedByCPU
assembly:
Code: Select all
/bootloader
/build
/disk with omega.raw
/kernel.bin
/engine
/drivers
/network
/daemons
/library
/locale
/software
config.asm
kernel.asm
https://github.com/akasei/Cyjon
simply for me
Re: How do you organize your kernel's code?
Posted: Tue May 10, 2016 12:01 pm
by Combuster
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.