aboutsummaryrefslogtreecommitdiff
path: root/lib/decompress.c
AgeCommit message (Collapse)AuthorFilesLines
2011-01-13decompressors: add boot-time XZ supportLasse Collin1-0/+5
This implements the API defined in <linux/decompress/generic.h> which is used for kernel, initramfs, and initrd decompression. This patch together with the first patch is enough for XZ-compressed initramfs and initrd; XZ-compressed kernel will need arch-specific changes. The buffering requirements described in decompress_unxz.c are stricter than with gzip, so the relevant changes should be done to the arch-specific code when adding support for XZ-compressed kernel. Similarly, the heap size in arch-specific pre-boot code may need to be increased (30 KiB is enough). The XZ decompressor needs memmove(), memeq() (memcmp() == 0), and memzero() (memset(ptr, 0, size)), which aren't available in all arch-specific pre-boot environments. I'm including simple versions in decompress_unxz.c, but a cleaner solution would naturally be nicer. Signed-off-by: Lasse Collin <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Alain Knaff <[email protected]> Cc: Albin Tonnerre <[email protected]> Cc: Phillip Lougher <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2010-01-11Add LZO compression support for initramfs and old-style initrdAlbin Tonnerre1-0/+5
Signed-off-by: Albin Tonnerre <[email protected]> Tested-by: Wu Zhangjin <[email protected]> Acked-by: "H. Peter Anvin" <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Tested-by: Russell King <[email protected]> Acked-by: Russell King <[email protected]> Cc: Ralf Baechle <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
2009-02-19bzip2/lzma: don't stop search at first unconfigured compressionAlain Knaff1-1/+1
Impact: Bugfix, avoids kernels which build but panic on boot Fix a bug in decompress.c : only scanned until the first non-configured compressor (with disastrous result especially if that was gzip.) Signed-off-by: Alain Knaff <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2009-01-12bzip2/lzma: comprehensible error messages for missing decompressorH. Peter Anvin1-6/+10
Instead of failing to identify a compressed image with a decompressor that we don't have compiled in, identify it and fail with a comprehensible panic message. Signed-off-by: H. Peter Anvin <[email protected]>
2009-01-08bzip2/lzma: centralize format detectionH. Peter Anvin1-0/+50
Centralize the compression format detection to a common routine in the lib directory, and use it for both initramfs and initrd. Signed-off-by: H. Peter Anvin <[email protected]>