git.openpandora.org
/
pandora-x-loader.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
849ac75
)
stop reading NAND on special EOF signature
author
Grazvydas Ignotas
<notasas@gmail.com>
Tue, 27 Dec 2011 23:49:37 +0000
(
01:49
+0200)
committer
Grazvydas Ignotas
<notasas@gmail.com>
Tue, 27 Dec 2011 23:49:37 +0000
(
01:49
+0200)
lib/board.c
patch
|
blob
|
history
diff --git
a/lib/board.c
b/lib/board.c
index
1c79d58
..
2381b69
100644
(file)
--- a/
lib/board.c
+++ b/
lib/board.c
@@
-36,6
+36,8
@@
#include <fat.h>
#include <asm/arch/mem.h>
#include <fat.h>
#include <asm/arch/mem.h>
+#define END_MARK 0x646e65ff /* end */
+
const char version_string[] =
"Texas Instruments X-Loader 1.5.1 (" __DATE__ " - " __TIME__ ")";
const char version_string[] =
"Texas Instruments X-Loader 1.5.1 (" __DATE__ " - " __TIME__ ")";
@@
-121,8
+123,11
@@
void start_armboot (void)
printf("Loading u-boot.bin from nand\n");
#endif
for (i = NAND_UBOOT_START; i < NAND_UBOOT_END; i+= NAND_BLOCK_SIZE){
printf("Loading u-boot.bin from nand\n");
#endif
for (i = NAND_UBOOT_START; i < NAND_UBOOT_END; i+= NAND_BLOCK_SIZE){
- if (!nand_read_block(buf, i))
+ if (!nand_read_block(buf, i))
{
buf += NAND_BLOCK_SIZE; /* advance buf ptr */
buf += NAND_BLOCK_SIZE; /* advance buf ptr */
+ if (*(int *)(buf - 8) == END_MARK && *(int *)(buf - 4) == END_MARK)
+ break;
+ }
}
#endif
}
}
#endif
}