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
Merged-In: Ic76c325ce102347f20b282572e3edbb5b4359aaf
This commit is contained in:
Inseob Kim 2021-06-11 12:55:10 +09:00
parent a9af042d58
commit f3897b668d

View file

@ -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