
1 Apr
2011
1 Apr
'11
5:22 p.m.
--- common/update.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/common/update.c b/common/update.c index fe2139a..8b858bd 100644 --- a/common/update.c +++ b/common/update.c @@ -195,6 +195,13 @@ static int update_flash(ulong addr_source, ulong addr_first, ulong size) return 1; }
+#ifdef CONFIG_SYSTEM_START_ADDR + if (addr_first < CONFIG_SYSTEM_START_ADDR) { + printf("Error: auto-update does not allow to write a new bootloader\n"); + return 1; + } +#endif + /* remove protection on processed sectors */ if (update_flash_protect(0, addr_first, addr_last) > 0) { printf("Error: could not unprotect flash sectors\n");
--
1.7.1