How to create an image uImage in linux uboot

Source: Internet
Author: User
Article Title: how to create an image uImage in linux uboot. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

In fact, the uboot boot image mainly adds a tag 0x40 before the original zImage to tell uboot about Kernel startup.

There are commands and rules in line 62 of arch/arm/boot/Makefile:

Quiet_pai_uimage = UIMAGE $ @

Export _uimage = $ (CONFIG_SHELL) $ (MKIMAGE)-A arm-O linux-T kernel \

-C none-a $ (ZRELADDR)-e $ (ZRELADDR )\

-N'linux-$ (KERNELRELEASE) '-d $

$ (Obj)/uImage: $ (obj)/zImage FORCE

$ (Call if_changed, uimage)

@ Echo 'image $ @ is ready'

In fact, the uboot boot image mainly adds a tag 0x40 before the original zImage to tell uboot about Kernel startup. The command for this rule is the definition of lines 63 to 65

-A: Specify the cpu architecture

-O specifies the Operating System

-T specifies the image type, such as standalone, kernel, ramdisk, multi, firmware, script, and filesystem.

-C specifies the image compression method, such as none (not compressed), gzip, and bzip2. UImage compression is not performed here

-A specifies the image loading address in the memory. When the image is downloaded to the memory, the image must be downloaded according to the address value specified by this parameter when the image is created using MKIMAGE.

-E specifies the image running entry point address, which is the value specified by-a plus 0x40 (because there is a MKIMAGE header with 0x40 bytes added)

-N indicates the image name.

-D specifies the source file for image creation.

In the preceding command, ZRELADDR is defined in 24 rows.

ZRELADDR: = $ (zreladdr-y) in row 17th has

Include $ (srctree)/$ (MACHINE)/Makefile. boot

In Makefile. boot

Zreladdr-y: = 0x30008000

So ZRELADDR: = 0x30008000

 

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.