public inbox for ecos-devel@sourceware.org
 help / color / mirror / Atom feed
From: "René Nielsen" <rbn@vitesse.com>
To: ecos-devel@ecos.sourceware.org
Subject: RedBoot: Auto-detection of gzipped/non-gzipped images
Date: Tue, 27 Nov 2007 09:57:00 -0000	[thread overview]
Message-ID: <13967870.post@talk.nabble.com> (raw)


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 
Thx.
René Schipp von Branitz Nielsen
Vitesse Semiconductors

-- 
View this message in context: http://www.nabble.com/RedBoot%3A-Auto-detection-of-gzipped-non-gzipped-images-tf4880764.html#a13967870
Sent from the Sourceware - ecos-devel mailing list archive at Nabble.com.

             reply	other threads:[~2007-11-27  9:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-27  9:57 René Nielsen [this message]
2007-11-30  9:05 ` René Nielsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13967870.post@talk.nabble.com \
    --to=rbn@vitesse.com \
    --cc=ecos-devel@ecos.sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).