[ECOS] fis load -d

Patrick Doyle wpd@delcomsys.com
Tue Dec 31 11:10:00 GMT 2002

> 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.

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

But if I change 'gzip_close()' as follows:
    case Z_OK:
#if 1
        if (stream_end) {
        // 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".


Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

More information about the Ecos-discuss mailing list