Port-arm archive

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

Re: args from uboot



Hi! adam,


From: Adam Hoka <adam.hoka%gmail.com@localhost>
Date: Thu, 7 Oct 2010 10:04:44 +0200


> Do we have code to access boot args from u-boot?
> If not, what needs to be done to support it?

Is it this that you wants?
I was able to obtain this with gumstix(Overo) and Marvell Sheevaplug.

 <snip>

NetBSD/evbarm (sheevaplug) booting ...
bootargs='console=ttyS0,115200 
mtdparts=nand_mtd:0x400000@0x100000(uImage),0x1fb00000@0x500000(rootfs) rw 
root=/dev/mtdblock1 rw 
ip=10.4.50.4:10.4.50.5:10.4.50.5:255.255.255.0:DB88FXX81:eth0:none'
Loaded initial symtab at 0xc0378ef8, strtab at 0xc03ae114, # entries 13514
pmap_postinit: Allocated 35 static L1 descriptor tables
Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,

 <snip>


This difference and marvell_start.S might be useful for you.
In addition, gumstix_machdep.c supports 'go' and 'bootm'.


Index: marvell_machdep.c
===================================================================
RCS file: /cvsroot/src/sys/arch/evbarm/marvell/marvell_machdep.c,v
retrieving revision 1.1
diff -u -r1.1 marvell_machdep.c
--- marvell_machdep.c   3 Oct 2010 06:03:10 -0000       1.1
+++ marvell_machdep.c   7 Oct 2010 09:30:00 -0000
@@ -291,6 +291,8 @@
        uint32_t target, attr, base, size;
        u_int l1pagetable;
        int loop, pt_index, cs, memtag = 0, iotag = 0, window;
+extern uint32_t *u_boot_args[];
+enum { r0 = 0, r1 = 1, r2 = 2, r3 = 3 }; /* args from u-boot */
 
        /* map some peripheral registers */
        pmap_devmap_bootstrap((vaddr_t)read_ttb(), marvell_devmap);
@@ -421,6 +423,7 @@
 #ifdef VERBOSE_INIT_ARM
        printf("initarm: Configuring system ...\n");
 #endif
+printf("bootargs='%s'\n", (char *)u_boot_args[r3]);
 
        bootconfig.dramblocks = 0;
        physical_end = physmem = 0;


Thanks,
--
kiyohara


Home | Main Index | Thread Index | Old Index