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. _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot