Am trying to test some kernels am been building from source, but all the guides i have found have an specific line when merging the zImage and the Initramfs back together, i think they are phone specific, any kernel developer might share some help with it?
what is the command to put zImage and ramdisk together for our GS3(tmo)??
Related
Hello all. I was wondering whether it'd be possible to put a 2.6.27 kernel into a 2.1 rom so that it can be made faster for the time being.
For now, i can boot up the image using
fastboot boot zImage
but i want it to be the default kernel it boots not the .29 one. Whenever i try to flash the 2.6.27 kernel from recovery mode, the phone will refuse to start up. Is there any way around this?
Yes I have the 2.6.27 working on the 2.1 ROM. (With Brain **** Scheduler Patches)
How?
10char
Compile your 2.6.27 kernel, create the required libs. unpack boot.img mv zImage as your new kernel repack it and boot.
This post has helped me a lot!
http://forum.xda-developers.com/showthread.php?t=551711
what do you mean by create the required libs? I already have a zImage file.
And the wlan.ko (loadable module)?
Did you compile this with most of it static in the kernel?
i have that as a seperate file which i'll push to the system after i flash the kernel
Well then go ahead
What I have done so far:
1) setup cross compiling
2) downloaded the HTC-provided kernel source
3) wrote my own lkm & Makefile
4) grabbed .config from /proc/config.gz off the phone
The problem though is that the distributed HTC kernel is only the source and it doesn't have the compiled files used in the kernel module building processing. It also doesn't have the autoconf files are shown here in the make error:
" ERROR: Kernel configuration is invalid.
include/linux/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it."
So I am wondering, do I have to compile my own kernel in order to be able to compile modules or is there someway to make it work with the stock HTC kernel? Loadable modules are enabled in the stock kernel, but unless I am missing something I don't see how you can actually compile modules for it.
Thanks for any help, and I am very experienced with kernel development (on Intel) so feel free to provide any technical details.
I'm trying to configure but I don't know which Defconfig file is it. I know the folder configs containing a lots of defconfigs but don't know which one is for Epic touch.
Sent from my SPH-D710 using xda premium
No info help out there?
Sent from my SPH-D710 using xda premium
Thanks to Agat he responded like a true developer that he is and provided me with the info I needed. Case closed on this thread...
Sent from my SPH-D710 using xda premium
Hi
I am stuck with the same problem since the default "u1_na_spr_defconfig" is not working for me. Can you please point out the right config file, if possible? The issue I'm having is that the flashing the zImage image fails while flashing the stock zImage works fine.
Also, the size of the compiled zImage is around 4 MB while stock zImage is around 8 MB. I'm wondering about the cause of this disparity.
Thanks
Ashish
Compiled/Stock zImage size variations (SPH-D710 FL24)
Hi,
I'm trying to do a similar setup and got stuck with the kernel image compilation.
I have a SPH-D710 FL24 device and I'm trying to install a custom kernel on it. I downloaded the kuban kernel source (bitbucket.org/rujelus22/the-kuban-kernel) and compiled it on a 64-bit linux environment.
I followed the steps in build-kernel.sh (make u1_na_spr_defconfig followed by make)
Got this error "Error: bad instruction `save_and_disable_irqs_notrace r9 in arch/arm/mm/cache-v7.S" which I fixed by changing function name to "save_and_disable_irqs" (serverphorums.com/read.php?12,440193)
After this, the make went through and used the compiled zImage (4.0MB) to flash the firmware on my device and it went into a reboot loop. However, if I download the same zImage from the bitbucket source tree (4.8MB in size!) it flashes the firmware and comes up without any errors.
Are there any particular set of options or commands to be run? I'm not sure what options I might have missed because the size of the zImage compiled is much lesser than the one in the bitbucket source tree.
The following are the commands I used :
1. export CROSS_COMPILE=..../path..to../arm-eabi-4.4.3/bin/arm-eabi-
2. export ARCH=arm
3. export USE_SEC_FIPS_MODE=true
4. make u1_na_spr_defconfig
5. make -j16
Thanks a lot in advance!
Best
Siva
Hello fellow OGPers...
So I've been jumping from ROM to ROM for a solid few months now. Really enjoyed my time as an Android user and soaked in a lot. I've been learning (well... teaching myself) about Linux and other related things. But I've been busy with classes, a social life, and other commitments. Anyway let me cut to the chase. I really enjoyed it in 4.3 ROMs when I could use all the settings on the AOSP custom kernel for our device and among other things liked the experience of a custom kernel. It's about time we got one for 4.4.x Kitkat... right?
I am currently running Windows 7 (if specs are important I will post them) with a Linux Mint distro (both are 64-bit). I have downloaded the CM11.0 from github and a few toolchains. I haven't untared them yet or anything, but I have some. One is specialized for Cortex A-15, which I read our device's CPU is much alike to. Anyway I just wanted some help getting started with making a kernel is what it comes down to. I have basic Linux knowledge and that's about it. I just want to get a custom kernel out and then maybe in the future get a nice battery-optimized kernel out. I forgot to grab a kernel patch and I'll download it tomorrow probably. But I really don't know where to start at all. Do I need knowledge of anything or some more experience knowledge? If anybody can point me in a good direction that would be great. Everything is appreciated.
Oh and feel free to PM me answers as well if it's easier or more convenient for you.
Thanks guys!
This would be great as we need a kernel Dev ... Good luck on your journey !
2SHAYNEZ
If you only want to compile kernel,clone this repository.
git clone https://github.com/CyanogenMod/lge-kernel-gproj/tree/cm-11.0
make any change you want to do with the source.
Download android toolchain and extract it.
Compile the kernel sources with
export ARCH=arm CROSS_COMPILE=/path.to.toolchain/bin/arm-eabi- && make cyanogenmod_e980_defconfig && make -j#
(# is the number of your computer cores +1)
you will get zimage in /arch/arm/boot folder
Using boot.img(the kernel) from official CM build zip to get the ramdisk is easier
abootimg -x boot.img
you will see:
writing boot image config in bootimg.cfg
extracting kernel in zImage
extracting ramdisk in initrd.img
put the extracted initrd.img and bootimg.cfg to /arch/arm/boot(where your compiled zimage are)
run:
abootimg --create boot.img -f bootimg.cfg -k zImage -r initrd.img
You will get the boot.img!
This is the complete kernel!
Use any previous kernel zip, and replace the boot.img inside the zip with yours.
Flash it and test it.
My TWRP 2.8.0.0 or TWRP from freegee or Philz Touch will auto lokify the kernel.
Wing
Attached is the kernel.zip that i use.
Replace the your finished boot.img with it~~
Wing
BTW i am not programmer, but i am a very long time gentoo linux and archlinux user, long before android exist~
mukwing said:
If you only want to compile kernel,clone this repository.
git clone https://github.com/CyanogenMod/lge-kernel-gproj/tree/cm-11.0
make any change you want to do with the source.
Download android toolchain and extract it.
Compile the kernel sources with
export ARCH=arm CROSS_COMPILE=/path.to.toolchain/bin/arm-eabi- && make cyanogenmod_e980_defconfig && make -j#
(# is the number of your computer cores +1)
you will get zimage in /arch/arm/boot folder
Using boot.img(the kernel) from official CM build zip to get the ramdisk is easier
abootimg -x boot.img
you will see:
writing boot image config in bootimg.cfg
extracting kernel in zImage
extracting ramdisk in initrd.img
put the extracted initrd.img and bootimg.cfg to /arch/arm/boot(where your compiled zimage are)
run:
abootimg --create boot.img -f bootimg.cfg -k zImage -r initrd.img
You will get the boot.img!
This is the complete kernel!
Use any previous kernel zip, and replace the boot.img inside the zip with yours.
Flash it and test it.
My TWRP 2.8.0.0 or TWRP from freegee or Philz Touch will auto lokify the kernel.
Wing
Click to expand...
Click to collapse
Wow thank you so much... definitely going to give this a shot today! So I didn't have to download the 12 GB source... good to know.
Oh and one more thing. Is there any difference from building a CM11 kernel vs an AOSP 4.4.x kernel? I figured since most of our device's ROMs are CM based this would work fine... Thank you very much for the information at hand! Appreciated.
CM kernel is different from AOSP kernel from what i know.
CM kernel is base on CAF(which is optimized for msm chip) and AOSP kernel base on google original code.
They are a bit different so imcompatible from what i know.
Wing
When I compile there are loads of errors and eventually it stops (at different times each attempt...) anyway, the first thing I notice is this:
warning: (ARCH_MSM7X27 && ARCH_MSM8960 && ARCH_MSM8930 && ARCH_MSM8974) selects DONT_MAP_HOLE_AFTER_MEMBANK0 which has unmet direct dependencies (SPARSEMEM)
warning: (ARCH_MSM7X27 && ARCH_MSM8960 && ARCH_MSM8930 && ARCH_MSM8974) selects DONT_MAP_HOLE_AFTER_MEMBANK0 which has unmet direct dependencies (SPARSEMEM)
Is that anything I have to worry about? I can't find anything online about it. Thanks in advance.
First, is it unmodified cm kernel sources?
Make sure to use unmodified sources to test building first.
Somes errors can safely ignored.The msm8960 error can safty ignore. It has nothing to do with our device.
If it failed to build, try using option like -Xlint.
Sometimes, using older build of toolchain is easier to build, e.g.gcc4.7 or 4.8
Gcc 4.9 always failed to build e980 cm kernel.
mukwing said:
First, is it unmodified cm kernel sources?
Make sure to use unmodified sources to test building first.
Somes errors can safely ignored.The msm8960 error can safty ignore. It has nothing to do with our device.
If it failed to build, try using option like -Xlint.
Sometimes, using older build of toolchain is easier to build, e.g.gcc4.7 or 4.8
Gcc 4.9 always failed to build e980 cm kernel.
Click to expand...
Click to collapse
Ohhh okay. Yeah it's all unmodified and I've downloaded tons of "needed" packages (including most likely unnessesary ones too). I'm using a 4.9 GCC. That might be it. Okay thanks. I'll give another shot tomorrow when I have access to my VM.
Kernel has been successfully compiled. Check here for download and further discussion...
http://forum.xda-developers.com/optimus-g-pro/orig-development/kernel-e980-kernel-t2872514
Hello friends,
I wanted to start kernel developing for the N910F. So i wanted to start compiling the original samsung sources.
Please excuse me, I'm pretty new to android/linux development.
I managed to get the kernel compiling, which gives me an output folder with some GB of stuff and as i could point out a zImage-file, which is hopefully the compiled kernel
To get my kernel working, extracted a stock boot.img with umkbootimg, which gave me a warning, that i can't repack the boot.img without using a modified mkbootimg executable.
A mkbootimg is included in the sammy-source so i used this to pack my zImage together with the extracted initfs.gz, resulting in a boot.img.
Which I flashed ofc, but the reason why i opened this thread is the result of this
The kernel is obviously not booting, it shows for maybe 0.5s the sammy logo and directly starts into download mode.
I guess it has something todo, how i pack my kernel. because i didnt even manage to unpack the stock kernel and repack it and get it booting.
So where is my mistake? Do i miss something?
greez d4rk
Deleted - I notice I replied to an old thread