06-30-2012 01:50 PM
36 12
tools
  1. sellers86's Avatar
    I haven't been able to find a decent guide on this, and I'd like to try it out. So how would I go about building a kernel from lgs, bobs, etc source?

    Any help would be appreciated

    INSTRUCTIONS BY TVALL:
    To compile a kernel you need:
    - A Linux box
    - a toolchain (use one from an android repo, or use linaro)
    - the kernel source

    To get the source and build:
    [CODE]$ git clone https://github.com/tvall43/android_kernel_thunderc.git
    $ cd android_kernel_thunderc
    (Get a toolchain if you don't already have one)
    $ ARCH=arm CROSS_COMPILE=<path to toolchain>/bin/arm-eabi- (or for linaro, arm-linux-gnueabi-) make -j4

    Change the address you are cloning from to the one you want. Or for lg's, go to http://opensource.lge.com

    thanks so much tvall!
    05-06-2012 12:09 PM
  2. tvall's Avatar
    Good guides for this are kinda hard to find. I'm going to write a guide to build my rom and kernel on my xda thread, but I'm not good at that so it'll probably be pathetic.

    To compile a kernel you need:
    - A Linux box
    - a toolchain (use one from an android repo, or use linaro)
    - the kernel source

    To get the source and build:
    [CODE]$ git clone https://github.com/tvall43/android_kernel_thunderc.git
    $ cd android_kernel_thunderc
    (Get a toolchain if you don't already have one)
    $ ARCH=arm CROSS_COMPILE=<path to toolchain>/bin/arm-eabi- (or for linaro, arm-linux-gnueabi-) make -j4

    Change the address you are cloning from to the one you want. Or for lg's, go to http://opensource.lge.com
    sellers86 and thewraith420 like this.
    05-06-2012 12:40 PM
  3. Paul627g's Avatar
    Another good recommendation would be to find some of the better kernel builders and see if they hang out on IRC chat channels and pop in and see what is going down. Maybe ask if they have any guides to refer out.
    sellers86 likes this.
    05-06-2012 12:59 PM
  4. sellers86's Avatar
    Good guides for this are kinda hard to find. I'm going to write a guide to build my rom and kernel on my xda thread, but I'm not good at that so it'll probably be pathetic.

    To compile a kernel you need:
    - A Linux box
    - a toolchain (use one from an android repo, or use linaro)
    - the kernel source

    To get the source and build:
    [CODE]$ git clone https://github.com/tvall43/android_kernel_thunderc.git
    $ cd android_kernel_thunderc
    (Get a toolchain if you don't already have one)
    $ ARCH=arm CROSS_COMPILE=<path to toolchain>/bin/arm-eabi- (or for linaro, arm-linux-gnueabi-) make -j4

    Change the address you are cloning from to the one you want. Or for lg's, go to http://opensource.lge.com
    Thanks. Where do I get linaro

    Sent from my LG-VM670 using Tapatalk
    05-06-2012 01:05 PM
  5. tvall's Avatar
    Thanks. Where do I get linaro

    Sent from my LG-VM670 using Tapatalk
    To quote a pm from mrg666:

    You can find the binary dowload at the bottom of the page in the following link
    http://www.linaro.org/downloads/1204
    The direct download link is
    https://launchpad.net/linaro-toolcha..._linux.tar.bz2
    sellers86 and brotherswing like this.
    05-06-2012 01:07 PM
  6. sellers86's Avatar
    To quote a pm from mrg666:
    alright thanks man
    05-06-2012 03:41 PM
  7. sellers86's Avatar
    Another good recommendation would be to find some of the better kernel builders and see if they hang out on IRC chat channels and pop in and see what is going down. Maybe ask if they have any guides to refer out.
    No offense to you or any moderators at all, but arent you guys the ones that recommend publicly posting everything to benefit the community as a whole?
    05-06-2012 03:42 PM
  8. thewraith420's Avatar
    Good guides for this are kinda hard to find. I'm going to write a guide to build my rom and kernel on my xda thread, but I'm not good at that so it'll probably be pathetic.

    To compile a kernel you need:
    - A Linux box
    - a toolchain (use one from an android repo, or use linaro)
    - the kernel source

    To get the source and build:
    [CODE]$ git clone https://github.com/tvall43/android_kernel_thunderc.git
    $ cd android_kernel_thunderc
    (Get a toolchain if you don't already have one)
    $ ARCH=arm CROSS_COMPILE=<path to toolchain>/bin/arm-eabi- (or for linaro, arm-linux-gnueabi-) make -j4

    Change the address you are cloning from to the one you want. Or for lg's, go to http://opensource.lge.com
    Thanks! I just got my first kernel to start compiling after reading this. I did have to edit one line in the makefile to point it at my newly downloaded toolchain

    Sent from my LG-VM670 using Tapatalk 2
    sellers86 likes this.
    05-06-2012 07:14 PM
  9. sellers86's Avatar
    Thanks! I just got my first kernel to start compiling after reading this. I did have to edit one line in the makefile to point it at my newly downloaded toolchain

    Sent from my LG-VM670 using Tapatalk 2
    What line did you edit? I cant find it
    05-06-2012 10:36 PM
  10. thewraith420's Avatar
    What line did you edit? I cant find it
    CROSS_COMPILE after cloning tvall git It was pointing at his home cm9 toolchain which I obviously didn't have. Use search/find for cm9 in the file and you should pick it up.

    Sent from my LG-VM670 using Tapatalk 2
    05-07-2012 01:08 AM
  11. sellers86's Avatar
    CROSS_COMPILE after cloning tvall git It was pointing at his home cm9 toolchain which I obviously didn't have. Use search/find for cm9 in the file and you should pick it up.

    Sent from my LG-VM670 using Tapatalk 2
    Didn't clone tvalls got lol. He got me past what I did wrong though. But I'm getting other errors. Ill try again sometime this week, or maybe ill try a different toolchain.

    Sent from my LG-VM670 using Tapatalk
    05-07-2012 01:18 AM
  12. anthonycr's Avatar
    I thought this was a pretty decent guide done by Jerry H.

    http://forums.androidcentral.com/htc...ge-source.html

    Sent from my LG-VM670 using Tapatalk 2
    05-07-2012 09:23 AM
  13. brotherswing's Avatar
    For the record, even though I haven't cooked a custom kernel in years, Slackware is awesome for development like that. Almost everything you need is always installed by default, making compiling your source a snap. Like, almost obscenely easy. I haven't dabbled with deving for Android, but I did for Linux in the late '90's and early 2000's. These days, I just make eye candy.
    05-07-2012 12:59 PM
  14. sellers86's Avatar
    bump. this could help some. instructions are in the second post. ill add them to the OP sometime, im lazy also
    topdawg661 likes this.
    06-24-2012 05:45 PM
  15. anon(235100)'s Avatar
    isn't this missing a step??

    scripts/kconfig/conf -s arch/arm/Kconfig
    ***
    *** You have not yet configured your kernel!
    *** (missing kernel config file ".config")
    ***
    *** Please run some configurator (e.g. "make oldconfig" or
    *** "make menuconfig" or "make xconfig").
    ***
    make[2]: *** [silentoldconfig] Error 1
    make[1]: *** [silentoldconfig] Error 2
    make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
    make: *** Waiting for unfinished jobs....
    CHK include/linux/version.h
    06-28-2012 07:00 PM
  16. EarthnFire78's Avatar
    isn't this missing a step??

    scripts/kconfig/conf -s arch/arm/Kconfig
    ***
    *** You have not yet configured your kernel!
    *** (missing kernel config file ".config")
    ***
    *** Please run some configurator (e.g. "make oldconfig" or
    *** "make menuconfig" or "make xconfig").
    ***
    make[2]: *** [silentoldconfig] Error 1
    make[1]: *** [silentoldconfig] Error 2
    make: *** No rule to make target `include/config/auto.conf', needed by `include/config/kernel.release'. Stop.
    make: *** Waiting for unfinished jobs....
    CHK include/linux/version.h
    Just run "make menuconfig and save, it well be saved has .config which is used to tell make files what the kernel is the have.
    06-28-2012 07:29 PM
  17. sellers86's Avatar
    You can also cp the default config

    Sent from my VM670 using Tapatalk
    06-28-2012 08:06 PM
  18. sammyz's Avatar
    You can also cp the default config

    Sent from my VM670 using Tapatalk
    Why is the .config that works right not included in the repos? ???

    Sent from my Optimus M
    06-28-2012 10:20 PM
  19. sellers86's Avatar
    Why is the .config that works right not included in the repos? ???

    Sent from my Optimus M
    idk. if your compiling bobz kernel, it would look something like this

    cp arch/arm/configs/chaos_defconfig .config
    06-28-2012 10:45 PM
  20. anon(235100)'s Avatar
    Why is the .config that works right not included in the repos? ???

    Sent from my Optimus M
    in mrg666's repo you can find it in \arch\arm\configs\vm670_config
    in tvall's repo I think they can be found in arch\arm\configs\ though I don't know which one would be for an Optimus M. May be wise just to pull the one from your phone
    06-28-2012 10:48 PM
  21. sammyz's Avatar
    in mrg666's repo you can find it in \arch\arm\configs\vm670_config
    in tvall's repo I think they can be found in arch\arm\configs\ though I don't know which one would be for an Optimus M. May be wise just to pull the one from your phone
    No cause I want the default values for the optimus v, you can't take values from a whole different kernel and expect it to work.....well anyways, now I have an OV....before I got the values by flashing V kernels to my OM and then pulling the .config and then nand restoring......
    06-28-2012 10:52 PM
  22. anon(235100)'s Avatar
    Just run "make menuconfig and save, it well be saved has .config which is used to tell make files what the kernel is the have.
    Is there any particular place where I should have the config file to reference when I do a make menuconfig? I've had it work about twice but most times it doesn't and I get this error.
    here's how I have it:
    \home\user\repos\.config
    \home\user\repos\android_kernel_thunderc\

    I cd into the android_kernel_thunderc folder and do a make menuconfig
    I load the \home\user\repos\.config and save, it asks to create a backup which it does
    then back in terminal I run
    ARCH=arm CROSS_COMPILE=/home/user/android-toolchain-eabi/bin/arm-linux-androideabi- make -j4

    but still get the error msg. there's something inconsistent with the command I'm missing.
    06-28-2012 10:52 PM
  23. sellers86's Avatar
    Is there any particular place where I should have the config file to reference when I do a make menuconfig? I've had it work about twice but most times it doesn't and I get this error.
    here's how I have it:
    \home\user\repos\.config
    \home\user\repos\android_kernel_thunderc\

    I cd into the android_kernel_thunderc folder and do a make menuconfig
    I load the \home\user\repos\.config and save, it asks to create a backup which it does
    then back in terminal I run
    ARCH=arm CROSS_COMPILE=/home/user/android-toolchain-eabi/bin/arm-linux-gnueabi- make -j4

    but still get the error msg. there's something inconsistent with the command I'm missing.
    whos kernel are you building?
    06-28-2012 10:54 PM
  24. sammyz's Avatar
    Is there any particular place where I should have the config file to reference when I do a make menuconfig? I've had it work about twice but most times it doesn't and I get this error.
    here's how I have it:
    \home\user\repos\.config
    \home\user\repos\android_kernel_thunderc\

    I cd into the android_kernel_thunderc folder and do a make menuconfig
    I load the \home\user\repos\.config and save, it asks to create a backup which it does
    then back in terminal I run
    ARCH=arm CROSS_COMPILE=/home/user/android-toolchain-eabi/bin/arm-linux-gnueabi- make -j4

    but still get the error msg. there's something inconsistent with the command I'm missing.
    what's the error say?
    06-28-2012 10:55 PM
  25. sellers86's Avatar
    what's the error say?
    my guess is the missing .config error. he needs to cp the correct config to get it to work correctly. ive never had luck with make menuconfig.
    06-28-2012 10:57 PM
36 12
LINK TO POST COPIED TO CLIPBOARD