diff options
author | John Crispin <john@openwrt.org> | 2012-04-05 14:33:04 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2012-04-05 14:33:04 +0000 |
commit | 032f3ea5e7dce34da3926f505fe939ded599a6fa (patch) | |
tree | 190e1b9c86d7c594ec9cbb3812a2a1eafcb126be /include | |
parent | e8c19a56db0f9401c23e9faca6f1a59562afe066 (diff) | |
download | upstream-032f3ea5e7dce34da3926f505fe939ded599a6fa.tar.gz upstream-032f3ea5e7dce34da3926f505fe939ded599a6fa.tar.bz2 upstream-032f3ea5e7dce34da3926f505fe939ded599a6fa.zip |
define external cpio
Allow building image with an external cpio
Signed-off-by: Tathagata Das <tathagata@alumnux.com>
SVN-Revision: 31204
Diffstat (limited to 'include')
-rw-r--r-- | include/kernel-defaults.mk | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk index 52ce03776c..9a1dace3e6 100644 --- a/include/kernel-defaults.mk +++ b/include/kernel-defaults.mk @@ -55,6 +55,7 @@ else endif ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) + ifeq ($(strip $(CONFIG_EXTERNAL_CPIO)),"") define Kernel/SetInitramfs mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old grep -v -e INITRAMFS -e CONFIG_RD_ -e CONFIG_BLK_DEV_INITRD $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config @@ -73,6 +74,21 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y) define Kernel/SetInitramfs mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_SOURCE="$(call qstrip,$(CONFIG_EXTERNAL_CPIO))"' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_ROOT_UID=$(shell id -u)' >> $(LINUX_DIR)/.config + echo 'CONFIG_INITRAMFS_ROOT_GID=$(shell id -g)' >> $(LINUX_DIR)/.config + echo "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_NONE),CONFIG_INITRAMFS_COMPRESSION_NONE=y,# CONFIG_INITRAMFS_COMPRESSION_NONE is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_GZIP),CONFIG_INITRAMFS_COMPRESSION_GZIP=y\nCONFIG_RD_GZIP=y,# CONFIG_INITRAMFS_COMPRESSION_GZIP is not set\n# CONFIG_RD_GZIP is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_BZIP2),CONFIG_INITRAMFS_COMPRESSION_BZIP2=y\nCONFIG_RD_BZIP2=y,# CONFIG_INITRAMFS_COMPRESSION_BZIP2 is not set\n# CONFIG_RD_BZIP2 is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA),CONFIG_INITRAMFS_COMPRESSION_LZMA=y\nCONFIG_RD_LZMA=y,# CONFIG_INITRAMFS_COMPRESSION_LZMA is not set\n# CONFIG_RD_LZMA is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_LZO),CONFIG_INITRAMFS_COMPRESSION_LZO=y\nCONFIG_RD_LZO=y,# CONFIG_INITRAMFS_COMPRESSION_LZO is not set\n# CONFIG_RD_LZO is not set)" >> $(LINUX_DIR)/.config + echo -e "$(if $(CONFIG_TARGET_INITRAMFS_COMPRESSION_XZ),CONFIG_INITRAMFS_COMPRESSION_XZ=y\nCONFIG_RD_XZ=y,# CONFIG_INITRAMFS_COMPRESSION_XZ is not set\n# CONFIG_RD_XZ is not set)" >> $(LINUX_DIR)/.config + endef + endif +else + define Kernel/SetInitramfs + mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old + grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config echo 'CONFIG_INITRAMFS_SOURCE=""' >> $(LINUX_DIR)/.config endef endif |