New: XDA launches forum for app developers. Discuss coding, tools, marketing, and more.
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
snq-
Old
(Last edited by snq-; 28th October 2010 at 12:04 AM.) Reason: added -gd96f2c0 version
#1  
snq-'s Avatar
Recognized Developer - OP
Thanks Meter 866
Posts: 581
Join Date: Aug 2010
Default [KERNEL] CIFS + UTF8 NLS support for the official HTC Desire Froyo kernel

with the release of the source code for the bravo kernel this has become redundant

to be able to directly access my stuff on samba shares i made a _patch_ for the cifs code in 2.6.32.15 and built cifs.ko and nls_utf8.ko with arm-eabi-4.4.0

i thought i'd share them here in case it was of use to anyone else


this is how i installed them:
Code:
(boot into recovery mode)
$ adb shell mount /system
$ adb push cifs.ko /system/lib/modules
$ adb push nls_utf8.ko /system/lib/modules
$ adb shell chmod 644 /system/lib/modules/*.ko
$ adb shell "cd /system/lib/modules; ln -s . 2.6.32.15-gf9c0527"
$ adb shell umount /system
(reboot)
this is how i tested them:
Code:
sh-3.2$ su
sh-3.2# modprobe nls_utf8
sh-3.2# modprobe cifs
sh-3.2# busybox mount -t cifs -o user=<username>,password=<password>,uid=1000,gid=1015,file_mode=0775,dir_mode=0775,iocharset=utf8,nodfs //10.0.1.2/public2 /sdcard/smb/public2
(1015 is the gid of 'sdcard_rw')




--
cifs_bravo_2.6.32.15-gf9c0527.zip
cifs_bravo_2.6.32.15-gd96f2c0.zip
The Following User Says Thank You to snq- For This Useful Post: [ Click to Expand ]
 
mikecoffee
Old
#2  
Senior Member
Thanks Meter 12
Posts: 329
Join Date: Dec 2009
Hey cheers for this will try it out

Sent from my C64
Twitter @michaeljjava
HTC Sensation
HTC Flyer
HTC Desire HD
HTC Desire
HTC Hero
HTC Dream
HTC HD2
HTC Touch 3G
If you want to support VillainROM, why not donate to the site at donate?
 
epyon1873
Old
#3  
Junior Member
Thanks Meter 0
Posts: 23
Join Date: Jun 2006
just tried

init_module 'cifs.ko' failed (Exec format error)
 
snq-
Old
#4  
snq-'s Avatar
Recognized Developer - OP
Thanks Meter 866
Posts: 581
Join Date: Aug 2010
Quote:
Originally Posted by epyon1873 View Post
init_module 'cifs.ko' failed (Exec format error)
as stated above it works with the stock htc kernel, which is 2.6.32.15-gf9c0527

check the output of uname -r
 
epyon1873
Old
#5  
Junior Member
Thanks Meter 0
Posts: 23
Join Date: Jun 2006
Quote:
Originally Posted by snq- View Post
as stated above it works with the stock htc kernel, which is 2.6.32.15-gf9c0527

check the output of uname -r

Thx find htc kernel is 2.6.32.15-g1fc4045 @ NexTSense Rom orz
 
snq-
Old
(Last edited by snq-; 1st October 2010 at 10:24 PM.)
#6  
snq-'s Avatar
Recognized Developer - OP
Thanks Meter 866
Posts: 581
Join Date: Aug 2010
Quote:
Originally Posted by epyon1873 View Post
Thx find htc kernel is 2.6.32.15-g1fc4045 @ NexTSense Rom
afaik the current nextsense comes with Myshkinbob's cifs module (although not with the latest one) - it's module version id was simply patched to suppress the version mismatch error message you got

here is mine if still interested:
(be sure to type "ln -s . 2.6.32.15-g1fc4045" instead of "ln -s . 2.6.32.15-gf9c0527" when installing)

--
cifs_bravo_2.6.32.15-g1fc4045.zip
 
epyon1873
Old
#7  
Junior Member
Thanks Meter 0
Posts: 23
Join Date: Jun 2006
Thx~! go to try it.
 
adambot
Old
#8  
Junior Member
Thanks Meter 0
Posts: 14
Join Date: Jan 2007
Greetings,

I tried using your patch on the source for the supersonic (evo) and it went in and compiled perfectly, i was able to do an insmod and loaded the driver fine, but when i go to do a mount the phone crashes.

any ideas?

(i have tried both the arm-eabi-4.4.0 and the arm-2010q1 toolchains)

Thanks!!
 
snq-
Old
#9  
snq-'s Avatar
Recognized Developer - OP
Thanks Meter 866
Posts: 581
Join Date: Aug 2010
Quote:
Originally Posted by adambot View Post
I tried using your patch on the source for the supersonic (evo) and it went in and compiled perfectly, i was able to do an insmod and loaded the driver fine, but when i go to do a mount the phone crashes.

any ideas?

(i have tried both the arm-eabi-4.4.0 and the arm-2010q1 toolchains)

the patch does not cleanly apply to supersonic-2.6.32.15-g746f4f0, as it is for vanilla 2.6.32.15
please overwrite fs/cifs with the vanilla sources before you apply it

just tried and was able to build the very same .ko published in the first post (except for the buildstamp of course):
  • pulled the supersonic kernel source from developer.htc.com
  • overwrote fs/cifs/* with vanilla
  • pulled & applied the patch from pastebin
  • pulled .config from my phone
  • in menuconfig
    • set the localversion (general setup)
    • selected cifs + nls_utf8 to be built as module
    • did _not_ touch the debug options already set
  • did 'make modules'
  • stripped the modules with arm-eabi-strip --strip-debug

insmod worked, mount worked, browsing the share worked


if you get crashes, check /proc/last_kmsg after reboot
 
adambot
Old
(Last edited by adambot; 5th September 2010 at 08:09 PM.)
#10  
Junior Member
Thanks Meter 0
Posts: 14
Join Date: Jan 2007
Quote:
Originally Posted by snq- View Post
the patch does not cleanly apply to supersonic-2.6.32.15-g746f4f0, as it is for vanilla 2.6.32.15
please overwrite fs/cifs with the vanilla sources before you apply it
What is considered "vanilla sources"?

I used git and pulled the whole android repo but am not finding the vanilla sources there...

do you mean the vanilla linux sources??


[edit]
i tried the cifs files from the vanilla linux source (same version) but the phone still crashes (even after the debug strip)

Should i try to use a different config (rather than the one from the supersonic templates?)

Do you have an evo that you tested this on?

Thanks again!!!
[/edit]

Tags
cifs, desire, evo, froyo, kernel, supersonic, utf8

XDA PORTAL POSTS

MicrowaveTimePicker Brings 4.2 TimePicker to 2.1+ Devices

It’s frustrating to see slick new features that you can’t use when … more

What’s Possible with CASUAL & How to Make Your Own CASUAL – XDA Developer TV

XDA Elite Recognized Developer AdamOutler is known … more

Pearl Chen to Talk NFC Development at XDA:DevCon 2013

From HTML to LEDs or Android to Arduino, Hardware Hacking is a pastime of many people … more

Avoid Framework Bootloops on Xperias Running Jelly Bean

If you’re a Sony device owner running a stock Android Jelly Bean firmware and … more