Introduction

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.

Prerequisite

Build

  1. 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
  2. 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.

  1. Extract All of  the Crossmeta FUSE zip archive which also contains the setup.exe program
  2. Try to Run as administrator while launching setup.exe
  3. The Crossmeta setup program will navigate you through the installation setups with easy to follow dialogs.  Usually you have to click Next
  4. Once the Crossmeta setup program finishes successfully the Crossmeta files will be available in the V: drive.
  5. There is no need to reboot the system.
  6. Transfer the newly build hello.exe  from Linux to Windows Crossmeta directory c:\program files\crossmeta
  7. Start the Crossmeta FUSE driver
    c:\program files\crossmeta> net start cxfuse
  8. Launch your FUSE program hello.exe with /mnt as mount point
    c:\program files\crossmeta> hello /mnt
    Sorry run in background not supported
  9. 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
  10. The FUSE program hello will stop when /mnt is unmounted.
    c:\program files\crossmeta> umount.exe  /mnt

Demo

Crossmeta FUSE Demo

Crossmeta FUSE running the sample fuse hello program

Conclusion

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

Please follow and like us: