cfenollosa / os-tutorial

How to create an OS from scratch
BSD 3-Clause "New" or "Revised" License
27.26k stars 3.3k forks source link

How to add a filesystem #150

Open ajh123 opened 4 years ago

ajh123 commented 4 years ago

@cfenollosa @ss18 @sapsaldog @wellingguzman @alhaad How would I add a filesystem to this os. I ave been reading the os the os dev wiki the FAT file system is the easiest on to add! But i don't know how to add it to this os

sapsaldog commented 4 years ago

It isn't so simple clearly to be explained here, but there are lots of resources related to this. I recommend you to research and read books more though.

Basically, a filesystem is a tool to determine how to read and save data by using a disk.

You need to integrate your code with a disk device driver, the filesystem you choose, and commands(or API) related to this.

The simpler version of your filesystem can be by using only memory (like memory disks) instead of disk-related things.

ajh123 commented 4 years ago

@sapsaldog I know what a filesystem dose, but I dont know how to code one in edit: this reply might be a bit silly

sapsaldog commented 4 years ago

No offences, but I don't think there is someone who willing to teach this every detail at least on Github. Hope you find your answer.

ajh123 commented 4 years ago

thank you, also i did add a FizzBuss "command" to the shell

shreyaslad commented 4 years ago

You need a disk driver first. Then you can start implementing a specification.

here are some examples: https://github.com/qloader2/qloader2/tree/master/src/fs

seriocomedy commented 4 years ago

ngl you could probably implement a tar fs in the same amount of lines as a fizzbuzz command