Mkimage use of the detailed

Source: Internet
Author: User

Uboot source Code tools/directory has mkimage tools, this tool can be used to create non-compression or compression of a variety of bootable image files.
Mkimage when making an image file, it is to precede the original executable image file with a 0x40 byte header, record the information specified by the parameter, so that Uboot can identify which CPU architecture the image is for, which OS, which type, which location to load in memory, Where the entry point is in memory and what the image name is

fprintf (stderr, "Usage:%s-l image\n"
"-L ==> list image header Information\n",
Params.cmdname);
fprintf (stderr, "%s [-X]-A arch-o os-t type-c Comp"
"-A addr-e ep-n name-d data_file[:d ata_file ...] Image\n "
"-A ==> set architecture to ' arch ' \ n '
"-O ==> Set operating system to ' OS ' \ n '
"-t ==> set Image type to ' type ' \ n"
"-C ==> set compression type ' comp ' \ n"
"-a ==> set load address to ' addr ' (hex) \ n"
"-e ==> Set entry point to ' EP ' (hex) \ n"
"-N ==> set image name to ' name ' \ n"
"-D ==> use image data from ' datafile ' \ n '
"-X ==> set XIP (execute in place) \ n",
Params.cmdname);
"[-D dtc_options]-F fit-image.its fit-image\n",
Params.cmdname);
"-V ==> print version information and exit\n",

[Email protected]:/tftpboot#./mkimage
Usage:./mkimage-l image
-L ==> List image header information
./mkimage-a arch-o os-t type-c comp-a addr-e ep-n name-d data_file[:d ata_file ...] image
-A ==> set architecture to ' arch '
-O ==> set operating system to ' OS '
-T ==> set Image type to ' type '
-C ==> Set compression type ' comp '
-a ==> set load address to ' addr ' (hex)
-e ==> set entry point to ' EP ' (hex)
-N ==> set image name to ' name '
-D ==> use image data from ' datafile '
-X ==> Set XIP (execute in place)
Parameter description:
-a specifies the architecture of the CPU:
Architecture for value representation
Alpha Alpha
Arm A RM
x86 Intel x86
IA64 IA64
MIPS MIPS
Mips64 MIPS-Bit
PPC PowerPC
s390 IBM S390
SH SuperH
SPARC SPARC
SPARC64 SPARC Bit
m68k MC68000
-o Specifies the operating system type, which can take the following values:
OpenBSD, NetBSD, FreeBSD, 4_4bsd, Linux, SVR4, Esix, Solaris, IRIX, SCO, Dell, NCR, LynxOS, VxWorks, PSOs, QNX, U-boot, Rtems, Artos
-t specifies the image type and can take the following values:
Standalone, kernel, RAMDisk, multi, firmware, script, filesystem
-c Specifies the image compression method, you can take the following values:
None No compression
Gzip compression method with gzip
Bzip2 compression method with bzip2
-a specifies the image to load the address in memory, when the image is downloaded into memory, the address value specified by this parameter is downloaded when the image is made with mkimage.
-e Specifies the address of the entry point for the image run, which is the value specified by the-a parameter plus 0x40 (because there is a header with a mkimage added 0x40 bytes in front)
-n Specifies the image name
-d Specifies the source file to make the image

Mkimage use of the detailed

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.