AT91SAM9260-EK: Trying to load U-Boot env from NAND
Hello, this is my first post in this Forum and my English is not very good so I give my best to describe my problem.
I have a AT91SAM9260 eval kit board and until now there were not very much problem. But what stops me now is a really tough problem. I use the Bootstraploader for NAND boot which is compiled by Atmel in the Demo. I've compiled the U-Boot by my self and its starts without problem, but what get on my nerves is that I can't write the U-Boot env over .tcl file. To explain that, I load everything, just like it is done in the demo, with this batch- and .tcl-file. So, I've checked the checksum for the env's but everytime I uploaded it and trying to boot I get this:
U-Boot 1.1.5 (Nov 2 2006 - 10:20:33)
DRAM: 64 MB NAND: NAND device: Manufacturer ID: 0xec, Chip ID: 0xda (<NULL> NAND 256MiB 3,3V 8-bit) 256 MiB DataFlash:AT45DB642 Nb pages: 8192 Page Size: 1056
Size= 8650752 bytes
Logical address: 0xD0000000
Area 0: D0000000 to D0003FFF (RO)
Area 1: D0004000 to D0007FFF
Area 2: D0008000 to D0037FFF (RO)
Area 3: D0038000 to D083FFFF
*** Warning - bad CRC or NAND, using default environment
In: serial Out: serial Err: serial
DM9161A PHY Detected
End of Autonegociation
U-Boot>
U-Boot>
U-Boot> printenv
bootdelay=3
baudrate=115200
stdin=serial
stdout=serial
stderr=serial
Environment size: 69/131068 bytes
U-Boot>
I checked the env (nand read to copy them in the RAM and md to hae a look at them) and they're still correct. Well, I could write the env every by hand that would work but if you have to do this 20 times a day and you have really much to write this wouldn't be very funny.
So I hope I haven't forget anything, but if there is any question I will try to answer.
Greets, Destrukto
Signature · 2 lines
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tf4896117.html#a14022552 Sent from the Uboot - Users mailing list archive at Nabble.com.
Hi,
If I remember correctly, i got the same issue on
AT91SAM9263ek.
you please debug the Dataflash_Select() ...
there u many need to go into the if condition and
do valid=1;
so, please check it once and modify the condition...
u may get the solution ..
Thanks,
Seetharam
Quoted 65 lines · --- Destrukto
Hello, this is my first post in this Forum and my
English is not very good so
I give my best to describe my problem.I have a AT91SAM9260 eval kit board and until now there were not very much
problem. But what stops me now is a really tough problem. I use the
Bootstraploader for NAND boot which is compiled by Atmel in the Demo. I've
compiled the U-Boot by my self and its starts without problem, but what get
on my nerves is that I can't write the U-Boot env over .tcl file. To explain
that, I load everything, just like it is done in the demo, with this batch-
and .tcl-file. So, I've checked the checksum for the env's but everytime I
uploaded it and trying to boot I get this:U-Boot 1.1.5 (Nov 2 2006 - 10:20:33)
DRAM: 64 MB NAND: NAND device: Manufacturer ID: 0xec, Chip ID:
0xda(<NULL> NAND 256MiB
3,3V 8-bit)
256 MiB
DataFlash:AT45DB642Nb pages: 8192 Page Size: 1056Size= 8650752 bytes
Logical address:0xD0000000
Area 0: D0000000 to D0003FFF (RO)
Area 1: D0004000 to D0007FFF
Area 2: D0008000 to D0037FFF (RO)
Area 3: D0038000 to D083FFFF
*** Warning - bad CRC or NAND, using default
environmentIn: serial Out: serial Err: serialDM9161A PHY Detected
End of Autonegociation
U-Boot>
U-Boot>
U-Boot> printenv
bootdelay=3
baudrate=115200
stdin=serial
stdout=serial
stderr=serialEnvironment size: 69/131068 bytes
U-Boot>I checked the env (nand read to copy them in the RAM and md to hae a look at
them) and they're still correct. Well, I could write the env every by hand
that would work but if you have to do this 20 times a day and you have
really much to write this wouldn't be very funny.
Quoted 8 lines
So I hope I haven't forget anything, but if there is any question I will try
to answer.Greets, Destrukto
Signature · 1 line
View this message in context:
http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tf4896117.html#a14022552
Quoted 5 lines
Sent from the Uboot - Users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
Quoted 6 lines
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
Quoted 4 lines
_______________________________________________
U-Boot-Users mailing list
U-Boot-Users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users
Quoted 1 line
Why delete messages? Unlimited storage is just a click away. Go to http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html
At first thanks for your reply, but could you explain that in detail please.
Thanks Destrukto
Hi,
If I remember correctly, i got the same issue on
AT91SAM9263ek.
you please debug the Dataflash_Select() ...
there u many need to go into the if condition and
do valid=1;
so, please check it once and modify the condition...
u may get the solution ..
Thanks,
Seetharam
Signature · 2 lines
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tf4896117.html#a14028021 Sent from the Uboot - Users mailing list archive at Nabble.com.
please Debug the function which i mention earlier.
If you don't get any clue, please copy the code of your Dataflash_Select() here
Thanks,
Seetharam
Destrukto <[email protected]> wrote:
At first thanks for your reply, but could you explain that in detail please.
Thanks Destrukto
Hi,
If I remember correctly, i got the same issue on
AT91SAM9263ek.
you please debug the Dataflash_Select() ...
there u many need to go into the if condition and
do valid=1;
so, please check it once and modify the condition...
u may get the solution ..
Thanks,
Seetharam
Signature · 21 lines
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tf4896117.html#a14028021
Sent from the Uboot - Users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
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
---------------------------------
5, 50, 500, 5000 - Store N number of mails in your inbox. Click here.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20071130/f1c05d10/attachment.htm Yes! I get it work, the problem was, that it had a problem to accept the crc32-Checksum. So I just erased the sequence where this happens. Here the patchfile:
env_nand.c +1 -9
@@ -247,13 +247,7 @@ void env_relocate_spec (void) crc2_ok = (crc32 (0 , tmp_env2->data,ENV_SIZE ) == tmp_env2->crc); } -if (!crc1_ok && !crc2_ok) -return use_default (); -else if (crc1_ok && !crc2_ok) - gd->env_valid =1 ; -else if (!crc1_ok && crc2_ok) - gd->env_valid =2 ; -else { +/* both ok - check serial */ if (tmp_env1->flags ==255 && tmp_env2->flags ==0 ) gd->env_valid =2 ;
@@ -266,8 +260,6 @@ void env_relocate_spec (void)else /* flags are equal - almost impossible */ gd->env_valid =1 ; - } -free (env_ptr);if (gd->env_valid ==1 ) { env_ptr = tmp_env1;
Maybe it isn't the best solution but it works ;)
Thanks for you help!!
Destrukto
Quoted 63 lines · Dharmosoth Seetharam
please Debug the function which i mention earlier.
If you don't get any clue, please copy the code of yourDataflash_Select()hereThanks,
SeetharamDestrukto <[email protected]> wrote:
At first thanks for your reply, but could you explain that in detail please.Thanks Destrukto
Hi,
If I remember correctly, i got the same issue on
AT91SAM9263ek.you please debug the
Dataflash_Select()...
there u many need to go into the if condition and
do valid=1;so, please check it once and modify the condition...
u may get the solution ..
Thanks,
SeetharamSignature · 28 lines
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tf4896117.html#a14028021 Sent from the Uboot - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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 --------------------------------- 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. ------------------------------------------------------------------------- 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
Signature · 2 lines
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tf4896117.html#a14124814 Sent from the Uboot - Users mailing list archive at Nabble.com.
I agree with your comment. !!!!
cool..
Thanks,
Seetharam
Destrukto <[email protected]> wrote:
Yes! I get it work, the problem was, that it had a problem to accept the crc32-Checksum. So I just erased the sequence where this happens. Here the patchfile:
env_nand.c 2007-11-30 14:16:17.000000000 +0100 renamed from env_nand.c 2007-11-30 14:15:03.000000000 +0100 +1 -9
@@ -247,13 +247,7 @@ void env_relocate_spec (void) crc2_ok = (crc32(0, tmp_env2->data, ENV_SIZE) == tmp_env2->crc); } - if(!crc1_ok && !crc2_ok) - return use_default(); - else if(crc1_ok && !crc2_ok) - gd->env_valid = 1; - else if(!crc1_ok && crc2_ok) - gd->env_valid = 2; - else { + /* both ok - check serial */ if(tmp_env1->flags == 255 && tmp_env2->flags == 0) gd->env_valid = 2;
@@ -266,8 +260,6 @@ void env_relocate_spec (void) else /* flags are equal - almost impossible */ gd->env_valid = 1; - } - free(env_ptr); if(gd->env_valid == 1) { env_ptr = tmp_env1;
Maybe it isn't the best solution but it works ;)
Thanks for you help!!
Destrukto
Quoted 63 lines · Dharmosoth Seetharam
please Debug the function which i mention earlier.
If you don't get any clue, please copy the code of yourDataflash_Select()hereThanks,
SeetharamDestrukto wrote:
At first thanks for your reply, but could you explain that in detail please.Thanks Destrukto
Hi,
If I remember correctly, i got the same issue on
AT91SAM9263ek.you please debug the
Dataflash_Select()...
there u many need to go into the if condition and
do valid=1;so, please check it once and modify the condition...
u may get the solution ..
Thanks,
SeetharamSignature · 28 lines
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tf4896117.html#a14028021 Sent from the Uboot - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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 --------------------------------- 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. ------------------------------------------------------------------------- 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
Signature · 21 lines
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tf4896117.html#a14124814
Sent from the Uboot - Users mailing list archive at Nabble.com.
-------------------------------------------------------------------------
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
---------------------------------
Unlimited freedom, unlimited storage. Get it now
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20071203/2377a2f8/attachment.htm 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
}
Quoted 147 lines · Dharmosoth Seetharam
I agree with your comment. !!!!
cool..
Thanks,
SeetharamDestrukto <[email protected]> wrote:
Yes! I get it work, the problem was, that it had a problem to accept the crc32-Checksum. So I just erased the sequence where this happens. Here the patchfile:env_nand.c 2007-11-30 14:16:17.000000000 +0100 renamed from env_nand.c 2007-11-30 14:15:03.000000000 +0100 +1
-9@@ -247,13 +247,7 @@ void env_relocate_spec (void) crc2_ok = (crc32(0, tmp_env2->data, ENV_SIZE) == tmp_env2->crc); } - if(!crc1_ok && !crc2_ok) - return use_default(); - else if(crc1_ok && !crc2_ok) - gd->env_valid = 1; - else if(!crc1_ok && crc2_ok) - gd->env_valid = 2; - else { + /* both ok - check serial */ if(tmp_env1->flags == 255 && tmp_env2->flags == 0) gd->env_valid = 2;@@ -266,8 +260,6 @@ void env_relocate_spec (void) else /* flags are equal - almost impossible */ gd->env_valid = 1; - } - free(env_ptr); if(gd->env_valid == 1) { env_ptr = tmp_env1;Maybe it isn't the best solution but it works ;)
Thanks for you help!!Destrukto
Quoted 64 lines · Dharmosoth Seetharam
please Debug the function which i mention earlier. If you don't get any clue, please copy the code of your
Dataflash_Select()
hereThanks,
SeetharamDestrukto wrote:
At first thanks for your reply, but could you explain that in detail please.Thanks Destrukto
Hi,
If I remember correctly, i got the same issue on
AT91SAM9263ek.you please debug the
Dataflash_Select()...
there u many need to go into the if condition and
do valid=1;so, please check it once and modify the condition...
u may get the solution ..
Thanks,
SeetharamSignature · 28 lines
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tf4896117.html#a14028021 Sent from the Uboot - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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 --------------------------------- 5, 50, 500, 5000 - Store N number of mails in your inbox. Click here. ------------------------------------------------------------------------- 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-usersSignature · 28 lines
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tf4896117.html#a14124814 Sent from the Uboot - Users mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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 --------------------------------- Unlimited freedom, unlimited storage. Get it now ------------------------------------------------------------------------- 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
Signature · 2 lines
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tp14022552p15087191.html Sent from the Uboot - Users mailing list archive at Nabble.com.
Quoted 10 lines · In message <[email protected]> you wrote:
Yes! I get it work, the problem was, that it had a problem to accept the crc32-Checksum. So I just erased the sequence where this happens. Here the patchfile:
env_nand.c +0
-0@@ -247,13 +247,7 @@ void env_relocate_spec (void) crc2_ok = (crc32 (0 , tmp_env2->data,ENV_SIZE ) == tmp_env2->crc); }
env_nand.c void env_relocate_spec (void) · line 251
Quoted 10 lines
env_nand.c +1
-7-if (!crc1_ok && !crc2_ok) -return use_default (); -else if (crc1_ok && !crc2_ok) - gd->env_valid =1 ; -else if (!crc1_ok && crc2_ok) - gd->env_valid =2 ; -else { +/* both ok - check serial */
You mean you completely castrated all logic that would verify if the environment is OK? Arrggghhhh...
env_nand.c void env_relocate_spec (void) · line 252
Quoted 1 line
env_nand.c +0
-0Maybe it isn't the best solution but it works ;)
You THINK it works, but actually it's completely broken.
Don't do that!!!
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things." - Doug Gwyn
Well, until now I haven't got any problem with this solution. So until I can't find any better solution I will use the system as long as it works.
Quoted 55 lines · wd
Quoted 11 lines · In message <[email protected]> you wrote:
Yes! I get it work, the problem was, that it had a problem to accept the crc32-Checksum. So I just erased the sequence where this happens. Here the
patchfile:env_nand.c +0
-0@@ -247,13 +247,7 @@ void env_relocate_spec (void) crc2_ok = (crc32 (0 , tmp_env2->data,ENV_SIZE ) == tmp_env2->crc); }env_nand.c void env_relocate_spec (void) · line 251
Quoted 10 lines
env_nand.c +1
-7-if (!crc1_ok && !crc2_ok) -return use_default (); -else if (crc1_ok && !crc2_ok) - gd->env_valid =1 ; -else if (!crc1_ok && crc2_ok) - gd->env_valid =2 ; -else { +/* both ok - check serial */ You mean you completely castrated all logic that would verify if the environment is OK? Arrggghhhh...
env_nand.c void env_relocate_spec (void) · line 252
Quoted 1 line
env_nand.c +0
-0Maybe it isn't the best solution but it works ;)You THINK it works, but actually it's completely broken.
Don't do that!!!
Best regards,
Wolfgang Denk
Signature · 15 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things." - Doug Gwyn ------------------------------------------------------------------------- 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
Signature · 2 lines
View this message in context: http://www.nabble.com/AT91SAM9260-EK%3A-Trying-to-load-U-Boot-env-from-NAND-tf4896117.html#a14146625 Sent from the Uboot - Users mailing list archive at Nabble.com.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello!
Quoted 1 line · Destrukto
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-----
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
}
Quoted 47 lines · Andreas Schweigstill
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1Hello!
Quoted 1 line · Destrukto
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 SchweigstillPS.: 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.orgiD8DBQFHVSEeYQhaO218O9ERAjfUAKCMo7uHtcz+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
Signature · 2 lines
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.
Quoted 3 lines · In message <[email protected]> you wrote:
Well, until now I haven't got any problem with this solution. So until I can't find any better solution I will use the system as long as it works.
Then all I can do is wishing you an early and complete crash, otherwise you will never fix the real problem until it really hurts.
Best regards,
Wolfgang Denk
Signature · 5 lines
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de "Beauty is transitory." "Beauty survives." -- Spock and Kirk, "That Which Survives", stardate unknown