NFS kernel module compilation problems - Nexus 10 Q&A, Help & Troubleshooting

Hello everybody,
I am new at kernel building and so please bare with me. I have been using kernel modules for CIFS from this thread http://forum.xda-developers.com/showthread.php?t=2003836http://forum.xda-developers.com/showthread.php?t=2003836 by H3g3m0n and all is working fine.
But since I couldn't find modules for NFS I decided to compile them myself. I had no problem in building the kernel and modules for stock android kernel gaf9c307 4.2.2 but the modules just won't load. That is why I also created the CIFS modules. I taken a look at the md4.ko modules with modinfo command and they both seem exactly the same. I have attached the md4.ko module which is used in CIFS just to show the example, the md4_works.ko is the module by H3g3m0n and the md4.ko is mine.
Can anybody please help me. What am I doing wrong. I have appended the steps I have taken when building modules.
git clone https://android.googlesource.com/device/samsung/manta
cd manta/
git log --max-count=1 kernel
git clone https://android.googlesource.com/kernel/exynos.git
cd exynos/
git checkout af9c307
export PATH=$(pwd)/arm-eabi-4.6/bin:$PATH
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=/home/ziga/ndk/toolchains/arm-linux-androideabi-4.7/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
make manta_defconfig
make
make menucofing
make modules
Click to expand...
Click to collapse
Thank you for all your help

Come on guys, nobody knows this? Then please tell me how I can get in touch with H3g3m0n who compiled the working modules!
Thank you.

Related

[Q] Compiling iptables

Hello.
I'm looking to compile iptables from the android git repo (with the LED trigger target patch). Hacking the source and patch was easy, but I'm not sure how to compile it. There's an Android.mk file in the source I pulled, but since it isn't structured like a JNI project, the NDK doesn't seem to help. Any suggestions on how I would go about compiling it?
I don't have much experience with the Android SDK and NDK (mostly do kernel hacking), and good ol' Google didn't help much either.
To run iptables you have to compile them in into the kernel or build as a kernel module. To do that you need to download the kernel for you specific device.
As for the actual iptables program, you can compile it using the agcc script. Since this site doesn't let new users to post the link just google for "vlad android-cruft" to find it.
PM me for details

[Q] [REQ] NFS kernel modules for XWKE7

I have been searching for nfs kernel modules for my SGS2 with the XWKE7 firmware. (I want to mount NFS shares on my phone, not share directories from my phone)
But alas, so far I have been unable to find them. Maybe I have not been looking in the right places...
Can anybody help me out here?
Thanx a lot.
yes please, i am also looking for either nfs kernel modules or a kernel for i9100 which was compiled with nfs support. dorimanx claims to have it, but it hasn't
maybe a good site with instructions how to cross-compile nfs.ko and other modules for android?
thanx

Android 4.0 ICS - getting kernel source

Im looking for the source of the kernel used in ICS.
Looks like "git://android.git.kernel.org/kernel/common" is not there.
Can some one please point me for what vertion is used in ICS and where to clone it from.
Thanks
Check this:
http://source.android.com/source/downloading.html
Google switched to their own servers since the kernel.org break-in
It does not appear to be there. Which means we would have to be patient for kernel devs to get their cook on.
Found some infos here:
http://groups.google.com/group/andr.../87d2802239d46898?show_docid=87d2802239d46898
1st
Code:
git clone https://android.googlesource.com/kernel/common.git
2nd should give you an overview
Code:
git branch -r
3rd checkout a kernel
Code:
git checkout -b android-3.0 origin/android-3.0

[GUIDE] How to build AOSP kernel from source S4 Mini (i9195 & i9190)

Welcome to Kernel build guide.
WITH THIS METHOD YOU WILL GET installable zip for your kernel.
My english is not best but i think you all will understand this guide . I write this guide because i dont own S4 Mini anymore and unfortunally i cant build kernels or roms anymore for s4 mini.
this is my kernel build method. you will have everything (tools) for build a kernel for s4 mini device. if you have questions, then ask it here. this kernel method is working only aosp based kernel (not tested for tw kernel but it may also work but you need ramdisk of tw kernel)
be sure you have packages installed for build something like this, or edit or clone a github source. look at cm kernel build guides.
1. Download build-s4-mini-kernel.zip [here]
extract it to root of your user directory (my is /home/proxuser/)
2. We need toolchain 4.7.4 by Christopher83 original thread [here]
download
arm-unknown-linux-gnueabi-linaro_4.7.4-2013.07-build_2013_07_12.tar.bz2
extract arm-unknown-linux-gnueabi-linaro_4.7.4-2013.07 folder to toolchains folder (home/yourusername/toolchains) and name it linaro_4.7.4
Download Build scripts from my source here
download:
- abooteur_3g.img
- abooteur_lte.img
- build_all.sh
- build_eur_3g.sh
- build_eur_lte.sh
- build_master.sh
- mkbootfs
- mkbootimg
and put them to your kernel folder "root folder of your kernel".
if you want clone a kernel source: example CyanogenMod's cm-10.2 kernel then
open Terminal, and be in user root folder /home/yourusername (just open terminal and your there)
Code:
git clone https://github.com/CyanogenMod/android_kernel_samsung_msm8930-common.git -b cm-10.2
if you want clone my Kartal kernel then
Code:
git clone https://github.com/proxuser/kartal.git -b master
it will named "if you cloned cyanogenmod kernel android_kernel_samsung_msm8930-common" if you clone my kernel then it will named "kartal"
you can rename kernel folder, its not problem.
if you want change of kernel name(example kartal), then go yourkernel/arch/arm/configs/kartal_defconfig and edit CONFIG_LOCALVERSION="-Kartal" change only "Kartal" for your kernel's name. if you want change defconfig example "kartal_defconfig" to "yourkernel_defconfig" then you need change it in build_master.sh too that it builds with your config file.
if you downloaded your kernel source and your build tools are there then lets start
Open terminal
type
Code:
cd yourkernelfolder
for build both phones i9195 & i9190
Code:
./build_all.sh
if it denies access for build_all.sh then type
Code:
chmod 777 build_all.sh
you can give all files access with this command.
for build i9195
Code:
./build_eur_lte.sh
for build i9190
Code:
./build_eur_3g.sh
finally it will start building. it will done within 4-5 min. depend your pc speed.
after it builds succesfully, your kernel will be in your /home/yourusername/Packages/ folder
IF YOU WANT add new changes from CM or other kernel to your kernel
then open Terminal
cd yourkernelfolder
git remote add CyanogenMod https://github.com/CyanogenMod/android_kernel_samsung_msm8930-common.git
git fetch CyanogenMod
this will fetch CyanogenMod kernel changes but it will not apply to your kernel. you will add changes step by step yourself. copy commits SHA from CyanogenMod kernel and
open Terminal
Code:
git cherry-pick 2108e6c3109ae126590a81876145a1f17d6771b5
if you get success on pick a commit then you will get a message like this
Code:
[email protected]:~/kernel$ git cherry-pick a41564437a0eb910d0347d274456f3f0116c3c77
[master 5dd0694] net-fixes: flow_dissector: prevent an infinite loop (CVE-2013-4348)
Author: Eric Dumazet <[email protected]>
1 file changed, 3 insertions(+), 1 deletion(-)
if you get an error like this
Code:
[email protected]:~/kernel$ git cherry-pick 63ee35463ea3ec5d4e8f2c60ad0f70abd8463733
error: could not apply 63ee354... ARM: 7809/1: perf: fix event validation for software group leaders
hint: after resolving the conflicts, mark the corrected paths
hint: with 'git add <paths>' or 'git rm <paths>'
hint: and commit the result with 'git commit'
thats mean it is not applied to your files. just type "git status" to see what files are not modified.
then type: git reset --hard for go to your last commit.
this will make changes of error commit back.
Work always with git because with this way you can save a lot your changes and you can restore anything anytime.
Credits:
XDA Community
Christopher83 for toolchain
ktoonsez for build scripts
arco68 for s4 mini kernel development
cyanogenmod
I really appreciate these posts! :good:
wonderful. thank you very much :good:
Srry wrong topik..
I have built your kernel successfully, but after flashing the .zip the device is stuck on the "Samsung Galaxy S4mini" Bootscreen.
I tested it with the this two roms:
- cm-10.2-20131102-SNAPSHOT-M1-serranoltexx
- CARBON-JB-UNOFFICIAL-20131026-1327-serranoltexx
Do you have any idea why it's not working?
Edit: I used arcos source and it is working fine now
@junkyde
Can't get the stock kartal kernel to build.
What for OS are you running in your virtual box? ubuntu? 86x or 64x?
Did you install any other buildtools?
there isn't a stock kartal kernel. kartal kernel is aosp. I am using Linux Mint 15 in a 64bit version on Virtual Box.
Ps: I had also my troubles with ubuntu x86 and x64, thats why I switched.
junkyde said:
there isn't a stock kartal kernel. kartal kernel is aosp. I am using Linux Mint 15 in a 64bit version on Virtual Box.
Ps: I had also my troubles with ubuntu x86 and x64, thats why I switched.
Click to expand...
Click to collapse
Thanks for you reply!
With "stock" I meant: without changing anything....
I will try mint 15 64bit with xfce!
you can also take a look into this tutorial: http://forum.xda-developers.com/showthread.php?t=1748297
junkyde said:
you can also take a look into this tutorial: http://forum.xda-developers.com/showthread.php?t=1748297
Click to expand...
Click to collapse
Got it working under Ubuntu 12.04 64bit.
Had some troubles because mkboofs and mkbootimg could not be found.
After installing : "sudo apt-get install ia32-libs" everything was fine
Now I will try to compile the 10,1 kernel from source, lets see how that goes..
Keon91 said:
After installing : "sudo apt-get install ia32-libs" everything was fine.
Click to expand...
Click to collapse
Yes I know, that this is required, when you are working with a 64bit system. But I couldn't get this installed in Ubuntu. On Mint everything worked fine. But I am glad you made it
@junkyde
After some trial and error I've succesfully compiled the cm 10.1 kernel.
Can you give me any direction on how to compile the custom liblights?
Do I need to download the full cm 10.1 source?
I used proxusers tutorial on how to build carbon rom. Downloaded full rom, modified lights.c and compiled whole rom.
Can someone build a kernel for the i257m
It would be nice if there was some kernel mods for this. especially just a near stock one with insecure root permissions.
The source is out if anyone was wondering
opensource.samsung.com/reception/receptionSub.do?method=search&searchValue=i257
IF YOU WANT add new changes from CM or other kernel to your kernel ...
Click to expand...
Click to collapse
What do you mean by this? Add changes that cm has done after you last downloaded them or changes you want to do to customize the kernel?
git cherry-pick 2108e6c3109ae126590a81876145a1f17d6771b5
Click to expand...
Click to collapse
What does this means and where do you get that ID? I would think that after fetching the changes from the source it will have been added to all the files you have already downloaded. Thanks for the tutorial!
---------- Post added at 05:58 PM ---------- Previous post was at 05:55 PM ----------
junkyde said:
I used proxusers tutorial on how to build carbon rom. Downloaded full rom, modified lights.c and compiled whole rom.
Click to expand...
Click to collapse
junkyde here you don't mention lights.c, aren't they needed for 10.1? http://forum.xda-developers.com/showpost.php?p=49958578&postcount=215
yes you need custom liblights for BLN, but since I have compiled them already, you can use the one from inside the .zip of my kernel.
junkyde said:
yes you need custom liblights for BLN, but since I have compiled them already, you can use the one from inside the .zip of my kernel.
Click to expand...
Click to collapse
Doesn't it matter that you compiled it for 10.2? Also, where is the source for liblights?
proxuser said:
Welcome to Kernel build guide.
WITH THIS METHOD YOU WILL GET installable zip for your kernel.
Click to expand...
Click to collapse
On ubuntu I got this message after the process took a while:
KERNEL DID NOT BUILD! no zImage exist
Click to expand...
Click to collapse
At some point in the process it printed:
[email protected]:~/Development/SGS4Mini/build-s4-mini-kernel/android_kernel_samsung_msm8930-common$ ./build_all.sh
...
...
...
rm: cannot remove `/home/rpgdev/Development/SGS4Mini/build-s4-mini-kernel/Packages/AOSP/zImage': No such file or directory
rm: cannot remove `arch/arm/boot/zImage': No such file or directory
Make the kernel
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
***
*** Can't find default configuration "arch/arm/configs/kartal_defconfig"!
***
...
...
...
Click to expand...
Click to collapse
And if I go there I indeed can't find the zImage, where can I get it?
PS: Used the characters "..." to denote abridgment of the compilation verbose printout.
Forgot to add, I'm downloaded the cyanogenmod kernel from build 10.1 since that's the cyanogenmod version I use and for the one I need to make this mod, could this be the cause of the problem? Googling it seems that the kernel version you use may need a specific toolchain version.
rpgdev said:
Doesn't it matter that you compiled it for 10.2? Also, where is the source for liblights?
Click to expand...
Click to collapse
I think it doesn't matter, I used the same for different roms and it worked. Source is as I said the lights.c file inside of the rom.
rpgdev said:
Can't find default configuration "arch/arm/configs/kartal_defconfig"!
Click to expand...
Click to collapse
This is why zImage can't be build.
junkyde said:
I think it doesn't matter, I used the same for different roms and it worked. Source is as I said the lights.c file inside of the rom.
This is why zImage can't be build.
Click to expand...
Click to collapse
I'm not using kartal but the one downloaded from cm. Thought the instructions were generic and the script took into account wether you had downloaded the kernel from cm or kartal :/, I did go inside the directory with all the defconfig files, how do I know which one should I point it to on cm-10.1 kernel?
Regarding the lights.c then I just have to include that library on the same directory you put it in your kernel AND add the changes you pointed to here http://forum.xda-developers.com/showpost.php?p=49958578&postcount=215 and I would be set?
Thanks!

How to find and compile wlan driver for SM-A500m

Hi all,
I have compiled the kernel SM-A500M_LATIN_LL_Opensource.zip from Samsung Opensource and generated an image using a ramdisk from a stock Kernel. I was able to flash it to the device and start Android, the problem is that Wifi is not working. On the stock kernel I found the module /system/lib/wlan.ko but on my Kernel's build drivers directory there are no wireless drivers compiled. I cannot use the stock wlan.ko on my custom Kernel since I need to compile it with my sources. I tried to search on /proc and /sys the exact chipset but no success. Anyone can help me with finding and compiling the proper driver for wifi on SM-A500m, please?
Thanks in advance
trojanrs said:
Hi all,
I have compiled the kernel SM-A500M_LATIN_LL_Opensource.zip from Samsung Opensource and generated an image using a ramdisk from a stock Kernel. I was able to flash it to the device and start Android, the problem is that Wifi is not working. On the stock kernel I found the module /system/lib/wlan.ko but on my Kernel's build drivers directory there are no wireless drivers compiled. I cannot use the stock wlan.ko on my custom Kernel since I need to compile it with my sources. I tried to search on /proc and /sys the exact chipset but no success. Anyone can help me with finding and compiling the proper driver for wifi on SM-A500m, please?
Thanks in advance
Click to expand...
Click to collapse
I went kitesurfing with my A5 in the pocket, it is no more. I had found a qualcomm prima driver that looked like it was it but now I can't test it anymore.
Regards

Categories

Resources