Kernel Selection
Kernel keeps growing to support new hardware and devices. The developer should study the kernel very carefully to check the availability of specified features in the kernel. Basically, only kernel.org is the main site. But it is better to get kernels or kernel patches ported to specific platforms as following:
x86
ARM
PowerPC
MIPS
SuperH
M68K
Kernel Configuration
The kernel has many platform dependent configuration items. That means some items/options are only available for specific platforms. And some options may have different meaning or have dependency on other options. The developer must check the release note and support documents for detail. The developer can configurate his new kernel in many ways and generate corresponding .config file as result. These configuration methods (commands) are:
Build Kernel
To build / compile a kernel, we have three steps to complete: setup dependency of sources, build kernel image and build kernel modules. If we use ARM as sample project, we must use following commands:
Setup Dependency
$ make ARCH=arm CROSS_COMPILE=arm-linux- clean dep
Build Kernel Image
$ make ARCH=arm CROSS_COMPILE=arm-linux- zImage
Build Kernel Modules
$ make ARCH=arm CROSS_COMPILE=arm-linux- module
Then backup .config file, generated file and run
$ make ARCH=arm CROSS_COMPILE=arm-linux- disclean
Books
|