Please note that User Registration has been temporarily disabled due to a recent increase in automated registrations. If anyone needs an account, please request one here: RequestAccount. Thanks for your patience!

Difference between revisions of "Kernel Building"

From Openembedded.org
Jump to: navigation, search
(Kernel configuration)
(Kernel patches)
Line 15: Line 15:
  
 
To select which kernel version to build, edit config file ??? and set variable ??? to , for example, 2.6.35.
 
To select which kernel version to build, edit config file ??? and set variable ??? to , for example, 2.6.35.
 
== Kernel patches ==
 
 
Where to place the patch files and how to configure OE to apply them?
 
  
 
== Default configuration ==
 
== Default configuration ==

Revision as of 08:14, 21 October 2010

Contents

Default Build

For a default build, just run:

 bitbake virtual/kernel

After done, you can collect the built image from under the deploy folder, for example: build/tmp/deploy/glibc/images/vmware/bzImage-vmware.bin.


Kernel image type

What kind of kernel image to build is controlled by the variable KERNEL_IMAGETYPE. For example, build image for u-boot

 KERNEL_IMAGETYPE = "uImage"

Select kernel version

To select which kernel version to build, edit config file ??? and set variable ??? to , for example, 2.6.35.

Default configuration

The default .config file used is normally placed somewhere under recipes/linux named defconfig. You may want to search for it, say for vmware:

 find recipes/linux -name "vmware*"
 

And you find it in:

 recipes/linux/linux/vmware/defconfig

Apply custom patches

FIXME

Customize configuration

If you need to customize the kernel configuration, you may run the menuconfig task by:

 bitbake -c menuconfig virtual/kernel


Note: by default these command requires you to run in X Windows. If you want to work in text terminal only, here's a how to.

Compile

After that, you can compile the kernel by:

 bitbake -f -c compile virtual/kernel

Fine control

If you need more control over the configuration and compile process, you can go to the shell by:

 bitbake -c devshell virtual/kernel

The build environment will be well setup for you; you can run regular make commands like make bzImage ...etc

Preserving the custom configuration

Changes are lost if you remove the tmpdir or do a "bitbake -c clean virtual/kernel", so you may consider replacing the defconfig with it.

Personal tools
Namespaces

Variants
Actions
Navigation
Categories
OE services
Toolbox