build: Adds the ability to disable personal initramfs build for target device
authorSergey Sergeev <adron@yapic.net>
Thu, 16 Jun 2016 19:04:51 +0000 (22:04 +0300)
committerFelix Fietkau <nbd@nbd.name>
Sun, 26 Jun 2016 11:06:36 +0000 (13:06 +0200)
If KERNEL_INITRAMFS := in the target/linux/*/image/Makefile->Device/%NAME% section is set to ''
then personal initramfs file for this target device will not be created.
This var is similar to the Device/Build/kernel KERNEL_INSTALL :=

Signed-off-by: Sergey Sergeev <adron@yapic.net>
include/image.mk

index c86d739fc9ae8baef56607637bebe89161d5548a..a47d588488bda6c3cc24034de7babf74cfddd534 100644 (file)
@@ -351,7 +351,7 @@ endef
 ifndef IB
 define Device/Build/initramfs
   $(call Device/Export,$(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE),$(1))
-  $$(_TARGET): $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE)
+  $$(_TARGET): $$(if $$(KERNEL_INITRAMFS),$(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE))
 
   $(KDIR)/$$(KERNEL_INITRAMFS_NAME):: image_prepare
   $(BIN_DIR)/$$(KERNEL_INITRAMFS_IMAGE): $(KDIR)/tmp/$$(KERNEL_INITRAMFS_IMAGE)