1.\" $NetBSD: mkubootimage.1,v 1.5 2012/12/29 15:11:56 jmcneill Exp $ 2.\" 3.\" Copyright (c) 2012 The NetBSD Foundation, Inc. 4.\" All rights reserved. 5.\" 6.\" This code is derived from software contributed to The NetBSD Foundation 7.\" by Jeremy C. Reed 8.\" 9.\" Redistribution and use in source and binary forms, with or without 10.\" modification, are permitted provided that the following conditions 11.\" are met: 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 2. Redistributions in binary form must reproduce the above copyright 15.\" notice, this list of conditions and the following disclaimer in the 16.\" documentation and/or other materials provided with the distribution. 17.\" 18.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 19.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 20.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 21.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 22.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28.\" POSSIBILITY OF SUCH DAMAGE. 29.\" 30.Dd December 29, 2012 31.Dt MKUBOOTIMAGE 1 32.Os 33.Sh NAME 34.Nm mkubootimage 35.Nd create U-Boot loader image 36.Sh SYNOPSIS 37.Nm 38.Op Fl h 39.Fl A No ( arm Ns | Ns mips Ns | Ns mips64 Ns | Ns powerpc ) 40.Fl a Ar address 41.Op Fl C No Po bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none Pc 42.Op Fl E Ar address 43.Op Fl e Ar address 44.Op Fl m Ar magic 45.Fl n Ar image 46.Op Fl O No Po freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd Pc 47.Fl T No ( fs Ns | Ns kernel Ns | Ns ramdisk Ns | Ns standalone ) 48.Ar source destination 49.\" 50.Sh DESCRIPTION 51The 52.Nm 53utility is used to create an image for Das U-Boot, the 54.Qq Universal Boot Loader . 55.Pp 56The arguments are as follows: 57.Bl -tag -width indent 58.It Fl A No ( arm Ns | Ns mips Ns | Ns mips64 Ns | Ns powerpc ) 59Defines the architecture. 60This is required. 61.It Fl a Ar address 62Sets the image load address. 63This is an integer between 0 and 64.Dv UINT32_MAX . 65This is required. 66.It Fl C No ( bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none ) 67Defines the compression. 68The default is 69.Qq none . 70.It Fl E Ar address 71Define the entry point. 72This is an integer between 0 and 73.Dv UINT32_MAX . 74This option is the same as 75.Fl e 76but it inverts the bytes to convert the 32 bit integer 77from little to big endian (or vice versa). 78If 79.Fl E 80or 81.Fl e 82are not set, the entry point defaults to the 83image load address 84.Pq Fl a . 85.It Fl e Ar address 86Define the entry point. 87This is an integer between 0 and 88.Dv UINT32_MAX . 89If 90.Fl E 91or 92.Fl e 93are not set, the entry point defaults to the 94image load address 95.Pq Fl a . 96.It Fl h 97Display the usage and exit. 98.It Fl m Ar magic 99Set the magic. 100This is an integer between 0 and 101.Dv UINT32_MAX . 102The default is 103.Qq 0x27051956 . 104.It Fl n Ar image 105Defines the image name. 106This is required. 107.It Fl O No ( freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd ) 108Defines the operating system type. 109The default OS name is 110.Qq netbsd . 111.It Fl T No ( fs Ns | Ns kernel Ns | Ns ramdisk Ns | Ns standalone Ns | Ns script ) 112Defines the image type. 113This is required. 114.El 115.Pp 116The required 117.Ar source 118argument is the filename of the kernel that is read. 119The required 120.Ar destination 121argument is the filename of the image file that is created. 122.\" 123.Sh RETURN VALUES 124.Nm 125returns 1 on failure to read the kernel, 126generate a header, or create the image. 127.\" 128.Sh EXAMPLES 129Before the image is written, the header is displayed to standard out; 130for example: 131.Bd -literal -offset 0 132 magic: 0x27051956 133 time: Tue Jun 7 15:58:41 2011 134 size: 2482203 135 load addr: 0x00020000 136 entry point: 0x00020000 137 data crc: 0x700fdf53 138 os: 2 (netbsd) 139 arch: 7 (powerpc) 140 type: 2 (kernel) 141 comp: 1 (gz) 142 name: NetBSD/evbppc 5.99.52 (INSTALL_PMPPC) 143 header crc: 0x94ea96cf 144.Ed 145.\" TODO: check the name line above 146.\" .Sh FILES 147.Sh SEE ALSO 148.Qq Das U-Boot - the Universal Boot Loader 149.Pa http://www.denx.de/wiki/U-Boot/ 150.\" 151.\" .Sh STANDARDS 152.\" 153.Sh HISTORY 154The 155.Nm 156command first appeared in 157.Nx 6.0 . 158.\" 159.Sh AUTHORS 160The 161.Nm 162utility was originally written by Jared D. McNeill. 163This manual page was written by Jeremy C. Reed. 164.\" .Sh CAVEATS 165.\" .Sh BUGS 166.\" .Sh SECURITY CONSIDERATIONS 167