From 18199aa7b69102c99c5b6c2382f039823c781e3b Mon Sep 17 00:00:00 2001 From: Ulf Samuelsson Date: Thu, 16 Aug 2007 06:26:25 +0000 Subject: [PATCH] Move lzma patches to toolchain/kernel-headers/lzma They will be applied ONLY if BR2_KERNEL_HEADERS_LZMA is set. BR2_KERNEL_HEADERS_LZMA defaults to NO, so the user has to actively set this config flag if lzma is needed. This means that the default behaviour of buildroot will work for most users. Comment from author: [Brad House] I find myself having to remove the lzma patches because my build system doesn't natively have lzma. I tried to compensate for this by installing the latest lzma from gentoo's package tree, and apparently, it accepts different flags than the one these patches expect, so my kernel build still fails. Finally, I used the lzma from this buildroot and compiled it by hand, and it _mostly_ worked. Regardless, it seems silly to make this a requirement. Personally, I gzip my initramfs, and that's enough compression for me... --- toolchain/kernel-headers/Config.in | 8 ++++++++ toolchain/kernel-headers/kernel-headers-new.makefile | 4 ++++ .../{ => lzma}/linux-2.6.21.5-001-lzma-vmlinuz.00.patch | 0 .../{ => lzma}/linux-2.6.21.5-002-lzma-vmlinuz.01.patch | 0 .../{ => lzma}/linux-2.6.22.1-001-lzma-vmlinuz.00.patch | 0 .../{ => lzma}/linux-2.6.22.1-002-lzma-vmlinuz.01.patch | 0 6 files changed, 12 insertions(+) rename toolchain/kernel-headers/{ => lzma}/linux-2.6.21.5-001-lzma-vmlinuz.00.patch (100%) rename toolchain/kernel-headers/{ => lzma}/linux-2.6.21.5-002-lzma-vmlinuz.01.patch (100%) rename toolchain/kernel-headers/{ => lzma}/linux-2.6.22.1-001-lzma-vmlinuz.00.patch (100%) rename toolchain/kernel-headers/{ => lzma}/linux-2.6.22.1-002-lzma-vmlinuz.01.patch (100%) diff --git a/toolchain/kernel-headers/Config.in b/toolchain/kernel-headers/Config.in index 2fafc1d45c..bb24d15dcb 100644 --- a/toolchain/kernel-headers/Config.in +++ b/toolchain/kernel-headers/Config.in @@ -58,6 +58,14 @@ choice endchoice +config BR2_KERNEL_HEADERS_LZMA + bool "use lzma initramfs kernel patches" + default n + help + Apply patches which allow for lzma compressed + initramfs filesystems. This requires the lzma + program in your development environment. + config BR2_DEFAULT_KERNEL_HEADERS string default "2.4.25" if BR2_KERNEL_HEADERS_2_4_25 diff --git a/toolchain/kernel-headers/kernel-headers-new.makefile b/toolchain/kernel-headers/kernel-headers-new.makefile index 06bc45268a..75bcce48e9 100644 --- a/toolchain/kernel-headers/kernel-headers-new.makefile +++ b/toolchain/kernel-headers/kernel-headers-new.makefile @@ -59,6 +59,10 @@ $(LINUX_HEADERS_UNPACK_DIR)/.unpacked: $(DL_DIR)/$(LINUX_HEADERS_SOURCE) $(LINUX_HEADERS_UNPACK_DIR)/.patched: $(LINUX_HEADERS_UNPACK_DIR)/.unpacked toolchain/patch-kernel.sh $(LINUX_HEADERS_UNPACK_DIR) toolchain/kernel-headers \ linux-$(LINUX_HEADERS_VERSION)-\*.patch{,.gz,.bz2} +ifeq ($(BR2_KERNEL_HEADERS_LZMA),y) + toolchain/patch-kernel.sh $(LINUX_HEADERS_UNPACK_DIR) toolchain/kernel-headers/lzma \ + linux-$(LINUX_HEADERS_VERSION)-\*.patch{,.gz,.bz2} +endif ifeq ($(BR2_PACKAGE_OPENSWAN),y) toolchain/patch-kernel.sh $(LINUX_HEADERS_UNPACK_DIR) package/openswan \ linux-$(LINUX_HEADERS_VERSION)-\*.patch{,.gz,.bz2} diff --git a/toolchain/kernel-headers/linux-2.6.21.5-001-lzma-vmlinuz.00.patch b/toolchain/kernel-headers/lzma/linux-2.6.21.5-001-lzma-vmlinuz.00.patch similarity index 100% rename from toolchain/kernel-headers/linux-2.6.21.5-001-lzma-vmlinuz.00.patch rename to toolchain/kernel-headers/lzma/linux-2.6.21.5-001-lzma-vmlinuz.00.patch diff --git a/toolchain/kernel-headers/linux-2.6.21.5-002-lzma-vmlinuz.01.patch b/toolchain/kernel-headers/lzma/linux-2.6.21.5-002-lzma-vmlinuz.01.patch similarity index 100% rename from toolchain/kernel-headers/linux-2.6.21.5-002-lzma-vmlinuz.01.patch rename to toolchain/kernel-headers/lzma/linux-2.6.21.5-002-lzma-vmlinuz.01.patch diff --git a/toolchain/kernel-headers/linux-2.6.22.1-001-lzma-vmlinuz.00.patch b/toolchain/kernel-headers/lzma/linux-2.6.22.1-001-lzma-vmlinuz.00.patch similarity index 100% rename from toolchain/kernel-headers/linux-2.6.22.1-001-lzma-vmlinuz.00.patch rename to toolchain/kernel-headers/lzma/linux-2.6.22.1-001-lzma-vmlinuz.00.patch diff --git a/toolchain/kernel-headers/linux-2.6.22.1-002-lzma-vmlinuz.01.patch b/toolchain/kernel-headers/lzma/linux-2.6.22.1-002-lzma-vmlinuz.01.patch similarity index 100% rename from toolchain/kernel-headers/linux-2.6.22.1-002-lzma-vmlinuz.01.patch rename to toolchain/kernel-headers/lzma/linux-2.6.22.1-002-lzma-vmlinuz.01.patch -- 2.30.2