Can Someone Post a zImage Built from Source Please?

Discussion in 'Lenovo IdeaTab A2109' started by FloRider, Dec 12, 2012.

  1. FloRider

    FloRider Senior Member

    Joined:
    Dec 2, 2012
    Messages:
    358
    Likes Received:
    111
    Trophy Points:
    240
    Location:
    Florida
    Tablet / Device:
    Lenovo A2109
    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!
     
  2. mcl630

    mcl630 Senior Member

    Joined:
    Dec 3, 2012
    Messages:
    171
    Likes Received:
    125
    Trophy Points:
    132
    Location:
    Illinois, USA
    Tablet / Device:
    Lenovo IdeaTab A2109A, Archos A101IT
    It shouldn't matter that you're running my ROM... it's basically stock with some minor modifications, and uses the stock boot.img.
     
  3. FloRider

    FloRider Senior Member

    Joined:
    Dec 2, 2012
    Messages:
    358
    Likes Received:
    111
    Trophy Points:
    240
    Location:
    Florida
    Tablet / Device:
    Lenovo A2109
    Yeah, I've sort of mixed & matched the boot.img's between stock & mcl ROM and it still worked... just not with my kernel.
     
  4. FloRider

    FloRider Senior Member

    Joined:
    Dec 2, 2012
    Messages:
    358
    Likes Received:
    111
    Trophy Points:
    240
    Location:
    Florida
    Tablet / Device:
    Lenovo A2109
    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!
     
  5. anika200

    anika200 Member

    Joined:
    Dec 2, 2012
    Messages:
    54
    Likes Received:
    30
    Trophy Points:
    87
    Location:
    Maryland, US
    Tablet / Device:
    Lenovo A2109
    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.

    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.

    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: Dec 13, 2012
    • Like Like x 2
  6. FloRider

    FloRider Senior Member

    Joined:
    Dec 2, 2012
    Messages:
    358
    Likes Received:
    111
    Trophy Points:
    240
    Location:
    Florida
    Tablet / Device:
    Lenovo A2109
    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'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.

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

    My goal right now is to get the original source compiled. After that, just changing a few governor defaults would be a victory :p.
     
  7. anika200

    anika200 Member

    Joined:
    Dec 2, 2012
    Messages:
    54
    Likes Received:
    30
    Trophy Points:
    87
    Location:
    Maryland, US
    Tablet / Device:
    Lenovo A2109
    Ok, this sounds good.

    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?

    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.
     
    Last edited: Dec 13, 2012
    • Like Like x 2
  8. FloRider

    FloRider Senior Member

    Joined:
    Dec 2, 2012
    Messages:
    358
    Likes Received:
    111
    Trophy Points:
    240
    Location:
    Florida
    Tablet / Device:
    Lenovo A2109
    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.
     
  9. FloRider

    FloRider Senior Member

    Joined:
    Dec 2, 2012
    Messages:
    358
    Likes Received:
    111
    Trophy Points:
    240
    Location:
    Florida
    Tablet / Device:
    Lenovo A2109
    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: Dec 14, 2012
  10. anika200

    anika200 Member

    Joined:
    Dec 2, 2012
    Messages:
    54
    Likes Received:
    30
    Trophy Points:
    87
    Location:
    Maryland, US
    Tablet / Device:
    Lenovo A2109
    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.
     
    • Like Like x 2
  11. FloRider

    FloRider Senior Member

    Joined:
    Dec 2, 2012
    Messages:
    358
    Likes Received:
    111
    Trophy Points:
    240
    Location:
    Florida
    Tablet / Device:
    Lenovo A2109
    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: Dec 14, 2012
  12. FloRider

    FloRider Senior Member

    Joined:
    Dec 2, 2012
    Messages:
    358
    Likes Received:
    111
    Trophy Points:
    240
    Location:
    Florida
    Tablet / Device:
    Lenovo A2109
    Solved! Finally :D.
     
  13. anika200

    anika200 Member

    Joined:
    Dec 2, 2012
    Messages:
    54
    Likes Received:
    30
    Trophy Points:
    87
    Location:
    Maryland, US
    Tablet / Device:
    Lenovo A2109
    Nice Job, feels good I will bet.
     
  14. FloRider

    FloRider Senior Member

    Joined:
    Dec 2, 2012
    Messages:
    358
    Likes Received:
    111
    Trophy Points:
    240
    Location:
    Florida
    Tablet / Device:
    Lenovo A2109
    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 ;).
     
  15. ccdreadcc

    ccdreadcc Member

    Joined:
    Apr 26, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    60
    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?
     

Share This Page

Search tags for this page

zimag tablet