Difference between revisions of "EmCOREFS"

From freemyipod.org
Jump to: navigation, search
(Created page with "emCOREFS is a FUSE-based filesystem that uses emCORE's Monitor API to provide communication with device's FS. It is still in very early state, but some features (directory listin...")
 
m (finally remove the requirement for gcc version)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
emCOREFS is a FUSE-based filesystem that uses emCORE's Monitor API to provide communication with device's FS. It is still in very early state, but some features (directory listing, reading files) are done.
+
emCOREFS is a FUSE-based filesystem that uses emCORE's Monitor API to provide communication with device's FS. It is mostly complete, and works well. It runs on both Linux and Mac OS X.
  
 
For communication with the device, this application uses libusb 1.0.
 
For communication with the device, this application uses libusb 1.0.
Line 6: Line 6:
 
You need:
 
You need:
  
1. GCC/Make
+
1. GCC and GNU Make (Xcode on OS X)
  
 
2. pkg-config
 
2. pkg-config
Line 12: Line 12:
 
3. libusb >= 1.0
 
3. libusb >= 1.0
  
4. libfuse >= 2.8
+
4. libfuse >= 2.8 (or fuse4x on x64 OS X)
  
5. maybe other packages
+
5. all dependencies of the above
 +
 
 +
===Installing needed packages on Ubuntu===
 +
sudo apt-get install gcc make pkg-config libusb-1.0-0-dev libfuse-dev
  
 
===Compiling===
 
===Compiling===
make - standard build, no debug messages, only fatal errors on startup are shown.
+
* standard build, no debug messages, only fatal errors on startup are shown.
 +
make build/emcorefs
 +
 
 +
 
 +
* debug build, some debug/error messages are shown. libusb debug messages are enabled, too.
 +
make debug
 +
 
  
make debug - debug build, some debug/error messages are shown. libusb debug messages are enabled, too.
+
You can prefix any of these with
 +
CFLAGS="-DDEBUG_USB_PACKETS"
 +
in order to have a dump of the usb traffic that's being sent and received.
  
 
===Testing===
 
===Testing===
make test - run the build without FUSE debugging messages, going into the background if it connects to the device successfully.
+
* test the connection and some basic emCORE functions. useful only to developers.
 +
make build/emcore-test
 +
./build/emcore-test
 +
 
 +
==Running==
 +
You need FUSE >= 2.8 installed. (or fuse4x on x64 OS X)
 +
 
 +
Currently tested on Linux (Ubuntu 11.04 x86) and Mac OS X (10.6.8 x64).
  
make testdebug - run the build in the foreground, showing FUSE debug messages in the terminal.
+
* Starting:
 +
./build/emcorefs <mountpoint>
  
==Running==
 
You need FUSE >= 2.8 installed.
 
  
Currently only tested on Linux (Ubuntu 11.04 in my case). Maybe an OSX-compatible version would appear at some point.
+
* Stopping:
 +
fusermount -u <mountpoint as seen in /etc/mtab> (on Linux)
  
Starting:
+
  diskutil unmount <mountpoint as seen in /etc/mtab> (on OS X)
  ./emcorefs <mountpoint>
 
Stopping:
 
fusermount -u <mountpoint as seen in /etc/mtab>
 
  
 
==Known bugs/issues==
 
==Known bugs/issues==
* Read-only support at the moment.
 
 
* Running FUSE with multithreading breaks file reading because of the way these are implemented on emCORE's side. Workaround: use the "-s" option.
 
* Running FUSE with multithreading breaks file reading because of the way these are implemented on emCORE's side. Workaround: use the "-s" option.
* Most errors are not handled properly, EIO (Input/output error) is given in many cases where there's a more descriptive error message available. Will be fixed in the future.
+
* Some errors are not handled properly, EIO (Input/output error) is given in cases where there's a more descriptive error message available. Will be fixed in the future.
 +
* '''Rename/move in the filesystem itself is currently disabled, since the underlying filesystem call crashes the emCORE kernel.''' Workaround: move the file/dir on another filesystem, then rename it if needed, then move it back.
  
 
==Future plans==
 
==Future plans==
* Implement write support.
+
* Merge some functions that are doing similar tasks to reduce code duplication.
* Merge some functions that are doing similar tasks to reduce code duplication. Return proper error codes in FS operations.
+
* Return proper error codes in FS operations.
  
 
==Bug reporting==
 
==Bug reporting==

Latest revision as of 15:07, 8 May 2014

emCOREFS is a FUSE-based filesystem that uses emCORE's Monitor API to provide communication with device's FS. It is mostly complete, and works well. It runs on both Linux and Mac OS X.

For communication with the device, this application uses libusb 1.0.

Building

You need:

1. GCC and GNU Make (Xcode on OS X)

2. pkg-config

3. libusb >= 1.0

4. libfuse >= 2.8 (or fuse4x on x64 OS X)

5. all dependencies of the above

Installing needed packages on Ubuntu

sudo apt-get install gcc make pkg-config libusb-1.0-0-dev libfuse-dev

Compiling

  • standard build, no debug messages, only fatal errors on startup are shown.
make build/emcorefs


  • debug build, some debug/error messages are shown. libusb debug messages are enabled, too.
make debug


You can prefix any of these with

CFLAGS="-DDEBUG_USB_PACKETS"

in order to have a dump of the usb traffic that's being sent and received.

Testing

  • test the connection and some basic emCORE functions. useful only to developers.
make build/emcore-test
./build/emcore-test

Running

You need FUSE >= 2.8 installed. (or fuse4x on x64 OS X)

Currently tested on Linux (Ubuntu 11.04 x86) and Mac OS X (10.6.8 x64).

  • Starting:
./build/emcorefs <mountpoint>


  • Stopping:
fusermount -u <mountpoint as seen in /etc/mtab> (on Linux)
diskutil unmount <mountpoint as seen in /etc/mtab> (on OS X)

Known bugs/issues

  • Running FUSE with multithreading breaks file reading because of the way these are implemented on emCORE's side. Workaround: use the "-s" option.
  • Some errors are not handled properly, EIO (Input/output error) is given in cases where there's a more descriptive error message available. Will be fixed in the future.
  • Rename/move in the filesystem itself is currently disabled, since the underlying filesystem call crashes the emCORE kernel. Workaround: move the file/dir on another filesystem, then rename it if needed, then move it back.

Future plans

  • Merge some functions that are doing similar tasks to reduce code duplication.
  • Return proper error codes in FS operations.

Bug reporting

Main developer: Vencislav "user890104" Atanasov

How to contact: Contact

License terms

emCOREFS is distributed under the same license terms as emCORE.


emCORE is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version.

emCORE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with emCORE. If not, see http://www.gnu.org/licenses/.