Bean wrote:
Hi,
This patch add support for lzma decompression. The assembly code
lzma_decode.S is manually optimized to reduce size. The result decoder
is tiny, only 416 bytes longer than the lzo version.
Not bad.
I also include lzma encode from the LZMA SDK. grub needs to use the
ANSI-C version of encoder, which is only present in the latest 4.58
beta. I can't find ready to use shared library in most distro.
Including the encoder/decoder has advantages as well. We don't need to
worry about the host os, and lzma encoder/decoder can be used in other
place, like font compression.
We can load more complete decoder module after we can load modules and
leave more optimized version in boot code.
I use lzma as default, it's still possible to use the old lzo
compression, you just need to add --enable-lzo option when running
configure.
PS, here are some information about the lzma decoder:
properties: lc = 3 lp = 0 pb = 2
memory requirement for the decoder: 15980 bytes
Can we probe for best values and then use always the best? Perhaps embed
them as constants to boot code?
Result of
./grub-mkimage -o core.img biosdisk pc ext2 lvm raid
lzma version: 27,776 bytes
lzo version: 32,768 bytes
Not bad. Not bad at all.
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel