[U-Boot] bootcounter implementation for OMAP3
Nitin Mahajan
nitinm76 at yahoo.com
Tue Mar 9 12:53:16 CET 2010
Hello,
--- On Tue, 9/3/10, Detlev Zundel <dzu at denx.de> wrote:
> From: Detlev Zundel <dzu at denx.de>
> Subject: Re: [U-Boot] bootcounter implementation for OMAP3
> To: nitinm76 at yahoo.com
> Cc: u-boot at lists.denx.de
> Date: Tuesday, 9 March, 2010, 2:03 PM
> Hi Nitin,
>
> > I am trying to implement the bootcount_store and
> bootcount_load
> > methods for the OMAP3503 processor based board which I
> am using.
> >
> > For this I decided to use the location at the end of
> scratchpad RAM,
> > that is I am trying to write at location 0x480029BF.
> The code looks like
> > this, but the boot loader hags when it encounters
> bootcount_load.
> >
> >
> > #ifdef CONFIG_BOOTCOUNT_LIMIT
> > void bootcount_store(ulong a)
> > {
> > volatile ulong *save_addr =
> > (volatile ulong
> *)(0x480029BF);
> > *save_addr = (BOOTCOUNT_MAGIC &
> 0xffff0000) | (a & 0x0000ffff);
>
> You are writing a 32 bit entity to an non 32-bit aligned
> address.
> Although I do not know the omap too well, this can be a
> problem on any
> architecture.
>
> Can you write 32-bot to that exact address from within the
> U-Boot
> commandline with e.g. "mm"?
That was the basic mistake I think. I was trying to write to a non 32 bit aligned address. This got solved, but I have some new errors saying this
## Error: environment overflow, "stdin" deleted
## Error: environment overflow, "stdout" deleted
## Error: environment overflow, "stderr" deleted
## Error: environment overflow, "bootcount" deleted
Does that mean the size allocated for env is smaller compared to the actual contents in env file.
I am new to u-boot. Can you give some pointers on this?
regards
-Nitin
>
> Cheers
> Detlev
>
> --
> Q: What do you get when you cross an elephant and a
> banana?
> A: |elephant| * |banana| * sin(theta)
> --
> DENX Software Engineering GmbH, MD:
> Wolfgang Denk & Detlev Zundel
> HRB 165235 Munich, Office: Kirchenstr.5, D-82194
> Groebenzell, Germany
> Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email:
> dzu at denx.de
>
New Email addresses available on Yahoo!
Get the Email name you've always wanted on the new @ymail and @rocketmail.
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/
More information about the U-Boot
mailing list