the title speaks.
How to port kernel???
Messi10 said:
the title speaks.
How to port kernel???
Click to expand...
Click to collapse
Recipe to port a kernel.
1 test device
1 Vendor kernel source
1 Copy of required patches to be port
1 Linux computer
Way too much time on your hands.
Power on Linux computer and add vendor source. Verify it compiles and then sprinkle in patches compiling as you cook until they have all been applied and your kernel builds. Flash to device and proceed to debug and fix errors until your kernel boots.
Viola.
thewadegeek said:
Recipe to port a kernel.
1 test device
1 Vendor kernel source
1 Copy of required patches to be port
1 Linux computer
Way too much time on your hands.
Power on Linux computer and add vendor source. Verify it compiles and then sprinkle in patches compiling as you cook until they have all been applied and your kernel builds. Flash to device and proceed to debug and fix errors until your kernel boots.
Viola.
Click to expand...
Click to collapse
is there another way without building stuffs?
Messi10 said:
is there another way without building stuffs?
Click to expand...
Click to collapse
Nope you have to compile it for your device, it's just in the nature of the kernel. Read this for more information. http://en.wikipedia.org/wiki/Kernel_(computing)
thewadegeek said:
Nope you have to compile it for your device, it's just in the nature of the kernel. Read this for more information. http://en.wikipedia.org/wiki/Kernel_(computing)
Click to expand...
Click to collapse
okay thanks for your help
Messi10 said:
okay thanks for your help
Click to expand...
Click to collapse
No problem. Thank you for being polite, and trying to learn.
Related
Okay, I managed to fix the sources and got it compiled.
This is based on 4.06/4.08 sources with 4.08 ramdisk.
Use it at your own risk. If you brick your phone, it will be your fault, not mine.
I do not own a Dell Venue and therefore cannot test this.
zImage :
fastboot flash zimage zImage
fastboot reboot
boot.img :
fastboot flash boot boot.img
fastboot reboot
Download :
dell-venue-dbg1.zip
dell-venue-dbg2.zip
dell-venue-dbg3.zip
WiFi module :
dhd.ko-dbg1.zip
Thanks.
Yes, we would.
Cool, right now I have a hard time finding the right defconfig.
In case someone could point me to the right file :
https://github.com/adridu59/dell-venue-kernel/tree/master/arch/arm/configs
Edit :
It seems to be codenamed "toucan".
adridu59 said:
Cool, right now I have a hard time finding the right defconfig.
In case someone could point me to the right file :
https://github.com/adridu59/dell-venue-kernel/tree/master/arch/arm/configs
Edit :
It seems to be codenamed "toucan".
Click to expand...
Click to collapse
I think you'll try all of them, then test on your real device and.....
)
nguyen_vh said:
I think you'll try all of them, then test on your real device and.....
)
Click to expand...
Click to collapse
I made an overlap comparaison and I think that this is it.
Right now I am fixing the sources, they are crap tbh.
adridu59 said:
i made an overlap comparaison and i think that this is it.
Right now i am fixing the sources, they are crap tbh.
Click to expand...
Click to collapse
thanks for your effort :d
Yes
Venue have Custom Kernel! I have one
Kinda busy right now working on my own device but you can contribute if ya want. github.com/adridu59
I'm excited about this topic! Please keep me up to date with this. BTW, I also think that v4.06 source from Dell OpenSource is crappy. Could you please public your change list after you complete the work, it's very helpful to us.
chacona said:
I'm excited about this topic! Please keep me up to date with this. BTW, I also think that v4.06 source from Dell OpenSource is crappy. Could you please public your change list after you complete the work, it's very helpful to us.
Click to expand...
Click to collapse
Well check my github, I haven't worked on this for a while but I'm not letting it down.
First build on first post, follow instructions. Thanks.
406 and 408 apparently use the same kernel according to dell. Though we've had the suspicion that there were differences, apparently there isnt.
TheManii said:
406 and 408 apparently use the same kernel according to dell. Though we've had the suspicion that there were differences, apparently there isnt.
Click to expand...
Click to collapse
Yes, that's what I was thinking. And otherwise they would've published the sources.
I tried to flash your zImage, what I received is "Flashing Error -2", in red background in fast boot mode.
BTW, I would like to ask the way you build the kernel. Did you build directly from /kernel folder (with .config), or you build from ROM's source tree (/kernel folder's parent, using "build/envsetup", then "choosecombo")? I would like to get my hands dirty with this work too!
If my dev pc wasnt broken at the moment, I could glue it together with the stock ramdisk and make a flashable zip.
Here's the stock 408 kernel: boot-408.img
You can glue it together with that ram disk if desired, but shouldnt it also generate a ramdisk when building the kernel?
Just as much the ramdisk's contents arnt that unusual, you could prob guess at a few things and reconstruct it without issue.
chacona said:
I tried to flash your zImage, what I received is "Flashing Error -2", in red background in fast boot mode.
BTW, I would like to ask the way you build the kernel. Did you build directly from /kernel folder (with .config), or you build from ROM's source tree (/kernel folder's parent, using "build/envsetup", then "choosecombo")? I would like to get my hands dirty with this work too!
Click to expand...
Click to collapse
Thanks for testing.
I just use the corresponding defconfig, that is the usual way to do it.
I don't really see what you mean by ROM source tree...
TheManii said:
If my dev pc wasnt broken at the moment, I could glue it together with the stock ramdisk and make a flashable zip.
Here's the stock 408 kernel: boot-408.img
You can glue it together with that ram disk if desired, but shouldnt it also generate a ramdisk when building the kernel?
Just as much the ramdisk's contents arnt that unusual, you could prob guess at a few things and reconstruct it without issue.
Click to expand...
Click to collapse
Nao, the ramdisk isn't compiled code. Usually you extract it from the stock kernel and build with mkbootimg or any similar tool.
Thanks for the link BTW.
Okay, I built the boot.img. Offset is 0x20000000.
Check first post, thanks.
adridu59 said:
Thanks for testing.
I just use the corresponding defconfig, that is the usual way to do it.
I don't really see what you mean by ROM source tree...
Thanks for the link BTW.
Click to expand...
Click to collapse
Sorry for not making it clear. By saying "from ROM source tree", I mean the way below (ftp.dell.com/opensource/venue/v4.06/Venue-HOW-TO-BUILD.txt)
Code:
kernel
1) download source tree of android froyo from Qualcomm.
2) replace kernel
3) build kernel by
. build/envsetup.sh
choosecombo
...
5) make -j4 kernel
# update on 4/27/2012 - 23:18 GMT+7
I built an update.zip, with all the files including boot.img and system/lib/modules. What I got is, the Dell logo is hung there like being fallen into an infinite loop.
chacona said:
Sorry for not making it clear. By saying "from ROM source tree", I mean the way below (ftp.dell.com/opensource/venue/v4.06/Venue-HOW-TO-BUILD.txt)
Code:
kernel
1) download source tree of android froyo from Qualcomm.
2) replace kernel
3) build kernel by
. build/envsetup.sh
choosecombo
...
5) make -j4 kernel
Click to expand...
Click to collapse
First time I see this kind of instructions.
Code:
export ARCH=arm
export CROSS_COMPILE=~/toolchains/arm-eabi-4.4.3/prebuilt/linux-x86/bin/arm-eabi-
make toucan-perf_defconfig
make
chacona said:
# update on 4/27/2012 - 23:18 GMT+7
I built an update.zip, with all the files including boot.img and system/lib/modules. What I got is, the Dell logo is hung there like being fallen into an infinite loop.
Click to expand...
Click to collapse
Would you try again using fastboot please ? thanks.
@Adridu59: still fail, flashing boot.img using fastboot gives the same result as I described above. I will try to get your config files and build a copy myself to see what's going on!
I have a kernel image whose source is not open =| any way to decompile it, so I get an idea to write a kernel from scratch. It is based on linux 2.6.35.7 with some addons
Ok. No more android development by me :sly:
ramoneC said:
I have a kernel image whose source is not open =| any way to decompile it, so I get an idea to write a kernel from scratch. It is based on linux 2.6.35.7 with some addons
Click to expand...
Click to collapse
You cant decompile a kernel zimage
And Questions belong in the Q&A thread, not here.
ramoneC said:
I have a kernel image whose source is not open =| any way to decompile it, so I get an idea to write a kernel from scratch. It is based on linux 2.6.35.7 with some addons
Click to expand...
Click to collapse
Yes, you can't decompile a zImage. Only compiling from the sources is possible.
If you want to get an idea for compiling kernel, then I'd suggest to get the sources from the Manufacture's website (Yes, they'll publish the sources) and compile with adding features or not, and if successful then you can try it on Stock ROM.
ramoneC said:
I have a kernel image whose source is not open =| any way to decompile it, so I get an idea to write a kernel from scratch. It is based on linux 2.6.35.7 with some addons
Click to expand...
Click to collapse
by the open source licence that the kernal is distributed under they are required to provide you with the sources. if not on their website, then send them an email.
how did magisk patch the kernel if not decompile. anyone explain?
kanso said:
by the open source licence that the kernal is distributed under they are required to provide you with the sources. if not on their website, then send them an email.
Click to expand...
Click to collapse
I got SILENCE from them ☺ and this is what i hate the most in many places when there is no response, like in chatting, forum...
K900 Device Tree project
hi folks, a couple of months ago i decided it was time to create a working device tree at least to build cwm, since lenovo is very bad at opensource with us, it is nearly impossible to build a working cyanogen. Fortunately cwm doesn't need too much to be build so i grabbed the motorola razr i device tree from @hazou and wrote a new device tree for us. But unfortunately we still need a developer firmware from lenovo to flash recovery.img's. However, cwm builds well and i want to share my work to any interested developer who are willing to help.
Click to expand...
Click to collapse
in this github you will find all needed repos and info --> https://github.com/lenovo-k900
Click to expand...
Click to collapse
Its true, thanks for your effort QuBeX. I hope it works. I will follow.
Great job! I am also interested in hacking my K900 to enable kvm kernel module to run VMs on it.
The issue was always their stupid secure boot process which prevent use to put our kernel or even a kernel module into the system.
You refer to a developer firmware. Did you get chance to have access to one of those?
Does that turns off secure boot or you somhow got the signing key?
Please pm me if you know more details on that.
Thanks a lot.
chinabull said:
Great job! I am also interested in hacking my K900 to enable kvm kernel module to run VMs on it.
The issue was always their stupid secure boot process which prevent use to put our kernel or even a kernel module into the system.
You refer to a developer firmware. Did you get chance to have access to one of those?
Does that turns off secure boot or you somhow got the signing key?
Please pm me if you know more details on that.
Thanks a lot.
Click to expand...
Click to collapse
Lenovo hasn't provided a dev firmware yet. And I don't think they will... Anyway we now have working recovery, and we are finding out how to bypass signature check, but it is really difficult.
Talking about the kernel, have you ever tried kexec? I don't know very much of it but you can find a lot of info and stuff in google
Thanks, man. That is a briliant idea!
I have built the kexec executible and have loaded my custom kernel into the memory.
Of course when it ran the new kernel, I got a black screen for now. But it's a good start. I'll debug it and keep you guys updated with the progress.
chinabull said:
Thanks, man. That is a briliant idea!
I have built the kexec executible and have loaded my custom kernel into the memory.
Of course when it ran the new kernel, I got a black screen for now. But it's a good start. I'll debug it and keep you guys updated with the progress.
Click to expand...
Click to collapse
Just a quick update on progress.
Tried all kinds of tricks including modifying kernel code on the fly.
Still no luck on kexec yet.
But I found a loophole in the JB4.3 kernel which I used to have the kernel module signature check disabled.
Now I can load any kerenl module I built.
If anybody has interest on that tool, please PM me.
Now we have AOSP 4.3 branch in our device tree: https://github.com/lenovo-k900/android_device_lenovo_redhookbay/tree/aosp-4.3
Author: MaXxXanter
Can't wait for this. I wish i could do some support too...
Sent from my Lenovo K900_ROW using XDA Free mobile app
can i use this device tree for build cm12.1 rom?
xxx-man-by said:
Now we have AOSP 4.3 branch in our device tree: https://github.com/lenovo-k900/android_device_lenovo_redhookbay/tree/aosp-4.3
Author: MaXxXanter
Click to expand...
Click to collapse
is possible to build cm11 with that source sir?
xxx-man and qubex and any other who is putting time to get some nice roms for our K900 is greatly appreciated.
I tried compile kernel for XRN3 Mtk
And terminal displayed this
make: *** No rule to make target '/home/Android/kernel/kernel-3.10/drivers/misc/mediatek/mach///dct/dct/codegen.dws', needed by '/home/Android/kernel/kernel-3.10/drivers/misc/mediatek/mach///dct/dct/inc/cust_kpd.h'. Stop.
I disabled needed line in defconfig, but it still not compiling
Sorry for my bad English
What can i do with that error?
Skrem339 said:
I tried compile kernel for XRN3 Mtk
And terminal displayed this
make: *** No rule to make target '/home/Android/kernel/kernel-3.10/drivers/misc/mediatek/mach///dct/dct/codegen.dws', needed by '/home/Android/kernel/kernel-3.10/drivers/misc/mediatek/mach///dct/dct/inc/cust_kpd.h'. Stop.
I disabled needed line in defconfig, but it still not compiling
Sorry for my bad English
What can i do with that error?
Click to expand...
Click to collapse
check if this file already exicst in ur kernel source or not
messi2050 said:
check if this file already exicst in ur kernel source or not
Click to expand...
Click to collapse
I am also facing the same error
can you explain the solution.
kalwardin said:
I am also facing the same error
can you explain the solution.
Click to expand...
Click to collapse
Which device are you compiling for and can you link the kernel source
messi2050 said:
Which device are you compiling for and can you link the kernel source
Click to expand...
Click to collapse
Lenovo Tab 2 A7 10 F
and the kernel source is https://github.com/KalWardinX/kernel_lenovo_tab2a710f
I m trying to port postmarketos but while building kernel i am getting this error:
'No rule to make target /home/pmos/ build/src/kernel_lenovo_tab2a710f-91effce241038f11 4faae5f80e19a94c810185e9/drivers/misc/mediatek/ mach//dct/dct/codegen.dws,
needed by
/home/ pmos/build/srckernel_lenovo_tab2a710f-91effce2410 38f114faae5f80e19a94c810185e9/out/drivers/misc/ mediatek/mach///dct/dct/inc/cust_kpd.h. Stop.
Please Help
I am stuck in this part since 5 days. :crying:
kalwardin said:
Lenovo Tab 2 A7 10 F
and the kernel source is https://github.com/KalWardinX/kernel_lenovo_tab2a710f
I m trying to port postmarketos but while building kernel i am getting this error:
'No rule to make target /home/pmos/ build/src/kernel_lenovo_tab2a710f-91effce241038f11 4faae5f80e19a94c810185e9/drivers/misc/mediatek/ mach//dct/dct/codegen.dws,
needed by
/home/ pmos/build/srckernel_lenovo_tab2a710f-91effce2410 38f114faae5f80e19a94c810185e9/out/drivers/misc/ mediatek/mach///dct/dct/inc/cust_kpd.h. Stop.
Please Help
I am stuck in this part since 5 days. :crying:
Click to expand...
Click to collapse
Well the cpu is mtk with old 3.10 kernel version, i would suggest to use a prebuilt kernel as this problem is probably related to the used toolchain to compile so if you are porting a rom with the same android version of the stock rom this will be the best solution for you, if it's a newer version you will need to upstream the kernel and apply necessary patches for the target new android version and call the correct toolchain.
messi2050 said:
Well the cpu is mtk with old 3.10 kernel version, i would suggest to use a prebuilt kernel as this problem is probably related to the used toolchain to compile so if you are porting a rom with the same android version of the stock rom this will be the best solution for you, if it's a newer version you will need to upstream the kernel and apply necessary patches for the target new android version and call the correct toolchain.
Click to expand...
Click to collapse
Thanks
I will try that
I have been using Agni kernel as my phone was stuck with a headphone jack problem.
I have no option of using other kernels.
So, can someone tell me how to put headphone jack fix to other kernels.
Thank you.
Cherry-pick that hack from AGNi sources, build your kernel and done.
onliner said:
Cherry-pick that hack from AGNi sources, build your kernel and done.
Click to expand...
Click to collapse
I need guidance on how to setup environment and stuff. Can you link that tread to me.
DKYP said:
I need guidance on how to setup environment and stuff. Can you link that tread to me.
Click to expand...
Click to collapse
https://forum.xda-developers.com/an...erence-how-to-compile-android-kernel-t3627297