* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
@ 2007-11-29 9:59 Destrukto
2007-11-29 14:06 ` Dharmosoth Seetharam
0 siblings, 1 reply; 12+ messages in thread
From: Destrukto @ 2007-11-29 9:59 UTC (permalink / raw)
To: u-boot
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
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
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
0 siblings, 1 reply; 12+ messages in thread
From: Dharmosoth Seetharam @ 2007-11-29 14:06 UTC (permalink / raw)
To: u-boot
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
--- Destrukto <simon.bielmann@gmx.ch> wrote:
>
> 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
> --
> 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.
>
>
>
-------------------------------------------------------------------------
> 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
>
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
2007-11-29 14:06 ` Dharmosoth Seetharam
@ 2007-11-29 15:32 ` Destrukto
2007-11-30 6:17 ` Dharmosoth Seetharam
0 siblings, 1 reply; 12+ messages in thread
From: Destrukto @ 2007-11-29 15:32 UTC (permalink / raw)
To: u-boot
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
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
2007-11-29 15:32 ` Destrukto
@ 2007-11-30 6:17 ` Dharmosoth Seetharam
2007-12-03 7:14 ` Destrukto
0 siblings, 1 reply; 12+ messages in thread
From: Dharmosoth Seetharam @ 2007-11-30 6:17 UTC (permalink / raw)
To: u-boot
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 <simon.bielmann@gmx.ch> 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
--
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
2007-11-30 6:17 ` Dharmosoth Seetharam
@ 2007-12-03 7:14 ` Destrukto
2007-12-03 9:28 ` Dharmosoth Seetharam
2007-12-03 9:55 ` Wolfgang Denk
0 siblings, 2 replies; 12+ messages in thread
From: Destrukto @ 2007-12-03 7:14 UTC (permalink / raw)
To: u-boot
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:15:03.000000000 +0100
+++ env_nand.c 2007-11-30 14:16:17.000000000 +0100
@@ -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
Dharmosoth Seetharam wrote:
>
> 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 <simon.bielmann@gmx.ch> 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
> --
> 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
>
>
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
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
1 sibling, 1 reply; 12+ messages in thread
From: Dharmosoth Seetharam @ 2007-12-03 9:28 UTC (permalink / raw)
To: u-boot
I agree with your comment. !!!!
cool..
Thanks,
Seetharam
Destrukto <simon.bielmann@gmx.ch> 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:15:03.000000000 +0100
+++ env_nand.c 2007-11-30 14:16:17.000000000 +0100
@@ -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
Dharmosoth Seetharam wrote:
>
> 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 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
> --
> 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
>
>
--
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
2007-12-03 7:14 ` Destrukto
2007-12-03 9:28 ` Dharmosoth Seetharam
@ 2007-12-03 9:55 ` Wolfgang Denk
2007-12-04 8:33 ` Destrukto
1 sibling, 1 reply; 12+ messages in thread
From: Wolfgang Denk @ 2007-12-03 9:55 UTC (permalink / raw)
To: u-boot
In message <14124814.post@talk.nabble.com> 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 2007-11-30 14:15:03.000000000 +0100
> +++ env_nand.c 2007-11-30 14:16:17.000000000 +0100
> @@ -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 */
You mean you completely castrated all logic that would verify if the
environment is OK? Arrggghhhh...
> Maybe 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
--
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
2007-12-03 9:55 ` Wolfgang Denk
@ 2007-12-04 8:33 ` Destrukto
2007-12-04 9:42 ` Andreas Schweigstill
2007-12-04 13:57 ` Wolfgang Denk
0 siblings, 2 replies; 12+ messages in thread
From: Destrukto @ 2007-12-04 8:33 UTC (permalink / raw)
To: u-boot
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.
wd wrote:
>
> In message <14124814.post@talk.nabble.com> 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 2007-11-30 14:15:03.000000000 +0100
>> +++ env_nand.c 2007-11-30 14:16:17.000000000 +0100
>> @@ -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 */
>
> You mean you completely castrated all logic that would verify if the
> environment is OK? Arrggghhhh...
>
>> Maybe 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
>
> --
> 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
>
>
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
2007-12-04 8:33 ` Destrukto
@ 2007-12-04 9:42 ` Andreas Schweigstill
2008-01-25 13:04 ` Destrukto
2007-12-04 13:57 ` Wolfgang Denk
1 sibling, 1 reply; 12+ messages in thread
From: Andreas Schweigstill @ 2007-12-04 9:42 UTC (permalink / raw)
To: u-boot
-----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-----
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
2007-12-04 8:33 ` Destrukto
2007-12-04 9:42 ` Andreas Schweigstill
@ 2007-12-04 13:57 ` Wolfgang Denk
1 sibling, 0 replies; 12+ messages in thread
From: Wolfgang Denk @ 2007-12-04 13:57 UTC (permalink / raw)
To: u-boot
In message <14146625.post@talk.nabble.com> 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
--
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
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
2007-12-03 9:28 ` Dharmosoth Seetharam
@ 2008-01-25 13:02 ` Destrukto
0 siblings, 0 replies; 12+ messages in thread
From: Destrukto @ 2008-01-25 13:02 UTC (permalink / raw)
To: u-boot
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
}
Dharmosoth Seetharam wrote:
>
>
> I agree with your comment. !!!!
>
> cool..
>
> Thanks,
> Seetharam
>
>
> Destrukto <simon.bielmann@gmx.ch> 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:15:03.000000000 +0100
> +++ env_nand.c 2007-11-30 14:16:17.000000000 +0100
> @@ -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
>
>
> Dharmosoth Seetharam wrote:
>>
>> 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 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
>> --
>> 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
>>
>>
>
> --
> 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
>
>
--
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [U-Boot-Users] AT91SAM9260-EK: Trying to load U-Boot env from NAND
2007-12-04 9:42 ` Andreas Schweigstill
@ 2008-01-25 13:04 ` Destrukto
0 siblings, 0 replies; 12+ messages in thread
From: Destrukto @ 2008-01-25 13:04 UTC (permalink / raw)
To: u-boot
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.
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-01-25 13:04 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-12-04 13:57 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox