From f9c9266c7565ebcea633f735ba8cdeb12fac2146 Mon Sep 17 00:00:00 2001 From: Rom Lemarchand Date: Wed, 8 Apr 2015 15:11:47 -0700 Subject: [PATCH] Omit ramdisk from boot.img if building without ramdisk Change-Id: I1940e3fd5f05dec555db04a556ed1fac58b2c15b --- core/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/core/Makefile b/core/Makefile index 3485c86e3..b832879b2 100644 --- a/core/Makefile +++ b/core/Makefile @@ -464,8 +464,12 @@ ifneq ($(strip $(TARGET_NO_KERNEL)),true) # the boot image, which is a collection of other images. INTERNAL_BOOTIMAGE_ARGS := \ $(addprefix --second ,$(INSTALLED_2NDBOOTLOADER_TARGET)) \ - --kernel $(INSTALLED_KERNEL_TARGET) \ - --ramdisk $(INSTALLED_RAMDISK_TARGET) + --kernel $(INSTALLED_KERNEL_TARGET) + +ifneq ($(BOARD_BUILD_SYSTEM_ROOT_IMAGE),true) +INTERNAL_BOOTIMAGE_ARGS += --ramdisk $(INSTALLED_RAMDISK_TARGET) +endif + INTERNAL_BOOTIMAGE_FILES := $(filter-out --%,$(INTERNAL_BOOTIMAGE_ARGS))