Re: [U-Boot] fw_setenv broken?

2010-11-18 Thread Steve Sakoman
On Wed, 2010-11-17 at 16:08 -0600, Scott Wood wrote: On Wed, 17 Nov 2010 22:40:49 +0100 Wolfgang Denk w...@denx.de wrote: Dear Steve Sakoman, In message aanlktimrfq5+awfdfy_fuetmh=x=xrkazgntk8fis...@mail.gmail.com you wrote: readenv: offset = 24 readenv: nand_read

Re: [U-Boot] fw_setenv broken?

2010-11-18 Thread Scott Wood
On Thu, 18 Nov 2010 16:13:52 -0800 Steve Sakoman st...@sakoman.com wrote: The code generating both errors is in the nand_do_read_ops function in nand_base.c: if (mtd-ecc_stats.failed - stats.failed) return -EBADMSG; return mtd-ecc_stats.corrected -

Re: [U-Boot] fw_setenv broken?

2010-11-18 Thread Steve Sakoman
On Thu, 2010-11-18 at 18:20 -0600, Scott Wood wrote: On Thu, 18 Nov 2010 16:13:52 -0800 Steve Sakoman st...@sakoman.com wrote: The code generating both errors is in the nand_do_read_ops function in nand_base.c: if (mtd-ecc_stats.failed - stats.failed) return

Re: [U-Boot] fw_setenv broken?

2010-11-18 Thread Steve Sakoman
On Thu, Nov 18, 2010 at 4:20 PM, Scott Wood scottw...@freescale.com wrote: On Thu, 18 Nov 2010 16:13:52 -0800 Steve Sakoman st...@sakoman.com wrote: The code generating both errors is in the nand_do_read_ops function in nand_base.c:        if (mtd-ecc_stats.failed - stats.failed)          

[U-Boot] fw_setenv broken?

2010-11-17 Thread Steve Sakoman
I'm seeing some strange behavior with the fw_setenv tools on OMAP. Here's what I see when using the tools on OMAP (overo in this case): 1. fw_printenv prints the environment with no issues [1] 2. fw_setenv allows me to change a variable with no reported errors [2] 3. fw_printenv will print the

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Stefano Babic
On 11/17/2010 05:30 PM, Steve Sakoman wrote: I'm seeing some strange behavior with the fw_setenv tools on OMAP. Here's what I see when using the tools on OMAP (overo in this case): 1. fw_printenv prints the environment with no issues [1] 2. fw_setenv allows me to change a variable with no

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Wolfgang Denk
Dear Stefano Babic, In message 4ce4092b.7090...@denx.de you wrote: On 11/17/2010 05:30 PM, Steve Sakoman wrote: I'm seeing some strange behavior with the fw_setenv tools on OMAP. Here's what I see when using the tools on OMAP (overo in this case): 1. fw_printenv prints the

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Steve Sakoman
On Wed, 2010-11-17 at 18:39 +0100, Wolfgang Denk wrote: Dear Stefano Babic, In message 4ce4092b.7090...@denx.de you wrote: On 11/17/2010 05:30 PM, Steve Sakoman wrote: I'm seeing some strange behavior with the fw_setenv tools on OMAP. Here's what I see when using the tools on OMAP

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Mike Frysinger
On Wednesday, November 17, 2010 12:39:33 Wolfgang Denk wrote: Stefano Babic wrote: On 11/17/2010 05:30 PM, Steve Sakoman wrote: I'm seeing some strange behavior with the fw_setenv tools on OMAP. Here's what I see when using the tools on OMAP (overo in this case): 1. fw_printenv

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Wolfgang Denk
Dear Mike Frysinger, In message 201011171313.27696.vap...@gentoo.org you wrote: Indeed this behaviour is normal. fw_printenv does not sort the output (not yet - patches welcome). why bloat the code ? why cant people simply: `fw_printenv | sort` ? Well, you are of course right, but some

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Steve Sakoman
On Wed, Nov 17, 2010 at 9:39 AM, Wolfgang Denk w...@denx.de wrote: Dear Stefano Babic, In message 4ce4092b.7090...@denx.de you wrote: On 11/17/2010 05:30 PM, Steve Sakoman wrote: I'm seeing some strange behavior with the fw_setenv tools on OMAP. Here's what I see when using the tools on

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Wolfgang Denk
Dear Steve Sakoman, In message aanlktikalbzg5ed=p-_0mwolojh=kfna-p8syac=n...@mail.gmail.com you wrote: After writing the environment with fw_setenv in linux, u-boot's read of the environment on the subsequent boot always fails with either EBADMSG or EUCLEAN. Can you read - in U-Boot - any

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Steve Sakoman
On Wed, Nov 17, 2010 at 12:47 PM, Wolfgang Denk w...@denx.de wrote: Dear Steve Sakoman, In message aanlktikalbzg5ed=p-_0mwolojh=kfna-p8syac=n...@mail.gmail.com you wrote: After writing the environment with fw_setenv in linux, u-boot's read of the environment on the subsequent boot always

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Wolfgang Denk
Dear Steve Sakoman, In message aanlktimrfq5+awfdfy_fuetmh=x=xrkazgntk8fis...@mail.gmail.com you wrote: readenv: offset = 24 readenv: nand_read failure = -117 *** Warning - readenv() failed, using default environment I then immediately tried to use the nand read command to read the

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Steve Sakoman
On Wed, Nov 17, 2010 at 1:40 PM, Wolfgang Denk w...@denx.de wrote: Dear Steve Sakoman, In message aanlktimrfq5+awfdfy_fuetmh=x=xrkazgntk8fis...@mail.gmail.com you wrote: readenv: offset = 24 readenv: nand_read failure = -117 *** Warning - readenv() failed, using default environment

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Scott Wood
On Wed, 17 Nov 2010 22:40:49 +0100 Wolfgang Denk w...@denx.de wrote: Dear Steve Sakoman, In message aanlktimrfq5+awfdfy_fuetmh=x=xrkazgntk8fis...@mail.gmail.com you wrote: readenv: offset = 24 readenv: nand_read failure = -117 *** Warning - readenv() failed, using default

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Steve Sakoman
On Wed, 2010-11-17 at 16:08 -0600, Scott Wood wrote: On Wed, 17 Nov 2010 22:40:49 +0100 Wolfgang Denk w...@denx.de wrote: Dear Steve Sakoman, In message aanlktimrfq5+awfdfy_fuetmh=x=xrkazgntk8fis...@mail.gmail.com you wrote: readenv: offset = 24 readenv: nand_read

Re: [U-Boot] fw_setenv broken?

2010-11-17 Thread Wolfgang Denk
Dear Steve Sakoman, In message 1290034139.2927.1192.ca...@quadra you wrote: I patched readenv to use the same nand_read_skip_bad function used in the command line nand read tool. I no longer get the -EUCLEAN errors when reading the environment after using fw_setenv to write from linux. Now