User manual
U-Boot for MPL SBC
User Manual
2003 by MPL AG
33
MEH-10082-002 Rev. D
High-Tech • Made in Switzerland
3.5.4 Creating bootable kernel images
This chapter explains how a kernel binary is converted into a u-boot image. If you are looking for information how to build
a kernel, refer to the kernel documentation.
The main purpose of u-boot is to load data into the memory and perform the appropriate action with this data. In case of
a kernel, the action is to write it to the specified Memory location passing parameters to it and execute it.
To distinguish different data types, actions etc. the tool mkimage exists.
3.5.4.1 U-Boot images
U-Boot images are created with the tool mkimage. This is a brief introduction of the tool mkimage, which is a part of the
u-boot project. The source of the u-boot is available at http://u-boot.sourceforge.net/. For in-deep information please refer
to the README/doc and source of the U-Boot.
The tool mkimage adds a header to the data containing the necessary information for the u-boot:
• Architecture:
In case of the MIP405 / PIP405 this is ppc in case of the VCMA9 this is arm.
• Operating system:
In case of Linux this is linux in case of a U-Boot update it is u-boot. Please refer to the source/README for more
Operating systems.
• Image Type:
Following Image types currently exists: standalone, kernel, ramdisk, multi, firmware and script.
• Compression:
none and gzip.
• Load address
• Entry point
• Image Name (max 32 characters)
To ensure that the data as well as the header information are complete an correct loaded, two CRC checksums are also
added: the header CRC32 checksum and the data CRC32 checksum.
3.5.4.2 Using mkimage
Invoking mkimage without a parameter displays a brief help:
Usage: tools/mkimage -l image
-l ==> list image header information
tools/mkimage -A arch -O os -T type -C comp -a addr -e ep -n name -d data_file[:data_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)
Invoking mkimage with the argument -l and an image file lists information about the image.
If you intend to build a linux kernel the parameters for the mkimage are already included in the Makefile. You have only
to make sure that the make knows where the mkimage is located:
ln -s <location where mkimage resides>/mkimage /usr/bin/mkimage
Provided that you are using the corresponding kernel sources the u-boot image will be created when issuing:
make uImage