[U-Boot-Users] [PATCH] Bad block skipping for command nboot

Stefan Roese sr at denx.de
Tue Jul 3 14:27:34 CEST 2007


Hi Thomas,

On Monday 02 July 2007, Thomas Knobloch wrote:
> The old implementation of command nboot does not support reading the image
> from NAND flash with skipping of bad blocks. The patch implements a new
> version of the nboot command: by calling nboot.jffs2 from the u-boot
> command line the command will load the image from NAND flash with respect
> to bad blocks (by using nand_read_opts()). This is similar to e.g. the NAND
> read command: "nand read.jffs2 ...".

And that's why I have to ask: Do we really need this command extension? Why 
not just use a combination of commands (e.g. "nand read.jffs2 ...;bootm ...)?

Nevertheless one short remark in the patch below:

> Signed-off-by: Thomas Knobloch <knobloch at siemens.com>
>
> --- a/common/cmd_nand.c	2007-02-02 10:02:06.000000000 +0100
> +++ b/common/cmd_nand.c	2007-07-02 10:59:26.000000000 +0200
> @@ -476,14 +476,33 @@
>   			   ulong offset, ulong addr, char *cmd)
>   {
>   	int r;
> -	char *ep;
> +	char *ep, *s;
>   	ulong cnt;
>   	image_header_t *hdr;
> +	int jffs2 = 0;
> +
> +	s = strchr(cmd, '.');
> +	if (s != NULL &&
> +	    (!strcmp(s, ".jffs2") || !strcmp(s, ".e") || !strcmp(s, ".i")))
> +	{
> +		jffs2 = 1;
> +	}

No parentheses for one lined statements please.

Best regards,
Stefan

=====================================================================
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de
=====================================================================




More information about the U-Boot mailing list