This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
redboot fis patch (redboot_1.diff)
- From: "Koeller, T." <Thomas dot Koeller at baslerweb dot com>
- To: "ecos-patches (E-Mail)" <ecos-patches at sources dot redhat dot com>
- Date: Mon, 26 Aug 2002 14:36:35 +0200
- Subject: redboot fis patch (redboot_1.diff)
I already submitted this patch some time ago, but
due to recent changes to redboot is would no longer
apply - the offsets had grown too large. This is an
update that applies cleanly to the current
CVS version.
This patch fixes two issues with redboot:
1. Even if the '-n' option was given to 'fis create',
RedBoot would nonetheless warn about overwriting
the flash image and request a confirmation.
2. When the 'fis load' command was going to check if
the image to be loaded would fit into ram, it used
the full image size instead of the actual data
length.
-----------------------------------------------
Thomas Koeller, Software Development
Basler Vision Technologies
An der Strusbek 60-62
22926 Ahrensburg
Germany
Tel +49 (4102) 463-390
Fax +49 (4102) 463-46390
mailto:Thomas.Koeller@baslerweb.com
http://www.baslerweb.com
diff --strip-trailing-cr -ru packages-orig/redboot/current/ChangeLog
packages/redboot/current/ChangeLog
--- packages-orig/redboot/current/ChangeLog 2002-08-26
11:22:57.000000000 +0200
+++ packages/redboot/current/ChangeLog 2002-08-26 11:49:24.000000000 +0200
@@ -1,3 +1,10 @@
+2002-08-26 Thomas Koeller <thomas@koeller.dyndns.org>
+
+ * src/flash.c: Do not warn about overwriting image data if
+ -n option is used with 'fis create'. For 'fis load',
+ perform load size check based on actual data length, not
+ image size.
+
2002-08-20 Thomas Koeller <thomas@koeller.dyndns.org>
* cdl/redboot.cdl:
diff --strip-trailing-cr -ru packages-orig/redboot/current/src/flash.c
packages/redboot/current/src/flash.c
--- packages-orig/redboot/current/src/flash.c 2002-08-26
11:22:57.000000000 +0200
+++ packages/redboot/current/src/flash.c 2002-08-26
11:45:47.000000000 +0200
@@ -727,7 +727,8 @@
return;
} else {
if (defaults_assumed) {
- if (!verify_action("* CAUTION * about to program '%s'\n
at %p..%p from %p",
+ if (no_copy &&
+ !verify_action("* CAUTION * about to program '%s'\n
at %p..%p from %p",
name, (void *)flash_addr, (void
*)(flash_addr+img_size-1),
(void *)mem_addr)) {
return; // The guy gave up
@@ -886,7 +887,7 @@
}
// Load image from FLASH into RAM
if ((mem_addr < (CYG_ADDRESS)user_ram_start) ||
- ((mem_addr+img->size) >= (CYG_ADDRESS)user_ram_end)) {
+ ((mem_addr+img->data_length) >= (CYG_ADDRESS)user_ram_end)) {
diag_printf("Not a loadable image\n");
return;
}