Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/mkubootimage Change '-e' to optional. Use load addr...



details:   https://anonhg.NetBSD.org/src/rev/8da29fc1b4d2
branches:  trunk
changeset: 756267:8da29fc1b4d2
user:      kiyohara <kiyohara%NetBSD.org@localhost>
date:      Sat Jul 10 07:48:25 2010 +0000

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

diffstat:

 usr.bin/mkubootimage/mkubootimage.c |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (41 lines):

diff -r 7d4c153b0206 -r 8da29fc1b4d2 usr.bin/mkubootimage/mkubootimage.c
--- a/usr.bin/mkubootimage/mkubootimage.c       Sat Jul 10 04:09:35 2010 +0000
+++ b/usr.bin/mkubootimage/mkubootimage.c       Sat Jul 10 07:48:25 2010 +0000
@@ -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 <jmcneill%invisible.ca@localhost>
@@ -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();
 



Home | Main Index | Thread Index | Old Index