Hi folks,
This suggestion is meant for RedBoot's flash.c:
In our product, we are soon running out of flash space, which has forced us to start using gzipped images. This means that we've enabled the CYGPRI_REDBOOT_ZLIB_FLASH and started using the "-d" option in the boot script for unpacking the images:
fis load -d my_image
This works fine.
However, we need to be backwards compatible, so that old, non-gzipped images can be loaded without passing it through the uncompressor. Loading such an image would require a script change so that the "-d" option was ommited:
fis load my_image
In order to avoid this script change, I've added an auto-detect mechanism, where - when enabled - the image will first be passed through the uncompressor, and only if that one fails, it is one-to-one copied from Flash to RAM. In this way, both types of images will be able to load correctly using:
fis load -a my_image
I've attached a patch. Please have a look and let me know what you think.
diff.patch
Thx.
René Schipp von Branitz Nielsen
Vitesse Semiconductors