From patchwork Sat Jan 24 04:41:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Hintz X-Patchwork-Id: 432371 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 231C11402A6 for ; Sat, 24 Jan 2015 15:42:15 +1100 (AEDT) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6F89C28BE64; Sat, 24 Jan 2015 05:39:47 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,FREEMAIL_FROM, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 0CFC028BE59 for ; Sat, 24 Jan 2015 05:39:41 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 CL_IP_EQ_HELO_IP=-2 (check from: .hotmail. - helo: .blu004-omc2s20.hotmail. - helo-domain: .hotmail.) FROM/MX_MATCHES_HELO(DOMAIN)=-2; rate: -8.5 Received: from BLU004-OMC2S20.hotmail.com (blu004-omc2s20.hotmail.com [65.55.111.95]) by arrakis.dune.hu (Postfix) with ESMTPS for ; Sat, 24 Jan 2015 05:39:40 +0100 (CET) Received: from BLU437-SMTP64 ([65.55.111.71]) by BLU004-OMC2S20.hotmail.com over TLS secured channel with Microsoft SMTPSVC(7.5.7601.22751); Fri, 23 Jan 2015 20:42:01 -0800 X-TMN: [gdNF2ggxPOS4MXNAeEaDJozlV07atfCw] X-Originating-Email: [nlhintz@hotmail.com] Message-ID: From: Nathan Hintz To: openwrt-devel@lists.openwrt.org Date: Fri, 23 Jan 2015 20:41:57 -0800 X-Mailer: git-send-email 1.9.3 X-OriginalArrivalTime: 24 Jan 2015 04:42:01.0117 (UTC) FILETIME=[17FF4CD0:01D03790] MIME-Version: 1.0 Cc: Nathan Hintz Subject: [OpenWrt-Devel] [PATCH] modules: add lz4 compression support X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Signed-off-by: Nathan Hintz --- package/kernel/linux/modules/lib.mk | 20 ++++++++++++++++++++ target/linux/generic/config-3.18 | 4 ++++ .../patches-3.18/262-compressor_kconfig_hack.patch | 16 ++++++++++++++-- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/package/kernel/linux/modules/lib.mk b/package/kernel/linux/modules/lib.mk index cd919ba..f230a99 100644 --- a/package/kernel/linux/modules/lib.mk +++ b/package/kernel/linux/modules/lib.mk @@ -117,6 +117,26 @@ endef $(eval $(call KernelPackage,lib-lzo)) +define KernelPackage/lib-lz4 + SUBMENU:=$(LIB_MENU) + DEPENDS:=@!(LINUX_3_3||LINUX_3_8||LINUX_3_10||LINUX_3_13||LINUX_3_14) + TITLE:=LZ4 support + KCONFIG:= \ + CONFIG_LZ4_COMPRESS \ + CONFIG_LZ4_DECOMPRESS + FILES:= \ + $(LINUX_DIR)/lib/lz4/lz4_compress.ko \ + $(LINUX_DIR)/lib/lz4/lz4_decompress.ko + AUTOLOAD:=$(call AutoProbe,lz4_compress lz4_decompress) +endef + +define KernelPackage/lib-lz4/description + Kernel module for LZ4 compression/decompression support +endef + +$(eval $(call KernelPackage,lib-lz4)) + + define KernelPackage/lib-raid6 SUBMENU:=$(LIB_MENU) TITLE:=RAID6 algorithm support diff --git a/target/linux/generic/config-3.18 b/target/linux/generic/config-3.18 index 1642b60..828c5b6 100644 --- a/target/linux/generic/config-3.18 +++ b/target/linux/generic/config-3.18 @@ -1876,6 +1876,9 @@ CONFIG_LZMA_COMPRESS=y CONFIG_LZMA_DECOMPRESS=y # CONFIG_LZO_COMPRESS is not set # CONFIG_LZO_DECOMPRESS is not set +# CONFIG_LZ4_COMPRESS is not set +# CONFIG_LZ4_DECOMPRESS is not set +# CONFIG_LZ4HC_COMPRESS is not set # CONFIG_M25PXX_PREFER_SMALL_SECTOR_ERASE is not set # CONFIG_MAC80211 is not set # CONFIG_MAC80211_MESSAGE_TRACING is not set @@ -4569,4 +4572,5 @@ CONFIG_XZ_DEC=y CONFIG_ZONE_DMA=y CONFIG_ZONE_DMA_FLAG=1 # CONFIG_ZRAM is not set +# CONFIG_ZRAM_LZ4_COMPRESS is not set # CONFIG_ZSMALLOC is not set diff --git a/target/linux/generic/patches-3.18/262-compressor_kconfig_hack.patch b/target/linux/generic/patches-3.18/262-compressor_kconfig_hack.patch index a24405d..51b4fc8 100644 --- a/target/linux/generic/patches-3.18/262-compressor_kconfig_hack.patch +++ b/target/linux/generic/patches-3.18/262-compressor_kconfig_hack.patch @@ -1,6 +1,6 @@ --- a/lib/Kconfig +++ b/lib/Kconfig -@@ -205,16 +205,16 @@ config RANDOM32_SELFTEST +@@ -205,25 +205,25 @@ config RANDOM32_SELFTEST # compression support is select'ed if needed # config ZLIB_INFLATE @@ -20,4 +20,16 @@ + tristate "LZO decompress support" config LZ4_COMPRESS - tristate +- tristate ++ tristate "LZ4 compress support" + + config LZ4HC_COMPRESS +- tristate ++ tristate "LZ4HC compress support" + + config LZ4_DECOMPRESS +- tristate ++ tristate "LZ4 decompress support" + + source "lib/xz/Kconfig" +