[U-Boot] [PATCH] vxworks: Add CONFIG_VXWORKS_PREBOOT
Wolfgang Denk
wd at denx.de
Wed Sep 23 15:02:54 CEST 2009
Dear Niklaus Giger,
In message <1253686958-30716-1-git-send-email-niklaus.giger at netstal.com> you wrote:
> The option CONFIG_VXWORKS_PREBOOT allows a board specific
> vxworks_preboot to be run just before jumping into the
> vxWorks images. This can be used to alter a register
> which is used differently by U-boot and vxWorks.
>
> Signed-off-by: Niklaus Giger <niklaus.giger at netstal.com>
> ---
> common/cmd_elf.c | 4 ++++
> include/vxworks.h | 4 ++++
> 2 files changed, 8 insertions(+), 0 deletions(-)
>
> diff --git a/common/cmd_elf.c b/common/cmd_elf.c
> index bf7dd63..4e36680 100644
> --- a/common/cmd_elf.c
> +++ b/common/cmd_elf.c
> @@ -213,6 +213,10 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> (char *) bootaddr);
> printf ("## Starting vxWorks at 0x%08lx ...\n", addr);
>
> +#ifdef CONFIG_VXWORKS_PREBOOT
> + vxworks_preboot();
> +#endif
> +
Please move that function before the printf "## Starting vxWorks".
> puts ("## vxWorks terminated\n");
> diff --git a/include/vxworks.h b/include/vxworks.h
> index 1633904..df2b580 100644
> --- a/include/vxworks.h
> +++ b/include/vxworks.h
> @@ -50,4 +50,8 @@ int do_bootvx(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]);
> #define CONFIG_SYS_VXWORKS_SERVERNAME "srv"
> #endif
>
> +#ifdef CONFIG_VXWORKS_PREBOOT
> + void vxworks_preboot(void);
> +#endif
Please make this a function returning int, and return (and handle) a
proper return code, so we can deal with error situations.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Drun'? 'm not drun'! You woudn' dare call m' drun' if I was sober!
- Terry Pratchett, _Men at Arms_
More information about the U-Boot
mailing list