From mboxrd@z Thu Jan 1 00:00:00 1970 From: Destrukto Date: Fri, 25 Jan 2008 05:04:43 -0800 (PST) Subject: [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND In-Reply-To: <4755211E.9060606@schweigstill.de> References: <14022552.post@talk.nabble.com> <494375.44488.qm@web94810.mail.in2.yahoo.com> <14028021.post@talk.nabble.com> <978780.75419.qm@web94809.mail.in2.yahoo.com> <14124814.post@talk.nabble.com> <20071203095544.3AE6C2430C@gemini.denx.de> <14146625.post@talk.nabble.com> <4755211E.9060606@schweigstill.de> Message-ID: <15087194.post@talk.nabble.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.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.