public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Destrukto <simon.bielmann@gmx.ch>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
Date: Fri, 25 Jan 2008 05:04:43 -0800 (PST)	[thread overview]
Message-ID: <15087194.post@talk.nabble.com> (raw)
In-Reply-To: <4755211E.9060606@schweigstill.de>


Well now I had time to solve the problem once and for all. If I look back the
solution was so simple. Because we use a .bat and .tcl file to copy all on
the NAND-Flash we haven't set the active ENV-Block (one redundant and one in
use). Now I simply ad the flag set in the .tcl file and it works:

################################################################################
#  proc uboot_env: Convert u-boot variables in a string ready to be flashed
#                  in the region reserved for environment variables
################################################################################
proc set_uboot_env {nameOfLstOfVar} {
    upvar $nameOfLstOfVar lstOfVar
   
    # sector size is the size defined in u-boot CFG_ENV_SIZE
    set sectorSize [expr 0x20000 - 5]
    set flag 1                                                                    
<- I added this

    set strEnv [join $lstOfVar "\0"]
    while {[string length $strEnv] < $sectorSize} {
        append strEnv "\0"
    }
    set strCrc [binary format i [::vfs::crc $strEnv]]
    return "$strCrc$flag$strEnv"                                           
<- and the $flag
} 



Andreas Schweigstill wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello!
> 
> Destrukto wrote:
>> Well, until now I haven't got any problem with this solution.
> 
> You probably don't have a problem but your customers will get them.
> I wish you some luck when your product goes to mass production if you
> neither have found out why your environment storage has problems nor
> if you don't have any error recovery.
> 
> With best regards
> Andreas Schweigstill
> 
> PS.: If you need a consultant which does some forensics on your failed
>   products and is able to find a quick and clean(!) solution don't
>   hesitate to contact me. ;-)
> 
> - --
> Dipl.-Phys. Andreas Schweigstill
> Schweigstill IT | Embedded Systems
> Schauenburgerstra?e 116, D-24118 Kiel, Germany
> Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436
> Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.2 (GNU/Linux)
> Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org
> 
> iD8DBQFHVSEeYQhaO218O9ERAjfUAKCMo7uHtcz+AIgBAxTIKRYbfSPYrgCfd9SP
> hAvwji2NgRSHHv7NfFL/LQQ=
> =owny
> -----END PGP SIGNATURE-----
> 
> -------------------------------------------------------------------------
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell.  From the desktop to the data center, Linux is going
> mainstream.  Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> U-Boot-Users mailing list
> U-Boot-Users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/u-boot-users
> 
> 

-- 
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tp14022552p15087194.html
Sent from the Uboot - Users mailing list archive at Nabble.com.

  reply	other threads:[~2008-01-25 13:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-29  9:59 [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND Destrukto
2007-11-29 14:06 ` Dharmosoth Seetharam
2007-11-29 15:32   ` Destrukto
2007-11-30  6:17     ` Dharmosoth Seetharam
2007-12-03  7:14       ` Destrukto
2007-12-03  9:28         ` Dharmosoth Seetharam
2008-01-25 13:02           ` Destrukto
2007-12-03  9:55         ` Wolfgang Denk
2007-12-04  8:33           ` Destrukto
2007-12-04  9:42             ` Andreas Schweigstill
2008-01-25 13:04               ` Destrukto [this message]
2007-12-04 13:57             ` Wolfgang Denk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15087194.post@talk.nabble.com \
    --to=simon.bielmann@gmx.ch \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox