# HG changeset patch # User asl # Date 1100026754 0 # Node ID ecd76f4985081e536a91b39f6124d6703adb7d02 # Parent b9ae2f90a53eaf8ec63cb0481416a9886125809d * 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. diff --git a/packages/redboot/current/ChangeLog b/packages/redboot/current/ChangeLog --- a/packages/redboot/current/ChangeLog +++ b/packages/redboot/current/ChangeLog @@ -1,3 +1,12 @@ +2004-11-09 David Vrabel + + * 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. + 2004-11-04 Peter Korsgaard * src/fconfig.c (flash_write_config): Removed compiler warning diff --git a/packages/redboot/current/cdl/redboot.cdl b/packages/redboot/current/cdl/redboot.cdl --- a/packages/redboot/current/cdl/redboot.cdl +++ b/packages/redboot/current/cdl/redboot.cdl @@ -263,6 +263,12 @@ cdl_package CYGPKG_REDBOOT { # Implemented within the platform HAL } + cdl_option CYGBLD_BUILD_REDBOOT_WITH_IOMEM { + display "Include I/O Memory commands 'in' and 'out'" + default_value CYGPKG_HAL_I386 + compile -library=libextras.a iomem.c + } + no_define description "This option enables the building of the Redboot ELF image. The image may require further relocation or symbol @@ -732,14 +738,14 @@ cdl_package CYGPKG_REDBOOT { } 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 { diff --git a/packages/redboot/current/src/flash.c b/packages/redboot/current/src/flash.c --- a/packages/redboot/current/src/flash.c +++ b/packages/redboot/current/src/flash.c @@ -564,8 +564,7 @@ find_free(struct free_chunk *chunks) // 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 @@ fis_free(int argc, char *argv[]) // 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 @@ fis_find_free(CYG_ADDRESS *addr, unsigne // 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) {