This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: RedBoot: fis free: don't ignore chunk at start.
- From: David Vrabel <dvrabel at arcom dot com>
- To: Andrew Lunn <andrew at lunn dot ch>
- Cc: eCos Patches <ecos-patches at ecos dot sourceware dot org>
- Date: Mon, 01 Nov 2004 10:44:25 +0000
- Subject: Re: RedBoot: fis free: don't ignore chunk at start.
- References: <417D3062.9000200@arcom.com> <417E1133.6060906@arcom.com> <20041026091142.GJ2141@lunn.ch> <417E189C.6030606@arcom.com> <20041027132809.GM2141@lunn.ch> <417FABE4.60403@arcom.com> <20041028080425.GN2141@lunn.ch>
Andrew Lunn wrote:
So i think your patch is OK. But it seems that code has been
cut/pasted a few times and probably the other ones should be fixed as
well. Please could you submit a patch for them all, and the change to
the documentation attribute of the option.
Here it is.
2004-11-01 David Vrabel <dvrabel@arcom.com>
* cdl/redboot.cdl (CYGBLD_REDBOOT_MIN_IMAGE_SIZE): Correct the
description to match what the option is actually used for.
* src/flash.c (find_free, fis_free, fis_find_free): Don't ignore
an extra CYGBLD_REDBOOT_MIN_IMAGE_SIZE amount from the start.
This fixes the case where nothing uses the start of flash.
--
David Vrabel, Design Engineer
Arcom, Clifton Road Tel: +44 (0)1223 411200 ext. 3233
Cambridge CB1 7EA, UK Web: http://www.arcom.com/
--- packages/redboot/current/cdl/redboot.cdl.orig Mon Nov 1 10:01:01 2004
+++ packages/redboot/current/cdl/redboot.cdl Mon Nov 1 10:01:37 2004
@@ -732,14 +732,14 @@
}
cdl_option CYGBLD_REDBOOT_MIN_IMAGE_SIZE {
- display "Minimum image size"
+ display "Maximum RedBoot image size"
flavor data
- default_value 0x20000
+ default_value { CYGOPT_REDBOOT_FIS_REDBOOT ? 0x20000 : 0 }
description "
- This option controls the minimum length of images kept by
- the FIS. In particular, it should be large enough to hold
- the RedBoot primary image itself, as well as be a natural
- multiple of the FLASH erase block size."
+ This option controls the maximum length reserved
+ for the RedBoot boot image in the FIS table.
+ This should be a multiple of the flash's erase
+ block size."
}
cdl_option CYGBLD_REDBOOT_FLASH_BOOT_OFFSET {
--- packages/redboot/current/src/flash.c.orig Tue Oct 26 09:48:59 2004
+++ packages/redboot/current/src/flash.c Mon Nov 1 09:52:28 2004
@@ -564,8 +564,7 @@
// Do not search the area reserved for pre-RedBoot systems:
fis_ptr = (CYG_ADDRESS *)((CYG_ADDRESS)flash_start +
- CYGNUM_REDBOOT_FLASH_RESERVED_BASE +
- CYGBLD_REDBOOT_MIN_IMAGE_SIZE);
+ CYGNUM_REDBOOT_FLASH_RESERVED_BASE);
fis_end = (CYG_ADDRESS *)flash_end;
chunks[num_chunks-1].start = (CYG_ADDRESS)fis_ptr;
chunks[num_chunks-1].end = (CYG_ADDRESS)fis_end;
@@ -620,8 +619,7 @@
// Do not search the area reserved for pre-RedBoot systems:
fis_ptr = (unsigned long *)((CYG_ADDRESS)flash_start +
- CYGNUM_REDBOOT_FLASH_RESERVED_BASE +
- CYGBLD_REDBOOT_MIN_IMAGE_SIZE);
+ CYGNUM_REDBOOT_FLASH_RESERVED_BASE);
fis_end = (unsigned long *)(CYG_ADDRESS)flash_end;
area_start = fis_ptr;
while (fis_ptr < fis_end) {
@@ -672,8 +670,7 @@
// Do not search the area reserved for pre-RedBoot systems:
fis_ptr = (unsigned long *)((CYG_ADDRESS)flash_start +
- CYGNUM_REDBOOT_FLASH_RESERVED_BASE +
- CYGBLD_REDBOOT_MIN_IMAGE_SIZE);
+ CYGNUM_REDBOOT_FLASH_RESERVED_BASE);
fis_end = (unsigned long *)(CYG_ADDRESS)flash_end;
area_start = fis_ptr;
while (fis_ptr < fis_end) {