DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2008-03-18 04:17:55

pof
Member
From: Barcelona
Registered: 2008-03-07
Posts: 28
Website

Fuse packages for fonz fun_plug

I have compiled fuse-2.7.3 packages for fonz fun_plug 0.3/0.4 and 0.5, posting them here hoping that someone else finds them useful.

Fonz fun_plug 0.3/0.4:

Code:

# wget http://pof.eslack.org/dns323/fuse-2.7.3.tgz
# funpkg.sh fuse-2.7.3.tgz
# ${FUNPLUGDIR}/start/fuse.sh start

Fonz fun_plug 0.5-experimental:

Code:

# wget http://pof.eslack.org/dns323/fuse-2.7.3-ffp05.tgz
# funpkg fuse-2.7.3-ffp05.tgz
# /ffp/start/fuse.sh start

With FUSE it is possible to implement a fully functional filesystem in a userspace program, see some examples.

Enjoy ;-)

Offline

 

#2 2008-03-18 22:57:08

jules
Member
Registered: 2008-01-26
Posts: 78

Re: Fuse packages for fonz fun_plug

Hmm, interesting stuff, i'll take a look at it.


CH3SNAS - Black Box Ed. • FW:1.03b6a • 2 x WD5000AAKS

Offline

 

#3 2008-10-07 23:22:52

jordan_d
Member
From: France
Registered: 2008-05-31
Posts: 22

Re: Fuse packages for fonz fun_plug

Hi, I tried to launch fuse with your package, but I got this error message:

Code:

# ./fuse.sh start
/ffp/bin/fusermount
Loading fuse module.
Mounting fuse control filesystem failed!

I don't understand why. Can someone explain me, or help me to find the problem? Thank you wink

Offline

 

#4 2008-10-07 23:50:51

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Fuse packages for fonz fun_plug

Would this then allow use of the user-space ntfs-3g module?
If so, has anybody compiled it and tested it?

Offline

 

#5 2008-10-29 07:35:57

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Fuse packages for fonz fun_plug

Were you able to get fuse to work?
I tried compiling my own version for kernel 2.6.12.6 (including some of the fixes mentioned on the net) but when I tried it with ntfs-3g and with the hello example, it hung my kernel.

Can you say a little more about what you did to get it to compile and work properly?
What user space filesystems have you gotten to work with it so far?

Offline

 

#6 2008-10-30 08:31:25

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Fuse packages for fonz fun_plug

The problem with "Mounting fuse control filesystem failed!" is due to the fact that the mountpoint /sys/fs/fuse/connections doesn't exist.
Creating the mountpoint allows /ffp/start/fuse.sh to run without errors.

However, I still get that running something like ntfs-3g or the 'hello' example hangs and is unkillable.

Offline

 

#7 2008-11-04 22:52:43

jordan_d
Member
From: France
Registered: 2008-05-31
Posts: 22

Re: Fuse packages for fonz fun_plug

Hi, I tried to compile mhddfs, and I got this message:

Code:

gcc -Wall -D_FILE_OFFSET_BITS=64 -I/ffp//include/fuse   -DFUSE_USE_VERSION=26 -MMD obj/debug.o obj/main.o obj/parse_options.o obj/tools.o obj/usage.o -o mhddfs -pthread -L/ffp//lib -lfuse -ldl  
obj/main.o: In function `mhdd_utimens':
main.c:(.text+0x1ea0): warning: the use of LEGACY `utimes' is discouraged, use `utime'
/ffp/bin/ld: ERROR: /ffp//lib/libfuse.so uses hardware FP, whereas mhddfs uses software FP
/ffp/bin/ld: failed to merge target specific data of file /ffp//lib/libfuse.so
collect2: ld returned 1 exit status
make: *** [mhddfs] Error 1

How can I fix this? I assume that I'll have to modify the code, but I don't really know what to look for. Do you have an idea? Thanks.

Offline

 

#8 2008-11-04 23:51:16

jordan_d
Member
From: France
Registered: 2008-05-31
Posts: 22

Re: Fuse packages for fonz fun_plug

FP refers to Floating Point. OK. But I can't find any reference to any option in the makefile that tries to use software FP.
Here is my Makefile:

Code:

#    mhddfs - Multi HDD [FUSE] File System
#    Copyright (C) 2008 Dmitry E. Oboukhov <dimka@avanto.org>

#  This program 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 3 of the License, or
#  (at your option) any later version.

#  This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.

SRC    =    $(wildcard src/*.c)

OBJ    =    $(SRC:src/%.c=obj/%.o)

DEPS    =    $(OBJ:obj/%.o=obj/%.d)

TARGET    =    mhddfs

CFLAGS    =    -Wall $(shell pkg-config fuse --cflags) -DFUSE_USE_VERSION=26 -MMD
LDFLAGS    =    $(shell pkg-config fuse --libs)

FORTAR    =    src COPYING LICENSE README Makefile \
        README.ru.UTF-8 ChangeLog mhddfs.1 \
        debian

VERSION    =    $(shell cat src/version.h  \
    |grep '^.define'|grep '[[:space:]]VERSION[[:space:]]' \
    |awk '{print $$3}'|sed 's/\"//g' )

all: $(TARGET)

tarball: mhddfs_$(VERSION).tar.gz
    @echo '>>>> mhddfs_$(VERSION).tar.gz created'

mhddfs_$(VERSION).tar.gz: $(FORTAR) $(wildcard src/*) 
    mkdir mhddfs-$(VERSION)
    cp -r $(FORTAR) mhddfs-$(VERSION)
    tar --exclude=.svn -czvf $@ mhddfs-$(VERSION)
    rm -fr mhddfs-$(VERSION)


$(TARGET): obj/obj-stamp $(OBJ)
    gcc $(CFLAGS) $(OBJ) -o $@ $(LDFLAGS)

obj/obj-stamp:
    mkdir -p obj
    touch $@

obj/%.o: src/%.c
    gcc $(CFLAGS) -c $< -o $@

clean:
    rm -fr obj $(TARGET) pwrite_test

release_svn_thread:
    @echo current version $(VERSION)
    if ! svn ls http://svn.uvw.ru/mhddfs/tags| \
        grep -q release_$(VERSION); then \
        svn copy -m release-$(VERSION) \
            http://svn.uvw.ru/mhddfs/trunk \
            http://svn.uvw.ru/mhddfs/tags/release_$(VERSION); \
    fi

open_project:
    screen -t vim vim Makefile src/* README* ChangeLog mhddfs.1

pwrite_test: src/test/pwrite.c
    gcc -o $@ $<

.PHONY: all clean open_project tarball release_svn_thread

include $(wildcard obj/*.d)

I don't understand

Offline

 

#9 2008-11-05 00:38:32

fonz
Member / Developer
From: Berlin
Registered: 2007-02-06
Posts: 1716
Website

Re: Fuse packages for fonz fun_plug

Your libfuse is broken, mhddfs compiled correctly with soft-FP.

Offline

 

#10 2008-12-08 18:21:44

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Fuse packages for fonz fun_plug

Does anybody have an example of a working fuse file system on the dns-323?
Because everything I have tried to do just hangs the mount (which requires a reboot to clear)

Offline

 

#11 2011-12-20 19:23:48

Darkvater
Member
Registered: 2011-11-13
Posts: 5

Re: Fuse packages for fonz fun_plug

I have compiled fuse-2.7.3 myself for the CH3SNAS. Kernel module, gcc-3.3, etc. I can successfully load the kernel module, but nothing else works... sad

Whenever I try to use it I get a kernel error.

Code:

fuse init (API version 7.8)
fuse distribution version: 2.7.3
Unable to handle kernel paging request at virtual address 003f5e34
pgd = c2d0c000
[003f5e34] *pgd=00000000
Internal error: Oops: 805 [#1]
Modules linked in: fuse nfsd exportfs usblp sd_mod
CPU: 0
PC is at prepare_to_wait+0x44/0x6c
LR is at 0xc1b96000
pc : [<c00662c4>]    lr : [<c1b96000>]    Not tainted
sp : c1b97e20  ip : c1b97e5c  fp : c1b97e30
r10: c1b97e34  r9 : c0e35f18  r8 : 00000000
r7 : c1b97e50  r6 : c1b96000  r5 : c0e2dde0  r4 : 00000001
r3 : 003f5e30  r2 : 40000013  r1 : c1b97e50  r0 : c0e2de38
Flags: nZCv  IRQs off  FIQs on  Mode SVC_32  Segment user
Control: A005317F  Table: 02D0C000  DAC: 00000015
Process ls (pid: 2545, stack limit = 0xc1b96194)
Stack: (0xc1b97e20 to 0xc1b98000)
7e20: c0e2de38 c1b97e88 c1b97e34 bf0252ac c0066290 00000000 00000000 00000000 
7e40: c39d4340 c00663c4 c1b97e5c c1b97e5c 00000000 c39d4340 c00663c4 003f5e30 
7e60: c1b97e5c c1b97f4c c30e0e20 c1b97ef0 c0e2dde0 c30e0e20 00000001 c1b97ec8 
7e80: c1b97e8c bf02939c bf02520c c1b97f4c c30cbee4 c1b96000 c1b97ef0 00000000 
7ea0: c1b97f4c c30e0e20 c1b97ef0 c1b97f4c bf028594 c1b96000 bed169e6 c1b97eec 
7ec0: c1b97ecc c0097ac4 bf02933c c1b97f4c 00000000 c1b97ef0 000000c4 c0024f44 
7ee0: c1b97f48 c1b97ef0 c0097bc0 c0097aa8 c30cd664 c0e35ea0 c007e7b4 c2d7582c 
7f00: c2d0c000 00000000 00000001 00000000 c1216800 c39d4340 0000b2b8 c1b97f54 
7f20: c1b97f2c c002c950 c007ec38 c2d8bb4c c1b97f4c bed163ac 00030d18 c1b97fa4 
7f40: c1b97f4c c0098174 c0097b90 c1b97f58 c002ca58 c012d26c 00034000 00034000 
7f60: 00000017 c1b97fec c029f510 0000b2b8 c1b97fb0 00000001 bed168e4 c1b97fac 
7f80: c1b97f8c c002cc3c c002c9f4 ffffffff 0002fb48 00000062 00000000 c1b97fa8 
7fa0: c0024dc0 c0098164 0002fb48 c002cc10 bed169e6 bed163ac 00000000 00030d18 
7fc0: 0002fb48 00000062 00030d18 00030d10 00000000 00000001 bed169e6 bed16774 
7fe0: 4001a54c bed163ac 0000a96c 4001a560 20000010 bed169e6 00002021 00002421 
Backtrace: 
[<c0066280>] (prepare_to_wait+0x0/0x6c) from [<bf0252ac>] (fuse_get_req+0xb0/0x164 [fuse]) r4 = C0E2DE38 
[<bf0251fc>] (fuse_get_req+0x0/0x164 [fuse]) from [<bf02939c>] (fuse_fsync_common+0x70/0x11c [fuse])
[<bf02932c>] (fuse_fsync_common+0x0/0x11c [fuse]) from [<c0097ac4>] (vfs_getattr+0x2c/0x94)
[<c0097a98>] (vfs_getattr+0x0/0x94) from [<c0097bc0>] (vfs_lstat+0x40/0x54)
r8 = C0024F44  r7 = 000000C4  r6 = C1B97EF0  r5 = 00000000 r4 = C1B97F4C 
[<c0097b80>] (vfs_lstat+0x0/0x54) from [<c0098174>] (sys_lstat64+0x20/0x44)
r6 = 00030D18  r5 = BED163AC  r4 = C1B97F4C 
[<c0098154>] (sys_lstat64+0x0/0x44) from [<c0024dc0>] (ret_fast_syscall+0x0/0x2c)
r5 = 00000062  r4 = 0002FB48 
Code: e153000c 05903000 e3cee03f 0581300c (0583c004)

Anyone has any idea? I've attached the module. My kernel is 2.6.12.6-arm1, and gcc was compiled with the following:

Code:

[Configured with: /mnt/HD_b2/build/uclibc-toolchain-src-20040609/gcc-3.3.x/toolchain_build_arm_nofpu/gcc-3.3.3/configure 
--prefix=/mnt/HD_b2/build/uclibc-toolchain-src-20040609/gcc-3.3.x/toolchain_arm_nofpu --build=arm-pc-linux-gnu 
--host=arm-pc-linux-gnu --target=arm-linux-uclibc --enable-languages=c,c++ --enable-shared 
--with-gxx-include-dir=/mnt/HD_b2/build/uclibc-toolchain-src-20040609/gcc-3.3.x/toolchain_arm_nofpu/arm-linux-uclibc/include/c++ 
--enable-__cxa_atexit --enable-target-optspace --with-gnu-ld --disable-nls --enable-multilib --without-float --enable-sjlj-exceptions
Thread model: posix
gcc version 3.3.3

I was running the hello example of fuse. It starts correctly, but when I try to list the contents of the fuse-d dir, *bamm* the kernel error happens. I feel as if I am really close to getting this to work!! I hope!

Last edited by Darkvater (2011-12-20 19:24:49)

Offline

 

#12 2012-01-03 13:05:22

Darkvater
Member
Registered: 2011-11-13
Posts: 5

Re: Fuse packages for fonz fun_plug

If anybody is interested; I've solved the problem!

One can argue on how much of a solution you want to call this; but the point is that everything works!
I could not get libfuse to work at all. I've finally installed the Alt-F RC1 (as a firmware), which upgraded my CH3SNAS[1] to Linux 2.6.35.14. The fuse module was already present in the kernel.

I've installed the libfuse-2.8.5 devel libraries, compiled davfs2-1.4.6 and now have everything working perfectly[2]! A webdav mount connection to google docs so I can back up my data simply with rsync big_smile

[1] I've flashed the CH3SNAS with the latest DNS-323 1.10 firmware first, hoping that would solve it, but they didn't change the kernel
[2] If someone wants, I can post binaries, although it won't work with the 2.6.12 kernel. I did end up upgrading to ffp 0.6 beta because I needed irssi as a funplug pkg which (long story short) didn't work with lower than uClibc-0.9.32 versions. Since I couldn't compile uClibc for some reason, I just used ffp-0.6's version. So the packages I created may work, or may not work with ffp-0.5.

Offline

 

#13 2012-01-03 18:16:47

puterboy
Member
Registered: 2008-09-18
Posts: 306

Re: Fuse packages for fonz fun_plug

Glad it works for you but it truly is not a solution to the original problem. I mean new kernel will by default support fuse....
I similarly got it working with a debian distro and kernel... but again that is not a solution to the original problem....

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB