files

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
zbeos
Posts: 6
Joined: Mon Jul 28, 2008 4:16 pm

files

Post by zbeos »

do all my files got in the same folder or should i divide everything up into different folders?
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: files

Post by 01000101 »

It's preference, and hardly worth asking in this forum.
NReed
Posts: 24
Joined: Wed May 28, 2008 10:56 pm

Re: files

Post by NReed »

while it is true that it is all a matter of preference and it is all up to the coder. I am running into a similar question of organization. So if some people could share their organization methods, some of us could learn from them.
blackcatcoder
Member
Member
Posts: 132
Joined: Wed Nov 03, 2004 12:00 am
Location: Austria
Contact:

Re: files

Post by blackcatcoder »

I divided the parts as followed:

/boot
/modules
/fs
/fs/vfs
/kernel
/kernel/ELF
/kernel/cpu
/mm
/include

It's up to the coder, don't divide it too much, just find the right middle so it's self explaining where things are, and so that others can brwose it easily :)
User avatar
01000101
Member
Member
Posts: 1599
Joined: Fri Jun 22, 2007 12:47 pm
Contact:

Re: files

Post by 01000101 »

/boot
/kernel
/drivers
/net
/filters
/experimental
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: files

Post by AJ »

Hi,

If you are planning on going multi-architecture (even just x86-32 and x86-64), it's worth making a strong distinction between "core" and architecture dependent files - and there must, of course, be a nice clean interface between the two (think of anyone wanting to port to a different architecture in the future...it could happen!).

Cheers,
Adam
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: files

Post by Korona »

Applications/<Name>/
Bootstrap/Binary/ (contains (floppy) images)
Bootstrap/Build/ (contains object code)
Bootstrap/Image/ (contains directories & files that are copied to the floppy image)
Bootstrap/Mount/ (on Linux the floppy image is mounted to this directory)
Drivers/Generic/<Name>/
Drivers/x86/<Name>/
DataFiles/Config/<Various configuration files>
Libraries/<Name>/ (contains userspace libraries)
Protocols/<Name>/ (contains headers file and helper classes for ipc protocols)
System/InitProcess/
System/InitScript/
System/<NameOfMyKernel>/Kernel/ (generic kernel files)
System/<NameOfMyKernel>/Runtime/x86/ (x86 specific kernel files)
System/MmLib/ (contains memory managers that are shared between the init process and the kernel)
Utilities/<Name>/ (contains utilities required to bootstrap the os e.g. a tool that generates the initrd)
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
User avatar
b.zaar
Member
Member
Posts: 294
Joined: Wed May 21, 2008 4:33 am
Location: Mars MTC +6:00
Contact:

Re: files

Post by b.zaar »

I try to keep it simple but obvious and this is my second directory structure as the first one was a bit too messy.

apps/[appname]/
boot/
docs/
drivers/[drivername]/
kernel/
kernel/asm/
lib/
lib/include/...
lib/libc/
lib/libk/
logs/
ramdisk/
tools/[toolname]/

If it makes it to another cpu down the track then i'll need to rethink it some.
"God! Not Unix" - Richard Stallman

Website: venom Dev
OS project: venom OS
Hexadecimal Editor: hexed
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: files

Post by JamesM »

Code: Select all

$ tree -d -I CMakeFiles
.
|-- build
|-- compilers
|   `-- dir -> /export/.pedigree
|-- dir -> ./compilers/dir
|-- docs
|   |-- code
|   |-- design
|   |   |-- design
|   |   |-- planning
|   |   `-- preliminaries
|   `-- docs
|-- images
|-- scripts
|-- src
|   |-- drivers
|   |   |-- arm
|   |   |-- common
|   |   |   |-- ata
|   |   |   `-- partition
|   |   |-- mips
|   |   |-- ppc
|   |   |   `-- test
|   |   `-- x86
|   |       `-- ata
|   |-- subsys
|   |   |-- dos
|   |   |-- native
|   |   |-- posix
|   |   `-- security
|   |-- system
|   |   |-- boot
|   |   |   |-- arm
|   |   |   |-- mips
|   |   |   |-- nutem
|   |   |   |   |-- src
|   |   |   |   |   |-- loader
|   |   |   |   |   |   |-- boot0
|   |   |   |   |   |   `-- boot1
|   |   |   |   |   `-- manager
|   |   |   |   `-- tools
|   |   |   |       `-- mkbootimage
|   |   |   `-- ppc
|   |   |-- common
|   |   |-- include
|   |   |   |-- machine
|   |   |   |   |-- arm_common
|   |   |   |   |-- arm_versatile
|   |   |   |   |-- mips_common
|   |   |   |   |-- openfirmware
|   |   |   |   |-- ppc_common
|   |   |   |   `-- x86_common
|   |   |   |-- process
|   |   |   |-- processor
|   |   |   |   |-- arm_926e
|   |   |   |   |-- arm_common
|   |   |   |   |-- mips32
|   |   |   |   |-- mips64
|   |   |   |   |-- mips_common
|   |   |   |   |-- ppc32
|   |   |   |   |-- ppc_common
|   |   |   |   |-- x64
|   |   |   |   |-- x86
|   |   |   |   `-- x86_common
|   |   |   `-- utilities
|   |   |-- kernel
|   |   |   |-- core
|   |   |   |   |-- lib
|   |   |   |   |-- process
|   |   |   |   `-- processor
|   |   |   |       |-- arm_926e
|   |   |   |       |   `-- asm
|   |   |   |       |-- arm_common
|   |   |   |       |-- mips32
|   |   |   |       |   `-- asm
|   |   |   |       |-- mips64
|   |   |   |       |-- mips_common
|   |   |   |       |-- ppc32
|   |   |   |       |   `-- asm
|   |   |   |       |-- ppc64
|   |   |   |       |-- ppc_common
|   |   |   |       |-- x64
|   |   |   |       |   `-- asm
|   |   |   |       |-- x86
|   |   |   |       |   `-- asm
|   |   |   |       `-- x86_common
|   |   |   |-- debugger
|   |   |   |   |-- commands
|   |   |   |   `-- libudis86
|   |   |   |-- linker
|   |   |   |-- machine
|   |   |   |   |-- arm_common
|   |   |   |   |-- arm_versatile
|   |   |   |   |-- au1500
|   |   |   |   |   `-- db1500
|   |   |   |   |-- mac
|   |   |   |   |-- malta
|   |   |   |   |   `-- bonito64
|   |   |   |   |-- mips_common
|   |   |   |   |-- openfirmware
|   |   |   |   |-- ppc_common
|   |   |   |   `-- x86_common
|   |   |   `-- utilities
|   |   `-- modules
|   |       |-- ata
|   |       |-- test2
|   |       |-- test3
|   |       `-- vfs
|   `-- user
|       |-- applications
|       |   `-- chess
|       `-- libraries
|           `-- 8086
|-- templates
`-- tests
Beat that.
User avatar
AJ
Member
Member
Posts: 2646
Joined: Sun Oct 22, 2006 7:01 am
Location: Devon, UK
Contact:

Re: files

Post by AJ »

:lol:
User avatar
Adek336
Member
Member
Posts: 129
Joined: Thu May 12, 2005 11:00 pm
Location: Kabaty, Warszawa
Contact:

Re: files

Post by Adek336 »

You support 4 architectures?
/arch/
/arch/x86/
/common/
/collection/
/ipc/
/module/
/memory/
/net/
/thread/
/tty/
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Re: files

Post by JamesM »

Adek336 wrote:You support 4 architectures?
/arch/
/arch/x86/
/common/
/collection/
/ipc/
/module/
/memory/
/net/
/thread/
/tty/
yes.
User avatar
inflater
Member
Member
Posts: 1309
Joined: Thu Sep 28, 2006 10:32 am
Location: Slovakia
Contact:

Re: files

Post by inflater »

CODE/BOOT
CODE/DATA
CODE/DATA/INC
CODE/DRIVERS
CODE/PASCAL
CODE/PASCAL/SPIRAL
CODE/PMODE
CODE/RMODE
CODE/SHELL

and the web site
SITE/DATA
SITE/EN
SITE/SK
SITE/PIC
My web site: http://inflater.wz.cz (Slovak)
Derrick operating system: http://derrick.xf.cz (Slovak and English :P)
zbeos
Posts: 6
Joined: Mon Jul 28, 2008 4:16 pm

Re: files

Post by zbeos »

thanks all i needed was a few opinions.
User avatar
thepowersgang
Member
Member
Posts: 734
Joined: Tue Dec 25, 2007 6:03 am
Libera.chat IRC: thePowersGang
Location: Perth, Western Australia
Contact:

Re: files

Post by thepowersgang »

/AcessOS - Fully Featured Version (Multitasking, Higher-Half)
/AcessBasic - Simple Version (Single Tasking, No VMem)
/CommonCode - Shared Code Between Versions (Drivers, VFS)
Kernel Development, It's the brain surgery of programming.
Acess2 OS (c) | Tifflin OS (rust) | mrustc - Rust compiler
Currently Working on: mrustc
Post Reply