On Apr 17, 2016, at 8:35 AM, Vagrant Cascadian <vagr...@debian.org> wrote:

> On 2016-04-16, Rick Thomas wrote:
>> Re-reading this, I realize that I said “0x80000” for the environment
>> location of legacy u-boot.  But when I went to test it, the true value
>> turned out to be “0xa0000”.
>> 
>> Sorry for the confusion.  The latter value (0xa0000) is correct.
> 
> Ok, what you submitted was:
> 
>>> # MTD device name   Device offset   Env. size   Flash sector size
>>> # Legacy u-boot versions:
>>> #/dev/mtd0           0xa0000         0x20000     0x20000
>>> 
>>> # New u-boot versions:
>>> /dev/mtd0           0x60000         0x20000     0x20000
> 
> Are those the values you would like in the example fw_env.config for
> openrd, or are you saying they need to be adjusted? If those values need
> to be changed, please re-submit the example fw_env.config you would like
> included in the package.
> 
> 
> live well,
>  vagrant

The correct values for “Device offset” are:

0xa0000 for “Legacy”  u-boot
   and
0x60000 for “New”  u-boot

So my suggested /etc/fw_env.config for u-boot-tools on OpenRD machines is:

============/usr/share/doc/u-boot-tools/examples/openrd.config============
# Configuration file for fw_(printenv/saveenv) utility.
# Up to two entries are valid, in this case the redundant
# environment sector is assumed present.
#
# XXX this configuration might miss a fifth parameter for the "Number of
# sectors"

# MTD device name   Device offset   Env. size   Flash sector size
# Legacy u-boot versions:
#/dev/mtd0           0xa0000         0x20000     0x20000

# New u-boot versions:
/dev/mtd0           0x60000         0x20000     0x20000
============ cut here ===============

Sorry for any confusion I may have caused!

For completeness, my testing procedure was:

1) On an OpenRD Ultimate, running latest u-boot
(specifically, “U-Boot 2016.03+dfsg1-3 (Apr 04 2016 - 18:23:06 +0000)”)
I used the above file as is.
With it, I was able to read the u-boot environment from Linux with fw_printenv.
I did not try fw_setenv.

2) On an OpenRD Client, running a legacy u-boot
(specifically. “U-Boot 1.1.4 (May 18 2009 - 13:33:10) Marvell version: 3.4.16”)
I reversed the commenting on the two “/dev/mtd0” lines.
With that, I was able to read the u-boot environment from Linux with 
fw_printenv.
I did not try fw_setenv.

For the time being, I plan to leave the Client machine with the legacy u-boot, 
incase
you find that further testing is required.

Thank you for your efforts!

Rick

Reply via email to