Building a kernel

sellers86

Well-known member
Jul 21, 2011
1,837
617
0
Visit site
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!
 
Last edited:

tvall

Well-known member
Nov 27, 2011
591
353
0
Visit site
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 [URL]http://opensource.lge.com[/URL]
 
Last edited:

Paul627g

AC Moderator All-Star
Moderator
Nov 25, 2010
15,963
2,752
0
Visit site
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.
 
  • Like
Reactions: sellers86

sellers86

Well-known member
Jul 21, 2011
1,837
617
0
Visit site
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 [URL]http://opensource.lge.com[/URL][/QUOTE]

Thanks. Where do I get linaro

Sent from my LG-VM670 using Tapatalk
 

tvall

Well-known member
Nov 27, 2011
591
353
0
Visit site

sellers86

Well-known member
Jul 21, 2011
1,837
617
0
Visit site
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?
 
Last edited:

thewraith420

Well-known member
Sep 6, 2011
1,987
223
63
Visit site
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 [URL]http://opensource.lge.com[/URL][/QUOTE]

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
 
  • Like
Reactions: sellers86

sellers86

Well-known member
Jul 21, 2011
1,837
617
0
Visit site
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
 

brotherswing

Well-known member
Feb 24, 2011
555
167
0
Visit site
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. :D 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.
 

anon(235100)

Well-known member
Mar 20, 2011
155
50
0
Visit site
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
 

EarthnFire78

YAY!!! ME :)
Jan 1, 2012
964
232
0
Visit site
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.
 

anon(235100)

Well-known member
Mar 20, 2011
155
50
0
Visit site
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
 

Trending Posts

Forum statistics

Threads
942,431
Messages
6,914,082
Members
3,158,413
Latest member
stark