summaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-06-30 08:40:35 +0200
committerWaldemar Brodkorb <wbx@openadk.org>2014-06-30 08:40:35 +0200
commit8b2ea5fd6a65f35d670eba5c44a7f7f9d561c131 (patch)
tree249a0a0e9f103e5866b69405223204b5a4fba1f7 /target
parenteb3f81cc2f161f97954b9b93839a0225bc2bf83b (diff)
add support for lz4 compressed kernel and initramfs
Diffstat (limited to 'target')
-rw-r--r--target/config/Config.in.tools9
-rw-r--r--target/linux/config/Config.in.kernel18
-rw-r--r--target/linux/patches/3.15.2/lz4.patch16
3 files changed, 43 insertions, 0 deletions
diff --git a/target/config/Config.in.tools b/target/config/Config.in.tools
index 194dba7a0..5e8e3ba77 100644
--- a/target/config/Config.in.tools
+++ b/target/config/Config.in.tools
@@ -98,6 +98,14 @@ config ADK_HOST_BUILD_GENEXT2FS
boolean
default n
+config ADK_HOST_NEED_LZ4
+ boolean
+ default n
+
+config ADK_HOST_BUILD_LZ4
+ boolean
+ default n
+
config ADK_HOST_NEED_LZMA
boolean
default n
@@ -179,6 +187,7 @@ config ADK_COMPRESSION_TOOL
default "gzip -n9" if ADK_KERNEL_INITRAMFS_COMPRESSION_GZIP
default "bzip2" if ADK_KERNEL_INITRAMFS_COMPRESSION_BZIP2
default "xz -v --check=crc32 --lzma2=dict=1MiB" if ADK_KERNEL_INITRAMFS_COMPRESSION_XZ
+ default "lz4c -l" if ADK_KERNEL_INITRAMFS_COMPRESSION_LZ4
default "lzma -9" if ADK_KERNEL_INITRAMFS_COMPRESSION_LZMA
default "lzop" if ADK_KERNEL_INITRAMFS_COMPRESSION_LZO
default "gzip -n9"
diff --git a/target/linux/config/Config.in.kernel b/target/linux/config/Config.in.kernel
index 1999b2055..348498936 100644
--- a/target/linux/config/Config.in.kernel
+++ b/target/linux/config/Config.in.kernel
@@ -17,6 +17,10 @@ config ADK_KERNEL_INITRAMFS_COMPRESSION_XZ
select ADK_HOST_NEED_XZ
boolean
+config ADK_KERNEL_INITRAMFS_COMPRESSION_LZ4
+ select ADK_HOST_NEED_LZ4
+ boolean
+
config ADK_KERNEL_INITRAMFS_COMPRESSION_LZMA
select ADK_HOST_NEED_LZMA
boolean
@@ -44,6 +48,12 @@ config ADK_KERNEL_RD_BZIP2
config ADK_KERNEL_KERNEL_BZIP2
boolean
+config ADK_KERNEL_RD_LZ4
+ boolean
+
+config ADK_KERNEL_KERNEL_LZ4
+ boolean
+
config ADK_KERNEL_RD_LZMA
boolean
@@ -137,6 +147,14 @@ config ADK_KERNEL_COMP_XZ
select ADK_KERNEL_KERNEL_XZ
select ADK_KERNEL_INITRAMFS_COMPRESSION_XZ
+config ADK_KERNEL_COMP_LZ4
+ prompt "use LZ4 compression"
+ boolean
+ select ADK_KERNEL_RD_LZ4
+ select ADK_KERNEL_KERNEL_LZ4
+ select ADK_KERNEL_INITRAMFS_COMPRESSION_LZ4
+ depends on ADK_LINUX_X86 || ADK_LINUX_ARM
+
config ADK_KERNEL_COMP_LZMA
prompt "use LZMA compression"
boolean
diff --git a/target/linux/patches/3.15.2/lz4.patch b/target/linux/patches/3.15.2/lz4.patch
new file mode 100644
index 000000000..3106015ab
--- /dev/null
+++ b/target/linux/patches/3.15.2/lz4.patch
@@ -0,0 +1,16 @@
+diff -Nur linux-3.15.2.orig/usr/Kconfig linux-3.15.2/usr/Kconfig
+--- linux-3.15.2.orig/usr/Kconfig 2014-06-26 21:17:52.000000000 +0200
++++ linux-3.15.2/usr/Kconfig 2014-06-30 08:29:00.000000000 +0200
+@@ -174,4 +174,12 @@
+ size is about 10% bigger than gzip; however its speed
+ (both compression and decompression) is the fastest.
+
++config INITRAMFS_COMPRESSION_LZ4
++ bool "LZ4"
++ depends on RD_LZ4
++ help
++ Its compression ratio is the poorest among the choices. The kernel
++ size is about 10% bigger than gzip; however its speed
++ (both compression and decompression) is the fastest.
++
+ endchoice