[Q] xpad.ko - G Tablet Q&A, Help & Troubleshooting

hello, i got the cifs module to work, but when i try to add the xpad.ko in the terminal it says read only. then when i do insmod it says can not find directory. i placed the xpad.ko where i placed the cifs.ko . the cifs works fine. i have cm7 with pershots 2.6.32.41 kernel. everything is placed in /system/lib/modules/2.6.32.41-cyanogenmod/.... what am i doing wrong ??

It would help if you gave us the exact command you used and the exact error message you got back.

this is what i did. placed xpad.ko in /system/lib/modules/2.6.32.41-cyanogenmod/ , then in terminal chmod 644 /system/lib/modules/2.6.32.41-cyanogenmod/xpad.ko , terminal replys chmod 644 /system/lib/modules/2.6.32.41-cyanogenmod/xpad.ko: Read-only file system ... then in terminal insmod /system/lib/modules/2.6.32.41-cyanogenmod/xpad.ko , reply from terminal, insmod: init_module '/system/lib/modules/2.6.32,41-cyanogenmod/xpad.ko' failed (no such file or directory) ....i followed pershots directions from droid basement. i had no problems installing the cifs module, that works fine.

Save yourself a lot of trouble:
Don't copy the xpad.ko file (or any other kernel module file for that matter) into /system--just leave it on the SD card.
You can also skip the chmod command. Since the insmod command needs to be run as superuser, permissions for the kernel module files don't matter.
All you have to do is specify the correct path to the .ko file when giving the insmod command which you must run as root--loading modules into a running kernel is a privileged operation, and normal users cannot do it.
Assuming your xpad.ko file is in /mnt/sdcard/tmp/, do:
Code:
$ su [I]# become superuser[/I]
# insmod /mnt/sdcard/tmp/xpad.ko

thank you for your help... tried doing it like you wrote , but it keeps telling me no such file or directory . i don't get it , why does it work for the cifs module and not the xpad module ?? if i can set up the cifs correctly, i should be able to do the xpad , it's all the same commands you just add in the module ko. , right? thanks for your time.. tired of messing with trying to get a game pad to work. i give up on this . at least i got the cifs to work..... thanks

The xpad.ko module needs another module to be loaded first, before it can be loaded. Otherwise you get this error:
Code:
$ su
# insmod /mnt/sdcard/tmp/xpad.ko
insmod: can't insert 'xpad.ko': unknown symbol in module or invalid parameter
I ran modinfo (on a Linux machine) on the xpad.ko file and it told me that xpad.ko depends on a ff-memless module. So load that module first (this module is also available in lib-2632.41_gb.tar.gz):
Code:
$ su
# insmod /mnt/sdcard/tmp/ff-memless.ko
# insmod /mnt/sdcard/tmp/xpad.ko
# dmesg | tail -n5
[79594.956918] CPU1 attaching NULL sched-domain.
[79595.074521] CPU0 attaching NULL sched-domain.
[79595.075957] CPU1: clean shutdown
[79608.912964] usbcore: registered new interface driver xpad
[79608.918576] xpad: X-Box pad driver
Looks like the drivers loaded successfully.

thank you, thank you, thank you, that worked....this is a really easy way to load in the modules , so much faster... just have to set up gscript lite now to do the work for me. thank you so much for your time ... thanks

Forgive my ignorance but in Pershoot's kernel would that xpad.ko file have to be compiled for the Android flavor you have? For instance on his blog he has both the Froyo and GB kernels, but I have seen his latest kernel on a few Honeycomb roms. Just wondering because I've tried to load the xpad.ko file in terminal with admin rights on a few and can't get them to work. Again, forgive my ignorance I'm trying to learn. Feel free to smack me about.

sixvoltsystem said:
Just wondering because I've tried to load the xpad.ko file in terminal with admin rights on a few and can't get them to work.
Click to expand...
Click to collapse
Did you load the ff-memless.ko module before loading xpad.ko as per post #6 in this thread?

rajeevvp said:
Did you load the ff-memless.ko module before loading xpad.ko as per post #6 in this thread?
Click to expand...
Click to collapse
Yes sir. Running Flashback Alpha 5.4 Rom. I can't get either one to run. My ff-memless.ko module is located in:
/system/lib/modules/2.6.32.42-cyanogenmod/kernel/drivers/input/ff-memless.ko
My Xpad.ko file is located in:
/system/lib/modules/2.6.32.42-cyanogenmod/kernel/drivers/input/joystick/xpad.ko
I get this:
Permission Denied even though I have "Needs SU" checked in Gscript
Thank you for the help I'm a bit of an idiot so I appreciate the look see

sixvoltsystem said:
I get this:
Permission Denied even though I have "Needs SU" checked in Gscript
Click to expand...
Click to collapse
Send me the output of these commands. Open the Terminal app on the gTablet and then type:
Code:
gTablet$ [B]su[/B]
gTablet# [B]find / -name ff-memless*[/B]
gTablet# [B]find / -name xpad.ko[/B]
EDIT: Just ran these exact commands in the terminal and the modules appear to have loaded just fine on my gTab (I'm running GtabComb beta 3.1):
Code:
gTablet$ [B]su[/B]
gTablet# [B]insmod /system/lib/modules/2.6.32.42-cyanogenmod/kernel/drivers/input/ff-memless.ko[/B]
gTablet# [B]insmod /system/lib/modules/2.6.32.42-cyanogenmod/kernel/drivers/input/joystick/xpad.ko[/B]
gTablet# [B]dmesg | tail -n 5[/B]
[ 1073.826181] CPU1 attaching NULL sched-domain.
[ 1073.942055] CPU0 attaching NULL sched-domain.
[ 1073.945705] CPU1: clean shutdown
[ 1283.649241] usbcore: registered new interface driver xpad
[ 1283.654886] xpad: X-Box pad driver

/system/lib/modules/2.6.32.42-cyanogenmod/kernel/drivers/input/ff-memless.ko
Then if I try running it in terminal it says failed ( File exists )
both the ff-memless.ko & xpad.ko files are located in the same place yours are. Should I format and start over? Odd
By the way much appreciated for the help

sixvoltsystem said:
Then if I try running it in terminal it says failed ( File exists )
Click to expand...
Click to collapse
That means that the modules are already loaded. Check using the dmesg command I gave previously, and also check using lsmod like this:
Code:
gTablet$ [B]su[/B]
gTablet# [B]lsmod[/B]
Module Size Used by Tainted: G
xpad 8315 0
ff_memless 4200 1 xpad
dhd 201288 0
tun 10899 0
nls_utf8 1143 0
ntfs 207149 0
cifs 235684 0
As you can see, both xpad.ko and ff_memless.ko are loaded and xpad.ko is using ff_memless.ko as it should. You should be good to go at this point.

rajeevvp said:
That means that the modules are already loaded. Check using the dmesg command I gave previously, and also check using lsmod like this:
Code:
gTablet$ [B]su[/B]
gTablet# [B]lsmod[/B]
Module Size Used by Tainted: G
xpad 8315 0
ff_memless 4200 1 xpad
dhd 201288 0
tun 10899 0
nls_utf8 1143 0
ntfs 207149 0
cifs 235684 0
As you can see, both xpad.ko and ff_memless.ko are loaded and xpad.ko is using ff_memless.ko as it should. You should be good to go at this point.
Click to expand...
Click to collapse
dmesg command gave this:
nvrm_notifier_show: blocking
CPU0 attaching NULL sched-domain.
CPU1 attaching NULL sched-domain.
CPU0 attaching NULL sched-domain.
CPU1: clean shutdown
lsmod command shows:
xpad 8315 0 - Live 0xbf043000
ff_memless 4200 1 xpad, Live oxbf03c000
dhd 201288 0 - Live 0xbf000000
You sir are awesome for helping me, it works! Wired Xbox 360 controller is working perfectly!! I thanked you in every post here.

sixvoltsystem said:
dmesg command gave this:
nvrm_notifier_show: blocking
CPU0 attaching NULL sched-domain.
CPU1 attaching NULL sched-domain.
CPU0 attaching NULL sched-domain.
CPU1: clean shutdown
Click to expand...
Click to collapse
You were too late with that dmesg command. It should've been executed right after the insmod stuff. Or, just plain dmesg without the tail and then look through its output.
Wired Xbox 360 controller is working perfectly!! I thanked you in every post here.
Click to expand...
Click to collapse
Oh, boy! And I don't even own an Xbox. Of any variety.
Really, you should be thanking the guy(s) who wrote the code.

rajeevvp said:
You were too late with that dmesg command. It should've been executed right after the insmod stuff. Or, just plain dmesg without the tail and then look through its output.
Oh, boy! And I don't even own an Xbox. Of any variety.
Really, you should be thanking the guy(s) who wrote the code.
Click to expand...
Click to collapse
No problem, I will thank them. Thank you for helping me understand it a bit more. You were very helpful and patient. We have an xbox, but it is my son's, I'd rather play some Atari or 8-bit Nintendo....which is what I'll do now that this works

Hello all of you, maybe anyone can help with this...
Im trying to use a generic usb gamepad with the gtab but only work the buttons and not the direction pad. Anyone have any idea? I dont have any wired xbox controller...
Thanks a lot!

first off, a million thank yous to rajeevp and everyone else on this thread. I'm not all that knowledgeable with this stuff but after coming across these posts I was able to install xpad.ko, using terminal emulator that I got of the android market and now I can use the xbox wireless gaming adapter and xbox360 wireless controller on my rooted gtablet. I'm using gtabcomb 3.3 bootloader 1.1 and I play nest, snes, n64, Sega roms and emulators that I got free from 4shared.com,. I was cracking my head trying to get the 360 controller to work with the usb adapter and now it all works. The thank god I found this thread!! You hackers and developers out there are awesome!!!

after the drivers loaded. Whats next
rajeevvp said:
The xpad.ko module needs another module to be loaded first, before it can be loaded. Otherwise you get this error:
Code:
$ su
# insmod /mnt/sdcard/tmp/xpad.ko
insmod: can't insert 'xpad.ko': unknown symbol in module or invalid parameter
I ran modinfo (on a Linux machine) on the xpad.ko file and it told me that xpad.ko depends on a ff-memless module. So load that module first (this module is also available in lib-2632.41_gb.tar.gz):
Code:
$ su
# insmod /mnt/sdcard/tmp/ff-memless.ko
# insmod /mnt/sdcard/tmp/xpad.ko
# dmesg | tail -n5
[79594.956918] CPU1 attaching NULL sched-domain.
[79595.074521] CPU0 attaching NULL sched-domain.
[79595.075957] CPU1: clean shutdown
[79608.912964] usbcore: registered new interface driver xpad
[79608.918576] xpad: X-Box pad driver
Looks like the drivers loaded successfully.
Click to expand...
Click to collapse
So what would the next step be after the ff-memless.ko and xpad.ko drivers have been installed????

Related

modinfo on Android

Hi, i need to know why modinfo isn't working on Android and if there is someother command that replaces it?
Thanks
You can try "insmod".
It needs the path the kernel module file as parameter. E.g.
insmod /path/to/module.ko
Trying to explore / understand installed modules
st_voss said:
You can try "insmod".
It needs the path the kernel module file as parameter. E.g.
insmod /path/to/module.ko
Click to expand...
Click to collapse
I have read that to understand all the drivers / modules installed on my Android device, I must look at everything in these two directories: /system/lib/modules and /sys/module
my device has no modules directory in the /system/lib directory.
in /sys/module, I have:
kernel
printk
wakelock
userwakelock
earlysuspend
spurious
omap3epfb
keyboard
vt
bridgedriver
scsi_mod
usbcore
musb_hdrc
omap_hdq
w1_bq27000
usbhid
binder
lowmemorykiller
snd
snd_timer
snd_pcm
snd_dummy
oprofile
tcp_cubic
rfkill
pvrsrvkm
omaplfb
bc_example
tiwlan_drv
None of these directories has any files ending in .ko? Using Root Explorer to search for *.ko, finds only these:
/etc/wifi/tiwlan_drv.ko
/system/bin/sgx/omaplfb.ko
/system/bin/sgx/pvrsrvkm.ko
Can someone help me figure out how to get the equivalent of modinfo details for these?
Thanks.
Environment info:
device runs Android 2.1 I use adbKonnect to connect wirelessly with my PC
PC is running XP

[DEV] netfilter for x8

Well, another module. A guy called me a module man
If we can compile this module we can (hopefully) have native usb/wifi tether on our phone.
Other benefits:
- Firewall apps
- Transparent proxies
- NAT
I'll start trying to make this work on our current kernel. Contribution is appreciated.
Github repo is here : https://github.com/doixanh/X8Features
PLEASE DON'T SPAM THIS DEV THREAD WITH UNCONTRIBUTED POSTS
Once again, great work!
Continue with the modules, you are solving many things extremely fast!
Big thank you from me for contributing to the X8 community!
All u need to do is implement the needed hooks missing from the stock kernel for iptables to attach on.
Sent from my GB MiniCM
Hello. If this module get worked, will be able the reverse usb tether(PC -> phone). I.e to have internet on my phone from the computer via USB.
Can someone explain what is this?
Great job! I use third-party programs, but is good to have native tether. One question. Will I need drivers for PC with native tether?
http://www.google.com/url?sa=t&sour...sg=AFQjCNGsYN4VLe4oQLOtuPksDb87g537lg&cad=rja
maybe it help
He3aBuCuM said:
Hello. If this module get worked, will be able the reverse usb tether(PC -> phone). I.e to have internet on my phone from the computer via USB.
Click to expand...
Click to collapse
no this would allow your phone to become a wifi hot spot, why would you need it the other way? if you have no wifi network you can download APK's to your computer and move to phone and install from your SD card
it would also allow you to use firewall apps to block all apps but the ones you want from connecting to your mobile internet to save you money.
So far, I managed to compile and insmod "netfilter.ko" with no error. But whenever I try to insmod iptable_filter.ko, I got a kernel crash.
The following modules has been insmoded - ordered to solve module dependencies.
insmod netfilter.ko
insmod x_tables.ko
insmod xt_tcpudp.ko
insmod nf_sockopt.ko
insmod ip_tables.ko
insmod ipt_addrtype.ko
insmod iptable_filter.ko <--- crashed here
Kernel crash message:
Code:
[ 466.135716] [<bf06b354>] (nf_register_hook+0x0/0x90 [netfilter]) from [<bf06b408>] (nf_register_hooks+0x24/0x64 [netfilter])
It seems the our nf_register_hook is not working.
Some logs:
Code:
[ 163.394843] nf_register_hook reg=BF059844
[ 163.395055] mutex locking
[ 163.395905] list for each entry pf=2, hooknum=1
<1>Unable to handle kernel NULL pointer dereference at virtual address 00000000
Could u share sources for those? Thanks.
Sent from my X10mini using XDA App
I'm at home now, I put all sources at work I changed lots of things to be able to compile it as module. Maybe I will need to upload whole /kernel/net/ipv4 and /kernel/net/netfilter branches.
I'll upload tomorrow.
It seems that the linked list is empty, that's why it couldn't initialize the list.
nobodyAtall: I've just created a github repo for X8Netfilter, I will push modifications soon.
doixanh said:
It seems that the linked list is empty, that's why it couldn't initialize the list.
nobodyAtall: I've just created a github repo for X8Netfilter, I will push modifications soon.
Click to expand...
Click to collapse
Thanks mate. I'll take a look and see if I can help.
Ok, everything pushed. Let's have fun with it my friend.
Repo is here : https://github.com/doixanh/X8Netfilter
The last time there were null pointers in linked lists because the initialization code (netfilter_init) was not executed. I forgot that now it's a module, so we have to declare module_init.
I added module_init into it. Insmoded fine now, but iptables tool still complains:
iptables v1.3.7: can't initialize iptables table `filter'
Click to expand...
Click to collapse
What are we missing?
/edit : post #200
/edit #2 : during xRecovery to switch to another ROM for testing, I bricked my lovely phone. There are lots of junk files in /system. Now I have to save my X8
/edit #3 : oh and I forgot that x10 mini has another offset for synchronize_rcu() - it should be 0xC0098F88. You have to modify it in netfilter.h
In the kernel config I didn't include xtables (required by iptable_filter) so maybe it's a problem.
I included, compiled, but still the same. I think the problem comes from the iptables userspace tool.
@nobodyAtall: can you modify and compile iptables.c (included in CM6/7 source). We need to know the reason that TC_INIT returns null. Before each "return NULL" you can put a printf so we can know why it's unable to load the table.
I cannot compile android iptables now (at work, the PC is really really slow).
I also pushed kernel config for my current kernel build, and a script to load the modules in order to solve dependencies.
Thanks.
doixanh said:
In the kernel config I didn't include xtables (required by iptable_filter) so maybe it's a problem.
I included, compiled, but still the same. I think the problem comes from the iptables userspace tool.
@nobodyAtall: can you modify and compile iptables.c (included in CM6/7 source). We need to know the reason that TC_INIT returns null. Before each "return NULL" you can put a printf so we can know why it's unable to load the table.
I cannot compile android iptables now (at work, the PC is really really slow).
I also pushed kernel config for my current kernel build, and a script to load the modules in order to solve dependencies.
Thanks.
Click to expand...
Click to collapse
I'm getting undefined references when building the kernel with your github files / .config file. Specifically:
kernel/include/linux/netfilter.h:193: undefined reference to `nf_hook_slow'
kernel/net/ipv4/ip_input.c:270: undefined reference to `nf_hooks'
kernel/net/ipv4/ip_input.c:270: undefined reference to `nf_hooks'
and many more.
Strange, I don't have any problem at all. I compiled those modules with
Code:
ARCH=arm CROSS_COMPILE=arm-eabi- make modules
oh and btw, I compiled with this kernel from SE: x10_x10mini_x10minipro_x8_eclair_2.1.A.0.390.tar.gz
doixanh said:
Strange, I don't have any problem at all. I compiled those modules with
Code:
ARCH=arm CROSS_COMPILE=arm-eabi- make modules
oh and btw, I compiled with this kernel from SE: x10_x10mini_x10minipro_x8_eclair_2.1.A.0.390.tar.gz
Click to expand...
Click to collapse
Ok, it wont make the kernel image but makes the modules.
Here's what's loaded:
Code:
localhost netfilter # ls
arp_tables.ko nfnetlink.ko xt_hashlimit.ko xt_realm.ko
ip_tables.ko nfnetlink_log.ko xt_iprange.ko xt_recent.ko
ipt_LOG.ko x_tables.ko xt_length.ko xt_sctp.ko
ipt_ULOG.ko xt_CLASSIFY.ko xt_limit.ko xt_statistic.ko
ipt_addrtype.ko xt_NFLOG.ko xt_mac.ko xt_string.ko
ipt_ah.ko xt_NFQUEUE.ko xt_multiport.ko xt_tcpudp.ko
iptable_filter.ko xt_TCPOPTSTRIP.ko xt_owner.ko xt_time.ko
iptable_mangle.ko xt_TRACE.ko xt_pkttype.ko xt_u32.ko
iptable_raw.ko xt_comment.ko xt_policy.ko
netfilter.ko xt_esp.ko xt_quota.ko
localhost netfilter # sh /sdcard/insmodnet
[B]insmod: init_module 'xt_NFLOG.ko' failed (No such file or directory)
insmod: init_module 'xt_string.ko' failed (No such file or directory)[/B]
localhost netfilter # lsmod
iptable_filter 2700 0 - Live 0xbf1e7000
ipt_addrtype 2388 0 - Live 0xbf1e1000
ip_tables 11264 1 iptable_filter, Live 0xbf1d9000
xt_u32 2036 0 - Live 0xbf1d3000
xt_time 2880 0 - Live 0xbf1cd000
xt_tcpudp 3016 0 - Live 0xbf1c7000
xt_statistic 1844 0 - Live 0xbf1bb000
xt_sctp 2672 0 - Live 0xbf1b5000
xt_recent 9308 0 - Live 0xbf1ad000
xt_realm 1492 0 - Live 0xbf1a7000
xt_quota 1752 0 - Live 0xbf1a1000
xt_policy 3120 0 - Live 0xbf19b000
xt_pkttype 1596 0 - Live 0xbf195000
xt_owner 2668 0 - Live 0xbf18f000
xt_multiport 3160 0 - Live 0xbf189000
xt_mac 1576 0 - Live 0xbf183000
xt_limit 2224 0 - Live 0xbf17d000
xt_length 1760 0 - Live 0xbf177000
xt_iprange 2640 0 - Live 0xbf171000
xt_hashlimit 9964 0 - Live 0xbf169000
xt_esp 1852 0 - Live 0xbf163000
xt_comment 1492 0 - Live 0xbf15d000
xt_TRACE 1484 0 - Live 0xbf157000
xt_TCPOPTSTRIP 1956 0 - Live 0xbf151000
xt_NFQUEUE 1716 0 - Live 0xbf070000
xt_CLASSIFY 1536 0 - Live 0xbf023000
x_tables 14212 25 ipt_addrtype,ip_tables,xt_u32,xt_time,xt_tcpudp,xt_statistic,xt_sctp,xt_recent,xt_realm,xt_quota,xt_policy,xt_pkttype,xt_owner,xt_multiport,xt_mac,xt_limit,xt_length,xt_iprange,xt_hashlimit,xt_esp,xt_comment,xt_TRACE,xt_TCPOPTSTRIP,xt_NFQUEUE,xt_CLASSIFY, Live 0xbf148000
netfilter 13564 3 iptable_filter,ip_tables,xt_TCPOPTSTRIP,[permanent], Live 0xbf142000
tiwlan_drv 838420 0 - Live 0xbf073000
ext3 110952 1 - Live 0xbf052000
jbd 49480 1 ext3, Live 0xbf040000
x8oc 6664 0 - Live 0xbf039000
synaptics_i2c_rmi4 11068 0 - Live 0xbf034000
twofish 9308 0 - Live 0xbf02c000
twofish_common 15740 1 twofish, Live 0xbf026000
dm_crypt 13052 0 - Live 0xbf01d000
dm_mod 53216 1 dm_crypt, Live 0xbf00b000
sdio 20724 1 tiwlan_drv, Live 0xbf000000
Do we need all there modules?
xt_NFLOG fails with:
xt_NFLOG: Unknown symbol nfulnl_log_packet
xt_string fails with:
xt_string: Unknown symbol textsearch_destroy
xt_string: Unknown symbol textsearch_prepare
I'm not sure, but I tried to compile and load all those modules to make it work first.
iptables tool still gives out error with
iptables -L
doixanh said:
I'm not sure, but I tried to compile and load all those modules to make it work first.
iptables tool still gives out error with
iptables -L
Click to expand...
Click to collapse
The actual error is:
iptables v1.4.7: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
Which is quite *disturbing*
The actual error reported from kernel space is ENOENT (see file libiptc.c in CM sources).

Galaxy S2 Compile 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 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
Solved:
I actually got this working after I met another developer through work. You need a ramdisk to compile into the kernel.
I can't post links yet but you can search for the thread on the google forms by googling: 'Tal Alon kernel' and it should give you a pretty good description of what to do.
unpack a boot.img from a backup with unpack-bootimg.pl and uncpio the bootdisk.
The geist of what i learned is that there is a line in the .config file that should read CONFIG_INITRAMFS_SOURCE="/path/to/bootimg/boot.img-ramdisk"
After you build the kernel, copy your .ko's to the ram disk folder in boot.img-ramdisk/system/lib/modules
compile the kernel again then tar the zImage and load with odin.
njdevi11 said:
I actually got this working after I met another developer through work. You need a ramdisk to compile into the kernel.
I can't post links yet but you can search for the thread on the google forms by googling: 'Tal Alon kernel' and it should give you a pretty good description of what to do.
unpack a boot.img from a backup with unpack-bootimg.pl and uncpio the bootdisk.
The geist of what i learned is that there is a line in the .config file that should read CONFIG_INITRAMFS_SOURCE="/path/to/bootimg/boot.img-ramdisk"
After you build the kernel, copy your .ko's to the ram disk folder in boot.img-ramdisk/system/lib/modules
compile the kernel again then tar the zImage and load with odin.
Click to expand...
Click to collapse
Hi, did you get your asix.ko to work? I'm trying the same thing, got the module to compile and load, even eth0 showed up but now I'm stuck. I'm unable to get any communication going, i get "invalid rx length" errors in dmesg for the eth0 interface.
Thanks

[FIX] [DRIVER] Kernel Module Pack V4

Here is kernel module pack version 4.
The modules should load without any problems.
If you need more drivers, PM me the module name or the .config changes.
Installing:
Create a directory /data/local/modules and copy the *.ko files to /data/local/modules via your method of choice (e.g., Root Explorer)
Fix for hangs/stalls/lags, because of background disk I/O
Code:
su
cd /data/local/modules
insmod cfq-iosched.ko
echo cfq >/sys/block/mmcblk0/queue/scheduler
Modules for some Logitech Joysticks:
Code:
su
cd /data/local/modules
insmod ff-memless.ko
insmod hid-logitech.ko
Modules for IPSec VPN support:
Code:
su
cd /data/local/modules
insmod tun.ko
insmod ah4.ko
insmod xfrm_user.ko
insmod xfrm4_mode_tunnel.ko
Modules included are:
Code:
adi.ko
ah4.ko
cifs.ko
cfq-iosched.ko
deadline-iosched.ko
ff-memless.ko
gameport.ko
hid-logitech.ko
iforce.ko
ipip.ko
md4.ko
tun.ko
xfrm4_mode_tunnel.ko
xfrm_user.ko
The file config.txt in the zip archive is the actual .config used.
Howto build them?
Install chroot Ubuntu or any other distribution on your Prime.
chroot to the distribution
wget the kernel source from Asus
$ mkdir linux; cd linux
unpack the kernel source here
modify Makefile, Find the CFLAGS_MODULE line, add -fno-pic this flag to the end of the line: CFLAGS_MODULE = -fno-pic
$ zcat /proc/config.gz > .config
$ make oldconfig
modify .config or use "make menuconfig"
$ make -j5 modules
$ make modules_install
$ depmod -a
$ find /lib/modules/$(uname -r) -name '*.ko'
Module description:
+CONFIG_INET_XFRM_MODE_TUNNEL=m
+CONFIG_XFRM_USER=m
Support for IPsec user configuration interface used by native Linux tools.
Module: xfrm4_mode_tunnel.ko xfrm_user.ko
+CONFIG_NET_IPIP=m
IP tunneling
http://cateee.net/lkddb/web-lkddb/NET_IPIP.html
Module: ipip.ko
+CONFIG_INET_AH=m
Support for IPsec AH.
Module: ah4.ko
+CONFIG_TUN=m
http://cateee.net/lkddb/web-lkddb/TUN.html
TUN/TAP provides packet reception and transmission for user space programs. It can be viewed as a simple Point-to-Point or Ethernet device, which instead of receiving packets from a physical media, receives them from user space program and instead of sending packets via physical media writes them to the user space program.
+CONFIG_HID_LOGITECH=m
+CONFIG_INPUT_FF_MEMLESS=m
Modules for Logitech FF pads, wheels, joysticks
Module: ff-memless.ko hid-logitech.ko
+CONFIG_GAMEPORT=m
+CONFIG_JOYSTICK_ADI=m
Logitech ADI digital joysticks and gamepads
Might not be needed on the prime, because there is no gameport
Module: gameport.ko adi.ko
+CONFIG_JOYSTICK_IFORCE=m
http://cateee.net/lkddb/web-lkddb/JOYSTICK_IFORCE.html
vendor: 044f ("ThrustMaster, Inc."), product: a01c
vendor: 046d ("Logitech, Inc."), product: c281 ("WingMan Force")
vendor: 046d ("Logitech, Inc."), product: c291 ("WingMan Formula Force")
vendor: 05ef ("AVB, Inc. [anko?]"), product: 020a ("Top Shot Pegasus Joystick")
vendor: 05ef ("AVB, Inc. [anko?]"), product: 8884 ("Mag Turbo Force Wheel")
vendor: 05ef ("AVB, Inc. [anko?]"), product: 8888 ("Top Shot Force Feedback Racing Wheel")
vendor: 061c ("Act Labs, Ltd"), product: c084
vendor: 061c ("Act Labs, Ltd"), product: c0a4
vendor: 06f8 ("Guillemot Corp."), product: 0001
vendor: 06f8 ("Guillemot Corp."), product: 0003
vendor: 06f8 ("Guillemot Corp."), product: 0004
vendor: 06f8 ("Guillemot Corp."), product: a302
Module: iforce.ko
+CONFIG_CIFS=m
+CONFIG_CRYPTO_MD4=m
This is the client VFS module for the Common Internet File System (CIFS) protocol which is the successor to the Server Message Block (SMB) protocol, the native file sharing mechanism for most early PC operating systems. The CIFS protocol is fully supported by file servers such as Windows 2000 (including Windows 2003, NT 4 and Windows XP) as well by Samba (which provides excellent CIFS server support for Linux and many other operating systems). Limited support for OS/2 and Windows ME and similar servers is provided as well.
Module: cifs.ko md4.ko
ChangeLog:
v4:
cfq-iosched.ko
deadline-iosched.ko
v3:
added cifs.ko
v2:
stripped the modules from the debug symbols, package is much smaller now
Version 2 now a lot smaller, because the debugging symbols have been removed.
added cifs.ko
Could you attach the .config you're using?
Thanks
curreyr said:
Could you attach the .config you're using?
Thanks
Click to expand...
Click to collapse
It's in the zip-file ... "config.txt"
Any list as to what each of these new driver modules included goes with? are these like controller drivers or different/new USB drivers not included on stock prime. just trying to find out what each of them go to.
kind of surprised to see:
# CONFIG_CRYPTO_DEV_TEGRA_AES is not set
My initial looking indicates that unless that's baked in, android might not make use of it
I'll research a bit more tho.
Should be useful when we can get custom ROMs in the oven!
demandarin said:
Any list as to what each of these new driver modules included goes with? are these like controller drivers or different/new USB drivers not included on stock prime. just trying to find out what each of them go to.
Click to expand...
Click to collapse
Added some more information about the modules, what I could find quickly..
Did you explicitly use the NDK to cross-compile? Or did the package from Asus just work?
Noxious Ninja said:
Did you explicitly use the NDK to cross-compile? Or did the package from Asus just work?
Click to expand...
Click to collapse
The package from Asus just works for the modules at least.
Noxious Ninja said:
Did you explicitly use the NDK to cross-compile? Or did the package from Asus just work?
Click to expand...
Click to collapse
Oh, and I didn't cross compile... I compiled natively on the Prime in a chrooted Ubuntu.
saturn_de said:
Oh, and I didn't cross compile... I compiled natively on the Prime in a chrooted Ubuntu.
Click to expand...
Click to collapse
Since Asus had only release .7 kernel version, I assume this would not be with source from latest ota.
I plan to try it on .11ota. Have anyone successfully use it on latest ota?
Thanks.
warmRLS1+Anthrax
saturn_de said:
Oh, and I didn't cross compile... I compiled natively on the Prime in a chrooted Ubuntu.
Click to expand...
Click to collapse
Oh, cool. I didn't even think to try that.
Noxious Ninja said:
Oh, cool. I didn't even think to try that.
Click to expand...
Click to collapse
Yeah, you can "make modules_install; depmod -a" and afterwards you can "modprobe" any modules without thinking about the dependencies
huytrang90 said:
Since Asus had only release .7 kernel version, I assume this would not be with source from latest ota.
I plan to try it on .11ota. Have anyone successfully use it on latest ota?
Thanks.
warmRLS1+Anthrax
Click to expand...
Click to collapse
Well, it's kernel version 2.6.39.4 in all ICS Prime version so far.
saturn_de said:
Well, it's kernel version 2.6.39.4 in all ICS Prime version so far.
Click to expand...
Click to collapse
Yea the kernel is the same and the modules work fine for me on .11
This might not be the correct place for this and if so I apologize.
Is this thread about finding/compiling drivers for things so that they will work when plugged into the usb port on the keyboard dock? If so how would I go about making this usb headset work?
http://h10025.www1.hp.com/ewfrf/wc/...n&lc=en&product=4085832&task=prodinfoCategory
Again I am sorry if I have totally misunderstood the point of this thread. Thanks!
version 4 now with:
cfq-iosched.ko
deadline-iosched.ko
Fix for hangs/stalls/lags, because of background disk I/O
Code:
su
cd /data/local/modules
insmod cfq-iosched.ko
echo cfq >/sys/block/mmcblk0/queue/scheduler
Nico^APEX said:
This might not be the correct place for this and if so I apologize.
Is this thread about finding/compiling drivers for things so that they will work when plugged into the usb port on the keyboard dock? If so how would I go about making this usb headset work?
http://h10025.www1.hp.com/ewfrf/wc/...n&lc=en&product=4085832&task=prodinfoCategory
Again I am sorry if I have totally misunderstood the point of this thread. Thanks!
Click to expand...
Click to collapse
Ok, boot your PC/Laptop from a Linux Live CD or a locally installed Linux. Log in, start a terminal, plug in the headset and show me the output of:
# dmesg | tail -20
# lsusb
# lsmod

use USB WiFi dongle on TF201

Hi folks!
one user ask if there is a method for using USB WiFi dongle on TF201, I've a working WG111v3 [RTL8187] which i use for connect when signal is weak, sniffing wifi packets , dump WPA handshakes and make some love ;P.
however i get all this working on TF201 by compile the kernel modules.
because not all users have a chroot with a stock kernel tree, i think to realease a package with all these modules inside.
so, for extract the modules from the package :
tar xzf wifi_ko.tar.gz -C path/to/
or
tar xjf wifi_ko.tar.bz2 -C path/to/
and all you have to do for use the wifi dongle is:
1) open termianl emulator
2) su
3) insmod path/to/module.ko
4) ifconfig wlan1 up
5) wpa_supplicant -i wlan1 -c /path/to/wpa_supplicant.conf -B
6) dhcpcd wlan1
i suppose that the new device is wlan1.
the step 5 and 6 is for connecting to a wireless Access Point, but if you use the dongle for other purposes just skip these.
I make these modules with debug information, so, if you have some problem look at `dmesg | grep "$module" ' output.
for a working wpa_supplicant.conf file take the /data/misc/wifi/wpa_supplicant.conf and remove extra information such as device-id and other android stuff.
Here you are the packages: ( if someone want to upload to another hoster will be better )
https://docs.google.com/open?id=0B0RHupHzEorHWkRheUMxNjRPTGc
https://docs.google.com/open?id=0B0RHupHzEorHZ21NZ3dTNzNHYTQ
Hope this help.
Regeards.
( sorry for my doggish english , i will update it soon )
tux_mind said:
Hi folks!
one user ask if there is a method for using USB WiFi dongle on TF201, I've a working WG111v3 [RTL8187] which i use for connect when signal is weak, sniffing wifi packets , dump WPA handshakes and make some love ;P.
however i get all this working on TF201 by compile the kernel modules.
because not all users have a chroot with a stock kernel tree, i think to realease a package with all these modules inside.
so, for extract the modules from the package :
tar xzf wifi_ko.tar.gz -C path/to/
or
tar xjf wifi_ko.tar.bz2 -C path/to/
and all you have to do for use the wifi dongle is:
1) open termianl emulator
2) su
3) insmod path/to/module.ko
4) ifconfig wlan1 up
5) wpa_supplicant -i wlan1 -c /path/to/wpa_supplicant.conf -B
6) dhcpcd wlan1
i suppose that the new device is wlan1.
the step 5 and 6 is for connecting to a wireless Access Point, but if you use the dongle for other purposes just skip these.
I make these modules with debug information, so, if you have some problem look at `dmesg | grep "$module" ' output.
for a working wpa_supplicant.conf file take the /data/misc/wifi/wpa_supplicant.conf and remove extra information such as device-id and other android stuff.
Click to expand...
Click to collapse
is it possible to use this on Aurora 2??? thanks for the post!
This is great.. But have a question
tux_mind said:
Hi folks!
one user ask if there is a method for using USB WiFi dongle on TF201, I've a working WG111v3 [RTL8187] which i use for connect when signal is weak, sniffing wifi packets , dump WPA handshakes and make some love ;P.
however i get all this working on TF201 by compile the kernel modules.
because not all users have a chroot with a stock kernel tree, i think to realease a package with all these modules inside.
so, for extract the modules from the package :
tar xzf wifi_ko.tar.gz -C path/to/
or
tar xjf wifi_ko.tar.bz2 -C path/to/
and all you have to do for use the wifi dongle is:
1) open termianl emulator
2) su
3) insmod path/to/module.ko
4) ifconfig wlan1 up
5) wpa_supplicant -i wlan1 -c /path/to/wpa_supplicant.conf -B
6) dhcpcd wlan1
i suppose that the new device is wlan1.
the step 5 and 6 is for connecting to a wireless Access Point, but if you use the dongle for other purposes just skip these.
I make these modules with debug information, so, if you have some problem look at `dmesg | grep "$module" ' output.
for a working wpa_supplicant.conf file take the /data/misc/wifi/wpa_supplicant.conf and remove extra information such as device-id and other android stuff.
Hope this help.
Regeards.
( sorry for my doggish english , i will update it soon )
Click to expand...
Click to collapse
What kernel did you use to compile these drivers on?
Cannot insmod
Hello,
could you please answer what kernel version is this working with? Any chance you could re-compile with newest kernel? When trying to ismod, I'm getting error:
insmod: init_module '...path...' failed (No such file or directory)
Before you ask - yes, the path is correct, just init_module returns non-zero.
Thanks for any help,
Martin
Is it possible to have a Atheros AR9271 driver?
I tried all athXX.ko, but "init_module '...path...' failed (No such file or directory)"always happened.
tux_mind said:
Hi folks!
one user ask if there is a method for using USB WiFi dongle on TF201, I've a working WG111v3 [RTL8187] which i use for connect when signal is weak, sniffing wifi packets , dump WPA handshakes and make some love ;P.
however i get all this working on TF201 by compile the kernel modules.
because not all users have a chroot with a stock kernel tree, i think to realease a package with all these modules inside.
Click to expand...
Click to collapse
tennyleaz said:
Is it possible to have a Atheros AR9271 driver?
I tried all athXX.ko, but "init_module '...path...' failed (No such file or directory)"always happened.
Click to expand...
Click to collapse
if i remember fine you need the ath9k or the ath9k_htc module.
btw the main trouble is that the module fails to load the device firmware.
it is probably due to wrong path.
module was probably compiled with "/system/lib/firmware/htc_9271.fw" but you have "/lib/firmware/htc_9271.fw".
please check dmesg immediately after the modprobe, you will see the path used by the module.
i solved by doing a symlink from /system/lib to /lib.
sorry for late replies but i never comes on XDA.
i read now all the previous questions.
the kernel i use is this: https://github.com/tux-mind/tf201-kernel
insmod
Like a previous post I am getting: init_module rtl8192ce.ko failed (no such file or directory)
1) I could not find a path/to so I just made one on the MicroSD and extracted the files.
2) I am executing insmod rtl8192ce.ko from the path/to/ directory
3) To me the issue is that the insmod is trying to write to a location that does not exist.
4) Per a previous post I added a directory "firmware" under system/lib still no luck.
Any help would be appreciated.

Categories

Resources