1 diff --git a/lib/Kconfig b/lib/Kconfig
2 index bb1326d..8639349 100644
5 @@ -117,6 +117,10 @@ config DECOMPRESS_BZIP2
10 + select LZO_DECOMPRESS
14 # Generic allocator support is selected if needed
16 diff --git a/lib/Makefile b/lib/Makefile
17 index 2e78277..cfa4041 100644
20 @@ -69,6 +69,7 @@ obj-$(CONFIG_LZO_DECOMPRESS) += lzo/
21 lib-$(CONFIG_DECOMPRESS_GZIP) += decompress_inflate.o
22 lib-$(CONFIG_DECOMPRESS_BZIP2) += decompress_bunzip2.o
23 lib-$(CONFIG_DECOMPRESS_LZMA) += decompress_unlzma.o
24 +lib-$(CONFIG_DECOMPRESS_LZO) += decompress_unlzo.o
26 obj-$(CONFIG_TEXTSEARCH) += textsearch.o
27 obj-$(CONFIG_TEXTSEARCH_KMP) += ts_kmp.o
28 diff --git a/lib/decompress.c b/lib/decompress.c
29 index d2842f5..a760681 100644
30 --- a/lib/decompress.c
31 +++ b/lib/decompress.c
33 #include <linux/decompress/bunzip2.h>
34 #include <linux/decompress/unlzma.h>
35 #include <linux/decompress/inflate.h>
36 +#include <linux/decompress/unlzo.h>
38 #include <linux/types.h>
39 #include <linux/string.h>
41 #ifndef CONFIG_DECOMPRESS_LZMA
44 +#ifndef CONFIG_DECOMPRESS_LZO
48 static const struct compress_format {
49 unsigned char magic[2];
50 @@ -32,6 +36,7 @@ static const struct compress_format {
51 { {037, 0236}, "gzip", gunzip },
52 { {0x42, 0x5a}, "bzip2", bunzip2 },
53 { {0x5d, 0x00}, "lzma", unlzma },
54 + { {0x89, 0x4c}, "lzo", unlzo },
55 { {0, 0}, NULL, NULL }
58 diff --git a/usr/Kconfig b/usr/Kconfig
59 index 1c3039f..e2721f5 100644
62 @@ -72,6 +72,15 @@ config RD_LZMA
63 Support loading of a LZMA encoded initial ramdisk or cpio buffer
67 + bool "Support initial ramdisks compressed using LZO" if EMBEDDED
69 + depends on BLK_DEV_INITRD
70 + select DECOMPRESS_LZO
72 + Support loading of a LZO encoded initial ramdisk or cpio buffer
76 prompt "Built-in initramfs compression mode" if INITRAMFS_SOURCE!=""
78 @@ -108,16 +117,15 @@ config INITRAMFS_COMPRESSION_GZIP
82 - The old and tried gzip compression. Its compression ratio is
83 - the poorest among the 3 choices; however its speed (both
84 - compression and decompression) is the fastest.
85 + The old and tried gzip compression. It provides a good balance
86 + between compression ratio and decompression speed.
88 config INITRAMFS_COMPRESSION_BZIP2
92 Its compression ratio and speed is intermediate.
93 - Decompression speed is slowest among the three. The initramfs
94 + Decompression speed is slowest among the four. The initramfs
95 size is about 10% smaller with bzip2, in comparison to gzip.
96 Bzip2 uses a large amount of memory. For modern kernels you
97 will need at least 8MB RAM or more for booting.
98 @@ -128,7 +136,15 @@ config INITRAMFS_COMPRESSION_LZMA
100 The most recent compression algorithm.
101 Its ratio is best, decompression speed is between the other
102 - two. Compression is slowest. The initramfs size is about 33%
103 + three. Compression is slowest. The initramfs size is about 33%
104 smaller with LZMA in comparison to gzip.
106 +config INITRAMFS_COMPRESSION_LZO
110 + Its compression ratio is the poorest among the four. The kernel
111 + size is about about 10% bigger than gzip; however its speed
112 + (both compression and decompression) is the fastest.