[openwrt/openwrt] x86: remove old lzma tuning patch

LEDE Commits lede-commits at lists.infradead.org
Fri Dec 10 15:51:42 PST 2021


chunkeey pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/4deaeaa13cbcd3c4b94c69e96d7e507f201ea4cc

commit 4deaeaa13cbcd3c4b94c69e96d7e507f201ea4cc
Author: Christian Lamparter <chunkeey at gmail.com>
AuthorDate: Sat Dec 4 21:52:22 2021 +0100

    x86: remove old lzma tuning patch
    
    Chen Minqiang reported in his GitHub PR #4733 that:
    With CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA=y option set,
    the popular x86/amd64 target's initramfs-kernel failed to boot.
    
    The cause for this boot failure is that the LZMA compression
    uses a the first bytes to encode the compression parameters.
    It does not have a fixed magic. Yes, this only works if the
    the existing lzma options in the upstream are not changed.
    
    This patch does away with OpenWrt special LZMA options tuning
    since it is rather unlikely that upstream will improve the
    compression algorithm detection after all this time. Even
    though, the tuning produced a smaller initramfs (~1.1% in a
    spot check).
    
    Link: <https://github.com/openwrt/openwrt/pull/4733>
    Reported-by: Chen Minqiang <ptpt52 at gmail.com>
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 .../x86/patches-5.10/011-tune_lzma_options.patch   | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/target/linux/x86/patches-5.10/011-tune_lzma_options.patch b/target/linux/x86/patches-5.10/011-tune_lzma_options.patch
deleted file mode 100644
index c19e1f54db..0000000000
--- a/target/linux/x86/patches-5.10/011-tune_lzma_options.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/scripts/Makefile.lib
-+++ b/scripts/Makefile.lib
-@@ -370,7 +370,7 @@ quiet_cmd_bzip2 = BZIP2   $@
- # ---------------------------------------------------------------------------
- 
- quiet_cmd_lzma = LZMA    $@
--      cmd_lzma = { cat $(real-prereqs) | $(LZMA) e -d20 -lc1 -lp2 -pb2 -eos -si -so; $(size_append); } > $@
-+      cmd_lzma = { cat $(real-prereqs) | $(LZMA) e -lc8 -eos -si -so; $(size_append); } > $@
- 
- quiet_cmd_lzo = LZO     $@
-       cmd_lzo = { cat $(real-prereqs) | $(KLZOP) -9; $(size_append); } > $@
---- a/arch/x86/include/asm/boot.h
-+++ b/arch/x86/include/asm/boot.h
-@@ -24,7 +24,7 @@
- # error "Invalid value for CONFIG_PHYSICAL_ALIGN"
- #endif
- 
--#if defined(CONFIG_KERNEL_BZIP2)
-+#if defined(CONFIG_KERNEL_BZIP2) || defined(CONFIG_KERNEL_LZMA)
- # define BOOT_HEAP_SIZE		0x400000
- #elif defined(CONFIG_KERNEL_ZSTD)
- /*



More information about the lede-commits mailing list