From bb246152ed9ba565d6e62300ab3f2a0cf4493b2f Mon Sep 17 00:00:00 2001 From: jakllsch Date: Tue, 1 Feb 2011 23:23:52 +0000 Subject: [PATCH] Use the command line U-Boot gave us for boothowto. From evbarm/gumstix. --- sys/arch/evbarm/marvell/marvell_machdep.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/arch/evbarm/marvell/marvell_machdep.c b/sys/arch/evbarm/marvell/marvell_machdep.c index 7a4606425826..3b63c32ce97e 100644 --- a/sys/arch/evbarm/marvell/marvell_machdep.c +++ b/sys/arch/evbarm/marvell/marvell_machdep.c @@ -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 -__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 @@ u_int cpu_reset_address = 0xffff0000; #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 @@ static const struct pmap_devmap marvell_devmap[] = { #undef _A #undef _S +extern uint32_t *u_boot_args[]; /* * u_int initarm(...) @@ -430,6 +432,9 @@ initarm(void *arg) #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 @@ initarm(void *arg) md_root_setconf(memory_disk, sizeof memory_disk); #endif + boot_args = bootargs; + parse_mi_bootargs(boot_args); + #ifdef BOOTHOWTO boothowto |= BOOTHOWTO; #endif