Need help with compiling modules for Dell Streak kernel.
Because i could not find cifs.ko module for mounting network shares for Dell Streak stock Froyo 318, i decided to make it on my own.
I did not have any clue how can it be done, but with lot of googling and reading forum posts on xda and modaco, i got vague idea how i can do it.
There was lots of trial-and-error attempts until i learned how to use all comands and tools, and here is final list of things id did to make it:
Already had VMWare workstation with Ubuntu 10.10 instalation, i got Android Froyo source tree from net, replaced kernel with Dell Streak 3.09 kernel (from opensource.dell.com) which is also Froyo, i think, and is closest to my kernel version (318).
Got toolchains from codesourcery.com
Extracted my phone config from /proc/config.gz, renamed to .config, uncommented and changed option for CONFIG_CIFS=m. Did same for tun.ko module which i did not need, but just for comparison. Placed .config file in kernel root.
Did comand:
Code:
make ARCH=arm CROSS_COMPILE=/path-to-toolchains/bin/arm-none-eabi- modules
after confirming some options (irellevant to this), and some compiling in terminal, all went ok without errors and did produce modules in fs/cifs and drivers/net
i also did some debugging to reduce filesize, bud also had tried module without debugging with same result (see below)
transferred modules to my phone in /system/lib/modules and tried to load them via insmod.
loaded tun.ko without problem (i dunno whteher is working because i have no means to try it and have no need for it). i compiled it just to see whether it will be loaded in phone kernel. it DID load without error messages.
when tried to load cifs.ko via insmod cifs.ko, got this error message:
Code:
insmod: init_module 'cifs.ko' failed (no such file or directory)
dmesg provided following errors:
Code:
cifs: Unknown symbol slow_work_register_user
cifs: Unknown symbol slow_work_enqueue
found in similar thread for Galaky Tab that i need to compile slow_work module and load it before because of that dependancies, Found another thread with instructions for compiling slow-work, followed them:
copied all slow-work files in cifs, Remove the calls to round_jiffies in fs/cifs/slow-work.c: round_jiffies(jiffies + SLOW_WORK_CULL_TIMEOUT)); changed to
jiffies + SLOW_WORK_CULL_TIMEOUT); AND round_jiffies(jiffies + SLOW_WORK_OOM_TIMEOUT)); TO jiffies + SLOW_WORK_OOM_TIMEOUT);
edited fs/cifs/Makefile and added slow-work.o to the obj-$(CONFIG_CIFS) += cifs.o line: obj-$(CONFIG_CIFS) += cifs.o slow-work.o.
Ran make command from above, got both modules (cifs.ko and slow-work.ko) in fs/cifs directory without errors.
Copied them to phone, done insmod and got error for slow-work:
Code:
insmod: init_module 'slow-work.ko' failed (no such file or directory)
dmesg provided following message:
Code:
slow_work: module licese "unspecified" taints kernel
slow_work: Unknown symbol mutex_lock_nested
Now i'm clueless (like i haven't been all the time :-D).
All modules compiled without errors, tun.ko will load, cifs.ko apparently need slow-work to run, slow-work compiled, but can't load.
So, if somebody can help, or point me where is possible error, i will be very grateful.
UPDATE:
Found references for missing slow_work modules in cifsfs.c and misc.c, deleted them and ran make.
produced cifs.ko without error.
LOADED cifs in phone without error!!!! With lsmod it shows that module is loaded!
BUT, does not work! Cannot mount anything. When tried with cifsmanager or manually via terminal get error message "No such device" which points that there is no valid cifs.ko module in kernel.
So, module is produced and loaded in phone without errors, BUT DOES NOT WORK. It looks like Streak Froyo need slow-work module after all...
I'm desperate, please if somebody did compiling cifs.ko for Streak, or use cifs mounting with found module, share your thoughts and experiences.
Thanks everybody.
CIFS and Slow worked - compiled
I was able to successfully compile both the slow work module and the CIFS module for the most recent 4G EVO. Took me a couple of days, but I think I could walk you through the specifics fairly easily. Let me know if you want the details.
of course I do!
please write your way.
Sent from my Dell Streak using XDA Premium App
dmandic, did you ever get this working? I went through similar pains doing this for the xperia arc, and did manage to get it working. I have some thoughts about your situation if you want to discuss further.
please, any help is appreciated.
i'm open to any kind of suggestions.
write your thoughts here.
Sent from my Dell Streak using XDA Premium App
Hmm. I originally stumbled upon this thread because I was searching for others who compiled a cifs.ko against a kernel with version "2.6.32.9-perf" (from the android about phone menu), hoping to avoid going through figuring out how to do this. I saw that others with the Dell Streak also had this kernel, and then I found your thread.
Anyway, I was thinking that maybe the kernel you got from the dell website had a slightly different version than your phone (because your phone is 3.18 vs 3.09), and that's why you're getting runtime symbol errors. I thought maybe there's a chance you needed exactly 2.6.32.9-perf and I could offer you mine. However, I downloaded the dell 3.09 kernel source and found that it's also 2.6.32.9-perf... so I guess that idea's out the window. (By the way, is this what your phone shows?)
Well just for kicks, I actually compiled slow-work and cifs from the dell kernel and loaded it on my xperia arc phone and they worked (was able to use CIFSManager).
It's a long shot but just in case there's something about the way you're compiling them, I attached them here - give it a try. [Edit: Duh, I forgot I need your .config file. Email it to me and I'll re-post these]
I tried out the Xperia files from the thread [DEV]TUN, CIFS modules files on my Streak 5. It did not go well, these are my messages from dmesg.
Code:
<4>[ 341.187030] tun: Unknown symbol dynamic_debug_enabled
<4>[ 341.190600] tun: Unknown symbol dynamic_debug_enabled2
<4>[ 341.219513] slow_work: module license 'unspecified' taints kernel.
<4>[ 341.220411] slow_work: Unknown symbol mutex_lock
<4>[ 341.638099] cifs: Unknown symbol mem_section
<4>[ 341.638397] cifs: Unknown symbol mutex_lock
<4>[ 341.641609] cifs: Unknown symbol slow_work_register_user
<4>[ 341.642835] cifs: Unknown symbol slow_work_enqueue
Looks like the kernel is differently compiled and or still some modules missing.
I noticed that in another thread Samba/CIFS for Motorola defy froyo nls_utf8.ko also has been required, however I do not have the 2.6.32.9-perf version of this to try it out.
How has the progression been for you guys?
Okay so heres my problem.. Im currently trying to compile modules to add to my z902. i have the 3.0.8 kernel source used for the mele which uses the same allwinner a10 proccessor. I have done some looking around and found that in order for android to load the module it needs to be compiled with the correct vermagic as well.. i managed to get info from both a module already on the device and from the module i compiled.
My module retrieves the following info when using modinfo()...
filename: hid-sony.ko
license: GPL
alias: hid:b0003v0000054Cp0000024B
alias: hid:b0005v0000054Cp00000268
alias: hid:b0003v0000054Cp0000042F
alias: hid:b0003v0000054Cp00000268
depends:
vermagic: 3.0.8+ preempt mod_unload modversions ARMv7
the original im comparing to looks as follows...
filename: sun4i-keypad.ko
alias: platform:sw-keypad
license: GPL
author: Aaron.maoye<[email protected]>
description: SW keypad driver
depends:
vermagic: 3.0.8+ preempt mod_unload modversions ARMv7
this is what it took me a while to acheive. the problem is when trying to insert the module into linux using the insmod command i get this error..
insmod: init_module 'hid-sony.ko' failed (Exec format error)
afterwords i ran dmesg and noticed a line that looks as follows:
hid-sony: dissagrees about version of symbol module_layout
after doing this i read about a way to overlook the vermagic by using modprobe..
here i ran into another problem.. when executing modprobe as follows i recive this error..
#busybox modprobe hid-sony.ko
modprobe: chdir(/lib/modules): No such file or directory
after recieving this error i tried making the directory and typed in the same command..
it returned that modules.dep was not found..i looked into this file and it seems to be where linux stores all the initiated drivers.
I searched high and low and could not find this file anywhere on the system.
my question is.. What the hell am i doing wrong..? lol
I compiled the entire kernel first.. then i compiled the modules afterwords to a set location.
does the baseband version info have anything to do with this because i couldnt find any info on it..
the z902 has 1.2.3 as a baseband..? is it possible i may not have the correct kernel source..?
anyone who helps me solve this i will personally buy them a unit and set it up for them.. lol
BUMP
Bump.. please someone help... how can i make modules.dep without depmod in my busybox applets.. anyone know if i can update busybox within android or through linux. id really like to add support for some controllers and bluetooth dongles. im pretty sure the module is setup and compiled right. but its trying to install it in the wrong place. unless it matters that android is compiled within the kernel as well.. because the tutorial i read through didnt say it was neccisary. i belive it was aimed towards the mele a2000. but its an allwinner a10 with the same kernel. 3.0.8+.. the only thing in not sure of is the build number. the z902 shows a 1.2.3 build. and i have no clue what build number the mele a2000 uses.
prob a waste of time as nobody seems interested...
I managed to update busy box and add depmod to the list of applets. After doing so I tried mod probe and the module still won't load. Don't have the info on the error in front of me but it was something to the effect that it was not compatible with the kernel. Back to square one. Going to try compiling it with android over the weekend and give it another attempt. Need to find some kind of a work around for actual controllers for this thing. USB/bt joystick center would be a phenomenal upgrade for this device.
Hi all,
I would like to know how to go about compiling drivers for the stock android OS, specifically, usb-serial driver for cp210x. The kernel version in the development tablet is 3.0.8+ and I have compiled an "example" module. When I "insmod" the module in the tab dmesg says
example : disagrees about version of symbol module_layout
I have checked module_layout in the "stock" module and compiled module and equated them using hex editor, but it failed with the same error.
Can anyone suggest me how to go remove this error?
So long story short, I wanted to build the ftdi_sio.ko module for the linux kernel of android based MiBox 1S. I was able to build the module but once I run "insmod" via adb, the system crashes and reboots (I couldn't see any error message because of this). Please could anyone suggest how to find where the problem is or whether what I wanted to do is even possible?
The device is running system version 1.3.88 rooted by the Chinese 360 root app. Kernel version follows:
Code:
adb shell cat /proc/version
Linux version 3.10.33 ([email protected]) (gcc version 4.7.3 20130205 (prerelease) (crosstool-NG linaro-1.13.1-4.7-2013.02-01-20130221 - Linaro GCC 2013.02) ) #1 SMP PREEMPT Tue Jun 16 00:38:26 CST 2015
As Xiaomi doesn't have kernel source release for MiBox (afaik), I went to look for the Amlogic kernel source for AML8726-MX (M6).
The closet kernel source I could find was from Stane1983's github repo amlogic-m6_m8. I'm using the earliest commit for 3.10.33 kernel version.
For the building of the kernel module, I pretty much followed a github document named 'Android-Build-Kernel-Modules-HOWTO.txt' by marco-pratesi. I downloaded the toolchain from the archive of linaro releases 13.02 which shows the same version of the android kernel above. I copied the .config from arch/arm/configs/meson6_deconfig and use 'make menuconfig' to add OTG_support and USB FTDI Single Port Serial Driver. Make the module by "make M=drivers/usb/serial/". And then adb push the generated ftdi_sio.ko file to /mnt/sdcard.
For loading the module, I run
Code:
adb shell
su
insmod /mnt/sdcard/ftdi_sio.ko
Then the box freezes for 10 seconds and reboots...
So my questions are:
1. Is there a way to find some logs of insmod to know what's gone wrong? As the system freezes and reboots, I can't use the dmesg method normally suggested, can I?
2. As the kernel source is from Amlogic, could it be that Xiaomi created their own kernel that is very different from this one to cause this problem?
3. Even if Xiaomi used exactly the same source code, as i'm using the meason6_defconfig file from the repo, it is likely to be different from the one Xiaomi was using. Would it matter for just building a module?
4. Is it possible to recover the config file from the prebuild kernel? I counld't find /proc/config.gz. And modprobe has error "can't open 'modules.dep': No such file or directory. "
5. What else I can try?
Sorry for the long post. I'm very new to this type of work and this forum as well. So any comments would be appreciated.
Hi finally i can install Chrome Os in my laptop...
Now i try install my wifi driver but the only problem is the kernel... this not have headers for compiling..
when i try to compile the code:
[email protected]:~/rtl8821ce$ sudo ./dkms-install.sh
Show me this error
Error! DKMS tree already contains: rtl8821ce-v5.5.2_34066.20200325 (The driver is install previously but not are activable)
You cannot add the same module/version combo more than once.
Error! Your kernel headers for kernel 4.19.87-07826-g55ab70aff690 cannot be found.
Please install the linux-headers-4.19.87-07826-g55ab70aff690 package,
or use the --kernelsourcedir option to tell DKMS where it's located
Error! Your kernel headers for kernel 4.19.87-07826-g55ab70aff690 cannot be found.
Please install the linux-headers-4.19.87-07826-g55ab70aff690 package,
or use the --kernelsourcedir option to tell DKMS where it's located
Finished running dkms install steps.
i try install the headers but this kernel version not have headerrrss!!! jajaja...
Well i try upgrade the linux and i can... my distr is Debian 10.3 now... and them i proced to upgrade the kernel... ok all fine upgrade the kernel but when i check the information of kernel with the code
uname -a
Linux penguin 4.19.87-07826-g55ab70aff690 #1 SMP PREEMPT Tue Feb 4 17:29:42 PST 2020 x86_64 GNU/Linux(show me the old kernel but is the install actually)
show me the new kernel in the older kernerls with the command
dpkg --list | grep linux-image
ii linux-image-5.5.0-0.bpo.2-cloud-amd64-dbg 5.5.17-1~bpo10+1 amd64 Debug symbols for linux-image-5.5.0-0.bpo.2-cloud-amd64
Any can help me? to update the kernel and the headers?
My specs:
HP-15-db0081wm
Cpu: AMD Dual-Core E2-9000e
Gpu: AMD Radeon™ R2 Graphics
Ram: 4GB
Q. How i install chrome os?
A. with this video ( https://www.youtube.com/watch?v=4gZYV0RWJQ8 )
SRY FOR MY BAD ENGLISH
If i