[Q] How to find kernel source and config - Galaxy Note 8.0 (Tablet) Q&A, Help & Troubleshooti

I am trying to compile kernel modules for a USB Ethernet adapter from ASIX for my N5100.
I downloaded the toolchain and what I believed to be the source of my kernel, but when insmodding the modules, it says "exec error", which usually indicates that I used the wrong kernel source for compilation.
My question now is:
How can I find out which kernel source (and config) was used for my kernel?
I am on stock kernel, in the about system settings it says
Code:
Kernel version 3.0.31
[email protected] #1
SMP PREEMPT Wed Apr 3 09:14:51
KST 2013.
Build number is JZO54K.N5100XXBMD1
Android version is 4.1.2
Does anyone know which kernel I have to download from the Samsung Open Source Release Center (http://opensource.samsung.com/reception/receptionSub.do?method=search&searchValue=GT-N5) to build the modules for the kernel above?
I already tried the first and second from the linked list, but none of those seemed to produce a module working with my device.
Do I have to use a kernel config other than kona_01_defconfig? I found some hints for retrieving the used kernel config by reading /proc/config.gz, but unfortuantely, this file is not present on my device.
Any help would be highly appreciated :fingers-crossed:

Related

Expected Sizes of Custom Kernel zImage

Dear Developers,
I've downloaded the Galaxy S Kernel sources (2.6.29) as provided by Samsung. I compiled them using the included build_kernel.sh script. As toolchain I use CodeSourcery 2009q3 as suggested in the Readme of the kernel. The final zImage of the kernel in arch/arm/boot is about 2.6MB.
To my surprise this is a lot smaller than the kernel image that can be found in official ROM images. It is also considerable smaller than the kernel posted here that includes the EXT3/4 filesystem.
I therefore wanted to ask all those of you who already built a custom kernel: Did you use some oder kernel sources? Another toolchain? Or most likely a different kernel .config (I'm using the default config as specified in build_kernel.sh)?
Thank you,
Tom
Sorry, i can't help you, however, TheLuckys appears to be having a similar issue.
http://forum.xda-developers.com/showthread.php?t=727357

[REF] cifs.ko for samsung galaxy s [including froyo 2.2]

This is the kernel module for smb/cifs mount.(windows shares)
You need it for example for this: hxxp://forum.xda-developers.com/showthread.php?t=756158
I didn't found a compatible cifs.ko for samsung s anywhere so I had to compile it.
[recommended] cifs.zip - Eclair(2.1)
[recommended] froyo.zip - Froyo(2.2) - cifs.ko & slow-work.ko (insmod slow-work.ko first)
cifs_froyo_slow_work.zip - Froyo(2.2) - cifs & slow_work in one .ko Do NOT use this because its buggy (slow, reboots when rmmod)
could you pls explain what is this for? Experts needn't, but there're lots of newbies hangin aroud here, like me . Thanks
It's a kind of file system like ext2/3/4, for example.
Sent from my GT-I9000 using Tapatalk
This is the kernel module for smb/cifs mount.(windows shares)
You need it for example for this: hxxp://forum.xda-developers.com/showthread.php?t=756158
I didn't found a compatible cifs.ko for samsung s anywhere so I had to compile it.
Awsome. We can now mount samba shares! Freakin awsome
Sent from my Apple Newton 2100
You have my gratitude
Very usefull! thank you!
i'm back, when i'm trying an insmod i have cifs.ko : invalid module format
i use a jm5 samset 1.9f roms.
I use jm5 (mimocam's fix + root) and I've compiled the module from source-code provided by samsung (opensource.samsung.com) using arm-none-eabi-(Sourcery G++ from codesourcery.com). Maybe samset used something else which is incompatible.
ickyboo said:
Sent from my Apple Newton 2100
Click to expand...
Click to collapse
Bwahahahaha
ethanfel said:
i'm back, when i'm trying an insmod i have cifs.ko : invalid module format
i use a jm5 samset 1.9f roms.
Click to expand...
Click to collapse
Setenza said he'll add Cifs in the next SamSet release.
can you make one that is compatible with the Vibrant version? Either stock Vibrant kernel or any working kernel compatible.
Greatly appreciated
I've tried the module, but also get the "invalid module format" message.
However, I'm using JM5 + root using kernel 2.6.29 built on Fri Jul 30 15:12:44 KST 2010 armv71 GNU/Linux
Can you tell us for which kernel you've build this module?
thoriam said:
I've tried the module, but also get the "invalid module format" message.
However, I'm using JM5 + root using kernel 2.6.29 built on Fri Jul 30 15:12:44 KST 2010 armv71 GNU/Linux
Can you tell us for which kernel you've build this module?
Click to expand...
Click to collapse
I've compiled for kernel 2.6.29.2 using samsung's sources
my phone says he has kernel 2.6.29 [email protected] #1
I'm attaching the module compiled with latest toolchain I could find(binutils-2.20.1, gcc-4.5.1,newlib-1.18.0)
ctran81 said:
can you make one that is compatible with the Vibrant version? Either stock Vibrant kernel or any working kernel compatible.
Greatly appreciated
Click to expand...
Click to collapse
No idea if will work bc I don't have a Vibrant.
In the mean time I've also compiled my own version of the cifs.ko module.
I've used the Samsung sources and used the Sourcery G++ Lite 2010q1-188 for ARM EABI toolchain.
I've only enabled cifs in the kernel config and compiled the module.
I've attached the compiled result.
Thanks for your effort. I'm using JM5 +samset1.9f and couldn't get the cifsmanager to work with all 3 of your cif.ko . I've just dont know why the size the last 2 versions are huge compare to the first one? Thanks anyway. Hope you can come up with something.
thoriam said:
In the mean time I've also compiled my own version of the cifs.ko module.
I've used the Samsung sources and used the Sourcery G++ Lite 2010q1-188 for ARM EABI toolchain.
I've only enabled cifs in the kernel config and compiled the module.
I've attached the compiled result.
Click to expand...
Click to collapse
darkbyt3 said:
no idea if will work bc i don't have a vibrant.
Click to expand...
Click to collapse
thank you very much. It's working on my stock vibrant kernel! YOU ROCK SIR! (using attached vibrant.zip)
Now I can stream all my media files!
(I'm vary curious how you did this, if you can point me to some guides that would be awesome, (I can write some C/C++ code))
Works great for me - had been looking around to see if anybody had compiled the CIFS module for the Galaxy S. I started reading up on how to cross compile kernel modules myself but didn't get very far.
Anyway; I have a slight problem. while mounting and browsing from the terminal as root and through adb as non-root work, I can't seem to browse in any mounted folders actually on the device using either the stock 'My Files' or Astro which was what I was aiming to do.
What I do to mount said:
\\\\192.168.0.0\\Directory /sdcard/smbshare -o user=Username,pass=password,uid=1000,gid=1015
Click to expand...
Click to collapse
Without setting the user and group settings I can't browse unprivileged as everything in the share is 'owned' by root.
I also tried using mount -t smbfs //192.168.0.0/Directory /sdcard/smbshare with the same result.
Anybody else having a similar problem? Maybe it's just something obscure about my setup.
thoriam said:
In the mean time I've also compiled my own version of the cifs.ko module.
I've used the Samsung sources and used the Sourcery G++ Lite 2010q1-188 for ARM EABI toolchain.
I've only enabled cifs in the kernel config and compiled the module.
I've attached the compiled result.
Click to expand...
Click to collapse
Sorry for the noob questions:
- Can you please give more details on how to enable cifs in the kernel config?
- Is there a specific plate to copy the cifs.ko module?
- Is there a simple (one-click) way to install this?
- is the module dependent on the kernel version? has to be exactly the same?
- is there a easy way to check if it's working (I'm using cifsmanager and get some error saying cannot access device / folder not found -not sure about the exact message text)
Thanks in advance

[Q] Compiled kernel makes no changes on flash

Hey, I cant post in the developer forum because i have less than 10 posts -____-
I cloned SavagedZen's kernel from GitHub (i cant post links either -____- ) and used the EVO-CFS-HAVS config. The only change I made to the source was the extraversion number/suffix (2.6.38.8-WINLAB instead of -SavagedZen...) and it compiled with no errors.
I put the modules and zImage into koush's AnyKernel template, zipped and flashed it.
It says successfully flashed, but when I reboot it still says its using the default cyanogen kernel. I checked dmesg and I found this:
Code:
bcm4329: version magic '2.6.38.8-WINLAB+ preempt mod_unload ARMv7 ' should be '2.6.37.4-cyanogenmod-01338-g0374804 preempt mod_unload ARMv7
So my modules are correctly compiled with the right version number, but version magic prevents them from being used because the phone's kernel version doesn't match it.
Does anyone know why this is happening and/or how to verify that the kernel is actually being flashed?
Anyone?
Sent from my ADR6300 using XDA App
How about now?
Sent from my ADR6300 using XDA App
This wouldn't go in the development forums anyway, unless you are developing a kernel for us to use.
PM a kernel dev and ask them. Also, if you are still restricted here, Savaged Zen has their own private forums you can use. They are also on IRC.
If you are flashing the kernel, and it's still using the old kernel that you are trying to overwrite, it sounds like the flash isn't working. You might try adding the kernel manually to the boot.img and fastboot flash that and manually copy over the kernel modules and their permissions.
For some reason fastboot doesnt work, even with Savaged-Zen's prebuilt kernel. Ill try the IRC I guess. Thanks!

[DEV][Kernel] Newer Kernel for Galaxy Tab P1000

Hi fellows,
I was thinking, why should we stuck on 2.6.35 kernel? If we want to have a possibility to update our devices, we must have our kernels up-to-date, right?
Last night, I did a couple of scripts that can generate patches from a git tree from a start commit until an end commit. And another that can apply these patches to another tree and list the ones that wasn't applied correctly.
So, I thought if I get all patches from, let's say, 2.6.38 android kernel_common tree from 2.6.35 version commit until the HEAD and apply it to our 2.6.35 kernel, then we should get something like a 2.6.38 kernel, am I right?! I know that our kernel tree is something like a Frankenstein tree, it is a 2.6.35 with some patches from newer kernels, but these patches we can just ignore.
Last time I try to update 2.6.35 to 2.6.36 using this approach, I saw that I need to apply more than 10k patches and it will take something like a day to do here in my machine. After, the patches that wasn't applied correctly should be check. So, firstly, I want to verify if anyone see something wrong in my approach, it will save me a lot of time
Let's discuss!!!
Thanks,
Ronan
Wont porting over Kernel 3.x a be a better thing
http://git.kernel.org/?p=linux/kernel/git/kgene/linux-samsung.git;a=summary
We can diff out this n our current source(2.6.35 GB Update2), and then patch
The overcome kernel is patched with latest patches (as far as I can remember) however it wont't boot therefore it had to be spoofed with 2.6.35 to get boot. Maybe Alterbridge86 can shed more light on this.
DarkPal said:
The overcome kernel is patched with latest patches (as far as I can remember) however it wont't boot therefore it had to be spoofed with 2.6.35 to get boot. Maybe Alterbridge86 can shed more light on this.
Click to expand...
Click to collapse
He's right. My kernel is patched up to 2.6.35.13 BUT I have to spoof the kernel version as 2.6.35.7. I suspect no matter what you patch the kernel to, it will always need to be spoofed because of Samsung's proprietary crap. The RFS drivers, amongst other things, are proprietary so we use the precompiled modules from an existing initramfs. Obviously Samsung is using the 2.6.35.7 source, so those modules will not load if the source is reporting a higher version than 2.6.35.7.
I imagine you could patch the kernel up to whatever you want, however the hard part is getting the patches. I don't believe an incremental patch exists to go from 2.6.35 to 2.6.36, 37, etc.
The only thing I think you could do is get full source trees for 2.6.35 and 2.6.36 and then do a manual diff on them, creating your own patch, then try and patch that in to the samsung kernel source.
alterbridge86 said:
I imagine you could patch the kernel up to whatever you want, however the hard part is getting the patches. I don't believe an incremental patch exists to go from 2.6.35 to 2.6.36, 37, etc.
The only thing I think you could do is get full source trees for 2.6.35 and 2.6.36 and then do a manual diff on them, creating your own patch, then try and patch that in to the samsung kernel source.
Click to expand...
Click to collapse
Patches used to be availabe before kernel.org went down, i have all patches for 2.6.32.x(incremental), or maybe they are still there are i just overlooked them
Telling my point again, porting Kernel 3.0 would be better than 2.6.3x
Alterbridge86,
I wrote a script that can take all patches from a kernel tree from a specifc commit up to HEAD. It uses the log and format-patch. So, it is easy now to clone android kernel common tree, switch to, let's say, 2.3.38 branch, and take all the patches from 2.6.35 release until HEAD.
I actually got it from 2.6.36 branch (+ 11000 patches). Basically, I have the incremental patch. Now i just need some time to apply it all using another script rejecting everything that can't be patched flawlessly, built it, and verify if this "2.6.36" version works.
Now, why doesn't try 3.0? Well, i need to test the concept. The number of patches to go from 2.6.35 to 2.6.36 is more than 11000. I just can imagine how many patches exist from 2.6.35 to 3.0. I just don't have the computational power here to do this...
Anyway, I am a little out of time by now. When I have news, i will post here.
Thanks for all the advices,
Ronan
Sent from my GT-P1000L using xda premium
Bringing the thread back to life
Over days, i've tried to port 3.0, but before that, we'll have to get MTD working with 2.6.35
Tree :
https://github.com/sgt7/p1000-kernel-cm9/tree/mtd
Kernel panic
<3>[ 0.418810] samsung-onenand s5pc110-onenand: cannot get clock
<4>[ 0.418936] samsung-onenand: probe of s5pc110-onenand failed with error -2
Logs : http://pastie.org/3275285 (Thanks @ Techomancer)
Any ideas ? (havent been able to focus on this lately due to studies)
Hello, any News on porting the new Kernel?
Sent from my GT-P1000 using XDA

[Q][C1905][4.3][15.4.A.1.9] fuse.ko fusermount encfs ntfs-3g?

Hi there,
I'm searching for a working fuse.ko to be able to mount ENCFS encrypted folders and maybe ntfs-3g partitions...
I am using stock kernel, still locked bootloader, but at least full rooted device.
It's single sim C1905, 4.3 JB, 15.4.A.1.9 and I tried any fuse.ko module I could find. None is working (the usual exec format error). All are compiled against android 4.1 or 4.2 with kernels less than 3.4...
Code:
# uname -a
Linux localhost 3.4.0 #1 SMP PREEMPT Fri May 9 12:55:32 CST 2014 armv7l GNU/Linux
Has anyone yet compiled a working fuse.ko for this kernel?
How could I do it myself - I have no idea if it can be done in the phone itself (kernel-sources? gcc?)
Any help appreciated.... thanks!
Well i had compiled it. But for myself and that kernel was only compatible with 4.1 it's very easy to get ntfs support. Just dig around github and cherry-pick it.
Sent from my C1904 using Tapatalk

Categories

Resources