[Q][KERNEL] building external modules - Micromax Canvas 4 A210

Hi
Im running a Wiko Darkside, a clone of Micromax A210 and i've downloaded the source code from wikogeek (FR version) and im trying to compile the RTL8187 driver
Im able to compile the modules with no errors, but i always get unknown symbol error when i try to insmod it
Code:
Unknown symbol kmem_cache_alloc_trace
I think it might have something to do with the kernel config, since theres no /proc/config.gz so im guessing that the .config provided in the source tree is the default one.
this is my build command (from the README file included in the source archive)
Code:
make TARGET_PRODUCT=wiko CFLAGS_MODULE=-fno-pic MTK_ROOT_CUSTOM=../mediatek/custom// CONFIG_DEBUG_SECTION_MISMATCH=y -j3 modulee
I've been around this error for a while and still haven't found a way to solve this so any tips on how to solve this ?
Better yet, can i flash the device with a custom/newer/better kernel without losing the data ? If so can you point me to a guide on how to do it ?
Thanks

norwat said:
Hi
Im running a Wiko Darkside, a clone of Micromax A210 and i've downloaded the source code from wikogeek (FR version) and im trying to compile the RTL8187 driver
Im able to compile the modules with no errors, but i always get unknown symbol error when i try to insmod it
Code:
Unknown symbol kmem_cache_alloc_trace
I think it might have something to do with the kernel config, since theres no /proc/config.gz so im guessing that the .config provided in the source tree is the default one.
this is my build command (from the README file included in the source archive)
Code:
make TARGET_PRODUCT=wiko CFLAGS_MODULE=-fno-pic MTK_ROOT_CUSTOM=../mediatek/custom// CONFIG_DEBUG_SECTION_MISMATCH=y -j3 modulee
I've been around this error for a while and still haven't found a way to solve this so any tips on how to solve this ?
Better yet, can i flash the device with a custom/newer/better kernel without losing the data ? If so can you point me to a guide on how to do it ?
Thanks
Click to expand...
Click to collapse
wiko darkside is not a clone of c4 wiko stairway is the clone & u can contact varun chitre
n these link may help you
http://forum.xda-developers.com/showthread.php?t=2467400
http://forum.xda-developers.com/showthread.php?t=2596271

rahilj007 said:
wiko darkside is not a clone of c4 wiko stairway is the clone & u can contact varun chitre
n these link may help you
http://forum.xda-developers.com/showthread.php?t=2467400
http://forum.xda-developers.com/showthread.php?t=2596271
Click to expand...
Click to collapse
thanks

Related

[Dev] Building a 2.6.29 kernel for the Hero

Hello,
I would like to build a 2.6.29 kernel for Hero for us to run properly Donut roms.
Here is my progress so far:
- I have sync the android kernel msm from git.
# git clone git://android.git.kernel.org/kernel/msm.git
# cd msm
# git checkout --track -b android-msm-2.6.29 origin/android-msm-2.6.27
- then:
# adb pull config.gz ./
# gunzip config.gz && mv config .config
# make PATH=$PATH:android-1.6_r1/prebuilt/linux-x86/toolchain/arm-eabi-4.2.1/bin ARCH=arm SUBARCH=arm CROSS_COMPILE=arm-eabi-
But no luck: it asks me questions to configure the kernel (error in .config?)
I have attached some useful files.
Try running make menuconfig and manually load the .config file. What happens?
kernel sources for hero is not available on http://developer.htc.com/ then no hero support in android.git.kernel.org/kernel/msm.git
Z!L0G80 said:
kernel sources for hero is not available on http://developer.htc.com/ then no hero support in android.git.kernel.org/kernel/msm.git
Click to expand...
Click to collapse
Well this guy did it here for sapphire before Htc released kernel sources.... So I think we can.
erikwt said:
Try running make menuconfig and manually load the .config file. What happens?
Click to expand...
Click to collapse
I copied the hero .config file to kernel root, then "make menuconfig" and loaded .config, then exit and yes to "write .config" question.
Make failed, output attached (make1.txt)
I then applied TigerTael sapphire patch as he "tends to think the memory locations may be correct". Tried to manually load hero's .config and got attached error (error.txt)
I then "make msm_defconfig" and could compile a kernel witch I added to ADP-1.6 boot.img. But no luck it does not work and adb logcat waits for device.... while I am waiting for advices
Regards
Was the downloaded config copied from a build of the same kernel version? If not do "make oldconfig" before commencing with "make menuconfig" or other build.
phel21 said:
Was the downloaded config copied from a build of the same kernel version? If not do "make oldconfig" before commencing with "make menuconfig" or other build.
Click to expand...
Click to collapse
'make oldconfig' asks me the questions to configure the kernel.....
Edit:
If that could help:
cat /proc/iomem
00700000-0079afff : msm_panel.1
007a0000-007bffff : ram_console
19200000-257fffff : System RAM
19223000-19513fff : Kernel text
19514000-195ebf7f : Kernel data
a0200000-a0200fff : msm_serial_hs.0
a0400000-a0400fff : msm_sdcc.1
a0500000-a0500fff : msm_sdcc.2
a0800000-a0800fff : msm_hsusb
a9900000-a9900fff : msm_i2c.0
a9900000-a9900fff : msm_i2c
a9c00000-a9c00fff : msm_serial.2
a9c00000-a9c00fff : msm_serial
aa200000-aa2effff : mdp
aa600000-aa600fff : msm_mddi.0
Yes. It will ask you questions as the kernel has added new capabilities - which you will need to configure. Use the help for the new options to guide your choices, although usually the default is the best way to go. Not doing "oldconfig" step will leave you with a busted build configuration.
I assume you're using the config options from /proc/config.gz on the phone?
CombinedEffort said:
I assume you're using the config options from /proc/config.gz on the phone?
Click to expand...
Click to collapse
of course I do
gecka said:
of course I do
Click to expand...
Click to collapse
Godspeed! (sorry, i cannot contribute anything as I am a total noob, but I'll read your progress regardless!)
(edit: i could beta test though..^_^)
http://forum.xda-developers.com/showpost.php?p=4737995&postcount=37
maybe this could be of any help?
E2K said:
http://forum.xda-developers.com/showpost.php?p=4737995&postcount=37
maybe this could be of any help?
Click to expand...
Click to collapse
please read first post
Now that kernel sources are out, it is time to port changes to 2.6.29.
Hey guys what would be the best? Apply HTC Hero kernel changes to 2.6.29 or apply 2.6.29 changes from 2.6.27 to hero kernel ?
I have applied HTC changes (3.4Mo patch!) to android2.6.29msm and I can compile it. When I run it it says it is a 2.6.27-dirty kernel... Why dirty ?
Lox, it probably means that some of your kernel changes from 2.6.27? or coded for 2.6.27 are not valid in the newer build, hence the 'dirty' reference.
Dirty here meaning spoilt or wrong.
I don't code, and i don't know exactly how much experience you have yourself, but do you reckon Cyanogen or maybe Drizzy could help some of you Hero ROM chefs out with some tips? I'm sure they'd love to give some pointers as to how they've gone about cooking on the Sapphire and Magic.
maybe you did a dirty trick
Lox_Dev said:
Hey guys what would be the best? Apply HTC Hero kernel changes to 2.6.29 or apply 2.6.29 changes from 2.6.27 to hero kernel ?
I have applied HTC changes (3.4Mo patch!) to android2.6.29msm and I can compile it. When I run it it says it is a 2.6.27-dirty kernel... Why dirty ?
Click to expand...
Click to collapse
You can get dirty tagged when you change owner of the files compared to the user who pulled them from git.
packetlss said:
You can get dirty tagged when you change owner of the files compared to the user who pulled them from git.
Click to expand...
Click to collapse
Well I understand that but I don't understand why it is not 2.6.29 ?
I have done:
git checkout --track -b android-msm-2.6.29 origin/android-msm-2.6.27
Why start with 2.6.29 and not the latest stable kernel (2.6.31.x) now that HTC-patches just have been released. According to the changelogs there's quite a few interesting android-specific improvements in those later revisions.
Is the intention to match kernel version for android 1.6 source? I'd expect generic android kernel-enhancements to be integrated into the kernel.org kernel. In that case it should be fairly easy to use a more recent kernel than that included in an official android release.
Lox, is this a dead project? Are you focusing on your optimized .27 kernel for our devices?

FTDI kernel module unknown relocation

Hey guys,
I've spent a few days now researching and attempting to build the FTDI kernel module for my Archos 70b. After following this guide I managed to get a successful compilation. I uploaded it to my device (which was rooted via Paul's root and rebooted into sde). When I attempt to use insmod, I get the following error: insmod: cannot insert '/sdcard/ftdi_sio.ko': Invalid module format (-1): Exec format error. I ran 'dmesg -c' and got the following output: [ 684.472290] ftdi_sio: unknown relocation: 27. I have the usbserial module installed already as well. What is the problem here? I'm assuming by relocation it means it's loading the module into the wrong part of the address space? I could be very off I'm new to this process. I just want to thank everyone in advance for their help, this is my first post and I've used these forums extensively over the last few days. You have a great community here.
A little extra information:
I'm using the toolkit from the android-ndk-r8. My makefile looks like this:
obj-m := ftdi_sio.o
KDIR := ~/bin/gen8/archos-gpl-gen9-kernel/
PWD := $(shell pwd)
CCPATH := ~/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
default:
$(MAKE) ARCH=arm CROSS_COMPILE=$(CCPATH)/arm-linux-androideabi- -C $(KDIR) M=$(PWD) modules
whistlinwilly said:
Hey guys,
I've spent a few days now researching and attempting to build the FTDI kernel module for my Archos 70b. After following this guide I managed to get a successful compilation. I uploaded it to my device (which was rooted via Paul's root and rebooted into sde). When I attempt to use insmod, I get the following error: insmod: cannot insert '/sdcard/ftdi_sio.ko': Invalid module format (-1): Exec format error. I ran 'dmesg -c' and got the following output: [ 684.472290] ftdi_sio: unknown relocation: 27. I have the usbserial module installed already as well. What is the problem here? I'm assuming by relocation it means it's loading the module into the wrong part of the address space? I could be very off I'm new to this process. I just want to thank everyone in advance for their help, this is my first post and I've used these forums extensively over the last few days. You have a great community here.
A little extra information:
I'm using the toolkit from the android-ndk-r8. My makefile looks like this:
obj-m := ftdi_sio.o
KDIR := ~/bin/gen8/archos-gpl-gen9-kernel/
PWD := $(shell pwd)
CCPATH := ~/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
default:
$(MAKE) ARCH=arm CROSS_COMPILE=$(CCPATH)/arm-linux-androideabi- -C $(KDIR) M=$(PWD) modules
Click to expand...
Click to collapse
Hi !
First be sure that you have the same version kernel->module , run modinfo module.ko and vermagic need to be the same with kernel version !
- if it's ok you can try strings module.ko and than insmod module.ko !
( but can be many things wrong in your process of compiling module !!! ) Good luck ...
I can confirm that the versions are the same, I was using an incorrect version before and dmesg was complaining. I've since compiled the module for the right kernel version and now dmesg only gives me the "unknown relocation: 27" error.
I ran the strings command, it outputted over 4000 lines. I'm not quite sure what you could gain from the output but I can attached the text file I piped it to if that will be helpful.
whistlinwilly said:
I can confirm that the versions are the same, I was using an incorrect version before and dmesg was complaining. I've since compiled the module for the right kernel version and now dmesg only gives me the "unknown relocation: 27" error.
I ran the strings command, it outputted over 4000 lines. I'm not quite sure what you could gain from the output but I can attached the text file I piped it to if that will be helpful.
Click to expand...
Click to collapse
Ok!
May be you have a problem when your module "export symbols" -> take a look into Module.symvers ... and see if something export !
I looked around and couldn't find Module.symvers either in the source code or on the actual device. Do you know where I might be able to find it or how I can create the file myself? When the module is compiled, make throws a warning about not being able to find it. I think this is the problem.
whistlinwilly said:
I looked around and couldn't find Module.symvers either in the source code or on the actual device. Do you know where I might be able to find it or how I can create the file myself? When the module is compiled, make throws a warning about not being able to find it. I think this is the problem.
Click to expand...
Click to collapse
Hi !
...maybe it help you => http://tldp.org/LDP/lkmpg/2.6/html/lkmpg.html
( module.symvers is created after you run make ( for make module) in directory where you compile module )
I'm not quite sure I understand. I get a warning
WARNING: Symbol fakepath/kernel/Module.symvers
is missing; modules will have no dependencies and modversions.
when I run make in the modules folder. There IS a file created called Module.symvers after I run make, but it is empty; I'm assuming its just a copy of whatever Module.symvers file it is actually looking for.
Has anyone compiled the archos gen9 kernel that might have created this file and can pass it along to me?
whistlinwilly said:
A little extra information:
I'm using the toolkit from the android-ndk-r8. My makefile looks like this:
obj-m := ftdi_sio.o
KDIR := ~/bin/gen8/archos-gpl-gen9-kernel/
PWD := $(shell pwd)
CCPATH := ~/android-ndk-r8/toolchains/arm-linux-androideabi-4.4.3/prebuilt/linux-x86/bin
default:
$(MAKE) ARCH=arm CROSS_COMPILE=$(CCPATH)/arm-linux-androideabi- -C $(KDIR) M=$(PWD) modules
Click to expand...
Click to collapse
Hi whistlinwilly
Are you sure you've grabbed the right kernel source - your KDIR says gen9, if your compiling for the 70b you probably need the gen8 kernel source code as I think it's on the Gen8 product line
you can check which kernel version you have by running the following from a command prompt.
Code:
adb shell uname -a
Hope that helps
Hey whistlinwilly,
i don't know if you were successful in the meantime, but here's what i suggest for simple kernel module compilation...
You might refer to my custom kernel thread and check my toolchain, which is ready to rock (only 32bit linux right now):
http://forum.xda-developers.com/showthread.php?t=1328027
To compile custom kernel/modules only, look here as well:
http://forum.xda-developers.com/showpost.php?p=19134490&postcount=8
The archos specific toolchain uses uclibc and is used for kernel and userland.
So if you use stock kernel, but choose a different toolchain (e.g. libc based) to compile your modules, you might run into trouble at some point.
BTW, is it correct that you talk about this device:
http://www.archos.com/products/ta/archos_70b/index.html?country=de&lang=de
Not sure which family it exactly belongs to
If you're talking about this one:
http://www.archos.com/products/ta/archos_70it2/index.html?country=de&lang=de
...the kernel should be 2.6.35 then.
http://gitorious.org/archos/archos-gpl-gen9-kernel
I'm not aware of any config for the A70IT2 though.
Please refer to trevd's suggestion and find out your kernel release first...
Good luck!
scholbert
I had the same problem (Relocation error: 27) when trying to compile a custom kernel module for my Moto xoom running Honeycomb.
I was able to compile successfully by rolling back to Android NDK 5b. I also had to force the vermagic string to read ARMv7 so I know this isn't the right way to solve the problem, but when I compiled with the 5b toolchain, the relocation error goes away and I am able to insmod without error on the tablet.
I would love to know why this works and the right way to get NDK 7 to work with this, if anyone can shed some light??
EDIT:
On further digging and testing- I realize it is not necessarily NDK 5b, but rather the toolchain "arm-eabi-4.4.0" as opposed to using the "arm-linux-androideabi-4.4.3" toolchain, that makes the difference with the "unknown relocation 27" error. It just so happens that NDK 5b is the last NDK that shipped with both toolchains, AFAIK.
It still for some reason likes to compile under ARMv5 unless I force it to use ARMv7 but this issue is probably unrelated- I didn't mean to confuse things with the ARM v5/v7 versus NDKr5 /NDKr7 which don't correlate...
Anyway I hope this helps, or maybe someone else who knows more can help us both!
Well, I solved my toolchain issue- I just needed to add an EXTRA_CFLAGS=-fno-pic to get the arm-linux-androideabi-4.4.3 toolchain to compile without seeing an unknown relocation error on the tablet.
Hope this helps someone!
the_zuck said:
Well, I solved my toolchain issue- I just needed to add an EXTRA_CFLAGS=-fno-pic to get the arm-linux-androideabi-4.4.3 toolchain to compile without seeing an unknown relocation error on the tablet.
Hope this helps someone!
Click to expand...
Click to collapse
Thanks a million, finally got past the relocation 27 error now. Insmod doesn't complain anymore and the drivers load successfully, now to just figure out why I'm getting a backtrace on device insertion.
Thanks for solving my major headache tho
Exec format error
the_zuck said:
Well, I solved my toolchain issue- I just needed to add an EXTRA_CFLAGS=-fno-pic to get the arm-linux-androideabi-4.4.3 toolchain to compile without seeing an unknown relocation error on the tablet.
Hope this helps someone!
Click to expand...
Click to collapse
Ok, thanks for the answer. My first post here.
After this got solved. I still have "Exec format error". And! and no errors are display in dmesg. Are there any other places where the error might be displayed? I just created a simple printk("hello world") project.
If i remove the printk it doesn't show the error.
I don't know whether to laugh or cry. I dabbled my self to the brink of madness to solve this. I couldn't find a solution anywhere. Finally solved it after 6 weeks of my time. Probably my boss at work will not be happy if he finds I was working on this instead of working.
And I find the solution here 2 days after I solved it. WOW!!!:crying::crying:
But my saga still continues...

[Guide] Building from sources [Kernel only for now]

Hello everyone.
This guide will help you in building a kernel from source for your Nexus 10
Later, when 4.2 hits AOSP, i'll add a guide for building that too
You will need a computer running Linux / OSX to build the kernel, natively, or via a VM.
This guide assumes you’re running any Linux distro.
Getting a toolchain:
You need a toolchain to build the kernel.
The preferred one is Google’s toolchain, the same they use to build AOSP.
In a terminal, type:
Code:
git clone [url]https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.6/[/url]
export PATH=$PATH:$(pwd)/arm-linux-androideabi-4.6/bin
export CROSS_COMPILE=arm-linux-androideabi-
TIp: paste the export statements in your ~/.bashrc to have them exported each login.
Getting the kernel source:
The kernel source for Nexus devices is available from Google’s servers.
Source : https://android.googlesource.com/kernel/exynos
Github Mirror: https://github.com/chirayudesai/android_kernel_exynos
Open the terminal, and type the below commands to get the kernel source on your computer.
Code:
mkdir -p android/kernel
cd android/kernel
For Nexus 10, we get the exynos kernel sources.
Code:
git clone [url]https://android.googlesource.com/kernel/exynos[/url]
Next, we change our directory to the newly fetched source.
Type
Code:
cd exynos
Figuring out what to build:
Now, we need to figure out which revision to build.
You need to be exactly sure about this, otherwise there are chances that the compiled kernel won’t work.
The commit to build upon can be found by a few ways.
To get the kernel sources matching the device tree, type the below in the device tree.
Code:
git log kernel
Then type the below in the kernel tree
Code:
git checkout <commit>
The commit of the version running on the current review units is 52f6ab1 (probably), which is same as branch android-exynos-manta-3.4-jb-mr1-fr .
Compiling:
Name of defconfig: manta_defconfig
cd to the directory of the kernel source, then type the below in a terminal.
Code:
export ARCH=arm
export SUBARCH=arm
Code:
make <name_of_defconfig>
make
The kernel image will be ready at arch/arm/boot/zImage
To flash it, you need to make it into a boot.img, more on that later. when we have more sources.
Nice work, it's been nice to see some instructions on building additional kernel modules too.
Sent from my GT-I9300 using Tapatalk 2
Great guide! I look forward to seeing your tutorial on compiling 4.2 from source .
Sent from my SCH-I535 using xda premium
Super awesome! I'm currently thoroughly:good: learning the rom building process with my nexus... ill get to this!
looking forward towards the development
Great! This is very helpful and useful
hey man, i got stuck at this point
Code:
git log kernel
it gives me this error
Code:
fatal: ambiguous argument 'kernel': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
didn't really get that point... thanks :good:
matt95 said:
hey man, i got stuck at this point
Code:
git log kernel
it gives me this error
Code:
fatal: ambiguous argument 'kernel': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions
didn't really get that point... thanks :good:
Click to expand...
Click to collapse
It has to be typed in the device tree, which hasn't hit AOSP yet, but should soon.
Sent from my GT-P1000
cdesai said:
It has to be typed in the device tree, which hasn't hit AOSP yet, but should soon.
Sent from my GT-P1000
Click to expand...
Click to collapse
oh, now i get this :good:
i was able to make a build tonight from aosp, waiting for my device to arrive & then ill be able to test. but as far as i could tell the output sizes were pretty on compared to the factory image files i extracted http://renzy.me/aoi
...just realized i didnt extract proprietary binaries.
Hello, Cdesai.
Thanks for your guide!
I will do my best to learn it.
so you say that you need to make the zImage into a boot.img (being a noob about this...) on my SGSII, I can flash zImages and boot.img, so I'm confused, lol
jrod091 said:
so you say that you need to make the zImage into a boot.img (being a noob about this...) on my SGSII, I can flash zImages and boot.img, so I'm confused, lol
Click to expand...
Click to collapse
i think it depends on how youre flashing. with the sgsii youre prob using odin/heimdall & it might just overwrite the kernel. flashing with fastboot might require the boot.img cause it contains a ramdisk image after the kernel & is writing a partition. thats just my guess at least, someone else might have a better/more accurate answer for ya
renzyyy said:
i think it depends on how youre flashing. with the sgsii youre prob using odin/heimdall & it might just overwrite the kernel. flashing with fastboot might require the boot.img cause it contains a ramdisk image after the kernel & is writing a partition. thats just my guess at least, someone else might have a better/more accurate answer for ya
Click to expand...
Click to collapse
yeah that's true, but for instance with HTC S-OFFed devices you don't even need to flash the boot.img....
cdesai said:
... To flash it, you need to make it into a boot.img, more on that later. when we have more sources.
Click to expand...
Click to collapse
you can extract the contents from the factory image & use getramdisk.py to get the ramdisk.img out of the current boot.img (or use this ramdisk.img)
then once youve compiled the kernel successfully, use mkbootimg from android_bootimg_tools.tar.gz to repack your boot.img.
if you want to just test...
fastboot boot [new-boot.img]
and flash if satisfied...
fastboot flash boot [new-boot.img]
just tested out if anyone wants some verification... screenshot
@cdesai, shouldn't we be using arm-eabi- instead of arm-linux-androideabi- as CROSS_COMPILE
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
export PATH=$PATH:$(pwd)/arm-eabi-4.6/bin
export CROSS_COMPILE=arm-eabi-
Building with arm-linux-androideabi- causes issues with kernel modules... here's an example of such an issue https://groups.google.com/forum/?fromgroups=#!topic/android-kernel/dzEIOVuxtEo
And the most updated kernel branch is android-exynos-manta-3.4-jb-mr1 not android-exynos-manta-3.4-jb-mr1-fr
Is there any chance of this becoming an OC kernel in the future?
craigacgomez said:
@cdesai, shouldn't we be using arm-eabi- instead of arm-linux-androideabi- as CROSS_COMPILE
Code:
git clone https://android.googlesource.com/platform/prebuilts/gcc/linux-x86/arm/arm-eabi-4.6/
export PATH=$PATH:$(pwd)/arm-eabi-4.6/bin
export CROSS_COMPILE=arm-eabi-
Building with arm-linux-androideabi- causes issues with kernel modules... here's an example of such an issue https://groups.google.com/forum/?fromgroups=#!topic/android-kernel/dzEIOVuxtEo
And the most updated kernel branch is android-exynos-manta-3.4-jb-mr1 not android-exynos-manta-3.4-jb-mr1-fr
Click to expand...
Click to collapse
Yes, I couldn't get md4 and cifs modules to load with arm-linux-androideabi-4.6:
<3>[ 1250.492203] md4: unknown relocation: 27
<4>[ 1260.230901] cifs: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
However, with this:
git clone https://android.googlesource.com/platform/prebuilt
export PATH=$PATH:$PWD/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
export CROSS_COMPILE=arm-eabi-
The modules load okay:
[email protected]:/mnt/shell/emulated/0 # lsmod
cifs 269223 0 - Live 0x00000000
md4 3442 0 - Live 0x00000000
(Now I have to work out why neither mount nor cifsmanager are working as expected...)
sam3000 said:
Yes, I couldn't get md4 and cifs modules to load with arm-linux-androideabi-4.6:
<3>[ 1250.492203] md4: unknown relocation: 27
<4>[ 1260.230901] cifs: Unknown symbol _GLOBAL_OFFSET_TABLE_ (err 0)
However, with this:
git clone https://android.googlesource.com/platform/prebuilt
export PATH=$PATH:$PWD/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin
export CROSS_COMPILE=arm-eabi-
The modules load okay:
[email protected]:/mnt/shell/emulated/0 # lsmod
cifs 269223 0 - Live 0x00000000
md4 3442 0 - Live 0x00000000
(Now I have to work out why neither mount nor cifsmanager are working as expected...)
Click to expand...
Click to collapse
I know the reason... busybox needs to be patched... i guess it's something new in 3.4.5 kernel... I haven't done the patch yet
https://github.com/OpenELEC/OpenELEC.tv/commit/f66041febdb07d13a158dab5da901d208cf4fff9
craigacgomez said:
I know the reason... busybox needs to be patched... i guess it's something new in 3.4.5 kernel... I haven't done the patch yet
https://github.com/OpenELEC/OpenELEC.tv/commit/f66041febdb07d13a158dab5da901d208cf4fff9
Click to expand...
Click to collapse
I had actually just got to the point of realising I could make it work by explicitly setting the unc path in mount command options. The missing patch would explain it.

[KERNEL][WIP][DEV] Quintus Kernel = Kcal

Hi all !
After many years of "xda looting", i'm trying to contribute a little.
I'm a begginer, just learned 3 days ago how to use github ! So be cool guys, not a dev here.
Now i successfully compiled a Kernel, with addition of KCAL for now, but...
I got the Image.gz-dtb and i don't succeed in repacking it in a boot.img, if someone want to try, be my guest. (It's untested obviously, but compilation was without errors/warnings (we are close to stock for now.).
I tried mkboot, anykernel2, lazyflasher.... Always flash error, and i don't have time for the next few days, so if we could put a team together...
Here is the link to my compiled files (arch/arm64/boot) except dto folder. //Update to my Dev folder
Theorically you just have to rename, put it in a stock boot.img, "fastboot boot newboot.img" and test if Kcal is working with ex kernel manager, then more to come (governors, maybe OC, etc.)
Poke @d1ngh, you could help here after your work on twrp ?
Cheers guys, we could have our first custom kernel soon !
----------------------------------------
Source : [url]https://github.com/WiwiWillou/Xiaomi_Kernel_OpenSource.git[/URL]
Defconfig used = defconfig daisy-perf_defconfig (with the kcal=Y addition not commited for now) // branch daisy-o-oss
Thank you very much! That´s what I waited for. Unfortunately 7zip says error: unknown compression method... Perhaps you can repack? Thx.
That is all we need ! A custom kernel thant can handle GSI !
Voodoojonny said:
Thank you very much! That´s what I waited for. Unfortunately 7zip says error: unknown compression method... Perhaps you can repack? Thx.
Click to expand...
Click to collapse
I've updated the link, you should see the uncompressed file in folder !
Or direct link : https://drive.google.com/file/d/1TvihsIa_XbtC66yaWRZ1EPY5UR6LLD5g/view?usp=drivesdk
Thanks
WiwiPouPou said:
Hi all !
After many years of "xda looting", i'm trying to contribute a little.
I'm a begginer, just learned 3 days ago how to use github ! So be cool guys, not a dev here.
Now i successfully compiled a Kernel, with addition of KCAL for now, but...
I got the Image.gz-dtb and i don't succeed in repacking it in a boot.img, if someone want to try, be my guest. (It's untested obviously, but compilation was without errors/warnings (we are close to stock for now.).
I tried mkboot, anykernel2, lazyflasher.... Always flash error, and i don't have time for the next few days, so if we could put a team together...
Here is the link to my compiled files (arch/arm64/boot) except dto folder. //Update to my Dev folder
Theorically you just have to rename, put it in a stock boot.img, "fastboot boot newboot.img" and test if Kcal is working with ex kernel manager, then more to come (governors, maybe OC, etc.)
Poke @d1ngh, you could help here after your work on twrp ?
Cheers guys, we could have our first custom kernel soon !
----------------------------------------
Source : [url]https://github.com/WiwiWillou/Xiaomi_Kernel_OpenSource.git[/URL]
Defconfig used = defconfig daisy-perf_defconfig (with the kcal=Y addition not commited for now) // branch daisy-o-oss
Click to expand...
Click to collapse
Try it with android image kitchen (you first have to get the original bootimage from vendor/factory image, unpack it, exchange your kernel and repack it). recompiled official sources (with UBERTC) and it worked fine like that.
wertus33333 said:
Try it with android image kitchen (you first have to get the original bootimage from vendor/factory image, unpack it, exchange your kernel and repack it). recompiled official sources (with UBERTC) and it worked fine like that.
Click to expand...
Click to collapse
I've tried, maybe my image is bad, strange (I originally tried my stock source too, Google 4.9 toolchain, no luck). Can you test with the one in the link please ?
I will have access to my PC only next week...
Thanks a lot for your feedback !
wertus33333 said:
Try it with android image kitchen (you first have to get the original bootimage from vendor/factory image, unpack it, exchange your kernel and repack it). recompiled official sources (with UBERTC) and it worked fine like that.
Click to expand...
Click to collapse
Could you please share your build script ? Did you use an alternate defconfig ?
Learning here
EDIT : Which UberTC did you use ?
WiwiPouPou said:
Could you please share your build script ? Did you use an alternate defconfig ?
Learning here
EDIT : Which UberTC did you use ?
Click to expand...
Click to collapse
I used the original source code with some small changes (which are now included in official source) to make it compile.
Don't mind about the toolchain for the moment, gcc4.9 is most stable.
I don't have time trying this out atm, busy compiling los 15.1 but if you share exactly how you did it, (terminal log in pastebin and most importantly the exact errors, "doesn't work" doesn't help ) me or someone else might be able to help you (and you don't have to ask next time you get the error.
If you want you can start adjusting the lineage kernel, so i could build with los kernel which could save time towards working custom roms.
I successfully repack. But phone don't boot. (9.11 ROM)
Hello , can you help me with conpiling kernel source code? I tryed a lot of time but same issues , that could find same files.
I successfully repack image of kernel that you publish, but phone don't boot , they reboot in stock kernel(if i write fastboot boot boot.img) and I trying flashing image. They dont boot.
I vary want to create collection of custom kernel's on my device. And of course becouse i vary interested in this sphere, but new this.
Can you describe how you fix issues, or your compiling go without issues.
With best regards. Please help.
artyom5613 said:
Hello , can you help me with conpiling kernel source code? I tryed a lot of time but same issues , that could find same files.
I successfully repack image of kernel that you publish, but phone don't boot , they reboot in stock kernel(if i write fastboot boot boot.img) and I trying flashing image. They dont boot.
I vary want to create collection of custom kernel's on my device. And of course becouse i vary interested in this sphere, but new this.
Can you describe how you fix issues, or your compiling go without issues.
With best regards. Please help.
Click to expand...
Click to collapse
On which roms did you test your kernel?
Voodoojonny said:
On which roms did you test your kernel?
Click to expand...
Click to collapse
8.1 stock. 9.11
I compile stock kernel , repack him , ans this work fine. Now i need help to add kcal support. Author, can you help?
artyom5613 said:
I compile stock kernel , repack him , ans this work fine. Now i need help to add kcal support. Author, can you help?
Click to expand...
Click to collapse
I will, I'm very far from my PC for a few weeks again, I've used some commits :
https://github.com/rama982/android_kernel_xiaomi_msm8953/search?q=kcal&type=Commits
Source for pie is not pushed ?
WiwiPouPou said:
I will, I'm very far from my PC for a few weeks again, I've used some commits :
https://github.com/rama982/android_kernel_xiaomi_msm8953/search?q=kcal&type=Commits
Source for pie is not pushed ?
Click to expand...
Click to collapse
Thanks! O try to add kcal with this commits.
Yea, source for pie is not pushed. Xiaomi cant fix 8.1 kernel... Stock compiled kernel issue: wifi don't work...
WiwiPouPou said:
I will, I'm very far from my PC for a few weeks again, I've used some commits :
https://github.com/rama982/android_kernel_xiaomi_msm8953/search?q=kcal&type=Commits
Source for pie is not pushed ?
Click to expand...
Click to collapse
Can you tell me what version of kernel you use whyle compile kernel? I tryed on new 9.11, but phone dont boot.
Maybe when you compile version be 9.10 or ealier.
becouse ramdisk and kernel image can conflict
I hope this can support settings for "display temperature" so that we dont need app for calibrating warmth or coolness of display
Current state:
Kernel builded.
Kcal included.
Wifi don't work , searching fix
artyom5613 said:
Current state:
Kernel builded.
Kcal included.
Wifi don't work , searching fix
Click to expand...
Click to collapse
Kcal is working ?
Strange for WiFi, module not compiled ?

Question Nethunter Build help [Kernel / System]

Hey xdas,
i just received my new Samsung Galaxy z Fold 4
SAOMC_SM-F936B_OXM_EUX_12_0045 EUX /-/EUX/EUX
Kernel : 5.10.81-afaneh92-gd8d6af751972 (flashed for twrp)
I would like to install nethunter on the device with a working kernel
I tired my best to understand the docu on kali but its not the best
i am also new to compiling kernels at that level so maybe someone can help here
I attached as much as i could
So the steps i took so far is
Unlocked Bootloader
installed the twrp ( like descriped here : https://forum.xda-developers.com/t/recovery-unofficial-twrp-for-galaxy-z-fold4-snapdragon.4498743/ )
installed magisk
Then for nethunter
(https://www.kali.org/docs/nethunter/)
i downloaded the kernel source :
https://opensource.samsung.com/uploadSearch?searchValue=SM-F936 (my device is EUX see infos for device above)
downloaded the proper=? toolchain , there is an readme_kernel inside the kernel_source with a link to the toolchain , i am unsure about this
https://opensource.samsung.com/uploadSearch?searchValue=toolchain
there are two options i took the S22(Exynos) file ( hope thats right ?)
now we come to the difficult part :-(
first i tried to compile via the instructions on kali docs
unpack the kernel file i did and there a subfolders so i decided to use the subfolder common as the root mentioned in the docs:
you can begin by cloning our kernel builder to the root of your kernel’s folder, and prepare the environment:
from common folder i did git clone https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-kernel
cd kali-nethunter-kernel
I did not change the configs as i am new to that so i know there are some exports inside the build config inside the kernel file but i dont know how get them together
./build.sh
S. Setup Environment and download toolchains.
2. Configure & compile kernel from scratch
It found the devconfig so i took it as mentioned in the docs (Select your device’s defconfig, then save and exit to start the building process.)
did not edit the kernel config till jet
and ran into the error attached in the error txt
I would like to understand how i can build the kernel the normal way , without the nethunter tool
and maybe someone could help to make this working with nethunter that would be great !
i want to understand the process and i am willing to help , so i am not asking for a final kernel , more for the way to go in general to also give the community a benefit for the next new kernel we want to port
as mentioned the docs are not the best !
thanks for your time
@yesimxev / @V3rB0se / @afaneh92 need some help here
Which toolchain to you use in nethunter kernel builder? I'd recommend clang-12.
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+archive/refs/tags/android-12.0.0_r12/clang-r416183b1.tar.gz
Download, extract somewhere and add it's path to kali-nethunter-kernel/config (clang-10 is the default). no need for setup environment again.
Any luck with this? i am in the same situation trying to build a nethunter kernel for my zfold4
Wanttoknowthings said:
Hey xdas,
i just received my new Samsung Galaxy z Fold 4
SAOMC_SM-F936B_OXM_EUX_12_0045 EUX /-/EUX/EUX
Kernel : 5.10.81-afaneh92-gd8d6af751972 (flashed for twrp)
I would like to install nethunter on the device with a working kernel
I tired my best to understand the docu on kali but its not the best
i am also new to compiling kernels at that level so maybe someone can help here
I attached as much as i could
So the steps i took so far is
Unlocked Bootloader
installed the twrp ( like descriped here : https://forum.xda-developers.com/t/recovery-unofficial-twrp-for-galaxy-z-fold4-snapdragon.4498743/ )
installed magisk
Then for nethunter
(https://www.kali.org/docs/nethunter/)
i downloaded the kernel source :
https://opensource.samsung.com/uploadSearch?searchValue=SM-F936 (my device is EUX see infos for device above)
downloaded the proper=? toolchain , there is an readme_kernel inside the kernel_source with a link to the toolchain , i am unsure about this
https://opensource.samsung.com/uploadSearch?searchValue=toolchain
there are two options i took the S22(Exynos) file ( hope thats right ?)
now we come to the difficult part :-(
first i tried to compile via the instructions on kali docs
unpack the kernel file i did and there a subfolders so i decided to use the subfolder common as the root mentioned in the docs:
you can begin by cloning our kernel builder to the root of your kernel’s folder, and prepare the environment:
from common folder i did git clone https://gitlab.com/kalilinux/nethunter/build-scripts/kali-nethunter-kernel
cd kali-nethunter-kernel
I did not change the configs as i am new to that so i know there are some exports inside the build config inside the kernel file but i dont know how get them together
./build.sh
S. Setup Environment and download toolchains.
2. Configure & compile kernel from scratch
It found the devconfig so i took it as mentioned in the docs (Select your device’s defconfig, then save and exit to start the building process.)
did not edit the kernel config till jet
and ran into the error attached in the error txt
I would like to understand how i can build the kernel the normal way , without the nethunter tool
and maybe someone could help to make this working with nethunter that would be great !
i want to understand the process and i am willing to help , so i am not asking for a final kernel , more for the way to go in general to also give the community a benefit for the next new kernel we want to port
as mentioned the docs are not the best !
thanks for your time
Click to expand...
Click to collapse
Great research bro , same as here.
Difference is I am doing it for M21 .
And to flash the kernel I need to do port twrp for vA12 M21 too.
Great respect bro.
Anyone can help with kernel? u need AR9271 and rtl8188EUS drivers on ysl Android 9
https://forum.xda-developers.com/t/arm64-rom-unofficial-9-0-0-ysl-lineageos-16-0-18-08-2019.3958696/ <----- this rom
Phone: codename-[ysl]
Redmi s2
i have been trying to make it myself but always gets fails
im having the same issue at this step... anyone willing to show the part on how to setup the toolchain properly>?
heres a screenshot of my issue
this is local.config file
kluongo said:
heres a screenshot of my issue
Click to expand...
Click to collapse
It shows the error, do apt install flex
yesimxev said:
It shows the error, do apt install flex
Click to expand...
Click to collapse
Will do, thanks... You know I was looking through the process and missed that line... I suppose next time I should take more time and look more carefully
kluongo said:
Will do, thanks... You know I was looking through the process and missed that line... I suppose next time I should take more time and look more carefully
Click to expand...
Click to collapse
Great, I'll add to the setup env script so it won't be missed. It shouldn't happen in the first place though

Categories

Resources