Linux Embedded Drive Learning path ⑥u-boot boot kernel

Source: Internet
Author: User

The kernel boot is required for the necessary startup parameters. No boot automatically starts completely from 0 and requires Uboot to help the kernel achieve relocation and provide parameters.

First, Uboo reads the BOOTCMD environment variable from the kernel partition, which can be started automatically depending on the environment variable.

Partition:

There is a partition table on each hard disk. Because there is no partition table in Flash, the partition of Flash can only be defined in the source code, so it cannot be changed.

Mtdparts=nandflash0:[email protected]0(bootloader), 128k (params), 2m (kernel),-(Root)

Note: @0 indicates starting from 0.

Before starting, the kernel is read from Nandflash and put into memory. and Uimage = head + True kernel.

Head (64 bytes):

Ih_load: The load address, which is where the kernel run should be located.

IH_EP: The entry address, which is the entry address of the kernel.

It's very similar to Uboot. The load address of the uboot is Text_base, and the entry address is start. The _start in S.

Work done by Bootm:

1. Read the head

2. Move the kernel based on the head information

2. Boot the kernel.

At boot time, Uboot needs to tell the kernel some boot parameters. The parameter is set.

Jumps to the first piece of code in the kernel.

When you start the kernel, use the header's entry address as the function pointer (Thekernel) to start.

Setup_start_tag ()

Setup_memory_tag ()

Setup_commandline_tag ()

Setup_end_tag ()

  

Sd

Linux Embedded Drive Learning path ⑥u-boot boot kernel

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.