CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: uwe Date: Wed May 22 00:02:47 UTC 2024 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 Log Message: mkubootimage.1: improve markup To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/mkubootimage/mkubootimage.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: uwe Date: Wed May 22 00:02:47 UTC 2024 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 Log Message: mkubootimage.1: improve markup To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/usr.bin/mkubootimage/mkubootimage.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/mkubootimage/mkubootimage.1 diff -u src/usr.bin/mkubootimage/mkubootimage.1:1.19 src/usr.bin/mkubootimage/mkubootimage.1:1.20 --- src/usr.bin/mkubootimage/mkubootimage.1:1.19 Tue May 21 23:31:21 2024 +++ src/usr.bin/mkubootimage/mkubootimage.1 Wed May 22 00:02:46 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkubootimage.1,v 1.19 2024/05/21 23:31:21 uwe Exp $ +.\" $NetBSD: mkubootimage.1,v 1.20 2024/05/22 00:02:46 uwe Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -35,18 +35,65 @@ .Nd create U-Boot loader image .Sh SYNOPSIS .Nm +. .Op Fl hu -.Fl A No ( arm Ns | Ns arm64 Ns | Ns i386 Ns | Ns mips Ns | Ns mips64 Ns | Ns or1k Ns | Ns powerpc Ns | Ns riscv Ns | Ns sh ) +. +.Fl A Po Xo +.Li arm Ns \||\| Ns +.Li arm64 Ns \||\| Ns +.Li i386Ns \||\| Ns +.Li mipsNs \||\| Ns +.Li mips64 Ns \||\| Ns +.Li or1kNs \||\| Ns +.Li powerpc Ns \||\| Ns +.Li riscv Ns \||\| Ns +.Li sh +.Xc Pc +. +.br .Fl a Ar address -.Op Fl C Po bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none Pc +. +.Oo Fl C Po Xo +.Li bz2 Ns \||\| Ns +.Li gz Ns \||\| Ns +.Li lzma Ns \||\| Ns +.Li lzo Ns \||\| Ns +.Li none +.Xc Pc Oc +. .Op Fl E Ar address +. .Op Fl e Ar address -.Op Fl f Po arm64 Ns | Ns uimg Pc +. +.Oo Fl f Po Xo +.Li arm64 Ns \||\| Ns +.Li uimg +.Xc Pc Oc +. .Op Fl m Ar magic -.Fl n Ar image -.Op Fl O Po freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd Pc -.Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns script Ns | Ns standalone ) +. +.Fl n Ar name +. +.br +.Oo Fl O Po Xo +.Li freebsd Ns \||\| Ns +.Li linux Ns \||\| Ns +.Li netbsd Ns \||\| Ns +.Li openbsd +.Xc Pc Oc +. +.br +.Fl T Po Xo +.Li fsNs \||\| Ns +.Li kernelNs \||\| Ns +.Li kernel_noload Ns \||\| Ns +.Li ramdisk Ns \||\| Ns +.Li scriptNs \||\| Ns +.Li standalone +.Xc Pc +. .Op Fl t Ar epoch +. .Ar source destination .\" .Sh DESCRIPTION @@ -56,23 +103,46 @@ utility is used to create an image for D .Qq Universal Boot Loader . .Pp The arguments are as follows: -.Bl -tag -width indent -.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 riscv Ns | Ns sh ) +.Bl -tag -width Fl +. +.It Fl A Po Xo +.Li arm Ns \||\| Ns +.Li arm64 Ns \||\| Ns +.Li i386Ns \||\| Ns +.Li mipsNs \||\| Ns +.Li mips64 Ns \||\| Ns +.Li or1kNs \||\| Ns +.Li powerpc Ns \||\| Ns +.Li riscv Ns \||\| Ns +.Li sh +.Xc Pc Defines the architecture. This is required for -.Qq uimg +.Ql uimg format images. +. .It Fl a Ar address Sets the image load address. This is an integer between 0 and .Dv UINT32_MAX . This is required for all -.Qq uimg -image types except for script, ramdisk, and kernel_noload. -.It Fl C No ( bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none ) +.Ql uimg +image types except for +.Li script , ramdisk , +and +.Li kernel_noload . +. +.It Fl C Po Xo +.Li bz2 Ns \||\| Ns +.Li gz Ns \||\| Ns +.Li lzma Ns \||\| Ns +.Li lzo Ns \||\| Ns +.Li none +.Xc Pc Defines the compression. The default is -.Qq none . +.Ql none . +. .It Fl E Ar address Define the entry point. This is an integer between 0 and @@ -88,6 +158,7 @@ or are not set, the entry point defaults to the image load address .Pq Fl a . +. .It Fl e Ar address Define the entry point. This is an integer between 0 and @@ -99,37 +170,61 @@ or are not set, the entry point defaults to the image load address .Pq Fl a . -.It Fl f No ( arm64 Ns | Ns uimg ) +. +.It Fl f Po Xo +.Li arm64 Ns \||\| Ns +.Li uimg +.Xc Pc Defines the output image format type. The default is -.Qq uimg . +.Ql uimg . +. .It Fl h Display the usage and exit. +. .It Fl m Ar magic Set the magic used for -.Qq uimg +.Ql uimg format images. This is an integer between 0 and .Dv UINT32_MAX . The default is -.Qq 0x27051956 . -.It Fl n Ar image +.Ql 0x27051956 . +. +.It Fl n Ar name Defines the image name. This is required. -.It Fl O No ( freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd ) +. +.It Fl O Po Xo +.Li freebsd Ns \||\| Ns +.Li linux Ns \||\| Ns +.Li netbsd Ns \||\| Ns +.Li openbsd +.Xc Pc Defines the operating system type. The default OS name is -.Qq netbsd . -.It Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns script Ns | Ns standalone ) +.Ql netbsd . +. +.It Fl T Po Xo +.Li fsNs \||\| Ns +.Li kernelNs \||\| Ns +.Li kernel_noload Ns \||\| Ns +.Li ramdisk Ns \||\| Ns +.Li scriptNs \||\| Ns +.Li standalone +.Xc Pc Defines the
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: uwe Date: Tue May 21 23:31:21 UTC 2024 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 Log Message: mkubootimage.1: restore .Ed lost in previous To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/mkubootimage/mkubootimage.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/mkubootimage/mkubootimage.1 diff -u src/usr.bin/mkubootimage/mkubootimage.1:1.18 src/usr.bin/mkubootimage/mkubootimage.1:1.19 --- src/usr.bin/mkubootimage/mkubootimage.1:1.18 Tue May 21 22:10:21 2024 +++ src/usr.bin/mkubootimage/mkubootimage.1 Tue May 21 23:31:21 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkubootimage.1,v 1.18 2024/05/21 22:10:21 gutteridge Exp $ +.\" $NetBSD: mkubootimage.1,v 1.19 2024/05/21 23:31:21 uwe Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -161,6 +161,7 @@ for example: comp:0 (none) name:NetBSD/armv7 boot header crc: 0x2164b567 +.Ed .\" .Sh FILES .Sh SEE ALSO .Qq Das U-Boot - the Universal Boot Loader
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: uwe Date: Tue May 21 23:31:21 UTC 2024 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 Log Message: mkubootimage.1: restore .Ed lost in previous To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/mkubootimage/mkubootimage.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: gutteridge Date: Tue May 21 22:10:21 UTC 2024 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 Log Message: mkubootimage(1): adjust example output in man page Refresh to show current output format (an additional field) and address a "TODO" comment that's been there for over a decade. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/mkubootimage/mkubootimage.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: gutteridge Date: Tue May 21 22:10:21 UTC 2024 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 Log Message: mkubootimage(1): adjust example output in man page Refresh to show current output format (an additional field) and address a "TODO" comment that's been there for over a decade. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/mkubootimage/mkubootimage.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/mkubootimage/mkubootimage.1 diff -u src/usr.bin/mkubootimage/mkubootimage.1:1.17 src/usr.bin/mkubootimage/mkubootimage.1:1.18 --- src/usr.bin/mkubootimage/mkubootimage.1:1.17 Tue May 21 04:01:26 2024 +++ src/usr.bin/mkubootimage/mkubootimage.1 Tue May 21 22:10:21 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkubootimage.1,v 1.17 2024/05/21 04:01:26 gutteridge Exp $ +.\" $NetBSD: mkubootimage.1,v 1.18 2024/05/21 22:10:21 gutteridge Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -148,20 +148,19 @@ generate a header, or create the image. Before the image is written, the header is displayed to standard out; for example: .Bd -literal -offset 0 + image type: uimg magic: 0x27051956 - time:Tue Jun 7 15:58:41 2011 - size:2482203 - load addr: 0x0002 - entry point: 0x0002 - data crc:0x700fdf53 + time:Tue May 21 18:05:09 2024 + size:137 + load addr: 0x + entry point: 0x + data crc:0xface05f2 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 + arch:2 (arm) + type:6 (script) + comp:0 (none) + name:NetBSD/armv7 boot + header crc: 0x2164b567 .\" .Sh FILES .Sh SEE ALSO .Qq Das U-Boot - the Universal Boot Loader
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: gutteridge Date: Tue May 21 04:01:26 UTC 2024 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 mkubootimage.c Log Message: mkubootimage(1): adjust usage, etc. In the tool, reflow and reorder usage() output and also consistently mark which arguments are optional. In the man page, add missing -t argument in the synopsis and follow consistent argument ordering. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/mkubootimage/mkubootimage.1 cvs rdiff -u -r1.32 -r1.33 src/usr.bin/mkubootimage/mkubootimage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/mkubootimage/mkubootimage.1 diff -u src/usr.bin/mkubootimage/mkubootimage.1:1.16 src/usr.bin/mkubootimage/mkubootimage.1:1.17 --- src/usr.bin/mkubootimage/mkubootimage.1:1.16 Tue May 21 03:54:31 2024 +++ src/usr.bin/mkubootimage/mkubootimage.1 Tue May 21 04:01:26 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkubootimage.1,v 1.16 2024/05/21 03:54:31 gutteridge Exp $ +.\" $NetBSD: mkubootimage.1,v 1.17 2024/05/21 04:01:26 gutteridge Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -46,6 +46,7 @@ .Fl n Ar image .Op Fl O Po freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd Pc .Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns script Ns | Ns standalone ) +.Op Fl t Ar epoch .Ar source destination .\" .Sh DESCRIPTION @@ -119,14 +120,14 @@ This is required. Defines the operating system type. The default OS name is .Qq netbsd . -.It Fl t Ar epoch -Use given epoch timestamp as image creation time. -(This is only used for legacy U-Boot images.) .It Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns script Ns | Ns standalone ) Defines the image type. This is required for .Qq uimg format images. +.It Fl t Ar epoch +Use given epoch timestamp as image creation time. +(This is only used for legacy U-Boot images.) .It Fl u Update the header in an existing file instead of creating a new one. .El Index: src/usr.bin/mkubootimage/mkubootimage.c diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.32 src/usr.bin/mkubootimage/mkubootimage.c:1.33 --- src/usr.bin/mkubootimage/mkubootimage.c:1.32 Tue May 21 03:54:31 2024 +++ src/usr.bin/mkubootimage/mkubootimage.c Tue May 21 04:01:26 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: mkubootimage.c,v 1.32 2024/05/21 03:54:31 gutteridge Exp $ */ +/* $NetBSD: mkubootimage.c,v 1.33 2024/05/21 04:01:26 gutteridge Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill @@ -30,7 +30,7 @@ #endif #include -__RCSID("$NetBSD: mkubootimage.c,v 1.32 2024/05/21 03:54:31 gutteridge Exp $"); +__RCSID("$NetBSD: mkubootimage.c,v 1.33 2024/05/21 04:01:26 gutteridge Exp $"); #include #include @@ -264,10 +264,10 @@ __dead static void usage(void) { fprintf(stderr, -"Usage: %s [-hu] -A -a address\n" -"\t-C [-E address] [-e address] [-t timestamp]\n" -"\t[-f ] [-m magic] -n image -O \n" -"\t-T \n" +"Usage: %s [-hu] -A \n" +"\t-a address [-C ] [-E address] [-e address] \n" +"\t[-f ] [-m magic] -n image [-O ]\n" +"\t-T [-t timestamp]\n" "\tsource destination\n", getprogname()); exit(EXIT_FAILURE);
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: gutteridge Date: Tue May 21 04:01:26 UTC 2024 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 mkubootimage.c Log Message: mkubootimage(1): adjust usage, etc. In the tool, reflow and reorder usage() output and also consistently mark which arguments are optional. In the man page, add missing -t argument in the synopsis and follow consistent argument ordering. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/usr.bin/mkubootimage/mkubootimage.1 cvs rdiff -u -r1.32 -r1.33 src/usr.bin/mkubootimage/mkubootimage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: gutteridge Date: Tue May 21 03:54:32 UTC 2024 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 mkubootimage.c uboot.h Log Message: mkubootimage(1): add riscv To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/mkubootimage/mkubootimage.1 cvs rdiff -u -r1.31 -r1.32 src/usr.bin/mkubootimage/mkubootimage.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/mkubootimage/uboot.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/mkubootimage/mkubootimage.1 diff -u src/usr.bin/mkubootimage/mkubootimage.1:1.15 src/usr.bin/mkubootimage/mkubootimage.1:1.16 --- src/usr.bin/mkubootimage/mkubootimage.1:1.15 Fri Feb 9 16:10:18 2024 +++ src/usr.bin/mkubootimage/mkubootimage.1 Tue May 21 03:54:31 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkubootimage.1,v 1.15 2024/02/09 16:10:18 christos Exp $ +.\" $NetBSD: mkubootimage.1,v 1.16 2024/05/21 03:54:31 gutteridge Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd February 7, 2024 +.Dd May 21, 2024 .Dt MKUBOOTIMAGE 1 .Os .Sh NAME @@ -36,7 +36,7 @@ .Sh SYNOPSIS .Nm .Op Fl hu -.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 ) +.Fl A No ( arm Ns | Ns arm64 Ns | Ns i386 Ns | Ns mips Ns | Ns mips64 Ns | Ns or1k Ns | Ns powerpc Ns | Ns riscv Ns | Ns sh ) .Fl a Ar address .Op Fl C Po bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none Pc .Op Fl E Ar address @@ -56,7 +56,7 @@ utility is used to create an image for D .Pp The arguments are as follows: .Bl -tag -width indent -.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 ) +.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 riscv Ns | Ns sh ) Defines the architecture. This is required for .Qq uimg Index: src/usr.bin/mkubootimage/mkubootimage.c diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.31 src/usr.bin/mkubootimage/mkubootimage.c:1.32 --- src/usr.bin/mkubootimage/mkubootimage.c:1.31 Fri Feb 9 16:10:18 2024 +++ src/usr.bin/mkubootimage/mkubootimage.c Tue May 21 03:54:31 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: mkubootimage.c,v 1.31 2024/02/09 16:10:18 christos Exp $ */ +/* $NetBSD: mkubootimage.c,v 1.32 2024/05/21 03:54:31 gutteridge Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill @@ -30,7 +30,7 @@ #endif #include -__RCSID("$NetBSD: mkubootimage.c,v 1.31 2024/02/09 16:10:18 christos Exp $"); +__RCSID("$NetBSD: mkubootimage.c,v 1.32 2024/05/21 03:54:31 gutteridge Exp $"); #include #include @@ -155,6 +155,7 @@ static const struct uboot_arch { { IH_ARCH_MIPS64, "mips64" }, { IH_ARCH_PPC, "powerpc" }, { IH_ARCH_OPENRISC, "or1k" }, + { IH_ARCH_RISCV, "riscv" }, { IH_ARCH_SH, "sh" }, }; @@ -263,7 +264,7 @@ __dead static void usage(void) { fprintf(stderr, -"Usage: %s [-hu] -A -a address\n" +"Usage: %s [-hu] -A -a address\n" "\t-C [-E address] [-e address] [-t timestamp]\n" "\t[-f ] [-m magic] -n image -O \n" "\t-T \n" Index: src/usr.bin/mkubootimage/uboot.h diff -u src/usr.bin/mkubootimage/uboot.h:1.8 src/usr.bin/mkubootimage/uboot.h:1.9 --- src/usr.bin/mkubootimage/uboot.h:1.8 Fri Sep 29 21:18:28 2017 +++ src/usr.bin/mkubootimage/uboot.h Tue May 21 03:54:31 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: uboot.h,v 1.8 2017/09/29 21:18:28 jmcneill Exp $ */ +/* $NetBSD: uboot.h,v 1.9 2024/05/21 03:54:31 gutteridge Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill @@ -45,7 +45,8 @@ enum uboot_image_arch { IH_ARCH_PPC = 7, IH_ARCH_SH = 9, IH_ARCH_OPENRISC = 21, - IH_ARCH_ARM64 = 22 + IH_ARCH_ARM64 = 22, + IH_ARCH_RISCV = 26 }; enum uboot_image_type {
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: gutteridge Date: Tue May 21 03:54:32 UTC 2024 Modified Files: src/usr.bin/mkubootimage: mkubootimage.1 mkubootimage.c uboot.h Log Message: mkubootimage(1): add riscv To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/usr.bin/mkubootimage/mkubootimage.1 cvs rdiff -u -r1.31 -r1.32 src/usr.bin/mkubootimage/mkubootimage.c cvs rdiff -u -r1.8 -r1.9 src/usr.bin/mkubootimage/uboot.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: christos Date: Fri Feb 9 16:10:18 UTC 2024 Modified Files: src/usr.bin/mkubootimage: crc32.c mkubootimage.1 mkubootimage.c Added Files: src/usr.bin/mkubootimage: crc32.h Log Message: PR/57914: Jan-Benedict Glaw: Set reproducible timestamp Cleanup lint. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/mkubootimage/crc32.c cvs rdiff -u -r0 -r1.1 src/usr.bin/mkubootimage/crc32.h cvs rdiff -u -r1.14 -r1.15 src/usr.bin/mkubootimage/mkubootimage.1 cvs rdiff -u -r1.30 -r1.31 src/usr.bin/mkubootimage/mkubootimage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/mkubootimage/crc32.c diff -u src/usr.bin/mkubootimage/crc32.c:1.4 src/usr.bin/mkubootimage/crc32.c:1.5 --- src/usr.bin/mkubootimage/crc32.c:1.4 Sat Dec 29 11:18:08 2012 +++ src/usr.bin/mkubootimage/crc32.c Fri Feb 9 11:10:18 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: crc32.c,v 1.4 2012/12/29 16:18:08 jmcneill Exp $ */ +/* $NetBSD: crc32.c,v 1.5 2024/02/09 16:10:18 christos Exp $ */ /*- * Copyright (c) 2002 Marcel Moolenaar @@ -33,14 +33,12 @@ #endif #include -__RCSID("$NetBSD: crc32.c,v 1.4 2012/12/29 16:18:08 jmcneill Exp $"); +__RCSID("$NetBSD: crc32.c,v 1.5 2024/02/09 16:10:18 christos Exp $"); #include #include #include - -uint32_t crc32(const void *, size_t); -uint32_t crc32v(const struct iovec *, int); +#include "crc32.h" static uint32_t crc32_tab[] = { 0x, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, @@ -99,6 +97,7 @@ crc32v(const struct iovec *iov, int cnt) for (i = 0; i < cnt; i++) { p = iov[i].iov_base; +/*###102 [lint] warning conversion from 'unsigned long' to 'int' may lose accuracy [132]%%%*/ len = iov[i].iov_len; while (len--) crc = crc32_tab[(crc ^ *p++) & 0xFF] ^ (crc >> 8); Index: src/usr.bin/mkubootimage/mkubootimage.1 diff -u src/usr.bin/mkubootimage/mkubootimage.1:1.14 src/usr.bin/mkubootimage/mkubootimage.1:1.15 --- src/usr.bin/mkubootimage/mkubootimage.1:1.14 Sat Dec 7 07:34:17 2019 +++ src/usr.bin/mkubootimage/mkubootimage.1 Fri Feb 9 11:10:18 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: mkubootimage.1,v 1.14 2019/12/07 12:34:17 wiz Exp $ +.\" $NetBSD: mkubootimage.1,v 1.15 2024/02/09 16:10:18 christos Exp $ .\" .\" Copyright (c) 2012 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 4, 2019 +.Dd February 7, 2024 .Dt MKUBOOTIMAGE 1 .Os .Sh NAME @@ -119,6 +119,9 @@ This is required. Defines the operating system type. The default OS name is .Qq netbsd . +.It Fl t Ar epoch +Use given epoch timestamp as image creation time. +(This is only used for legacy U-Boot images.) .It Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns script Ns | Ns standalone ) Defines the image type. This is required for Index: src/usr.bin/mkubootimage/mkubootimage.c diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.30 src/usr.bin/mkubootimage/mkubootimage.c:1.31 --- src/usr.bin/mkubootimage/mkubootimage.c:1.30 Sat Feb 8 08:27:00 2020 +++ src/usr.bin/mkubootimage/mkubootimage.c Fri Feb 9 11:10:18 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: mkubootimage.c,v 1.30 2020/02/08 13:27:00 ryo Exp $ */ +/* $NetBSD: mkubootimage.c,v 1.31 2024/02/09 16:10:18 christos Exp $ */ /*- * Copyright (c) 2010 Jared D. McNeill @@ -30,7 +30,7 @@ #endif #include -__RCSID("$NetBSD: mkubootimage.c,v 1.30 2020/02/08 13:27:00 ryo Exp $"); +__RCSID("$NetBSD: mkubootimage.c,v 1.31 2024/02/09 16:10:18 christos Exp $"); #include #include @@ -51,6 +51,7 @@ __RCSID("$NetBSD: mkubootimage.c,v 1.30 #include "uboot.h" #include "arm64.h" +#include "crc32.h" #ifndef __arraycount #define __arraycount(__x) (sizeof(__x) / sizeof(__x[0])) @@ -62,9 +63,6 @@ enum image_format { FMT_ARM64, /* Linux ARM64 image (booti) */ }; -extern uint32_t crc32(const void *, size_t); -extern uint32_t crc32v(const struct iovec *, int); - static enum uboot_image_os image_os = IH_OS_NETBSD; static enum uboot_image_arch image_arch = IH_ARCH_UNKNOWN; static enum uboot_image_type image_type = IH_TYPE_UNKNOWN; @@ -264,12 +262,12 @@ get_comp_name(enum uboot_image_comp comp __dead static void usage(void) { - fprintf(stderr, "usage: mkubootimage [-hu] -A " - " -a address\n"); - fprintf(stderr, "\t-C [-E address] [-e address]\n"); - fprintf(stderr, "\t[-f ] [-m magic] -n image -O \n"); - fprintf(stderr, "\t-T \n"); - fprintf(stderr, "\tsource destination\n"); + fprintf(stderr, +"Usage: %s [-hu] -A -a address\n" +"\t-C [-E address] [-e address] [-t timestamp]\n" +"\t[-f ] [-m magic] -n image -O \n" +"\t-T \n" +"\tsource destination\n", getprogname()); exit(EXIT_FAILURE); } @@ -298,7 +296,8 @@ dump_header_uimg(struct uboot_image_head } static int
CVS commit: src/usr.bin/mkubootimage
Module Name:src Committed By: christos Date: Fri Feb 9 16:10:18 UTC 2024 Modified Files: src/usr.bin/mkubootimage: crc32.c mkubootimage.1 mkubootimage.c Added Files: src/usr.bin/mkubootimage: crc32.h Log Message: PR/57914: Jan-Benedict Glaw: Set reproducible timestamp Cleanup lint. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.bin/mkubootimage/crc32.c cvs rdiff -u -r0 -r1.1 src/usr.bin/mkubootimage/crc32.h cvs rdiff -u -r1.14 -r1.15 src/usr.bin/mkubootimage/mkubootimage.1 cvs rdiff -u -r1.30 -r1.31 src/usr.bin/mkubootimage/mkubootimage.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/usr.bin/mkubootimage
Comments inline... Module Name: src Committed By: reed Date: Thu Nov 29 23:23:23 UTC 2012 Added Files: src/usr.bin/mkubootimage: mkubootimage.1 Log Message: Add a manual for mkubootimage(1). It was missing. It had one review on netbsd-docs@. I didn't add the manual to the Makefile nor distrib set yet -- waiting for more review or improvements first. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/usr.bin/mkubootimage/mkubootimage.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/usr.bin/mkubootimage/mkubootimage.1 diff -u /dev/null src/usr.bin/mkubootimage/mkubootimage.1:1.1 --- /dev/null Thu Nov 29 23:23:23 2012 +++ src/usr.bin/mkubootimage/mkubootimage.1 Thu Nov 29 23:23:22 2012 @@ -0,0 +1,162 @@ +.\ $NetBSD: mkubootimage.1,v 1.1 2012/11/29 23:23:22 reed Exp $ +.\ +.\ 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. +.\ +.Dd November 28, 2012 +.Dt MKUBOOTIMAGE 1 +.Os +.Sh NAME +.Nm mkubootimage +.Nd create U-Boot loader image +.Sh SYNOPSIS +.Nm +.Fl A No ( arm Ns | Ns mips Ns | Ns mips64 Ns | Ns powerpc ) +.Fl a Ar address +.Op Fl C No Po bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none Pc +.Op Fl E Ar address +.Op Fl e Ar address +.Op Fl h +.Op Fl m Ar magic +.Fl n Ar image +.Op Fl O No Po freebsd Ns | Ns linux Ns | Ns netbsd Ns | Ns openbsd Pc +.Fl T No ( fs Ns | Ns kernel Ns | Ns ramdisk Ns | Ns standalone ) +.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 +.It Fl A No ( arm Ns | Ns mips Ns | Ns mips64 Ns | Ns powerpc ) +Defines the architecture. +This is required. +.It Fl a Ar address +Sets the image load address. +This is an integer between 0 and ULONG_MAX. Maybe note where ULONG_MAX is defined or specify the value here and ULONG_MAX as defined in //X.h +This is required. +.It Fl C No ( bz2 Ns | Ns gz Ns | Ns lzma Ns | Ns lzo Ns | Ns none Ns ) +Defines the compression. +The default is +.Qq none . +.It Fl E Ar address +Define the entry point. +This is an integer between 0 and ULONG_MAX. +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. +This is an integer between 0 and ULONG_MAX. +If +.Fl E +or +.Fl e +are not set, the entry point defaults to the +image load address +.Pq Fl a . +.It Fl h +Display the usage and exit. +.It Fl m Ar magic +Set the magic. +This is an integer between 0 and ULONG_MAX. +The default is +.Qq 0x27051956. +.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 . +.It Fl T No ( fs Ns | Ns kernel Ns | Ns ramdisk Ns | Ns standalone ) +Defines the image type. +This is required. +.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. +.\ +.Sh RETURN VALUES +.Nm +returns 1 on failure to read the kernel, +generate a header, or