CVS commit: [netbsd-8] src/usr.bin/mkubootimage

2017-11-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Nov  6 09:52:15 UTC 2017

Modified Files:
src/usr.bin/mkubootimage [netbsd-8]: mkubootimage.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #347):
usr.bin/mkubootimage/mkubootimage.c: revision 1.22
add missing break after -m case


To generate a diff of this commit:
cvs rdiff -u -r1.18.8.2 -r1.18.8.3 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.c
diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.18.8.2 src/usr.bin/mkubootimage/mkubootimage.c:1.18.8.3
--- src/usr.bin/mkubootimage/mkubootimage.c:1.18.8.2	Tue Jul 25 02:00:33 2017
+++ src/usr.bin/mkubootimage/mkubootimage.c	Mon Nov  6 09:52:15 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: mkubootimage.c,v 1.18.8.2 2017/07/25 02:00:33 snj Exp $ */
+/* $NetBSD: mkubootimage.c,v 1.18.8.3 2017/11/06 09:52:15 snj Exp $ */
 
 /*-
  * Copyright (c) 2010 Jared D. McNeill 
@@ -30,7 +30,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: mkubootimage.c,v 1.18.8.2 2017/07/25 02:00:33 snj Exp $");
+__RCSID("$NetBSD: mkubootimage.c,v 1.18.8.3 2017/11/06 09:52:15 snj Exp $");
 
 #include 
 #include 
@@ -410,6 +410,7 @@ main(int argc, char *argv[])
 			(num == ULONG_MAX || num == 0)))
 errx(1, "illegal number -- %s", optarg);
 			image_magic = (uint32_t)num;
+			break;
 		case 'n':	/* name */
 			image_name = strdup(optarg);
 			break;



CVS commit: [netbsd-8] src/usr.bin/mkubootimage

2017-11-06 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Mon Nov  6 09:52:15 UTC 2017

Modified Files:
src/usr.bin/mkubootimage [netbsd-8]: mkubootimage.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #347):
usr.bin/mkubootimage/mkubootimage.c: revision 1.22
add missing break after -m case


To generate a diff of this commit:
cvs rdiff -u -r1.18.8.2 -r1.18.8.3 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: [netbsd-8] src/usr.bin/mkubootimage

2017-07-24 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jul 25 02:00:33 UTC 2017

Modified Files:
src/usr.bin/mkubootimage [netbsd-8]: mkubootimage.1 mkubootimage.c
uboot.h

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #142):
usr.bin/mkubootimage/mkubootimage.1: 1.9-1.10
usr.bin/mkubootimage/mkubootimage.c: 1.20
usr.bin/mkubootimage/uboot.h: 1.7
Add support for "kernel_noload" image types. This type is the same as the
"kernel" type, except it can run from any load address.
--
Remove unnecessary macros. Use standard headers.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.8.1 src/usr.bin/mkubootimage/mkubootimage.1
cvs rdiff -u -r1.18.8.1 -r1.18.8.2 src/usr.bin/mkubootimage/mkubootimage.c
cvs rdiff -u -r1.6 -r1.6.8.1 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.8 src/usr.bin/mkubootimage/mkubootimage.1:1.8.8.1
--- src/usr.bin/mkubootimage/mkubootimage.1:1.8	Tue Sep 30 10:30:35 2014
+++ src/usr.bin/mkubootimage/mkubootimage.1	Tue Jul 25 02:00:33 2017
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mkubootimage.1,v 1.8 2014/09/30 10:30:35 wiz Exp $
+.\"	$NetBSD: mkubootimage.1,v 1.8.8.1 2017/07/25 02:00:33 snj 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 September 30, 2014
+.Dd July 15, 2017
 .Dt MKUBOOTIMAGE 1
 .Os
 .Sh NAME
@@ -38,13 +38,13 @@
 .Op Fl h
 .Fl A No ( arm Ns | Ns arm64 Ns | Ns i386 Ns | Ns mips Ns | Ns mips64 Ns | Ns or1k 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 C 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 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 )
+.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 standalone )
 .Ar source destination
 .\"
 .Sh DESCRIPTION
@@ -62,7 +62,7 @@ This is required.
 Sets the image load address.
 This is an integer between 0 and
 .Dv UINT32_MAX .
-This is required.
+This is required for all 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 )
 Defines the compression.
 The default is
@@ -108,7 +108,7 @@ This is required.
 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 Ns | Ns script )
+.It Fl T No ( fs Ns | Ns kernel Ns | Ns kernel_noload Ns | Ns ramdisk Ns | Ns standalone Ns | Ns script )
 Defines the image type.
 This is required.
 .El
@@ -120,7 +120,7 @@ The required
 .Ar destination
 argument is the filename of the image file that is created.
 .\"
-.Sh RETURN VALUES
+.Sh EXIT STATUS
 .Nm
 returns 1 on failure to read the kernel,
 generate a header, or create the image.

Index: src/usr.bin/mkubootimage/mkubootimage.c
diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.18.8.1 src/usr.bin/mkubootimage/mkubootimage.c:1.18.8.2
--- src/usr.bin/mkubootimage/mkubootimage.c:1.18.8.1	Wed Jul  5 20:15:33 2017
+++ src/usr.bin/mkubootimage/mkubootimage.c	Tue Jul 25 02:00:33 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: mkubootimage.c,v 1.18.8.1 2017/07/05 20:15:33 snj Exp $ */
+/* $NetBSD: mkubootimage.c,v 1.18.8.2 2017/07/25 02:00:33 snj Exp $ */
 
 /*-
  * Copyright (c) 2010 Jared D. McNeill 
@@ -30,7 +30,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: mkubootimage.c,v 1.18.8.1 2017/07/05 20:15:33 snj Exp $");
+__RCSID("$NetBSD: mkubootimage.c,v 1.18.8.2 2017/07/25 02:00:33 snj Exp $");
 
 #include 
 #include 
@@ -144,11 +144,12 @@ static const struct uboot_type {
 	enum uboot_image_type type;
 	const char *name;
 } uboot_type[] = {
-	{ IH_TYPE_STANDALONE,	"standalone" },
-	{ IH_TYPE_KERNEL,	"kernel" },
-	{ IH_TYPE_RAMDISK,	"ramdisk" },
-	{ IH_TYPE_FILESYSTEM,	"fs" },
-	{ IH_TYPE_SCRIPT,	"script" },
+	{ IH_TYPE_STANDALONE,		"standalone" },
+	{ IH_TYPE_KERNEL,		"kernel" },
+	{ IH_TYPE_KERNEL_NOLOAD,	"kernel_noload" },
+	{ IH_TYPE_RAMDISK,		"ramdisk" },
+	{ IH_TYPE_FILESYSTEM,		"fs" },
+	{ IH_TYPE_SCRIPT,		"script" },
 };
 
 static enum uboot_image_type
@@ -221,7 +222,7 @@ usage(void)
 	"");
 	fprintf(stderr, " -C ");
 	fprintf(stderr, " -O ");
-	fprintf(stderr, " -T ");
+	fprintf(stderr, " -T ");
 	

CVS commit: [netbsd-8] src/usr.bin/mkubootimage

2017-07-24 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Tue Jul 25 02:00:33 UTC 2017

Modified Files:
src/usr.bin/mkubootimage [netbsd-8]: mkubootimage.1 mkubootimage.c
uboot.h

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #142):
usr.bin/mkubootimage/mkubootimage.1: 1.9-1.10
usr.bin/mkubootimage/mkubootimage.c: 1.20
usr.bin/mkubootimage/uboot.h: 1.7
Add support for "kernel_noload" image types. This type is the same as the
"kernel" type, except it can run from any load address.
--
Remove unnecessary macros. Use standard headers.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.8.8.1 src/usr.bin/mkubootimage/mkubootimage.1
cvs rdiff -u -r1.18.8.1 -r1.18.8.2 src/usr.bin/mkubootimage/mkubootimage.c
cvs rdiff -u -r1.6 -r1.6.8.1 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: [netbsd-8] src/usr.bin/mkubootimage

2017-07-05 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jul  5 20:15:33 UTC 2017

Modified Files:
src/usr.bin/mkubootimage [netbsd-8]: mkubootimage.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #96):
usr.bin/mkubootimage/mkubootimage.c: revision 1.19
Load address is not required for "ramdisk" images.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.8.1 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: [netbsd-8] src/usr.bin/mkubootimage

2017-07-05 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Wed Jul  5 20:15:33 UTC 2017

Modified Files:
src/usr.bin/mkubootimage [netbsd-8]: mkubootimage.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #96):
usr.bin/mkubootimage/mkubootimage.c: revision 1.19
Load address is not required for "ramdisk" images.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.18.8.1 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.c
diff -u src/usr.bin/mkubootimage/mkubootimage.c:1.18 src/usr.bin/mkubootimage/mkubootimage.c:1.18.8.1
--- src/usr.bin/mkubootimage/mkubootimage.c:1.18	Tue Sep 30 10:21:50 2014
+++ src/usr.bin/mkubootimage/mkubootimage.c	Wed Jul  5 20:15:33 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: mkubootimage.c,v 1.18 2014/09/30 10:21:50 msaitoh Exp $ */
+/* $NetBSD: mkubootimage.c,v 1.18.8.1 2017/07/05 20:15:33 snj Exp $ */
 
 /*-
  * Copyright (c) 2010 Jared D. McNeill 
@@ -30,7 +30,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: mkubootimage.c,v 1.18 2014/09/30 10:21:50 msaitoh Exp $");
+__RCSID("$NetBSD: mkubootimage.c,v 1.18.8.1 2017/07/05 20:15:33 snj Exp $");
 
 #include 
 #include 
@@ -429,7 +429,8 @@ main(int argc, char *argv[])
 
 	if (image_arch == IH_ARCH_UNKNOWN ||
 	image_type == IH_TYPE_UNKNOWN ||
-	(image_type != IH_TYPE_SCRIPT && image_loadaddr == 0) ||
+	(image_type != IH_TYPE_SCRIPT && image_type != IH_TYPE_RAMDISK &&
+	 image_loadaddr == 0) ||
 	image_name == NULL)
 		usage();