From adcdb2fbdaa64b11851c71ea412cb9a2512d3f5a Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Fri, 11 Jun 2021 12:55:10 +0900 Subject: [PATCH] Directly create ramdisk dirs in ramdisk image rule These directories have been created with post install cmds of init_first_stage. To migrate init_first_stage to Soong, the directory rules are now written directly in ramdisk image rule. Bug: 187196593 Test: "m installclean; m" and see ramdisk output Change-Id: Ic76c325ce102347f20b282572e3edbb5b4359aaf --- core/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/Makefile b/core/Makefile index 194e372c5d..8d8a5baa5b 100644 --- a/core/Makefile +++ b/core/Makefile @@ -815,8 +815,13 @@ endif # We just build this directly to the install location. INSTALLED_RAMDISK_TARGET := $(BUILT_RAMDISK_TARGET) +$(INSTALLED_RAMDISK_TARGET): PRIVATE_DIRS := debug_ramdisk dev metadata mnt proc second_stage_resources sys $(INSTALLED_RAMDISK_TARGET): $(MKBOOTFS) $(INTERNAL_RAMDISK_FILES) $(INSTALLED_FILES_FILE_RAMDISK) | $(COMPRESSION_COMMAND_DEPS) $(call pretty,"Target ramdisk: $@") + $(hide) mkdir -p $(addprefix $(TARGET_RAMDISK_OUT)/,$(PRIVATE_DIRS)) +ifeq (true,$(BOARD_USES_GENERIC_KERNEL_IMAGE)) + $(hide) mkdir -p $(addprefix $(TARGET_RAMDISK_OUT)/first_stage_ramdisk/,$(PRIVATE_DIRS)) +endif $(hide) $(MKBOOTFS) -d $(TARGET_OUT) $(TARGET_RAMDISK_OUT) | $(COMPRESSION_COMMAND) > $@ .PHONY: ramdisk-nodeps