2018-02-04 18:44:51 +03:00
|
|
|
.\" $NetBSD: mkubootimage.1,v 1.12 2018/02/04 15:44:51 jmcneill Exp $
|
2012-11-30 03:23:22 +04:00
|
|
|
.\"
|
|
|
|
.\" Copyright (c) 2012 The NetBSD Foundation, Inc.
|
|
|
|
.\" All rights reserved.
|
|
|
|
.\"
|
|
|
|
.\" This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
.\" by Jeremy C. Reed
|
|
|
|
.\"
|
|
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
|
|
.\" modification, are permitted provided that the following conditions
|
|
|
|
.\" are met:
|
|
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
|
|
.\"
|
|
|
|
.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
.\" POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
.\"
|
2018-02-04 18:44:51 +03:00
|
|
|
.Dd February 4, 2018
|
2012-11-30 03:23:22 +04:00
|
|
|
.Dt MKUBOOTIMAGE 1
|
|
|
|
.Os
|
|
|
|
.Sh NAME
|
|
|
|
.Nm mkubootimage
|
|
|
|
.Nd create U-Boot loader image
|
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm
|
2012-11-30 12:25:35 +04:00
|
|
|
.Op Fl h
|
2017-09-30 00:18:28 +03:00
|
|
|
.Fl A No ( arm Ns | Ns arm64 Ns | Ns i386 Ns | Ns mips Ns | Ns mips64 Ns | Ns or1k Ns | Ns powerpc Ns | Ns sh )
|
2012-11-30 03:23:22 +04:00
|
|
|
.Fl a Ar address
|
2017-07-15 15:10:31 +03:00
|
|
|
.Op Fl C Po bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none Pc
|
2012-11-30 03:23:22 +04:00
|
|
|
.Op Fl E Ar address
|
|
|
|
.Op Fl e Ar address
|
2018-02-04 18:44:51 +03:00
|
|
|
.Op Fl f Po arm64 Ns | Ns uimg Pc
|
2012-11-30 03:23:22 +04:00
|
|
|
.Op Fl m Ar magic
|
|
|
|
.Fl n Ar image
|
2017-07-15 15:10:31 +03:00
|
|
|
.Op Fl O Po freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd Pc
|
2017-07-15 14:13:08 +03:00
|
|
|
.Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns standalone )
|
2012-11-30 03:23:22 +04:00
|
|
|
.Ar source destination
|
|
|
|
.\"
|
|
|
|
.Sh DESCRIPTION
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
utility is used to create an image for Das U-Boot, the
|
|
|
|
.Qq Universal Boot Loader .
|
|
|
|
.Pp
|
|
|
|
The arguments are as follows:
|
|
|
|
.Bl -tag -width indent
|
2017-09-30 00:18:28 +03:00
|
|
|
.It Fl A No ( arm Ns | Ns arm64 Ns | Ns i386 Ns | Ns mips Ns | Ns mips64 Ns | Ns or1k Ns | Ns powerpc Ns | Ns sh )
|
2012-11-30 03:23:22 +04:00
|
|
|
Defines the architecture.
|
2018-02-04 18:44:51 +03:00
|
|
|
This is required for
|
|
|
|
.Qq uimg
|
|
|
|
format images.
|
2012-11-30 03:23:22 +04:00
|
|
|
.It Fl a Ar address
|
|
|
|
Sets the image load address.
|
2012-12-01 12:16:25 +04:00
|
|
|
This is an integer between 0 and
|
|
|
|
.Dv UINT32_MAX .
|
2018-02-04 18:44:51 +03:00
|
|
|
This is required for all
|
|
|
|
.Qq uimg
|
|
|
|
image types except for script, ramdisk, and kernel_noload.
|
2012-11-30 12:25:35 +04:00
|
|
|
.It Fl C No ( bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none )
|
2012-11-30 03:23:22 +04:00
|
|
|
Defines the compression.
|
|
|
|
The default is
|
|
|
|
.Qq none .
|
|
|
|
.It Fl E Ar address
|
|
|
|
Define the entry point.
|
2012-12-01 12:16:25 +04:00
|
|
|
This is an integer between 0 and
|
|
|
|
.Dv UINT32_MAX .
|
2012-11-30 03:23:22 +04:00
|
|
|
This option is the same as
|
|
|
|
.Fl e
|
|
|
|
but it inverts the bytes to convert the 32 bit integer
|
|
|
|
from little to big endian (or vice versa).
|
|
|
|
If
|
|
|
|
.Fl E
|
|
|
|
or
|
|
|
|
.Fl e
|
|
|
|
are not set, the entry point defaults to the
|
|
|
|
image load address
|
|
|
|
.Pq Fl a .
|
|
|
|
.It Fl e Ar address
|
|
|
|
Define the entry point.
|
2012-12-01 12:16:25 +04:00
|
|
|
This is an integer between 0 and
|
|
|
|
.Dv UINT32_MAX .
|
2012-11-30 03:23:22 +04:00
|
|
|
If
|
|
|
|
.Fl E
|
|
|
|
or
|
|
|
|
.Fl e
|
|
|
|
are not set, the entry point defaults to the
|
|
|
|
image load address
|
|
|
|
.Pq Fl a .
|
2018-02-04 18:44:51 +03:00
|
|
|
.It Fl f No ( arm64 Ns | Ns uimg )
|
|
|
|
Defines the output image format type.
|
|
|
|
The default is
|
|
|
|
.Qq uimg .
|
2012-11-30 03:23:22 +04:00
|
|
|
.It Fl h
|
|
|
|
Display the usage and exit.
|
|
|
|
.It Fl m Ar magic
|
2018-02-04 18:44:51 +03:00
|
|
|
Set the magic used for
|
|
|
|
.Qq uimg
|
|
|
|
format images.
|
2012-12-01 12:16:25 +04:00
|
|
|
This is an integer between 0 and
|
|
|
|
.Dv UINT32_MAX .
|
2012-11-30 03:23:22 +04:00
|
|
|
The default is
|
2012-11-30 12:25:35 +04:00
|
|
|
.Qq 0x27051956 .
|
2012-11-30 03:23:22 +04:00
|
|
|
.It Fl n Ar image
|
|
|
|
Defines the image name.
|
|
|
|
This is required.
|
|
|
|
.It Fl O No ( freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd )
|
|
|
|
Defines the operating system type.
|
|
|
|
The default OS name is
|
|
|
|
.Qq netbsd .
|
2017-07-15 14:13:08 +03:00
|
|
|
.It Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns standalone Ns | Ns script )
|
2012-11-30 03:23:22 +04:00
|
|
|
Defines the image type.
|
2018-02-04 18:44:51 +03:00
|
|
|
This is required for
|
|
|
|
.Qq uimg
|
|
|
|
format images.
|
2012-11-30 03:23:22 +04:00
|
|
|
.El
|
|
|
|
.Pp
|
|
|
|
The required
|
|
|
|
.Ar source
|
|
|
|
argument is the filename of the kernel that is read.
|
|
|
|
The required
|
|
|
|
.Ar destination
|
|
|
|
argument is the filename of the image file that is created.
|
|
|
|
.\"
|
2017-07-15 15:10:31 +03:00
|
|
|
.Sh EXIT STATUS
|
2012-11-30 03:23:22 +04:00
|
|
|
.Nm
|
|
|
|
returns 1 on failure to read the kernel,
|
|
|
|
generate a header, or create the image.
|
|
|
|
.\"
|
|
|
|
.Sh EXAMPLES
|
|
|
|
Before the image is written, the header is displayed to standard out;
|
|
|
|
for example:
|
|
|
|
.Bd -literal -offset 0
|
|
|
|
magic: 0x27051956
|
|
|
|
time: Tue Jun 7 15:58:41 2011
|
|
|
|
size: 2482203
|
|
|
|
load addr: 0x00020000
|
|
|
|
entry point: 0x00020000
|
|
|
|
data crc: 0x700fdf53
|
|
|
|
os: 2 (netbsd)
|
|
|
|
arch: 7 (powerpc)
|
|
|
|
type: 2 (kernel)
|
|
|
|
comp: 1 (gz)
|
|
|
|
name: NetBSD/evbppc 5.99.52 (INSTALL_PMPPC)
|
|
|
|
header crc: 0x94ea96cf
|
|
|
|
.Ed
|
|
|
|
.\" TODO: check the name line above
|
|
|
|
.\" .Sh FILES
|
|
|
|
.Sh SEE ALSO
|
|
|
|
.Qq Das U-Boot - the Universal Boot Loader
|
|
|
|
.Pa http://www.denx.de/wiki/U-Boot/
|
|
|
|
.\"
|
|
|
|
.\" .Sh STANDARDS
|
|
|
|
.\"
|
|
|
|
.Sh HISTORY
|
|
|
|
The
|
|
|
|
.Nm
|
|
|
|
command first appeared in
|
|
|
|
.Nx 6.0 .
|
|
|
|
.\"
|
|
|
|
.Sh AUTHORS
|
2014-09-30 14:30:35 +04:00
|
|
|
.An -nosplit
|
2012-11-30 03:23:22 +04:00
|
|
|
The
|
|
|
|
.Nm
|
2014-09-30 14:30:35 +04:00
|
|
|
utility was originally written by
|
2018-02-04 18:44:51 +03:00
|
|
|
.An Jared McNeill .
|
2014-09-30 14:30:35 +04:00
|
|
|
This manual page was written by
|
|
|
|
.An Jeremy C. Reed .
|
2012-11-30 03:23:22 +04:00
|
|
|
.\" .Sh CAVEATS
|
|
|
|
.\" .Sh BUGS
|
|
|
|
.\" .Sh SECURITY CONSIDERATIONS
|