LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Creating a Filesystem Driver (https://www.linuxquestions.org/questions/linux-newbie-8/creating-a-filesystem-driver-820109/)

Zymus 07-15-2010 11:35 PM

Creating a Filesystem Driver
 
Hello, I am trying to create a driver for a particular filesystem format(FATX) because one does not exist natively for linux. So my question is this. I know the format the file system is in, but how do i make a driver for it? I mean, i want people to be able to do, for example
'sudo apt-get install fatx'

And then it downloads the driver, and bam, they can read the fatx file system? What steps would i have to take to accomplish this?

sag47 07-16-2010 12:45 AM

Do you already have the kernel module written? If so then you must follow the debian policy manual before it will be accepted into any of the debian repositories.

http://www.debian.org/doc/debian-policy/

zaks_974 07-16-2010 12:47 AM

Hi Zymus,

apt-get and tools alike are used for user space packages and NOT for kernel space modules (drivers). If at all you plan to write your driver, you could write the driver and test it and release it to the kernel groups (maintaiiners), they could take the same and incorporate in the main kernel if they find it good.

OR

Write the driver and release the source code. Tell people against which version of linux you have compiled. Needed users can download the source files and build the module with the command
make -C /usr/src/`uname -r` SUBDIRS=$PWD modules

jf.argentino 07-16-2010 01:54 AM

Or use FUSE to write your driver in user mode. I'd start with that solution before trying to make a kernel-land driver.

Zymus 07-16-2010 02:42 AM

I do not have the kernel module written. What steps(and in what language) do i have to take to get started from the absolute start?

zaks_974 07-16-2010 06:34 AM

kernel is in C and hence your module should also be in C

Google search for writing device drivers from scratch and you will find many results for the same

jf.argentino 07-16-2010 05:34 PM

Quote:

What steps(and in what language)
Use FUSE...

1°) Kernel development is far more difficult than user space ("normal") programming. With FUSE, you can do the sugar for your fs in user space.

2°) Kernel modules are in C, no alternative there (see this and that). With FUSE come plenty of different languages wrappers.


All times are GMT -5. The time now is 05:09 PM.