[U-Boot-Users] environment settings question

nicky geerts nicky.geerts.news at gmail.com
Tue Jun 26 14:34:15 CEST 2007


those boards are probably using custom flash drivers in
/board/<name>/flash.[ch], or are derived from boards that do.  Setting
the define to '1' is needed in cases where you use those custom flash
drivers, and it's not wrong in case you don't use those custom flash
driver.

as far as i know, protecting will only prevent you writing to the
flash, reading should not be affected

you also need to indicate where this redundant storage is located
(also see the README file for more information on what these defines
do):

for example
#define CFG_ENV_IS_IN_FLASH	1
#define CFG_ENV_ADDR		0xXXXXXXXX
#define CFG_ENV_SECT_SIZE	0xXXXXXXXX
#define CFG_ENV_ADDR_REDUND	0xXXXXXXXX
#define CFG_ENV_SIZE_REDUND	0xXXXXXXXX

Nicky Geerts

2007/6/26, sapirf fersht <sapirf at gmail.com>:
> see below my reply:
>
> On 6/26/07, nicky geerts <nicky.geerts.news at gmail.com> wrote:
> > grep -r CFG_ENV_IS_IN_FLASH * | grep if
> >
> > it does show that CFG_ENV_IS_IN_FLASH is checked to be '1' in some
> > custom board flash drivers
>
> in 90% of the boards it appears with 1.  The rest which it didn't
> appear i thought it's just a mistake which didn't make any problems
> with compilation.
>
> The problem is that it still reads from default after reset instead
> from from flash.
>
> Can it be that the flash environment sector is protected, and i need
> to unprotect, copy and put the protect on again?
>
>
> >
> > your safest bet would be the second option, although I agree with
> > Timur Tabi that it isn't really logical.
> >
> > 2007/6/26, Timur Tabi <timur at freescale.com>:
> > > sapirf fersht wrote:
> > > > For a ixp425 cpu how should the environment value
> > > > #define CFG_ENV_IS_IN_FLASH be set?
> > > >
> > > > #define CFG_ENV_IS_IN_FLASH
> > > >
> > > > OR
> > > >
> > > > #define CFG_ENV_IS_IN_FLASH 1
> > >
> > > The code that uses these macros should support both methods, but personally I prefer that
> > > the macros themselves be defined using the first method.  IMHO, you should define a macro
> > > to contain a value only if that value has some inherent significance.  For example, does
> > > "1" really mean something that "2" doesn't?  In this case, no.
> > >
> > > --
> > > Timur Tabi
> > > Linux Kernel Developer @ Freescale
> > >
> > > -------------------------------------------------------------------------
> > > This SF.net email is sponsored by DB2 Express
> > > Download DB2 Express C - the FREE version of DB2 express and take
> > > control of your XML. No limits. Just data. Click to get it now.
> > > http://sourceforge.net/powerbar/db2/
> > > _______________________________________________
> > > U-Boot-Users mailing list
> > > U-Boot-Users at lists.sourceforge.net
> > > https://lists.sourceforge.net/lists/listinfo/u-boot-users
> > >
> >
>




More information about the U-Boot mailing list