Motorola Mobility Confidential Restricted.

build_boot_image command

Boot images are built using the build_boot_image command included in the development kit.

Usage

build_boot_image
  [--help]                               Display this help and exit.
  --boot_image <file>                    Save boot image in file.
  --debug_boot_image <file>              Save debug boot image in file.
  --rootdisk <file>                      Save rootdisk in file.
  [--non_secure_flash_boot_image <file>] Save non secure boot image in file.
  --kernel <file>                        Save NFS kernel in file.
  --config <file>                        Boot image configuration file listing IIPs.
  --source <path>                        Path to directory containing IIPs.
  --toolchain <path>                     Path to toolchain.
  [--info <name> <value>]                Set variable name=value in boot image build info.
  [--iip <iip>]                          Include IIP in boot image.
  [--architecture <arch>]                Architecture to build boot image for in format
                                          <processor>_<hw_comp> (e.g. st40_vip19x3).
  [--processor <processor>]              Processor (i.e. name of toolchain) to build boot image for
                                          (e.g. st40, bcm74xx). Or specify --architecture.
  [--hw_comp <hw_comp>]                  Hardware variant (i.e. STB model) to build boot image for
                                          (e.g. vip19x3). Or specify --architecture.
  [--goldenimage]                        Build a golden image.
Various
Parameter Description
--architecture Name of target architecture, for instance st40_vip19x3, which is used for the Motorola VIP19X3 series. If this parameter is not set, the parameters 'processor' and 'hw_comp' must be specified.
--processor Name of target processor. Is equivalent to name of toolchain. Valid values are st40 which is used for a Motorola box using ST chipset, bcm74xx which is used for a Motorola box using Broadcom chipset.
--hw_comp Name of hardware variant.
--toolchain Path to the KreaTV toolchain.
--goldenimage Build a golden image.
Boot image input files/directories
Parameter Description
--source Directories in which build_boot_image can find IIPs. Subdirectories will also be searched. It is possible to specify multiple sources.
--iip IP-STB Installation Package. A more convenient way to specify packages is to use a configuration file instead.
--config Configuration file containing IIP names and parameters. Blank lines and lines with '#' in the beginning (comments) are ignored. It is also possible to pass information values (see the --info parameter) through the configuration file. A comment line containing $<name>:<value> would be the equivalent of passing "--info <name> <value>" to build_boot_image.
Boot image targets - at least one is mandatory
Parameter Description
--boot_image Boot image name.
--debug_boot_image Debug boot image name. A debug boot image prints information to the screen while the Motorola IP-STB is booting.
--rootdisk Rootdisk name. A rootdisk is usually only used together with a NFS kernel to NFS boot the Motorola IP-STB.
--kernel NFS kernel name. An NFS kernel is usually only used together with a rootdisk to NFS boot the Motorola IP-STB.
Boot image information
Parameter Description
--info Information about the boot image. All items are added to the Information Service using the names config.build.<name>.

It is also possible to pass information values using a configuration file, see the --config parameter.

The following items are quaranteed to have a value (set by build_boot_image, but possible to override):

  • branch (empty string as default)
  • date
  • host
  • time
  • user
  • version (empty string as default)

The following items are recommended to set:

  • company (name of the company building the boot image)
  • configuration (filename of the configuration file used)

Boot image config syntax

Below is a description of all valid boot image config syntax constructs. Note that adding a parameter to an IIP that does not have this documented will result in a build error.

# This is a comment. Empty lines and comments are ignored.

# Below is a comment that is the equivalent of passing.
# "--info <name> <value>" to build_boot_image.
# $<name>:<value>$

# Basic format without and with parameters.
iip-name
iip-name:param1=value1,param2=value2

# Include other configs (the two "" are optional).
@include "/absolute/path/to/config"
@include "../relative/this/config"

# Extra directory to search for IIPs, in addition to the ones given to
# build_boot_image with --source. May be given several times.
@search "/external/vendor/latest"

# Instead of writing "iip-name:param1=value1,param2=value2" on a single line,
# it can be split into two lines using "::" instead of ":" the second time.
# The result is that the parameters are concatenated.
iip-name:param1=value1
iip-name::param2=value2

# Remove an IIP by placing a "-" before the IIP name.
-iip-name

# Break long lines with backslash. Spaces before the backslash and at the start
# of the next line are ignored.
iip-name:long-parameter-name=with-a-long-parameter-value- \
  that-continues-on-the-next-line

# Environment variables are expanded in IIP parameters and path to include file.
iip-name:user=%USER%
@include "%HOME%/config"

# Environment variables are also expanded in the architecture list. This can be
# used to e.g. conditionally include an IIP based on the environment.
iip-name(%ARCHITECTURE%)

# A specific IIP can be include by using an absolute path.
/external/vendor/iip-name.iip:parameters

# All of the above constructs can be specified for only one or several
# architecture(s) using the syntax (arch1,arch2,...). See examples below.

# Include IIP only for VIP19x3.
iip-name(vip19x3)

# Add an extra parameter for VIP19x3.
iip-name(vip19x3)::param=value

# Include IIP for all platforms but VIP19x3.
iip-name
-iip-name(vip19x3)

Example - simple configuration

The example below will build a boot image for a Motorola VIP19x3 with a few applications and options. The following simple configuration is used:

  • The webkit portal application started.
  • Use English standard PC keyboard keymap.
  • Support for Multicasted streams.
  • Central European Time zone.

The following configuration file (<config>) is used:

#
#
# $configuration:example$
#

# Applications
kreatv-app-webkit-portal::cache=0
kreatv-app-webkit-portal::ntp_wait_limit=5
kreatv-app-webkit-portal::startinfront

# Keyboard mapping
kreatv-option-kreatvinput-keymaps:pc-en

# Stream clients
kreatv-option-streamclients:basic

# Time zone
kreatv-option-tz:CET-1CEST-2,M3.5.0/02:00:00,M10.5.0/03:00:00

The example assumes that the development kit is installed in <dk>. <toolchain> contains the toolchain path. The following command will then build the boot image:

build_boot_image \
    --toolchain <path> \
    --source <dk> \
    --boot_image ip-stb-bi-example.bin \
    --architecture st40_vip19x3 \
    --config <config> \
    --info version 4.4.test

More boot-image config file examples and complete scripts that build boot images for Motorola IP-STBs can be found in the build_scripts directory of your KreaTV SDK.