Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
bullyfrog
Old
(Last edited by bullyfrog; 12th November 2010 at 08:25 AM.)
#1  
Senior Member - OP
Thanks Meter 25
Posts: 182
Join Date: Oct 2007
Default Making cifs.ko

Hey guys

Need your help here.

Have been desperately searching the forums/net for a cifs.ko for the galaxy tab but i do not think one exists.

Have decided to see if i can build one on my own (this will likely crash & burn)
Anyway, i've installed ubuntu in a VM

and pulled the following down
-GT-P1000 source code (from http://opensource.samsung.com)
-toolchains (wget http://www.codesourcery.com/public/g...ux-gnu.tar.bz2)
unpacked the source
unpacked toolchains into /opt/toolchains
ran ./build_kernel.sh <--no errors
cd into source directory
-apt-get install ncurses-dev
make oldconfig
make menuconfig
set M for cifs (under fs -> networking)
exited
make prepare
make M=fs/cifs
and the cifs.ko was created!

upon copying into my tab and trying an insmod cifs.ko
I saw the following in my dmesg
cifs: Unknown symbol slow_work_register_use
cifs: Unknown symbol slow_work_enqueue

I'm guessing i need to make a slow-work.ko or hack the source of the cifs and remove all references of slow-work.

Anyone can advice how for either or better yet, make a cifs.ko for us

Thanks!
 
svmpatel
Old
#2  
Member
Thanks Meter 4
Posts: 59
Join Date: Oct 2007
Location: Chelmsford
Hiya,

If you ever get it working, please do share... I know a fair number of people who have the Galaxy Tab including myself who are just waiting for someone bright enough to get samba mounting available so they can play their media files without having to copy directly to the device.

Kinda like the Holy Grail this is... Especially as iPad users are able to stream avi's using Buzz Player HD which is a media player with a built in method of connecting to smb shares from the app. I hate being one-upped by my iPad weilding wife!! Heh.

Cheers.
 
rotohammer
Old
#3  
rotohammer's Avatar
Senior Member
Thanks Meter 1051
Posts: 1,378
Join Date: Jan 2007
Location: New Jersey
Quote:
Originally Posted by bullyfrog View Post
Anyone can advice how for either or better yet, make a cifs.ko for us
Thanks!
There are several reasons why you may have missing symbols. One is that the original kernel was compiled with different driver options, so certain symbols are missing when compared to the new kernel/module you compiled. The easy fix is to install the new kernel too.

It could also be that the kernel versions are different, and the source you have is older or newer than the original.

If I have time later I plan on giving it a go myself, compile and install a complete kernel.
-Rotohammer
T879 Note on T-Mobile
Do not quote my entire first post in a reply!
 
daniel.weck
Old
#4  
daniel.weck's Avatar
Senior Member
Thanks Meter 74
Posts: 547
Join Date: Nov 2010
From another discussion thread on this forum:

-------
You'll need to change kernel/slow-work.c to be compiled as a module which is not very hard:

move kernel/slow-work.c in fs/slow-work/slow-work.c
remove "config SLOW_WORK" from init/Kconfig
create fs/slow-work/Kconfig with config SLOW_WORK as tristate and add it to fs/Kconfig (source fs/slow_work/Kconfig)
create fs/slow-work/Makefile with obj-$(CONFIG_SLOW_WORK) += slow-work.o and add it to fs/Makefile: obj-$(CONFIG_SLOW_WORK) += slow-work/
-------

Then, some useful commands:

adb shell
su
insmod slow-work.ko
insmod cifs.ko
lsmod | grep cifs
dmesg

mount -o username=guest -t cifs //IP/SHARE /mnt/cifs
(or CifsManager)

...also add "iocharset=utf8" in CifsManager's options field (non-latin characters support).

I too need to get started with compiling the Tab's sources...when I have time !
 
overridex
Old
(Last edited by overridex; 18th November 2010 at 03:52 AM.)
#5  
Member
Thanks Meter 7
Posts: 40
Join Date: Jan 2009
Ok, I compiled cifs.ko and slow_work.ko modules using the SCH-I800 kernel source (which is the Verizon Galaxy Tab model) so I'm not sure they'll work on other tabs, but I figured I'd post them here.

I haven't done much testing yet, but I ran:

busybox insmod slow_work.ko
busybox insmod cifs.ko
mkdir /mnt/cifs
busybox mount -o username=guest //myserver/share /mnt/cifs

It mounted successfully, and I was able to watch a video directly off the mount. It was a little choppy though, I'm not sure if the default video player has any buffering options or if there's one in the market that does.

As far as how I got it to compile, it was very much a hack based on info here. The rough method was:

Built cifs.ko from the steps listed in the first post, with the exception of using the SCH-I800 source instead.

After that:

mkdir fs/slow-work
cp kernel/slow-work.* fs/slow-work/.
added fs/slow-work/Kconfig with the config section copied from init/Kconfig, but with bool changed to 'tristate' and default changed to m.
edited fs/Kconfig and added 'source "fs/slow-work/Kconfig"'
Added fs/slow-work/Makefile containing: "obj-m += slow-work.o"
Added the line "obj-m += slow-work/" to the end of fs/Makefile

I also had to edit fs/slow-work/slow-work.c and removed the round_jiffies calls, they were coming up as unresolved symbols and it's a function in timer.c, wasn't sure if there was a way to pull that into a module.

make M=fs/slow-work

I'll post more as I play around with it, just wanted to get the modules up for people to play with. I should also probably look into using my busybox utilities as the default so I don't have to keep calling busybox to use the correct ones.

-Dan
Attached Files
File Type: zip cifs_gtab.zip - [Click for QR Code] (1.19 MB, 3645 views)
The Following User Says Thank You to overridex For This Useful Post: [ Click to Expand ]
 
jknisley
Old
#6  
Member
Thanks Meter 1
Posts: 39
Join Date: Dec 2007
Location: San Francisco, CA
Default CIFS on Sprint device

I'm using the updated Sprint GTab and your precompiled CIFS modules worked very well. It's just now CIFS Manager seems to keep telling me that the mount string isn't valid. I mounted with the mount command from the terminal (wow, this is tedious without a BT keyboard. Need a terminal with editable strings.) and it worked just great.

JK
 
daniel.weck
Old
(Last edited by daniel.weck; 18th November 2010 at 11:08 AM.)
#7  
daniel.weck's Avatar
Senior Member
Thanks Meter 74
Posts: 547
Join Date: Nov 2010
Well done ! This works on my JK1-flashed Galaxy Tab.

Note: I use WifiKeyboard as my input method on the tablet, to ease typing in the Terminal Emulator (or ConnectBot). It works marvelously well !

The "insmod" commands worked perfectly (thanks again for compiling...personally I was stuck at the "libc" ELF headers in my toolchain Mac OS X setup...I will soon install a Linux virtual machine so I can use the default toolchain, which contains all the required "libc" stuff...I regularly compile RockBox on my Mac so I wonder what's wrong with this particular toolchain).

I switched on Samba/SMB/CIFS sharing on my Mac OS X laptop, via the "Sharing" panel in System Preferences.

Once in "su" shell mode, I pre-created the mount point: "mkdir /mnt/cifs". I then experimented various commands, including:

- EDIT - DroidWall configured with a whitelist *prevents* the "mount" command from connecting to the Samba share, despite allowing Terminal Emulator and ConnectBot to connect via wifi...as a result I have to disable DroidWall entirely, which sub-optimal Allowing all "root" applications to access wifi in DroidWall doesn't solve the problem: it makes a difference with commands like "ping" but the SMB mount fails to connect over the network...for some reason.

busybox mount -r -t cifs -o "username=MY_USERNAME,password=MY_PASS" //MY_IP/MY_SHARED_FOLDER /mnt/cifs

busybox mount | grep cifs
ls /mnt/cifs
umount /mnt/cifs

busybox mount -r -t cifs -o "username=guest" //MY_IP/MY_SHARED_FOLDER /mnt/cifs

Note that I chose to secure the mounted directory in read-only mode, but of course we could use "-w" instead, providing the file server accepts authenticated or anonymous connections with write credentials.

I still need to test transfer speeds...as this is often the problem with high-quality video. At any rate, I recommend using VLC Player on the server (e.g. laptop containing video/audio assets), and VLC Stream and Connect on the Android device: the live transcoding works really well !
 
jknisley
Old
#8  
Member
Thanks Meter 1
Posts: 39
Join Date: Dec 2007
Location: San Francisco, CA
Default CIFSManager

I'm a bit of a noob, actually. I put a double-slash in cifsmanager in front of the name, like you were doing in mount. It's just machine/share and not //machine/share. Makes all the difference, really.

Now I just wish there were a few more video codecs to be had.

JK
 
daniel.weck
Old
#9  
daniel.weck's Avatar
Senior Member
Thanks Meter 74
Posts: 547
Join Date: Nov 2010
Quote:
Originally Posted by jknisley View Post
Now I just wish there were a few more video codecs to be had.
RockPlayer ?
 
jknisley
Old
#10  
Member
Thanks Meter 1
Posts: 39
Join Date: Dec 2007
Location: San Francisco, CA
Wow. That's a fantastic player. And sorry to be off topic. Glad CIFS is working for us.

 
Post Reply+
Tags
making a cifs.ko
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

report this ad
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...