NMT:fuse: Difference between revisions

From Lundman Wiki
No edit summary
No edit summary
Line 1: Line 1:
== Fuse ==
== Fuse ==
Binary download:
[http://www.lundman.net/ftp/nmt/ldvd-1.0.tar.gz ldvd-1.0.tar.gz] tarball with fuse, dvdfs and fusermount


I downloaded the latest '''fuse''' I could find, which at the time was '''fuse-2.7.2'''.
I downloaded the latest '''fuse''' I could find, which at the time was '''fuse-2.7.2'''.
Line 38: Line 46:
  <4>fuse init (API version 7.8)
  <4>fuse init (API version 7.8)
  <4>fuse distribution version: 2.7.2
  <4>fuse distribution version: 2.7.2
Due to a bug in 2.6.15, with cache coherency, fuse never ran properly. There was a work around by calling '''flush_cache_page''' but this function is missing in the running kernel. I have managed to pull it out of a similar MIPS CPU tree, and put them together with a hammer.




=== DVDfs ===
=== DVDfs ===


This does not always work, often I have to issue a command twice before things appear. No idea why that is. But as preliminary results, it is very pleasing.
With the fix of fuse above, DVDfs is confirmed to work correctly. However, there is not a lot of CPU to play with, and decrypting CSS in CPU is "just enough". You will probably find there are scenes with slow down however.
 
You will need to put '''dvdfs''' and '''fusermount''' in a directory, and change '''PATH''' to include it.
 


  # dvdfs -o device=/dev/cdrom /opt/sybhttpd/localhost.drives/CDROM -d -s &
  # dvdfs -o device=/dev/cdrom /opt/sybhttpd/localhost.drives/CDROM -d -s &

Revision as of 03:59, 23 January 2008

Fuse

Binary download:

ldvd-1.0.tar.gz tarball with fuse, dvdfs and fusermount



I downloaded the latest fuse I could find, which at the time was fuse-2.7.2.

Compiling turned out to be a real hassle, the compiled kernel version string has to match that of my compiled kernel module version string.

The string we need to get is

2.6.15-sigma preempt MIPS32_R2 32BIT gcc-4.0

So, change Makefile to have EXTRAVERSION = -sigma, then turn on preemptive kernel, and MIPS R2 under CPU Architecture. I compile the kernel with:

make V=1 CROSS_COMPILE=mipsel-linux-uclibc- ARCH=mips modules

Based on my cross-compile tool chain. However, note that Linux kernel can not easily be built on platforms other than Linux. It uses HOST_CC to build some items that assume you have Linux headers.

After that, I configured fuse with:

./configure --host=mipsel-linux-uclibc --enable-kernel-module --with-kernel=/home/lundman/cross/linux-2.6.15.7/ --enable-static
cd kernel
make V=1 CROSS_COMPILE=mipsel-linux-uclibc- ARCH=mips

Which gives me a fuse.ko. This does not yet load, due to:

insmod -v fuse.ko
Using fuse.ko
fuse: Unknown symbol capable
fuse: Unknown symbol _spin_unlock
fuse: Unknown symbol add_preempt_count
fuse: Unknown symbol __might_sleep
fuse: Unknown symbol _spin_lock
fuse: Unknown symbol sub_preempt_count
insmod: cannot insert 'fuse.ko': Success (2): Success

Ahh, ok instead of picking malta board, I picked atlas and voila:

# insmod fuse3.ko
<4>fuse init (API version 7.8)
<4>fuse distribution version: 2.7.2


Due to a bug in 2.6.15, with cache coherency, fuse never ran properly. There was a work around by calling flush_cache_page but this function is missing in the running kernel. I have managed to pull it out of a similar MIPS CPU tree, and put them together with a hammer.



DVDfs

With the fix of fuse above, DVDfs is confirmed to work correctly. However, there is not a lot of CPU to play with, and decrypting CSS in CPU is "just enough". You will probably find there are scenes with slow down however.

You will need to put dvdfs and fusermount in a directory, and change PATH to include it.


# dvdfs -o device=/dev/cdrom /opt/sybhttpd/localhost.drives/CDROM -d -s &
libdvdcss debug: opening target `/dev/cdrom'
libdvdcss debug: using libc for access
libdvdcss debug: disc is scrambled
libdvdcss debug: requesting AGID
libdvdcss debug: drive authenticated, using variant 5
libdvdcss debug: authentication established
libdvdcss debug: GetASF authenticated, ASF=1
libdvdcss debug: decrypting disc key xx:xx:xx:xx:xx
libdvdcss debug: trying player key xx:xx:xx:xx:xx
libdvdcss debug: decrypted disc key is xx:xx:xx:xx:xx
libdvdcss debug: using CSS key cache dir: /root/.dvdcss/IRON_GIANT-1999100713372400-f287af6105/
Scanning DVD ...
Scan complete!
unique: 1, opcode: INIT (26), nodeid: 0, insize: 56
INIT: 7.8
flags=0x00000003
max_readahead=0x00020000
  INIT: 7.8
  flags=0x00000000
  max_readahead=0x00020000
  max_write=0x00020000
  unique: 1, error: 0 (Success), outsize: 40

# ls: /opt/sybhttpd/localhost.drives/CDROM/VIDEO_TS/
-r--r--r--    1 root     root         8192 Jan  1 12:49 VIDEO_TS.IFO
-r--r--r--    1 root     root        79872 Jan  1 12:49 VTS_01_0.IFO
-r--r--r--    1 root     root     47220736 Jan  1 12:49 VTS_01_0.VOB
-r--r--r--    1 root     root   1073741824 Jan  1 12:49 VTS_01_1.VOB
-r--r--r--    1 root     root   1073741824 Jan  1 12:49 VTS_01_2.VOB
-r--r--r--    1 root     root   1041446912 Jan  1 12:49 VTS_01_3.VOB
-r--r--r--    1 root     root        36864 Jan  1 12:49 VTS_02_0.IFO
-r--r--r--    1 root     root    786161664 Jan  1 12:49 VTS_02_1.VOB