summaryrefslogtreecommitdiffstats
path: root/board/BuR
diff options
context:
space:
mode:
authorHannes Petermaier <oe5hpm@oevsv.at>2015-09-29 08:43:33 +0200
committerTom Rini <trini@konsulko.com>2015-11-12 13:17:27 -0500
commit91931f7ed324ea223be560319031dbefddb8b2e7 (patch)
tree18a874535c8a09202597c6e9bbf0e50b2161e56f /board/BuR
parentade766acfb27b1cfe175cd83f22db80dc5b5d789 (diff)
downloadblackbird-obmc-uboot-91931f7ed324ea223be560319031dbefddb8b2e7.tar.gz
blackbird-obmc-uboot-91931f7ed324ea223be560319031dbefddb8b2e7.zip
board/BuR/kwb: use bootvx(...) (with bootline feature) instead go(...)
Since we don't have for sure a valid IP-setup during board_late_init(...) because it maybe allready stored in environment or not, we cannot form a proper vxWorks bootline at this place. So we move to the way, forming the bootline just before executing/launching vxWorks. To do this we use the bootvx command instead go. We only have to form the "othbootargs" environment variable, the rest is done pretty good by the "bootvx" commannd. Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'board/BuR')
-rw-r--r--board/BuR/kwb/board.c27
1 files changed, 9 insertions, 18 deletions
diff --git a/board/BuR/kwb/board.c b/board/BuR/kwb/board.c
index 039ec207c2..ad74ff299c 100644
--- a/board/BuR/kwb/board.c
+++ b/board/BuR/kwb/board.c
@@ -47,10 +47,6 @@
#define RSTCTRL_FORCE_PWR_NEN 0x0404
#define RSTCTRL_CAN_STB 0x4040
-#define VXWORKS_BOOTLINE 0x80001100
-#define DEFAULT_BOOTLINE "cpsw(0,0):pme/vxWorks"
-#define VXWORKS_USER "u=vxWorksFTP pw=vxWorks tn=vxtarget"
-
DECLARE_GLOBAL_DATA_PTR;
#if defined(CONFIG_SPL_BUILD)
@@ -281,20 +277,15 @@ int board_late_init(void)
} else {
puts("ERROR: i2c_set_bus_speed failed! (scratchregister)\n");
}
- /* setup vxworks bootline */
- char *vxworksbootline = (char *)VXWORKS_BOOTLINE;
- sprintf(vxworksbootline,
- "%s h=%s e=%s:%s g=%s %s o=0x%08x;0x%08x;0x%08x;0x%08x",
- DEFAULT_BOOTLINE,
- getenv("serverip"),
- getenv("ipaddr"), getenv("netmask"),
- getenv("gatewayip"),
- VXWORKS_USER,
- (unsigned int) gd->fb_base-0x20,
- (u32)getenv_ulong("vx_memtop", 16, gd->fb_base-0x20),
- (u32)getenv_ulong("vx_romfsbase", 16, 0),
- (u32)getenv_ulong("vx_romfssize", 16, 0));
-
+ /* setup othbootargs for bootvx-command (vxWorks bootline) */
+ char othbootargs[128];
+ snprintf(othbootargs, sizeof(othbootargs),
+ "u=vxWorksFTP pw=vxWorks o=0x%08x;0x%08x;0x%08x;0x%08x",
+ (unsigned int) gd->fb_base-0x20,
+ (u32)getenv_ulong("vx_memtop", 16, gd->fb_base-0x20),
+ (u32)getenv_ulong("vx_romfsbase", 16, 0),
+ (u32)getenv_ulong("vx_romfssize", 16, 0));
+ setenv("othbootargs", othbootargs);
/*
* reset VBAR registers to its reset location, VxWorks 6.9.3.2 does
* expect that vectors are there, original u-boot moves them to _start
OpenPOWER on IntegriCloud