This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

redboot fis patch


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 -ru packages-orig/redboot/current/ChangeLog
packages/redboot/current/ChangeLog
--- packages-orig/redboot/current/ChangeLog	2002-08-19
11:42:28.000000000 +0200
+++ packages/redboot/current/ChangeLog	2002-08-19 13:22:46.000000000 +0200
@@ -1,3 +1,10 @@
+2002-08-19  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-16  Jani Monoses  <jani@iv.ro>
 
 	* src/io.c: Do not add empty lines to command history.
diff -ru packages-orig/redboot/current/src/flash.c
packages/redboot/current/src/flash.c
--- packages-orig/redboot/current/src/flash.c	2002-08-19
11:42:28.000000000 +0200
+++ packages/redboot/current/src/flash.c	2002-08-19
13:19:23.000000000 +0200
@@ -41,7 +41,7 @@
 //#####DESCRIPTIONBEGIN####
 //
 // Author(s):    gthomas
-// Contributors: gthomas
+// Contributors: gthomas, tkoeller
 // Date:         2000-07-28
 // Purpose:      
 // Description:  
@@ -726,7 +726,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
@@ -883,7 +884,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;
     }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]