Kernel startup entry point / how Linux kernel boots

We will consider our hardware platform as ARM, so the kernel startup entry point code is at arch/arm/kernel/head.S This is normally called from the decompressor code. The requirementsare: MMU = off, D-cache = off, I-cache = dont care, r0 = 0,r1 = machine nr, r2 = atags or dtb pointer. This code is mostly position … Read more

How to cross compile static dtc for ARM

As we seen in our previous post, “How to Compile and Install device-tree-compiler (DTC) On Ubuntu”, we could compile DTC ( Device Tree Compiler ) for Host machine i.e. Ubuntu In this post, we will describe what changes are required to get the DTC compiled to execute on embedded targets such as ARM. Since executing … Read more

How to extract android boot.img

boot: The boot partition contains a kernel image and a RAM disk combined via mkbootimg. In order to flash the kernel directly without flashing a new boot partition, a virtual partition can be used: kernel: The virtual kernel partition overwrites only the kernel (zImage, zImage-dtb, Image.gz-dtb) by writing the new image over the old one. To do this, it determines … Read more

How to compile dts to dtb from Linux kernel and manually

Lets say, you have been trying to compile Linux kernel source code for Raspberry Pi following steps from “Cross Compilation and Booting of Linux kernel for Raspberry Pi3 – Manual Compilation” although most of the steps remains same in general for other ARM architectures as well , so just replace Raspberry Pi name with your … Read more

How to Compile and Install device-tree-compiler (DTC) On Ubuntu

If you want to install device-tree-compiler i.e. dtc command on ubuntu, use following command, $ sudo apt-get install device-tree-compiler This command will install two command “dtc” and “dtdiff” of which dtc is a device tree compiler whereas dtdiff helps to take diff between two device tree source files. The source code of DTC is available … Read more

How to resolve error : dtc: command not found

When trying to compile uboot on ubuntu, we seen the following error, OBJCOPY u-boot.srec OBJCOPY u-boot-nodtb.bin ./scripts/dtc-version.sh: line 17: dtc: command not found ./scripts/dtc-version.sh: line 18: dtc: command not found *** Your dtc is too old, please upgrade to dtc 1.4 or newer Makefile:1450: recipe for target ‘checkdtc’ failed make: *** [checkdtc] Error 1 From … Read more