changeset 306:eb332fa195ca

Add CDL control over FIS entry size - from Thomas Koeller
author gthomas
date Sat, 24 Aug 2002 11:20:54 +0000
parents 82c554739834
children 906a5d289c6d
files packages/redboot/current/ChangeLog packages/redboot/current/cdl/redboot.cdl packages/redboot/current/include/fis.h
diffstat 3 files changed, 27 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/packages/redboot/current/ChangeLog
+++ b/packages/redboot/current/ChangeLog
@@ -1,3 +1,8 @@
+2002-08-20  Thomas Koeller  <thomas@koeller.dyndns.org>
+ 
+     	* cdl/redboot.cdl:
+ 	* include/fis.h: Allow control of FIS descriptor padding.
+
 2002-08-16  Jani Monoses  <jani@iv.ro>
 
 	* src/io.c: Do not add empty lines to command history.
--- a/packages/redboot/current/cdl/redboot.cdl
+++ b/packages/redboot/current/cdl/redboot.cdl
@@ -43,7 +43,7 @@
 #
 # Author(s):      gthomas
 # Original data:  gthomas
-# Contributors:   Philippe Robin, Andrew Lunn
+# Contributors:   Philippe Robin, Andrew Lunn, tkoeller
 # Date:           2000-05-01
 #
 #####DESCRIPTIONEND####
@@ -558,6 +558,17 @@ cdl_package CYGPKG_REDBOOT {
                   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 {
--- a/packages/redboot/current/include/fis.h
+++ b/packages/redboot/current/include/fis.h
@@ -43,7 +43,7 @@
 //#####DESCRIPTIONBEGIN####
 //
 // Author(s):    gthomas
-// Contributors: gthomas
+// Contributors: gthomas, tkoeller
 // Date:         2000-07-28
 // Purpose:      
 // Description:  
@@ -54,6 +54,13 @@
 //
 //==========================================================================
 
+#include <pkgconf/redboot.h>
+#ifdef CYGOPT_REDBOOT_FIS
+#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,11 +68,12 @@ struct fis_image_desc {
     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
 };
 
 struct fis_image_desc *fis_lookup(char *name, int *num);
 
+#endif // CYGOPT_REDBOOT_FIS
 #endif // _FIS_H_