Remove All Ads from XDA

Making cifs.ko

187 posts
Thanks Meter: 27
By bullyfrog, Senior Member on 12th November 2010, 04:16 AM
Post Reply Email Thread
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
-toolchains (wget
unpacked the source
unpacked toolchains into /opt/toolchains
ran ./ <--no errors
cd into source directory
-apt-get install ncurses-dev
make oldconfig
make menuconfig
set M for cifs (under fs -> networking)
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

15th November 2010, 11:43 AM |#2  
Senior Member
Flag Chelmsford
Thanks Meter: 21

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.

15th November 2010, 04:44 PM |#3  
rotohammer's Avatar
Senior Member
Flag New Jersey
Thanks Meter: 1,072
Originally Posted by bullyfrog

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

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.
17th November 2010, 11:25 PM |#4  
daniel.weck's Avatar
Senior Member
Thanks Meter: 95
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
insmod slow-work.ko
insmod cifs.ko
lsmod | grep cifs

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 !
18th November 2010, 03:50 AM |#5  
Thanks Meter: 7
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.

Attached Files
File Type: zip - [Click for QR Code] (1.19 MB, 4210 views)
The Following User Says Thank You to overridex For This Useful Post: [ View ] Gift overridex Ad-Free
18th November 2010, 08:20 AM |#6  
Flag San Francisco, CA
Thanks Meter: 1
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.

18th November 2010, 09:07 AM |#7  
daniel.weck's Avatar
Senior Member
Thanks Meter: 95
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 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 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 !
18th November 2010, 09:17 AM |#8  
Flag San Francisco, CA
Thanks Meter: 1
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.

18th November 2010, 09:21 AM |#9  
daniel.weck's Avatar
Senior Member
Thanks Meter: 95
Originally Posted by jknisley

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

RockPlayer ?
18th November 2010, 09:29 AM |#10  
Flag San Francisco, CA
Thanks Meter: 1
Wow. That's a fantastic player. And sorry to be off topic. Glad CIFS is working for us.
18th November 2010, 01:01 PM |#11  
Senior Member
Flag Chelmsford
Thanks Meter: 21
Cool, now all we need is a step by step guide for doing this for noob users like me who have no idea what Busybox is or where to save the cifs and slow work files etc... Hmm... Anyone fell nice and would like to help a guy out?

Post Reply Subscribe to Thread

making a cifs.ko

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes