Module Name:    src
Committed By:   kiyohara
Date:           Sat Jul 10 07:48:25 UTC 2010

Modified Files:
        src/usr.bin/mkubootimage: mkubootimage.c

Log Message:
Change '-e' to optional.  Use load addr(-a), if '-e' not specify.
Just like u-boot's mkimage.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 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.3 src/usr.bin/mkubootimage/mkubootimage.c:1.4
--- src/usr.bin/mkubootimage/mkubootimage.c:1.3	Fri Jul  9 11:36:42 2010
+++ src/usr.bin/mkubootimage/mkubootimage.c	Sat Jul 10 07:48:25 2010
@@ -1,4 +1,4 @@
-/* $NetBSD: mkubootimage.c,v 1.3 2010/07/09 11:36:42 kiyohara Exp $ */
+/* $NetBSD: mkubootimage.c,v 1.4 2010/07/10 07:48:25 kiyohara Exp $ */
 
 /*-
  * Copyright (c) 2010 Jared D. McNeill <jmcne...@invisible.ca>
@@ -30,7 +30,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: mkubootimage.c,v 1.3 2010/07/09 11:36:42 kiyohara Exp $");
+__RCSID("$NetBSD: mkubootimage.c,v 1.4 2010/07/10 07:48:25 kiyohara Exp $");
 
 #include <sys/mman.h>
 #include <sys/stat.h>
@@ -131,7 +131,7 @@
 	fprintf(stderr, "usage: mkubootimage -A <arm|powerpc>");
 	fprintf(stderr, " -T <kernel|ramdisk|fs>");
 	fprintf(stderr, " -C <none|gz|bz2>");
-	fprintf(stderr, " -a <addr> -e <ep> -n <name>");
+	fprintf(stderr, " -a <addr> [-e <ep>] -n <name>");
 	fprintf(stderr, " <srcfile> <dstfile>\n");
 
 	exit(EXIT_FAILURE);
@@ -278,10 +278,12 @@
 	if (argc != 2)
 		usage();
 
+	if (image_entrypoint == 0)
+		image_entrypoint = image_loadaddr;
+
 	if (image_arch == IH_ARCH_UNKNOWN ||
 	    image_type == IH_TYPE_UNKNOWN ||
 	    image_loadaddr == 0 ||
-	    image_entrypoint == 0 ||
 	    image_name == NULL)
 		usage();
 

Reply via email to