[U-Boot-Users] [Patch 08/17] U-Boot-V2:Commands: Unbreak loadb support

Menon, Nishanth x0nishan at ti.com
Tue Jun 3 17:12:28 CEST 2008


Sascha,

> -----Original Message-----
> From: Sascha Hauer [mailto:s.hauer at pengutronix.de]
> Sent: Tuesday, June 03, 2008 3:09 AM
> To: Menon, Nishanth
> Cc: u-boot-users at lists.sourceforge.net; Laurent Desnogues; dirk.behme at googlemail.com;
> philip.balister at gmail.com; Gopinath, Thara; Kamat, Nishant; Syed Mohammed, Khasim
> Subject: Re: [Patch 08/17] U-Boot-V2:Commands: Unbreak loadb support
> >  config CMD_LOADB
> > -	depends on BROKEN
> >  	select CRC16
> > -	tristate
> > +	bool
> >  	prompt "loadb"
> 
> Is there a reason why loadb does not work as module? othwerwise you
> should leave this to tristate.
Hmm... modules in U-Boot v2!!! :).. I missed that.. apologies -> I am still in the learning process.. I should try that out..

> >  	/* pre-set offset from $loadaddr */
> > -	if ((s = getenv("loadaddr")) != NULL) {
> > +	s = (char *) getenv("loadaddr");
> > +	if (s != NULL)
> >  		offset = simple_strtoul(s, NULL, 16);
> 
> Parameters to commands should go via command line arguments and not
> environment variables. The use of environment variables makes it
> necessary to read the documentation (if it's there ;) or the source to
> make it clear which commands use which variables. Command line options
> on the other hand are self explaining via the -h option.
> 
> Normally commands like tftp work on a file and not on a plain memory
> address. The serial commands should behave the same.
Yes. Indeed, I am facing the same issue when I thought about using nand download over uart.. using device and ability to give an offset within the device will be the proper approach. I will redo this patch.

> > +
> > +/* Convert a character to lower case */
> > +static inline char _tolower(char c)
> > +{
> > +	if ((c >= 'A') && (c <= 'Z'))
> > +		c = (c - 'A') + 'a';
> > +	return c;
> > +}
> 
> We already have a tolower function in include/linux/ctype.h
Yep. It has been a blind port. Will fix it as part of the revisit of this patch.

Regards,
Nishanth Menon




More information about the U-Boot mailing list