Little Kernel is the Boot Loader on the DragonBoard 410c for hardware initialization, reading the Linux kernel and ramdisk from the storage device and importing it into RAM, setting initialization registers and command line parameters for the Linux kernel and jumping to the Linux kernel for execution. . LK is based on an open source project.

If you need to understand this article, you need to have a basic understanding of the device tree. A device tree is a data structure used to describe hardware. It has a tree of nodes, each of which contains attributes and other nodes. This article only applies to Android developers.

Little Kernel Overview

Boot Loader for Android is Little Kernel

LK implements the following functions:

Hardware initialization: set vector table, MMU, cache, initialize peripheral modules, storage devices, USB, encryption, etc.

Import the boot.img file from the storage device

Support Flashing and recovery operations

Download and compile Little Kernel code

We can download the code as follows:

Clone code from LK's Git website

Git clone git://codeaurora.org/kernel/lk.git

Update code: git pull origin or git fetch orgin

Check the branch of a specific version: git checkout –b

Export PATH = $PATH: Binaries

Export TOOLCHAIN_PREFIX = arm-eabi-

Make msm8916 EMMC_BOOT = 1123123

Create a build-msm8916 file in Little Kernel:

Where the file compilation target is located in /lk/target

In the Android project, the compiler is located at /prebuild/gcc/linux-x86/arm/arm-toolchain/arm-eabi-4.7/bin/arm-eabi-

In addition, the build/object file includes: emmc_appsboot.mbn (image file) and LK, which includes all the symbols.

Declaration of the equipment tree

Device tree is a data structure that describes hardware

The device tree source code contains the following structure (dts file):

a simple tree structure with nodes and attributes

Attributes consist of key-value pairs, and nodes may contain child nodes and attributes at the same time.

The format of the dts file supports C and C++ style comments.

For the ARM architecture, the device tree source code can be found in the kernel/arch/arm/boot/dts/qcom folder.

Device Tress Blob(dtb):

The device tree compiler compiles the dts file into a binary target dtb file that can be recognized by the Linux Kernel.

The blob is added to the kernel image during compilation as follows.

Figure 1 DTB file and kernel relationship

The device tree header is as follows:

Struct dt_table{

Uint32_t magic;

Uint32_t version;

Uint32_t num_entries;

};

The device tree entry is as follows:

Struct dt_entry{

Uint32_t platform_id; → Platform ID/Chipset ID

Uint32_t variant_id; → Hardware variants (MTP, CDP, etc.)

Uint32_t board_hw_subtype; → DisTInguishes between subtypes like

Pmicvariants, fusion/standalone etc.

Uint32_t soc_rev;→ SOC revision

Uint32_t pmic_rev[4];→ PMIC revision

Uint32_t offset;

Uint32_t size;

};

Each device's DTS code adds qcom, msm-id/qcom, board-id/qcom, pmic-id entries, where:

Qcom, msm-id entry defines the MSM chipset, hardware version and optional manufacturer

Qcom, msm-id entry defines hardware parameters and subclass versions

Qcom, pmic-id entry defines a PMIC chip that supports a given MSM platform

LK uses the following information on the boot node to determine which device tree to use and pass it to the device tree in the kernel:

Qcom, msm-id = ;

Qcom,board-id =

Dash Cam Front and Back

Dash Cam Front And Back,2-Inch Front And Rear Dashcam,2 " Mini Dual Dashcams,Front Rear Dash Cam

SHENZHEN ROSOTO TECHNOLOGY CO., LTD. , https://www.rdtkdashcam.com