Module Name: src
Committed By: jakllsch
Date: Tue Feb 1 23:23:52 UTC 2011
Modified Files:
src/sys/arch/evbarm/marvell: marvell_machdep.c
Log Message:
Use the command line U-Boot gave us for boothowto. From evbarm/gumstix.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/marvell/marvell_machdep.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/arch/evbarm/marvell/marvell_machdep.c
diff -u src/sys/arch/evbarm/marvell/marvell_machdep.c:1.3 src/sys/arch/evbarm/marvell/marvell_machdep.c:1.4
--- src/sys/arch/evbarm/marvell/marvell_machdep.c:1.3 Tue Feb 1 22:54:24 2011
+++ src/sys/arch/evbarm/marvell/marvell_machdep.c Tue Feb 1 23:23:52 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: marvell_machdep.c,v 1.3 2011/02/01 22:54:24 jakllsch Exp $ */
+/* $NetBSD: marvell_machdep.c,v 1.4 2011/02/01 23:23:52 jakllsch Exp $ */
/*
* Copyright (c) 2007, 2008, 2010 KIYOHARA Takashi
* All rights reserved.
@@ -25,7 +25,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: marvell_machdep.c,v 1.3 2011/02/01 22:54:24 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: marvell_machdep.c,v 1.4 2011/02/01 23:23:52 jakllsch Exp $");
#include "opt_evbarm_boardtype.h"
#include "opt_ddb.h"
@@ -104,6 +104,7 @@
#endif
BootConfig bootconfig; /* Boot config storage */
+static char bootargs[MAX_BOOT_STRING];
char *boot_args = NULL;
vm_offset_t physical_start;
@@ -283,6 +284,7 @@
#undef _A
#undef _S
+extern uint32_t *u_boot_args[];
/*
* u_int initarm(...)
@@ -430,6 +432,9 @@
#define _BDSTR(s) #s
printf("\nNetBSD/evbarm (" BDSTR(EVBARM_BOARDTYPE) ") booting ...\n");
+ /* copy command line U-Boot gave us */
+ strncpy(bootargs, (char *)u_boot_args[3], sizeof(bootargs));
+
#ifdef VERBOSE_INIT_ARM
printf("initarm: Configuring system ...\n");
#endif
@@ -753,6 +758,9 @@
md_root_setconf(memory_disk, sizeof memory_disk);
#endif
+ boot_args = bootargs;
+ parse_mi_bootargs(boot_args);
+
#ifdef BOOTHOWTO
boothowto |= BOOTHOWTO;
#endif