diff options
author | Hannes Petermaier <oe5hpm@oevsv.at> | 2015-02-03 13:22:42 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2015-03-05 20:13:20 -0500 |
commit | a9642925a126b6a0be1e205c8da60883114a0f3d (patch) | |
tree | 2c7f7df1de46ed44469585f411a43dd158f3a514 | |
parent | d2eb73d757b7e830c25254a0400c1dce40a01e8c (diff) | |
download | u-boot-imx-a9642925a126b6a0be1e205c8da60883114a0f3d.zip u-boot-imx-a9642925a126b6a0be1e205c8da60883114a0f3d.tar.gz u-boot-imx-a9642925a126b6a0be1e205c8da60883114a0f3d.tar.bz2 |
board/BuR/kwb: Form a bootline for vxWorks
vxWorks needs several parameters which are set by the bootloader und his
environment. So we form a vxWorks bootline and pass the result to vxWorks on
a predefined address.
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
-rw-r--r-- | board/BuR/kwb/board.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/board/BuR/kwb/board.c b/board/BuR/kwb/board.c index 30900bc..455f472 100644 --- a/board/BuR/kwb/board.c +++ b/board/BuR/kwb/board.c @@ -47,6 +47,12 @@ #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) /* TODO: check ram-timing ! */ static const struct ddr_data ddr3_data = { @@ -248,6 +254,30 @@ int board_late_init(void) } else { puts("ERROR: i2c_set_bus_speed failed! (scratchregister)\n"); } + /* setup vxworks bootline */ + char *vxworksbootline = (char *)VXWORKS_BOOTLINE; + + /* setup default IP, in case if there is nothing in environment */ + if (!getenv("ipaddr")) { + setenv("ipaddr", "192.168.60.1"); + setenv("netmask", "255.255.255.0"); + setenv("serverip", "192.168.60.254"); + setenv("gatewayip", "192.168.60.254"); + puts("net: had no IP! made default setup.\n"); + } + + 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)); + /* * 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 |