|
@@ -347,12 +347,19 @@ void autoboot_command(const char *s)
|
|
|
|
|
|
{
|
|
|
unsigned char *BufTmp;
|
|
|
-
|
|
|
- run_command_list("nand read 0x80000000 0x09C00000 0x00600000", -1, 0);
|
|
|
- BufTmp=0x80000000;
|
|
|
+ unsigned int i,Chk=0;
|
|
|
+
|
|
|
+ BufTmp=0x80000000;
|
|
|
+ memset(BufTmp,0,0x600000);
|
|
|
+ run_command_list("nand read 0x80000000 0x09000000 0x00600000", -1, 0);
|
|
|
sprintf(BufTmp,&uboot_version,strlen(uboot_version));
|
|
|
- run_command_list("nand erase 0x09C00000 0x00600000", -1, 0);
|
|
|
- run_command_list("nand write 0x80000000 0x09C00000 0x00600000", -1, 0);
|
|
|
+ for(i=0;i<(0x00600000-4);i++)
|
|
|
+ {
|
|
|
+ Chk+=*(BufTmp+i);
|
|
|
+ }
|
|
|
+ memcpy(BufTmp+(0x00600000-4),&Chk,4);
|
|
|
+ run_command_list("nand erase 0x09000000 0x00600000", -1, 0);
|
|
|
+ run_command_list("nand write 0x80000000 0x09000000 0x00600000", -1, 0);
|
|
|
}
|
|
|
|
|
|
if (stored_bootdelay != -1 && s && !abortboot(stored_bootdelay)) {
|