mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 17:15:00 +02:00
[image] define external cpio
Allow building image with an external cpio Signed-off-by: Tathagata Das <tathagata@alumnux.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@31204 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
97f7040e2d
commit
1b760ca1fc
@ -49,6 +49,13 @@ menu "Target Images"
|
|||||||
depends LINUX_2_6_38
|
depends LINUX_2_6_38
|
||||||
endchoice
|
endchoice
|
||||||
|
|
||||||
|
config EXTERNAL_CPIO
|
||||||
|
string
|
||||||
|
prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
|
||||||
|
default ""
|
||||||
|
help
|
||||||
|
Kernel uses specified external cpio as INITRAMFS_SOURCE
|
||||||
|
|
||||||
comment "Root filesystem archives"
|
comment "Root filesystem archives"
|
||||||
|
|
||||||
config TARGET_ROOTFS_CPIOGZ
|
config TARGET_ROOTFS_CPIOGZ
|
||||||
|
@ -55,6 +55,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
||||||
|
ifeq ($(strip $(CONFIG_EXTERNAL_CPIO)),"")
|
||||||
define Kernel/SetInitramfs
|
define Kernel/SetInitramfs
|
||||||
mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
|
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
|
grep -v -e INITRAMFS -e CONFIG_RD_ -e CONFIG_BLK_DEV_INITRD $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
|
||||||
@ -70,6 +71,21 @@ ifeq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
|||||||
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
|
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
|
endef
|
||||||
else
|
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="$(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
|
define Kernel/SetInitramfs
|
||||||
mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
|
mv $(LINUX_DIR)/.config $(LINUX_DIR)/.config.old
|
||||||
grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
|
grep -v INITRAMFS $(LINUX_DIR)/.config.old > $(LINUX_DIR)/.config
|
||||||
|
Loading…
Reference in New Issue
Block a user