[U-Boot-Users] environment settings question

sapirf fersht sapirf at gmail.com
Tue Jun 26 18:01:25 CEST 2007


Cool. ;-)

I"ll post the debug as soon as i go to them and check the board.
I already added the #define DEBUG in the .h file.

On 6/26/07, nicky geerts <nicky.geerts.news at gmail.com> wrote:
> debug will also show all accesses to the flash (like unprotect, erase,
> write, protect), so if the saveenv command doesn't work, it'll show up
> in the traces
>
> Nicky
>
> 2007/6/26, sapirf fersht <sapirf at gmail.com>:
> > That's a good tip. Thanks a lot. I mainly used printf in places where
> > i suspected. The problem is that where i suspected things will go
> > wrong, it turned out that it was ok.
> >
> > On 6/26/07, nicky geerts <nicky.geerts.news at gmail.com> wrote:
> > > I guess you'll be fine using the first three defines, I just use the
> > > redundant sector for backup.
> > >
> > > in the command line interface, when you change environment settings
> > > with "setenv", don't forget to save them with "saveenv", compile with
> > > code with "#define DEBUG" in your config header file to enable the
> > > output of all debug messages.
> > >
> > > Nicky
> > >
> > > 2007/6/26, sapirf fersht <sapirf at gmail.com>:
> > > > > 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
> > > >
> > > > I just read the README about these parameters.
> > > > These settings describe a second storage area used to hold
> > > >            a redundand copy of the environment data, so that there is
> > > >            a valid backup copy in case there is a power failure during
> > > >            a "saveenv" operation.
> > > >
> > > > My board is based on ixdp425. I don't have these values. Is it wrong?
> > > >
> > > > >
> > > > > 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