From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22619 invoked by alias); 27 Nov 2007 09:57:06 -0000 Received: (qmail 22609 invoked by uid 22791); 27 Nov 2007 09:57:05 -0000 X-Spam-Status: No, hits=1.4 required=5.0 tests=AWL,BAYES_05,DK_POLICY_SIGNSOME,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from kuber.nabble.com (HELO kuber.nabble.com) (216.139.236.158) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 27 Nov 2007 09:56:59 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1IwxBZ-0000ew-PZ for ecos-devel@ecos.sourceware.org; Tue, 27 Nov 2007 01:56:57 -0800 Message-ID: <13967870.post@talk.nabble.com> Date: Tue, 27 Nov 2007 09:57:00 -0000 From: =?UTF-8?Q?Ren=C3=A9_Nielsen?= To: ecos-devel@ecos.sourceware.org Subject: RedBoot: Auto-detection of gzipped/non-gzipped images MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: rbn@vitesse.com X-IsSubscribed: yes Mailing-List: contact ecos-devel-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-devel-owner@ecos.sourceware.org X-SW-Source: 2007-11/txt/msg00003.txt.bz2 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. http://www.nabble.com/file/p13967870/diff.patch diff.patch=20 Thx. Ren=C3=A9 Schipp von Branitz Nielsen Vitesse Semiconductors --=20 View this message in context: http://www.nabble.com/RedBoot%3A-Auto-detecti= on-of-gzipped-non-gzipped-images-tf4880764.html#a13967870 Sent from the Sourceware - ecos-devel mailing list archive at Nabble.com.