RedBoot: Auto-detection of gzipped/non-gzipped images

View: New views
2 Messages — Rating Filter:   Alert me  

RedBoot: Auto-detection of gzipped/non-gzipped images

by René Nielsen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

Re: RedBoot: Auto-detection of gzipped/non-gzipped images

by René Nielsen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello again,

I posted a bug regarding "fis load -d" on ecos-discuss the day before yesterday (see e.g. http://www.nabble.com/forum/ViewPost.jtp?post=13993780&framed=y).
Gary Thomas asked me to send a patch for that, so I have merged the "fis load -d" bug patch with the zip-image auto-detect patch, and attached it to this post.

Also, I've snail-mailed an eCos Copyright Assignment as suggested by Gary in the aforementioned mail.

/René


diff2.patch