MKUBOOTIMAGE(1)

MKUBOOTIMAGE(1) | General Commands Manual | MKUBOOTIMAGE(1)

# NAME

`mkubootimage` — create U-Boot loader image

# SYNOPSIS

`mkubootimage` | [`-hu`] `-A` (`arm`|`arm64`|`i386`|`mips`|`mips64`|`or1k`|`powerpc`|`riscv`|`sh`) `-a` address [`-C` (`bz2`|`gz`|`lzma`|`lzo`|`none`)] [`-E` address] [`-e` address] [`-f` (`arm64`|`uimg`)] [`-m` magic] `-n` name [`-O` (`freebsd`|`linux`|`netbsd`|`openbsd`)] `-T` (`fs`|`kernel`|`kernel_noload`|`ramdisk`|`script`|`standalone`) [`-t` epoch] source destination

# DESCRIPTION

The `mkubootimage` utility is used to create an image for Das U-Boot, the "Universal Boot Loader".

The arguments are as follows:

`-A` (`arm`|`arm64`|`i386`|`mips`|`mips64`|`or1k`|`powerpc`|`riscv`|`sh`)
  Defines the architecture. This is required for ‘`uimg`’ format images.
`-a` address
  Sets the image load address. This is an integer between 0 and `UINT32_MAX`. This is required for all ‘`uimg`’ image types except for `script`, `ramdisk`, and `kernel_noload`.
`-C` (`bz2`|`gz`|`lzma`|`lzo`|`none`)
  Defines the compression. The default is ‘`none`’.
`-E` address
  Define the entry point. This is an integer between 0 and `UINT32_MAX`. This option is the same as `-e` but it inverts the bytes to convert the 32 bit integer from little to big endian (or vice versa). If `-E` or `-e` are not set, the entry point defaults to the image load address (`-a`).
`-e` address
  Define the entry point. This is an integer between 0 and `UINT32_MAX`. If `-E` or `-e` are not set, the entry point defaults to the image load address (`-a`).
`-f` (`arm64`|`uimg`)
  Defines the output image format type. The default is ‘`uimg`’.
`-h`
  Display the usage and exit.
`-m` magic
  Set the magic used for ‘`uimg`’ format images. This is an integer between 0 and `UINT32_MAX`. The default is ‘`0x27051956`’.
`-n` name
  Defines the image name. This is required.
`-O` (`freebsd`|`linux`|`netbsd`|`openbsd`)
  Defines the operating system type. The default OS name is ‘`netbsd`’.
`-T` (`fs`|`kernel`|`kernel_noload`|`ramdisk`|`script`|`standalone`)
  Defines the image type. This is required for ‘`uimg`’ format images.
`-t` epoch
  Use given epoch timestamp as image creation time. (This is only used for legacy U-Boot images.)
`-u`
  Update the header in an existing file instead of creating a new one.

The required source argument is the filename of the kernel that is read. The required destination argument is the filename of the image file that is created.

# EXIT STATUS

`mkubootimage` returns 1 on failure to read the kernel, generate a header, or create the image.

# EXAMPLES

Before the image is written, the header is displayed to standard out; for example:

     image type:  uimg
     magic:       0x27051956
     time:        Tue May 21 18:05:09 2024
     size:        137
     load addr:   0x00000000
     entry point: 0x00000000
     data crc:    0xface05f2
     os:          2 (netbsd)
     arch:        2 (arm)
     type:        6 (script)
     comp:        0 (none)
     name:        NetBSD/armv7 boot
     header crc:  0x2164b567

# SEE ALSO

Das U-Boot – the Universal Boot Loader, http://www.denx.de/wiki/U-Boot/.

# HISTORY

The `mkubootimage` command first appeared in NetBSD 6.0.

# AUTHORS

The `mkubootimage` utility was originally written by Jared McNeill. This manual page was written by Jeremy C. Reed.

May 21, 2024 | NetBSD 11.0