[Q] Compile kernel module for galaxy s2 - Galaxy S II Q&A, Help & Troubleshooting

Im trying to create a kernel module for galaxy s2 but got problems when using insmod.
dmesg says: sunrpc: disagrees about version of symbol module_layout
I downloaded the source from opensamsung.org and using the arm compiler arm-2009q3 from codesourcery.com
setting crosscompiler in MakeFile
CROSS_COMPILE ?= /opt/toolchains/arm-2009q3/bin/arm-none-eabi-
typed:
make c1_rev02_defconfig
make menuconfig
disabled all kernel hacking, and enabled nfs
edit .config set CONFIG_LOCALVERSION="-I9100XWKE1-CL181974"
after that i copied the kernel module file to the device and type: insmod sunrpc.ko and it failed with insmod: init_module '/sdcard/sunrpc.ko' failed (Exec format error)

Related

tun module

for those of you who needing vpnc running, here's attached the tun.ko fresh built.
gled said:
for those of you who needing vpnc running, here's attached the tun.ko fresh built.
Click to expand...
Click to collapse
ty, but I need help to set it up. :/
First of all, my phone is rooted. (x10 mini pro)
- got latest Version of busybox.
- tun.ko is on my SD card
- installed OpenVpnGui
- installed OpenVpnInstaller
- executed insmod tun.ko
- started OpenVpnInstaller
- tryed to install to /system/bin/
but I cant install the binaries.
the log file says for example:
STDERR cp: cp not found
STDERR: Unable to chmod /system/bin/openvpn no such file or directory
Hope someone can help me
Same prob like Daxmyst here.
Anyone who can help us ??
"cp not found" indicates you don't installed busybox.
by memory it's something like busybox --install /system/xbin
Code:
# busybox cp /sdcard/tun.ko /system/lib/modules/
busybox cp /sdcard/tun.ko /system/lib/modules/
# cd /system/lib/modules
cd /system/lib/modules
# busybox insmod tun.ko
busybox insmod tun.ko
# dmesg|tail
dmesg|tail
<6>[67658.043432] bq24180: Set safety timer to 4305 minutes
<6>[67668.099598] bq24180: Set safety timer to 0 minutes
<6>[67838.603295] bq24180: Set safety timer to 2686 minutes
<6>[67848.643480] bq24180: Set safety timer to 0 minutes
<6>[67979.253107] bq24180: Set safety timer to 2686 minutes
<6>[67989.293892] bq24180: Set safety timer to 0 minutes
<6>[68139.993915] bq24180: Set safety timer to 2686 minutes
<6>[68150.043948] bq24180: Set safety timer to 0 minutes
<6>[68233.031543] tun: Universal TUN/TAP device driver, 1.6
<6>[68233.031568] tun: (C) 1999-2004 Max Krasnyansky <[email protected]>
#
here is how I just loaded it.
xperia x10 mini pro
Hi Guys!
I am trying to get working openvpn cliet on my xperiy x10 mini pro. I have android 2.1(UK version) and.
I downloded the tun.ko(I found it on this portal) and copied it to the below mentioned modules folder, then I tried insmod and got the following:
Code:
$ su
su
# insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed (Exec format error)
Does it mean I have wrong tun.ko version?
kovgergo said:
Hi Guys!
I am trying to get working openvpn cliet on my xperiy x10 mini pro. I have android 2.1(UK version) and.
I downloded the tun.ko(I found it on this portal) and copied it to the below mentioned modules folder, then I tried insmod and got the following:
Code:
$ su
su
# insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed (Exec format error)
Does it mean I have wrong tun.ko version?
Click to expand...
Click to collapse
The posted tun module is for Android 1.6. It won't work on 2.1.
Also, this is for vpnc, not for openvpn (probably this is covered natively? - haven't tried though).
Sorry I got the tun.ko from: droidforums.net
unfortunatelly I cannot post the link. the title: 'Got OpenVPN Running on 2.1!!! (How-To)'
It should work on 2.1. Or not?
kovgergo said:
Sorry I got the tun.ko from: droidforums.net
unfortunatelly I cannot post the link. the title: 'Got OpenVPN Running on 2.1!!! (How-To)'
It should work on 2.1. Or not?
Click to expand...
Click to collapse
I bet it won't.
Since it won't be built with the mini's .config file.
Try it out thought, at post the results!
attached tun.ko for X10 Mini Pro?
I have X10 mini pro.
Code:
D:\x10\ftool>adb shell
$ su
su
# insmod /system/lib/modules/tun.ko
insmod /system/lib/modules/tun.ko
insmod: init_module '/system/lib/modules/tun.ko' failed (Exec format error)
#
Then I did dmesg:
Code:
.
.
.
<3>[ 5883.527575] tun: version magic '2.6.29-rel preempt mod_unload ARMv7 ' should be '2.6.29 preempt mod_unload ARMv6 '
So, I ssume the attached tun.ko is compiled for X10 and not for X10 mini pro which has ARMv7 proc instead of ARMv6.
tun.ko should be built for Mini Pro.
Can anybody help where I can find the source of tun.ko and all the necessary source which I need for the compiling?
Any suggestion where to find desp. how to compile?
I guess that waiting for SE to release the kernel source for 2.1 is what we have to wait for now.
Thx!
And how can I be informed when it is relased?
Thx!
How can I be informed when it is relased?
My guess is that it will get published here:
http://developer.sonyericsson.com/w...ield=release_date&sortOrder=false&toggle=true
as donut kernels did earlier this year.
I think they just uploaded it!
ppirate said:
I think they just uploaded it!
Click to expand...
Click to collapse
No .config file though
tun.ko for X10 mini with android 2.1
could you please post the ".config" you are using to build the "tun.ko" on the mini?
Thanks for you work
i would be interested in that .config too!
As stated here, the config is supposedly available:
http://forum.xda-developers.com/wiki/index.php?title=Xperia_X10_Mini_Compiling
Has anyone tried memberfive's tun.ko with success on 2.1 ?
It does'nt seem to work for me...(phone reboots).

Working Kernel (2.1) Modules for Mini / MiniPro / X8

Here are some kernel modules for common operations that can't be done using the vanilla SE 2.1 kernel. Those modules should work on X10mini/X10minipro/X8
Requirements: working busybox, adb
Firstly, you need to remount RW your /system partition to be able to put the modules in place:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
tun.ko, used for vpnc networks
Installation (kernel part):
Code:
adb push tun.ko /sdcard/
adb shell
su
busybox mv /sdcard/tun.ko /system/lib/modules/
busybox chmod 644 /system/lib/modules/tun.ko
Installation (gui part):
Get the latest apk of get-a-robot from here
Code:
adb install VPN_Connections_v099.apk
launch the app and add the network according to the config parameters that you have. This app also handles insmoding the tun.ko kernel module when needed.
cifs.ko, used for mounting windows/samba shares
Installation (kernel part):
Code:
adb push cifs.ko /sdcard/
adb shell
su
busybox mv /sdcard/cifs.ko /system/lib/modules/
busybox chmod 644 /system/lib/modules/cifs.ko
Usage:
Code:
insmod /system/lib/modules/cifs.ko
busybox mount -t cifs //<serverip>/<sharename> <local mount point> -o username=<name>,password=<password>
e.g. for guest authentication to share named 'samba' at server with ip 192.168.0.3:
busybox mkdir /sdcard/samba
busybox mount -t cifs //192.168.0.3/samba /sdcard/samba -o username=guest
nfs.ko, used for mounting NFS shares
Installation (kernel part):
Code:
adb push sunrpc.ko /sdcard/
adb push lockd.ko /sdcard/
adb push nfs.ko /sdcard/
adb shell
su
busybox mv /sdcard/sunrpc.ko /system/lib/modules/
busybox mv /sdcard/lockd.ko /system/lib/modules/
busybox mv /sdcard/nfs.ko /system/lib/modules/
busybox chmod 644 /system/lib/modules/sunrpc.ko
busybox chmod 644 /system/lib/modules/lockd.ko
busybox chmod 644 /system/lib/modules/nfs.ko
Usage:
Code:
insmod /system/lib/modules/sunrpc.ko
insmod /system/lib/modules/lockd.ko
insmod /system/lib/modules/nfs.ko
busybox mount -t nfs <serverip>:/<share> <local mount point> -o nolock
e.g.
busybox mkdir /sdcard/nfs
busybox mount -t nfs 192.168.0.3:/home/data /sdcard/nfs -o nolock
Utf8 support
This can be used with cifs or nfs when mounted partitions contain characters in utf8 and thus appear as junk
Installation (kernel part):
Code:
adb push nls_utf8.ko /sdcard/
adb shell
su
busybox mv /sdcard/nls_utf8.ko /system/lib/modules/
busybox chmod 644 /system/lib/modules/nls_utf8.ko
Usage:
Code:
insmod /system/lib/modules/nls_utf8.ko
Filesystems
I have not used these modules since I have not partitioned my sdcard for these types of filesystems. I guess they can be useful in a multi-partition scheme or with app2sd and something else other than ext2
ext3.ko (needs jbd.ko to be insmoded first)
ext4.ko (needs jbd2.ko to be insmoded first)
jfs.ko
reiserfs.ko
xfs.ko (needs exportfs.ko to be insmoded first)
ntfs.ko (read-only support)
App2sd for froyo
These modules are only useful if you have an custom froyo ROM in order to get the app2sd functionality working
dm-mod.ko (needs jbd.ko to be insmoded first)
dm-crypt.ko (needs jbd2.ko to be insmoded first)
twofish_common.ko
twofish.ko
Installation (kernel part):
Code:
adb push dm-mod.ko /sdcard/
adb push dm-crypt.ko /sdcard/
adb push twofish_common.ko /sdcard/
adb push twofish.ko /sdcard/
adb shell
su
busybox mv /sdcard/dm-mod.ko /system/lib/modules/
busybox mv /sdcard/dm-crypt.ko /system/lib/modules/
busybox mv /sdcard/twofish_common.ko /system/lib/modules/
busybox mv /sdcard/twofish.ko /system/lib/modules/
busybox chmod 644 /system/lib/modules/*
Disclaimer:
I can't be held responsible if any of those modules brick your device. Use them at your own risk!​
Changelog:
- 22/3/11 2.1.A.0.435 kernel image for x10mini
- 20/3/11 Updated tun.ko and kernel .config using 2.1.1.A.0.6
- 11/2/11 Added modules for froyo's app2sd
- 20/1/11 Added .config file
- 17/12/10 Initial posting
- 22/12/10 Added missing filesystems deps to filesystems.zip
Feel free to post any module requests you may have.
Can u explain me ths much further..what it is..?how the change when we get this in e10i
Sent from my E10i
you can find very helpful information on wikipedia:
(unfortuneately i cannot post external urls by now yet)
so, put in wikipedia this:
tun.ko - you can create VPN connection with this module
VPN
OpenVPN
cifs.ko - you can mount your samba/windows share on your device (if u dont know what it means.. you can basically have a folder on your phone, which represents the shared folder from your windows computer ..e.g. movies, music..etc
Server Message Block
Samba
Mount
nfs.ko - that is the same actually, but with this module u mount linux network file system, which also is capable of permissions management etc
NFS
Great! Nice Addition!
Just a point though:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock2 /system
Click to expand...
Click to collapse
Shouldn't this be:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock0 /system
Click to expand...
Click to collapse
any module to overclok?
any module (or modification) to overclock cpu over 600 mhz?
DaRk_dOg said:
Great! Nice Addition!
Just a point though:
Shouldn't this be:
Click to expand...
Click to collapse
That's correct. Fixed.
Even though it works with mtdblock2 also
DrBios said:
any module (or modification) to overclock cpu over 600 mhz?
Click to expand...
Click to collapse
Is there some particular module in the vanilla kernel that can provide this?
I've seen it on other phones but with custom kernel modules / modifications
where can i read about all the possible modules?
What about psfreedom.ko (used to jailbreak the PS3)
It is possible to import?
Lef.teris said:
What about psfreedom.ko (used to jailbreak the PS3)
It is possible to import?
Click to expand...
Click to collapse
yeah psfreedom.ko would be so great on mini
any one can help me to run debian on my device???
theres a program called "Linux Installer", but its seem to need some kernel modules that the U20 dosnt have:
Code:
The Linux is installed separetly of android, the application doesn't delete any android files.
For that the application need some preriquieres :
- Rooted phone with id 0.
- Ext2, Ext3 or Ext4 support.
- If you install into loop, LOOP is needed into kernel.
- It is recommanded to reboot your phone before lunch this app to freed your memory.
(more info here http://android.galoula.com/en/LinuxInstall/)
the high priority is the LOOP thing!
any help? regards!
you need a kernel supporting loop, no addon will enable this,
you need a KERNEL that supports loop ( same as for NETFILTER needed for proper WiFi tethering )
see this thread
morning_wood said:
you need a kernel supporting loop, no addon will enable this,
you need a KERNEL that supports loop ( same as for NETFILTER needed for proper WiFi tethering )
see this thread
Click to expand...
Click to collapse
The default kernel DOES have loopback support. E.g:
cd /sdcard/
dd if=/dev/urandom of=1.img bs=1024 count=20000
mkfs.ext2 -F 1.img
mkdir /sdcard/loop
mount -o loop 1.img /sdcard/loop
This will create a loop device (1.img) formatted with ext2 and mount it under /sdcard/loop
Netfilter though is not build in, hence there can be no iptables module for this kernel for Wifi tethering
Hi nobodyAtall,
How to implement method for app2sd with ext4 with these new modules?
daemon-rj said:
Hi nobodyAtall,
How to implement method for app2sd with ext4 with these new modules?
Click to expand...
Click to collapse
This shouldn't be too hard.
- Place the required module in /system/lib/modules/
- Format your 'app' partition of the sd card in ext4 or any other FS
- Have /system/bin/sh modified so that the respective module is insmoded at boot, e.g:
Code:
#!/system/bin/sh_bak
busybox sh <<eof
if [ -f /sqlite_stmt_journals/app2sd ] ;
then
sleep 0
else
[B]insmod /system/lib/modules/jbd2.ko[/B]
[B]insmod /system/lib/modules/ext4.ko[/B]
busybox sh /system/etc/mount_sd.sh >> /sqlite_stmt_journals/app2sd.log
fi
eof
/system/bin/sh_bak "[email protected]"
- Have /system/etc/mount_sd.sh updated so that the correct FS type is used when mounting:
e.g.
Code:
mount -t ext4 /dev/block//vold/179:2 /system/sd
And it should work. As already said, I have not tried this, hence can't guarantee for it!
nobodyAtall said:
This shouldn't be too hard.
- Place the required module in /system/lib/modules/
- Format your 'app' partition of the sd card in ext4 or any other FS
- Have /system/bin/sh modified so that the respective module is insmoded at boot, e.g:
Code:
#!/system/bin/sh_bak
busybox sh <<eof
if [ -f /sqlite_stmt_journals/app2sd ] ;
then
sleep 0
else
[B]insmod /system/lib/modules/ext4.ko[/B]
busybox sh /system/etc/mount_sd.sh >> /sqlite_stmt_journals/app2sd.log
fi
eof
/system/bin/sh_bak "[email protected]"
- Have /system/etc/mount_sd.sh updated so that the correct FS type is used when mounting:
e.g.
Code:
mount -t ext4 /dev/block//vold/179:2 /system/sd
And it should work. As already said, I have not tried this, hence can't guarantee for it!
Click to expand...
Click to collapse
I had some problems with it:
# insmod /system/lib/modules/ext3.ko
insmod /system/lib/modules/ext3.ko
insmod: init_module '/system/lib/modules/ext3.ko' failed (No such file or direct
ory)
Click to expand...
Click to collapse
What could have gonne wrong?
DaRk_dOg,
Could you post the output from:
Code:
ls -la /system/lib/modules/ext3.ko
and
Code:
dmesg
after insmoding the module?
nobodyAtall said:
DaRk_dOg,
Could you post the output from:
Code:
ls -la /system/lib/modules/ext3.ko
and
Code:
dmesg
after insmoding the module?
Click to expand...
Click to collapse
Ok still can't insmod:
# ls -la /system/lib/modules/ext3.ko
ls -la /system/lib/modules/ext3.ko
-la: No such file or directory
/system/lib/modules/ext3.ko
Click to expand...
Click to collapse
And dsmeg output:
<4>[ 303.281915] select 2041 (re.rootexplorer), adj 15, size 5010, to kill
<4>[ 303.281975] send sigkill to 2041 (re.rootexplorer), adj 15, size 5010
<3>[ 303.296963] init: untracked pid 2053 exited
<4>[ 318.617897] ext3: Unknown symbol journal_force_commit
<4>[ 318.620697] ext3: Unknown symbol journal_dirty_data
<4>[ 318.621781] ext3: Unknown symbol journal_force_commit_nested
<4>[ 318.624642] ext3: Unknown symbol journal_init_dev
<4>[ 318.625722] ext3: Unknown symbol journal_dirty_metadata
<4>[ 318.626801] ext3: Unknown symbol journal_forget
<4>[ 318.628947] ext3: Unknown symbol journal_wipe
<4>[ 318.630355] ext3: Unknown symbol journal_blocks_per_page
<4>[ 318.636724] ext3: Unknown symbol journal_errno
<4>[ 318.639097] ext3: Unknown symbol journal_extend
<4>[ 318.643832] ext3: Unknown symbol journal_invalidatepage
<4>[ 318.649460] ext3: Unknown symbol journal_create
<4>[ 318.651390] ext3: Unknown symbol journal_unlock_updates
<4>[ 318.653257] ext3: Unknown symbol journal_revoke
<4>[ 318.655039] ext3: Unknown symbol journal_lock_updates
<4>[ 318.656995] ext3: Unknown symbol journal_start_commit
<4>[ 318.661068] ext3: Unknown symbol journal_flush
<4>[ 318.662145] ext3: Unknown symbol journal_load
<4>[ 318.664970] ext3: Unknown symbol journal_try_to_free_buffers
<4>[ 318.667287] ext3: Unknown symbol journal_update_format
<4>[ 318.668987] ext3: Unknown symbol journal_get_write_access
<4>[ 318.670397] ext3: Unknown symbol journal_get_undo_access
<4>[ 318.671827] ext3: Unknown symbol journal_get_create_access
<4>[ 318.673858] ext3: Unknown symbol journal_destroy
<4>[ 318.675905] ext3: Unknown symbol journal_clear_err
<4>[ 318.679265] ext3: Unknown symbol journal_stop
<4>[ 318.684682] ext3: Unknown symbol journal_init_inode
<4>[ 318.685760] ext3: Unknown symbol journal_start
<4>[ 318.687413] ext3: Unknown symbol log_wait_commit
<4>[ 318.692583] ext3: Unknown symbol journal_release_buffer
<4>[ 318.694160] ext3: Unknown symbol journal_check_available_features
<4>[ 318.695243] ext3: Unknown symbol journal_abort
<4>[ 318.696633] ext3: Unknown symbol journal_restart
<3>[ 516.699960] init: untracked pid 2271 exited
Click to expand...
Click to collapse
Thanks DaRk_dOg.
Apparently the jbd.ko module is also needed for journaling to work for ext3.
jbd2.ko is needed for ext4.
Added those to the initial post, please re-download the updated filesystems.zip

module path in kernel

As among other things, I needed a tun.ko module for my kernel, so I tried compiling my own kernel.
The kernel did build OK, and also boots OK, the only problem is that I cannot load any modules.
It seemes, that the module tools (insmod, modprobe etc) looks for the modules in /lib/modules, and I have them in /system/lib/modules, so my wifi does not work, as I cannot load the module.
Can anybody tell me, where I can specify the kernel module load path in the .config file?
Thanks Per
Example:
# cd /system/lib/modules
# ls -l
-rw-r--r-- root root 315403 2008-08-01 14:00 bcm4329.ko
-rw-r--r-- root root 211573 2008-08-01 14:00 tun.ko
# modprobe bcm4329.ko
modprobe: chdir(/lib/modules): No such file or directory
# insmod bcm4329.ko
insmod: init_module 'bcm4329.ko' failed (No such file or directory)
# insmod ./bcm4329.ko
insmod: init_module './bcm4329.ko' failed (No such file or directory)
# insmod /system/lib/modules/bcm4329.ko
insmod: init_module '/system/lib/modules/bcm4329.ko' failed (No such file or directory)
Problem solved
The file not find was a misleading error message:
Code:
# cd /system/lib/modules
# ls -l
-rw-r--r-- root root 315395 2008-08-01 14:00 bcm4329.ko
-rw-r--r-- root root 211549 2008-08-01 14:00 tun.ko
# insmod bcm4329.ko
insmod: init_module 'bcm4329.ko' failed (No such file or directory)
Actually this was an error in loading the module, as I found with dmesg:
Code:
<4>[ 464.127929] bcm4329: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
<4>[ 474.021514] bcm4329: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
This turned out to be a problem when compiling the kernel and modules with
compiler version arm-linux-androideabi-4.4.3 from android-ndk-r6b.
SOLUTION:
Either compile the kernel and modules with arm-eabi-4.4.0 from android-ndk-r5b or earlier, or:
compile the modules only with "-fno-pic", then everything is working OK
...
...

[Q] Compiling A Kernel Module

I'm having an issue insmoding a kernel I built for my rooted galaxy s2. My end game is to get USB-ethernet working by building the asix module but I cant even get a ko from the default build to insmod. (I also cant load the kernel I compiled, i tried with odin... but I feel like this is a separate issue)
I compiled a kernel based on what I downloaded from samsungs website "GT-I9100_OpenSource_Update3.zip" and followed the instructions included (basically run make with defconfig) I chose scsi_wait_scan.ko as a test because it was built with the default config and currently wasn't loaded on my phone.
Here's some info that's pertinent. Any help would be appreciated. I'm running Ubuntu 11.
# lsmod
lsmod
dhd 242604 0 - Live 0xbf02e000
j4fs 65002 1 - Live 0xbf018000 (P)
Si4709_driver 17347 0 - Live 0xbf00d000
bthid 3384 0 - Live 0xbf007000
vibrator 6724 2 - Live 0xbf000000
# insmod scsi_wait_scan.ko
insmod scsi_wait_scan.ko
insmod: init_module 'scsi_wait_scan.ko' failed (Exec format error)
# dmesg
...
<4>[19668.986907] scsi_wait_scan: disagrees about version of symbol module_layout
# modinfo scsi_wait_scan.ko
modinfo scsi_wait_scan.ko
modinfo: can't open '/2.6.35.7-I9100XWKI4-CL575468/': No such file or directory
# pwd
/mnt/sdcard
# ls -l
...
-rwxrwxr-x system sdcard_rw 32484 2012-01-12 10:21 scsi_wait_scan.ko
$ file scsi_wait_scan.ko
scsi_wait_scan.ko: ELF 32-bit LSB relocatable, ARM, version 1 (SYSV), not stripped
USB Host support
Has any body had luck with usb host working for devices other then sdcards on the S2? I got the kernel compiled and removed the whitelist but it looks like the USB host support is not fully implimented? Does the S2 support usb asynchronous mode? I'm not a usb expert but the kernel fails hard (lots of messges to dmesg and then the phone reboots) when I try it with an asix usb device.

[Q] Looking for cifs.ko module for ics lpq stock rom (cf root)

Hi, I have, without luck, been searching for a cifs.ko module for the stock lpq ics 4.0.3 rom (cf root).
I have also looked into compiling it myself, but have to admit that it apparently requires skills that I do not possess
I tried the speedmod kernel, and cifs worked fine with that, but I prefer to stay with the stock kernel..
Does someone have a cifs.ko module that would work with the stock kernel?
Thanks
John
Same here. Anyone?
doclorenzo said:
Hi, I have, without luck, been searching for a cifs.ko module for the stock lpq ics 4.0.3 rom (cf root).
I have also looked into compiling it myself, but have to admit that it apparently requires skills that I do not possess
I tried the speedmod kernel, and cifs worked fine with that, but I prefer to stay with the stock kernel..
Does someone have a cifs.ko module that would work with the stock kernel?
Thanks
John
Click to expand...
Click to collapse
The attached modules will probaby not work for you, because of the missing module versioning at the stock kernel.
You will have to build module(s) for your kernel.
The only usefull file can be kernel config from the zip file, so you can skip 'make menuconfig'.
OS: Ubuntu 12.04.1 LTS
32bit and 64bit systems:
sudo aptitude install git-core gnupg sun-java6-jdk flex bison gperf libsdl-dev libesd0-dev libwxgtk2.6-dev build-essential zip curl libncurses5-dev zlib1g-dev
(You will not need sun-java6-jdk to biuld kernel)
64bit only:
sudo aptitude install ia32-libs lib32z1-dev lib32ncurses5-dev gcc-multilib g++-multilib
Get 'arm-eabi-4.4.3' and copy it to /opt/toolchains
$ git clone android.googlesource.com/platform/prebuilt
Get the 'GT-I9100_ICS_Opensource_Update4.zip' from opensource.samsung.com and unpack it.
Unpack GT-I9100_Kernel.tar.gz to 'build_directory' (mkdir before)
Change working directory to that dir:
Add the code before the following lines in fs/cifs/cifsfs.c
void
cifs_sb_active(struct super_block *sb)
...
Code:
#ifdef CONFIG_CRYPTO_FIPS
bool in_fips_err()
{
return false;
}
EXPORT_SYMBOL_GPL(in_fips_err);
#endif
Build procedure:
export CROSS_COMPILE=/opt/toolchains/arm-eabi-4.4.3/bin/arm-eabi-
export ARCH=arm
export USE_SEC_FIPS_MODE=true
make u1_defconfig
(this will make default .config which is not the same like the one in the phone kernel)
make menuconfig
-- skip this info if you copied config-3.0.15-cifs to .config, just change 'Local version'
Instructions: (what to change in kernel default config made by u1_defconfig):
- CONFIG_CROSS_COMPILE="/opt/toolchains/arm-eabi-4.4.3/bin/arm-eabi-"
- Local version: -I9100XWLPD-CL524746 (About phone: Kernel version)
These are the options that should not be set in the config:
CONFIG_DEBUG_PREEMPT
CONFIG_DEBUG_RT_MUTEXES
CONFIG_DEBUG_SPINLOCK
CONFIG_DEBUG_MUTEXES
CONFIG_PROFILING
CONFIG_PERF_EVENTS
CONFIG_PERF_COUNTERS
CONFIG_LATENCYTOP
CONFIG_FTRACE
enable
md4
nls_utf8
cifs
-- end skip
make
cp crypto/md4.ko /wrk/target/
cp fs/nls/nls_utf8.ko /wrk/target/
cp fs/cifs/cifs.ko /wrk/target/
Transfer the modules into the phone directory: /system/lib/modules
Test: insmod md4.ko; insmod nls_utf8.ko; insmod cifs.ko
If the phone is rooted, and you have a SSH access, here is a litle boot-init hack:
mount -o remount,rw /system
-> edit /system/bin/dvfs.sh and add this line to the end of file:
exec /system/bin/sh /system/etc/init.local.sh &
-> make file /system/etc/init.local.sh
#!/system/bin/sh
/system/bin/insmod /system/lib/modules/md4.ko
/system/bin/insmod /system/lib/modules/nls_utf8.ko
/system/bin/insmod /system/lib/modules/cifs.ko
Download link 2: 2shared.com/file/2oidoupd/cifs-sgs2-ics-3015-I9100XWLPD-.html
Mpointer,
"
Thank you very much. I follow the instructions and I got a working cifs.ko file for kernel "-I9100UMLP6-CL539982"
I do not understand why the additional lines for the cifsfs.c files but without it does not work.
Thanks again. I am still with my stock rom that I do not want to change and now with CIFS !!!

Categories

Resources