
Hi Hannes,
Hi Bin, thanks for reply.
On Mon, Sep 28, 2015 at 4:33 PM, Hannes Schmelzer oe5hpm@oevsv.at
wrote:
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 with "go <address>". At this time we have a valid IP-setup for sure because it is either in environment or defined through CONFIG_PREBOOT command.
To do this, we overload the __weak function "do_go_exec(...)" with our own and do the job.
Signed-off-by: Hannes Schmelzer oe5hpm@oevsv.at
I don't understand the technical details here on this board, but can we use the generic 'bootvx' command to handle the VxWorks bootline?
At first i had a look to this, but unfortunately it is not useable for my case, because we are passing serveral things more through the bootline to our vxWorks kernel. Especially o=... contains several information like framebuffer address, factory-settings address and so on. Further we have FTP-Filesystem, so we pass additional arguments ( u=vxWorksFTP pw=vxWorks).
board/BuR/kwb/board.c | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-)
diff --git a/board/BuR/kwb/board.c b/board/BuR/kwb/board.c index 039ec20..703a474 100644 --- a/board/BuR/kwb/board.c +++ b/board/BuR/kwb/board.c @@ -281,6 +281,19 @@ int board_late_init(void) } else { puts("ERROR: i2c_set_bus_speed failed!
(scratchregister)\n");
}
/*
* 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
*/
__asm__("ldr r0,=0x20000");
__asm__("mcr p15, 0, r0, c12, c0, 0"); /* Set VBAR */
return 0;
+} +#endif /* CONFIG_BOARD_LATE_INIT */ +unsigned long do_go_exec(ulong (*entry)(int, char * const []), int
argc,
char * const argv[])
+{ /* setup vxworks bootline */ char *vxworksbootline = (char *)VXWORKS_BOOTLINE; sprintf(vxworksbootline, @@ -295,13 +308,5 @@ int board_late_init(void) (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
*/
__asm__("ldr r0,=0x20000");
__asm__("mcr p15, 0, r0, c12, c0, 0"); /* Set VBAR */
return 0;
return entry(argc, argv);
}
-#endif /* CONFIG_BOARD_LATE_INIT */
1.9.1
Regards, Bin
best regards, Hannes