How to use xzio?
Hi,
I'm trying to experiment with loading xz-compressed multiboot modules and
cannot figure out how to do it so that the xzio module can actually deal with the compressed file (after instrumenting it, the problem is "unsupported xz options"), I've tried simply compressing the file I'm interested in loading with "xz", and with "xz -1" and both of the files cannot be decompressed. What's the deal with the xz support, then?
Also, the grub manual currently only lists gzip:
"
Support automatic decompression
Can decompress files which were compressed by gzip. This function is both
automatic and transparent to the user (i.e. all functions operate upon the uncompressed contents of the specified files). This greatly reduces a file size and loading time, a particularly great benefit for floppies.2
It is conceivable that some kernel modules should be loaded in a
compressed state, so a different module-loading command can be specified to avoid uncompressing the modules. "
(the manual does not mention the --nounzip flag to the module command,
either).
--S
Quoted 9 lines · Seth Goldberg
Hi,
I'm trying to experiment with loading xz-compressed multiboot
modules and cannot figure out how to do it so that the xzio module can actually deal with the compressed file (after instrumenting it, the problem is "unsupported xz options"), I've tried simply compressing the file I'm interested in loading with "xz", and with "xz -1" and both of the files cannot be decompressed. What's the deal with the xz support, then?
xzio utilizes xzembedded for decompression and this implementation doesn't support crc64 (which is default in xz). So one must compress files with xz --check=crc32 foo.bar or xz --check=none foo.bar
It also supports BCJ filters (only with start offset=0) so if you are compressing executable code better compression ratio (few %) can be achieved
xz --x86=start=0 --lzma2 --check=crc32 foo.bar
(also supports PowerPC, ARM, ARM-Thumb, IA-64, SPARC code, see xz manual for details)
Maybe xzio should print appropriate warning when unsupported (but not critical for decompression) option is used?
Quoted 1 line
Also, the grub manual currently only lists gzip:
Yeah... I'll update documentation with xz stuff when find some time :)
Signature · 1 line
Szymon Janc