help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to reuse the the part of codes about file system in grub ?


From: Arch Stack
Subject: How to reuse the the part of codes about file system in grub ?
Date: Thu, 6 Aug 2015 21:27:43 +0800

I found that grub support for reading many type of file system. Now I want to write a file system driver to read them on Windows like ext2fsd ,but support many type of file system,with the help of the source code in grub.
Because most of the file systems are written in a single C source file with an uniform interface (grub_fs) , and grub is independent from special OS (Windows , Linux ...),I think that it's possible to split them from grub to an independent library.
But the codes depend on mm.h, misc.h,disk.h, dl.h, types.h, fshelp.h and many other header files , and many of them may should be written to achieve my goal.
I think there must have easier way to do it , especially when I found that grub provide a user-mode program 'grub-mount' , which can be ran on Linux with the help of FUSE.
I haven't read the source code of grub-mount, but I think that it's very helpful for me and I can wirte a file like this to achieve my goal.

Now my question is:
1.How can grub-mount be compiled singly, which argument should I pass to 'make' ?
2.Must I rewrite many of the header files, such as disk.h to make it runnable in a driver on Windows? Or I should change the structure of grub?
3.Why not split the file system part in grub to an independent library,which may be used by other people who want to read special file system?  And I found that grub implemented many crypto, and I think they can be changed to an independent library either.

By the way, the driver I want to write will be open source on github, and if you can show me the way to do it, I may announce what I have done when I achieved something. And if the part can be changed to an independent library, I may try to write a python or other languages' library with it if I have free time.

Thank you, and sorry for my poor English!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]