All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] bootvx: Cleanup & improvements
Date: Mon, 3 Nov 2008 13:06:05 +0100	[thread overview]
Message-ID: <20081103120605.GD10086@game.jcrosoft.org> (raw)
In-Reply-To: <200811031054.19105.niklausgiger@gmx.ch>

On 10:54 Mon 03 Nov     , Niklaus Giger wrote:
> The following improvements are made:
> - document bootvx in README
> - fix size too small by one in sprintf
> - changed old (pre 2004) device name ibmEmac to emac
> - boot device may be overriden in board config
> - servername may be defined in board config
> - additional parameters may be defined in board config
> - fixed some line wrappings
> - changed netstal-common.h to use the new settings
Could you split your patch a smallest changeset?
> 
> ---
>  README                           |   17 ++++++++
>  common/cmd_elf.c                 |   80 ++++++++++++++++++--------------------
>  include/configs/netstal-common.h |   29 +++++++-------
>  3 files changed, 69 insertions(+), 57 deletions(-)
> 
> diff --git a/README b/README
> index ebee20f..99d2a3d 100644
> --- a/README
> +++ b/README
> @@ -379,6 +379,23 @@ The following options need to be configured:
>  		This define fills in the correct boot CPU in the boot
>  		param header, the default value is zero if undefined.
>  
> +- vxWorks boot parameters:
> +
> +		bootvx constructs a valid bootline using the following
> +		environments variables: bootfile, ipaddr, serverip, hostname.
> +		It loads the vxWorks image pointed bootfile.
> +
> +		CONFIG_SYS_VXWORKS_BOOT_DEVICE - The vxworks device name
> +		CONFIG_SYS_VXWORKS_MAC_PTR - Ethernet 6 byte MA -address
> +		CONFIG_SYS_VXWORKS_SERVERNAME - Name of the server
> +
> +		CONFIG_SYS_VXWORKS_ADD_PARAMS
> +
> +		Add it at the end of the bootline. E.g "u=username pw=secret"
> +
> +		Note: If a "bootargs" environment is defined, it will overwride
> +		the defaults discussed just above.
> +
>  - Serial Ports:
>  		CONFIG_PL010_SERIAL
>  
> diff --git a/common/cmd_elf.c b/common/cmd_elf.c
> index 3ebb6d9..d537478 100644
> --- a/common/cmd_elf.c
> +++ b/common/cmd_elf.c
> @@ -102,10 +102,8 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>  	unsigned long bootaddr;		/* Address to put the bootline */
>  	char *bootline;			/* Text of the bootline        */
>  	char *tmp;			/* Temporary char pointer      */
> +	char build_buf[128];		/* Buffer for building the bootline */
>  
> -#if defined(CONFIG_4xx) || defined(CONFIG_IOP480)
> -	char build_buf[80];		/* Buffer for building the bootline */
> -#endif
>  	/* -------------------------------------------------- */
>  
>  	/*
> @@ -124,7 +122,8 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>  	if ((argc == 2) && (strcmp (argv[1], "tftp") == 0)) {
>  		if (NetLoop (TFTP) <= 0)
>  			return 1;
> -		printf ("Automatic boot of VxWorks image at address 0x%08lx ... \n", addr);
> +		printf ("Automatic boot of VxWorks image at address 0x%08lx ... \n",
> +		     addr);
>  	}
>  #endif
>  
> @@ -163,54 +162,53 @@ int do_bootvx (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>  	 */
>  
>  	if ((bootline = getenv ("bootargs")) != NULL) {
> -		memcpy ((void *) bootaddr, bootline, MAX(strlen(bootline), 255));
> -		flush_cache (bootaddr, MAX(strlen(bootline), 255));
> +		memcpy ((void *) bootaddr, bootline,
> +			MAX (strlen (bootline), 255));
> +		flush_cache (bootaddr, MAX (strlen (bootline), 255));
>  	} else {
> +
> +#ifndef CONFIG_SYS_VXWORKS_BOOT_DEVICE
>  #if defined(CONFIG_4xx)
> -		sprintf (build_buf, "ibmEmac(0,0)");
> +#define		CONFIG_SYS_VXWORKS_BOOT_DEVICE "emac(0,0)"
> +#elif defined(CONFIG_IOP480)
> +#define		CONFIG_SYS_VXWORKS_BOOT_DEVICE "dc(0,0)"
> +#else
> +#define		CONFIG_SYS_VXWORKS_BOOT_DEVICE "eth(0,0)"
> +#endif
> +#endif
could we move thie define to an header?

Best Regards,
J.

  reply	other threads:[~2008-11-03 12:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-03  9:54 [U-Boot] [PATCH] bootvx: Cleanup & improvements Niklaus Giger
2008-11-03 12:06 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2008-11-03 18:59   ` Niklaus Giger
2008-11-03 19:43     ` Jean-Christophe PLAGNIOL-VILLARD
2008-11-03 20:17     ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081103120605.GD10086@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.