1 Dec 2003 18:10
Re: reading environment from flash fails
Wolter Kamphuis <spam <at> wkamphuis.student.utwente.nl>
2003-12-01 17:10:24 GMT
2003-12-01 17:10:24 GMT
Wolfgang Denk wrote: > In message <3FC7802B.7010506 <at> wkamphuis.student.utwente.nl> you wrote: > >>We define: >>#define CFG_MONITOR_BASE 0xFFF00000 >>#define CFG_ENV_SECT_SIZE (128*1024) >>#define CFG_ENV_SIZE (2*1024) >>#define CFG_ENV_ADDR (CFG_MONITOR_BASE + CFG_ENV_SECT_SIZE - CFG_ENV_SIZE) > > > The CFG_ENV_ADDR definition makes no sense to me. If it results in > the intended value than by pure chance, not by any deeper logic. > > U-boot is located at 0xfff00000 up to 0xfff20000. I would like to save my environment in the same sector as u-boot, but in the last two Kb's, thus at 0xfff1f800-0xfff20000 (0xfff00000 + 0x20000 - 0x800 = 0xfff1f800 = starting address for env) >>Shouldn't gd->env_addr be equal to CFG_ENV_ADDR? Now my saved >>environment settings aren't read and after a reset all settings are >>restored to the defaults. > > > I don't know which board you're talking about, and I don't understand > how your patch and your question are related to each other. From this > message it sounds as if you want to put the environment in flash, but > your code #defines CFG_ENV_IS_IN_NVRAM (at least in some cases). >(Continue reading)
RSS Feed