BMFS: Difference between revisions

1,450 bytes added ,  6 years ago
no edit summary
[unchecked revision][unchecked revision]
(Added link to documentation and how to open a directory.)
No edit summary
Line 170:
}
}
 
=== Creating a File System on the Development Machine ===
 
Sometimes, in creating an operating system, a file system has to be made in the development machine to transfer system files (such as programs or shared libraries).
 
For that reason, the BMFS utility program was designed. It allows a user to create a file system on a disk image and read and write to the file system.
 
To build the utility program, just use the standard 'make' and 'make install' commands in the project directory.
 
git clone https://github.com/ReturnInfinity/BMFS
cd BMFS
make
sudo make install
 
Create a disk image called 'bmfs.img' using the 'init' command.
 
bmfs init
 
To use a different name, use the `--disk` option.
 
bmfs --disk my-file-system.img init
 
Using `bmfs.img` is nice, because all the commands default to this name.
 
The rest of this tutorial assumes you have used the name 'bmfs.img'.
 
If this is not the case, just specify the name using the '--disk' option for each command.
 
To create a directory, us the 'mkdir' command.
 
bmfs mkdir /drivers
 
To transfer a file from the host system to the image, us the 'cp' command.
 
bmfs cp ahci-driver.sys /drivers/ahci.sys
 
To list the contents of a directory, us the 'ls' command.
 
bmfs ls /drivers
 
=== Reporting Bugs ===
 
If you think there is a bug in the file system implementation, report it on the project issue tracker [https://github.com/ReturnInfinity/BMFS/issues].
 
=== Going Further ===
Anonymous user