This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: fis load -d
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Patrick Doyle <wpd at delcomsys dot com>
- Cc: eCos Discussion <ecos-discuss at sources dot redhat dot com>
- Date: 31 Dec 2002 12:10:18 -0700
- Subject: RE: [ECOS] fis load -d
- References: <NFBBJAJICAKJPMMKDAGBEEABDIAA.wpd@delcomsys.com>
On Tue, 2002-12-31 at 11:55, Patrick Doyle wrote:
> > There are two lengths kept for each FIS image - the size
> > of the FLASH used (rounded to blocks) and the actual size
> > of the data (which may be less). If you don't specify the
> > latter (via the -s option to 'fis create'), then the actual
> > size won't be known and all that is kept is the rounded size.
> >
> > Try using the "-s XXX" option when you create the image. If
> > the 'fis -d' then still has a problem, I'd like to hear about it.
> >
> Hmmm....
>
> RedBoot> fis create -b 0x160000 -l 2016720 -s 2016720 initrd
> ... Erase from 0x10180000-0x10370000: ...............................
> ... Program from 0x00160000-0x0034c5d0 at 0x10180000:
> ...............................
> ... Erase from 0x103f0000-0x10400000: .
> ... Program from 0x01fef000-0x01fff000 at 0x103f0000: .
> RedBoot> fis list
> Name FLASH addr Mem addr Length Entry point
> RedBoot 0x10000000 0x10000000 0x00020000 0x00000000
> RedBoot config 0x103E0000 0x103E0000 0x00001000 0x00000000
> FIS directory 0x103F0000 0x103F0000 0x00010000 0x00000000
> RedBoot[backup] 0x10020000 0x00020000 0x00020000 0x00020040
> Image 0x10040000 0x00020000 0x00140000 0x00020000
> initrd 0x10180000 0x00160000 0x001F0000 0x00160000
> RedBoot> fis load -d initrd
> decompression error: premature end of input
> RedBoot>
>
>
> But if I change 'gzip_close()' as follows:
> case Z_OK:
> #if 1
> if (stream_end) {
> break;
> }
> #endif
> // Decompression didn't complete
> p->msg = "premature end of input";
> // fall-through
>
> (i.e. I add the code inside the '#if 1' construct), it appears to work
> correctly. I suppose I could go and chase down where the "-s" information
> gets recorded and see if that is what gets passed to the decompress
> function, but you asked if "-s XXX" solved the problem and the answer
> appears to be "not yet".
I seem to recall it working properly in the past. However, there
have been some changes in the decompression code, so if your change
makes it work better, we should apply it. Can you send a proper
patch, along with a ChangeLog entry, please?
--
------------------------------------------------------------
Gary Thomas |
MLB Associates | Consulting for the
+1 (970) 229-1963 | Embedded world
http://www.mlbassoc.com/ |
email: <gary@mlbassoc.com> |
gpg: http://www.chez-thomas.org/gary/gpg_key.asc
------------------------------------------------------------
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss