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 directory padding


This is a patch that allows to control the
size that every FIS directory entry is
padded to by means of a configuration
option. This is very useful if the flash
in use has tiny sectors.




diff -x CVS -ru /opt/ecos/packages/redboot/current/cdl/redboot.cdl
redboot/current/cdl/redboot.cdl
--- /opt/ecos/packages/redboot/current/cdl/redboot.cdl	2002-05-24
01:08:25.000000000 +0200
+++ redboot/current/cdl/redboot.cdl	2002-06-28 13:48:45.000000000 +0200
@@ -486,6 +486,17 @@
                   flash to be recognized as a reserved area for RedBoot
                   by an ARM BootRom monitor."
             }
+
+	    cdl_option CYGNUM_REDBOOT_FIS_DIRECTORY_ENTRY_SIZE {
+                display         "Size of FIS directory entry"
+		flavor	    	data
+                default_value   256
+                description "
+                  The FIS directory is limited to one single flash
+		  sector. If your flash has tiny sectors, you may wish
+		  to reduce this value in order to get more slots in
+		  the FIS directory."
+ 	    }
         }
 
         cdl_component CYGSEM_REDBOOT_FLASH_CONFIG {
diff -x CVS -ru /opt/ecos/packages/redboot/current/include/fis.h
redboot/current/include/fis.h
--- /opt/ecos/packages/redboot/current/include/fis.h	2002-05-24
01:08:27.000000000 +0200
+++ redboot/current/include/fis.h	2002-06-28 14:23:42.000000000 +0200
@@ -54,6 +54,12 @@
 //
 
//==========================================================================
 
+#include <pkgconf/redboot.h>
+#include <cyg/infra/cyg_type.h>
+
+#define FIS_IMAGE_DESC_SIZE_UNPADDED \
+  (16 + 4 * sizeof(unsigned long) + 3 * sizeof(CYG_ADDRESS))
+
 struct fis_image_desc {
     unsigned char name[16];      // Null terminated name
     CYG_ADDRESS   flash_base;    // Address within FLASH of image
@@ -61,7 +67,7 @@
     unsigned long size;          // Length of image
     CYG_ADDRESS   entry_point;   // Execution entry point
     unsigned long data_length;   // Length of actual data
-    unsigned char _pad[256-(16+4*sizeof(unsigned
long)+3*sizeof(CYG_ADDRESS))];
+    unsigned char
_pad[CYGNUM_REDBOOT_FIS_DIRECTORY_ENTRY_SIZE-FIS_IMAGE_DESC_SIZE_UNPADDED];
     unsigned long desc_cksum;    // Checksum over image descriptor
     unsigned long file_cksum;    // Checksum over image data
 };


----------------------------------------------- 
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 



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