Can Someone Post a zImage Built from Source Please?

FloRider

Senior Member
Dec 2, 2012
358
111
And a ramdisk that works with it? I'm still having no luck booting my kernel built from source. I've tried using the ramdisk from the stock 4.0.4 ROM (although I don't have the version number available here). I can flash back and recover my system, but flashing my kernel always hangs the system at the first Lenovo logo. I just thought of something, though -- I think I've always been running mcl's ROM when I flashed. I bet that's the problem. I'd still like those files for testing though, if anyone has the time.

Thanks!
 
It shouldn't matter that you're running my ROM... it's basically stock with some minor modifications, and uses the stock boot.img.
 
It shouldn't matter that you're running my ROM... it's basically stock with some minor modifications, and uses the stock boot.img.

Yeah, I've sort of mixed & matched the boot.img's between stock & mcl ROM and it still worked... just not with my kernel.
 
Yeah, I've sort of mixed & matched the boot.img's between stock & mcl ROM and it still worked... just not with my kernel.

Because I can flash back to stock successfully, I can only think of three possibilities why my kernel doesn't work:
  1. The tab doesn't like the ramdisk I'm flashing with the kernel.
  2. My kernel is incompatible with the ROM I'm using.
  3. My kernel just is not compiling correctly.

Can anyone offer any help? I'd like to try flashing a kernel that I know works. I could also post my kernel if anyone is willing to try flashing it. If anyone has another suggestion, I'd love to hear it.

Thanks!
 
My kernel just is not compiling correctly.

So typically kernel compiles take a while and when it completes without errors it will tell you, have you done this? There should be some lines at the end of the compile the say something like zimage saved to ..... or zimage created at /boot/arm .....

I have to ask, have you looked at any general guides for compiling a linux kernel? The procedure is basically the same for all linux distros which inclueds Android. So you could look at a Debian Linux wiki or Gentoo and see how the kernel compile should go down and follow those steps.

My kernel is incompatible with the ROM I'm using.
There are only so many things you can change in menuconfig before you break your kernels compatibility.
I would just start with a clean original kernel source and see it it builds and works and then start to tweak things only after you get and original to compile, install and run.

The tab doesn't like the ramdisk I'm flashing with the kernel.
If you are using the original ram disk and only changing the kernel then this should not be a problem.

To accomplish your main goal of overclock you would need to figure out a few things.
1) Does the original kernel already have tegra3 cpu frequence control enabled or not? It may already be enabled and just not used.
2) Does the original kernel already have init.d support compiled in? If you do not know what that is, you need to find out because this is where things get changed before the desktop boots. I do not really know how the frequency for tegra3 is getting changed but even if you need to start a third party interface to make adjustments it probably will need this enabled.
 
Last edited:
So typically kernel compiles take a while and when it completes without errors it will tell you, have you done this? There should be some lines at the end of the compile the say something like zimage saved to ..... or zimage created at /boot/arm .....
I get quite a few warnings, but no errors. The kernel does compile; my zImage appears in /arch/arm/boot I think. Regardless, I do end up with a kernel...

I have to ask, have you looked at any general guides for compiling a linux kernel? The procedure is basically the same for all linux distros which inclueds Android. So you could look at a Debian Linux wiki or Gentoo and see how the kernel compile should go down and follow those steps.
I've looked at quite a few pages regarding compiling kernels. The main idea I've taken away is that the right libraries must be installed. I don't think I've missed anything; I've installed everything recommended to anything related to what I'm doing. I'm also using the right toolchain now, I believe: /prebuilt/linux-x86/toolchain/arm-eabi-4.4.3. gcc is found by adding "/bin/arm-eabi-" to the preceding string in the variable CROSS_COMPILE. I haven't installed any patches on the toolchain btw.

There are only so many things you can change in menuconfig before you break your kernels compatibility.
I would just start with a clean original kernel source and see it it builds and works and then start to tweak things only after you get and original to compile, install and run.

If you are using the original ram disk and only changing the kernel then this should not be a problem.
Ah, I must have given you the wrong impression. I'm using untouched source, without menuconfig.

To accomplish your main goal of overclock you would need to figure out a few things.
1) Does the original kernel already have tegra3 cpu frequence control enabled or not? It may already be enabled and just not used.
2) Does the original kernel already have init.d support compiled in? If you do not know what that is, you need to find out because this is where things get changed before the desktop boots. I do not really know how the frequency for tegra3 is getting changed but even if you need to start a third party interface to make adjustments it probably will need this enabled.

My goal right now is to get the original source compiled. After that, just changing a few governor defaults would be a victory :p.
 
Regardless, I do end up with a kernel..

Ok, this sounds good.

Ah, I must have given you the wrong impression. I'm using untouched source, without menuconfig.

Hmmm, every kernel I have ever built you need to run menuconfig to get a proper make file for your kernel. This is always the first step unless for some reason you have a pre-configured config file but you usually do not get that with the kernel source.

It looks like you can get a config file from the device, maybe you did this?

# Pull config.gz from /proc/ from the device

I just checked on the kernel source we have and it definitively does not have a proper config file and therefore you will not get a running kernel by just compiling it.

but flashing my kernel always hangs the system at the first Lenovo logo

This is where you would have the device plugged into your computer and issue the "adb shell dmesg" command and see exactly where the kernel is failing.
 
Last edited:
I just checked on the kernel source we have and it definitively does not have a proper config file and therefore you will not get a running kernel by just compiling it.

This is where you would have the device plugged into your computer and issue the "adb shell dmesg" command and see exactly where the kernel is failing.
Ah! I wish gmarkall would come over here. Omissions like that in the build instructions can't be corrected over at Lenovo. That's why we got this forum in the first place.

By the way, I'm happy to say that it's the most active Lenovo forum here and will soon have the highest post count (in Lenovo) in its very short life. Thanks again to Spider, who created this forum within seconds, I think, of my request. But I'll make an official post soon (forgive me -- I do feel a sort of parental pride :D), so we don't need to get off-topic here.

So, I assume I'll still need to do a make distclean to clean up from prior makes. Then
Code:
make tegra3_android_defconfig menuconfig
make
That's more or less how I've compiled the one other kernel I built. I'll try tonight; I think this time I might finally be successful. Thank you for all your help.
 
I skipped a step in my above make statements. Here is what I've been doing:
Code:
make distclean
make tegra3_android defconfig
make tegra3_android defconfig menuconfig
make
Still no luck. Not sure what to try next... except flashing a good zImage (compiled from source) to help isolate the problem. I expect it will work, as I can flash the stock kernel (from the ROM boot.img) and boot my tab, but it's worth a shot.
 
Last edited:
Code:

make tegra3_android_defconfig menuconfigmake

No, that is not going to work. That just drags in a generic tegra3 kernel config and is not what you want.

Did you grab the /system/proc/config.gz file from off the device? It has to be from the ics rom. You need this file decompressed and placed in your kernel src directory.

You have to modify a few files and call the kernel make command with a few parameters. I will get those back to you when I get a chance. I just did not want you banging your head against a wall again ;).

You may be able to get it sussed out by reading the readme file in the kernel src directory and also my typing "make help" in the kernel src directory. Basically you want to import the default config file from your running kernel and then save it as the default. There is also some problems with the default build directories as of now the default on my system is reaching out to my linux box kernel source (openSuse) and trying to build that kernel.
What distro are you running and is it in a vm or hardware? Please tell me the exact path to the lenovo kernel source on your system so I can give you a good example when I get back to it.
 
Code:

make tegra3_android_defconfig menuconfigmake

No, that is not going to work. That just drags in a generic tegra3 kernel config and is not what you want.

Did you grab the /system/proc/config.gz file from off the device? It has to be from the ics rom. You need this file decompressed and placed in your kernel src directory.

You have to modify a few files and call the kernel make command with a few parameters. I will get those back to you when I get a chance. I just did not want you banging your head against a wall again ;).

You may be able to get it sussed out by reading the readme file in the kernel src directory and also my typing "make help" in the kernel src directory. Basically you want to import the default config file from your running kernel and then save it as the default. There is also some problems with the default build directories as of now the default on my system is reaching out to my linux box kernel source (openSuse) and trying to build that kernel.
What distro are you running and is it in a vm or hardware? Please tell me the exact path to the lenovo kernel source on your system so I can give you a good example when I get back to it.

Ok, go easy on me. I've been using Linux for less than two months. I am running Linux Mint 14 -- "It combines the Linux 3.5 kernel, Ubuntu 12.10 base...". I'm using VMware Player to run Linux inside Windows. I've only pulled boot.img's from ROM zips -- nothing from my tablet. My toolchain variable is:
Code:
CROSS_COMPILE=/home/joshua/Development/prebuilt/linux-x86/toolchain/arm-eabi-4.4.3/bin/arm-eabi-
My kernel is located at:
Code:
/home/joshua/Development/kernels/A2109N_GPL_kernel_570

Thanks! My head really is sore now ;).

PS I am a little confused that when I click on home from the file manager, I end up in /joshua, but the CROSS_COMPILE variable seems to work with "/home/joshua/...", so I have to assume that's correct.
 
Last edited:
Nice Job, feels good I will bet.

Oh yeah. I'm a little disappointed about how much time I spent trying to accomplish something so basic, but I'm happy that in the end, I figured it out -- with a few hints from you ;).
 
hello, i have been having the same problems as you, can you specify how did u specify the config file pulled from /proc/ before issuing make?
 
Back
Top