On Wed, 2008-03-19 at 00:46 +0100, Carl-Daniel Hailfinger wrote:
To be honest, most of this probably could be worked around a bit easier with less code changes if decompression wasn't changed at all. Is there any reason we can't copy (in the sense of "read byte from SPI, copy it somewhere") the ROM contents to a given location in RAM, then decompress it with normal lzma functions? That would reduce code differences to copy/nocopy and decompression source address. As a bonus, it would speed up booting a lot in the SPI case.
I don't see how "copy byte by byte from rom to ram and when all bytes are done, only then start decompressing" would be faster than "copy byte by byte from rom to ram and decompress while doing that". Can you explain, please? Besides the fact that we need yet-another-place-in-ram to do yet another copy. I was looking at the opposite: while decompressing, copy it directly to the place the elf-header says it should be, using the LZMA_OUT_READ mode. That should speed up the ELF loading in the normal rom_stream mode too.
Ronald.