Kernel cross compilation:
Requirements: ubuntu 14.04 or 16.04 LTS
Required Packages: Install the below required packages to compile kernel.
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib build-essential chrpath socat libsdl1.2-dev xterm bc curl gcc git libssl-dev libncurses5-dev lzop make u-boot-tools
Before Kernel compilation make sure to run the arm cross Toolchain.
Kernel-Source: Download the kernel from the linux git
$ git clone https://github.com/torvalds/linux.git
$ cd linux
Kernel Compilation:follow the below steps to compile the kernel.
$ make your-board-default configs # to find the you board config arch/arm/configs
$ make -j4
Here “make -j4” means it will use your pc all Ram cores. j4 is useful to compile the kernel fast.
after successful compilation “zImage” is present in arch/arm/boot/
Device tree compilation:
$ make dtbs
After successfull compilation the device tree is present in arch/arm/boot/dts/your-board-name.dtb
Note: your-board-name.dts is source file of device tree and “your-board-name.dtb” is device tree binary.and “.dtsi” means include for for “.dts” file
Hope you got a good knowledge to compile kernel. share this to other friends to know and make them learn. comment for any modifications.
want to learn more www.yoctotutor.com