This post guides you through complete steps of building your first FUSE (File System in User SpacE) program that will contain one file with the contents Hello, World. The development will happen on any Linux system that has MinGW cross compilation packages installed. After that you will be executing the program on Windows platform with Crossmeta to verify its operation.
- Mingw32 Cross Compilation packages gcc
- Clone of Crossmeta FUSE SDK from cxfuse
- Clone cxfuse repository from github. The sample programs are in hello and hello_ll
# git clone https://github.com/crossmeta/cxfuse ... # ls hello hello_ll include lib README.md sshfs sys # cd hello # ls # hello.c Makefile Makefile.mingw SOURCES
- Use the Makefile.mingw to build the target hello.exe
# make -f Makefile.mingw
Deploy and Test
Obtain the latest Crossmeta FUSE system installer package that includes EV code signed FUSE driver modules for all Windows releases. The installer also contains the runtime Crossmeta system with additional FUSE programs sshfs and fuse-nfs.
- Extract All of the Crossmeta FUSE zip archive which also contains the setup.exe program
- Try to Run as administrator while launching setup.exe
- The Crossmeta setup program will navigate you through the installation setups with easy to follow dialogs. Usually you have to click Next
- Once the Crossmeta setup program finishes successfully the Crossmeta files will be available in the V: drive.
- There is no need to reboot the system.
- Transfer the newly build hello.exe from Linux to Windows Crossmeta directory c:\program files\crossmeta
- Start the Crossmeta FUSE driver
c:\program files\crossmeta> net start cxfuse
- Launch your FUSE program hello.exe with /mnt as mount point
c:\program files\crossmeta> hello /mnt Sorry run in background not supported
- Any file system requests to the mount point /mnt will be redirected to the hello fuse program. In Windows namespace /mnt is visible as v:\mnt to any windows application. The Crossmeta aware applications have POSIX namespace /
c:\program files\crossmeta> dir v:\mnt
- The FUSE program hello will stop when /mnt is unmounted.
c:\program files\crossmeta> umount.exe /mnt
Hope you enjoyed this simple tutorial of building your first FUSE hello program for Windows in a cross compiled MinGW32 environment.
Crossmeta FUSE for Windows
FUSE SDK Github project repository cxfuse
Leave a Reply