Move persist.img build rules to another repository

This commit moves the persist.img build rules to another repository
because "device/google/bramble" is a part of aosp-without-vendor source
tree but it depends on some files that do NOT belong to
aosp-without-vendor source tree.

Bug: 140158409
Test: lunch bramble-userdebug && make
Change-Id: Ie11fe78b65ab3c1fb427496a46b0bb941f021a7c
This commit is contained in:
Logan Chien
2019-08-01 11:54:24 -07:00
committed by Jason Chiu
parent fd9fc3d3ed
commit cd16b391b8

View File

@@ -9,36 +9,6 @@ $(FIRMWARE_MOUNT_POINT):
@echo "Creating $(FIRMWARE_MOUNT_POINT)"
@mkdir -p $(TARGET_OUT_VENDOR)/firmware_mnt
#----------------------------------------------------------------------
# Generate persist image (persist.img)
#----------------------------------------------------------------------
TARGET_OUT_PERSIST_IMG_PATH := $(PRODUCT_OUT)/persist
INTERNAL_PERSISTIMAGE_FILES := \
$(foreach pair,$(PRODUCT_COPY_FILES),\
$(if $(filter persist/%,$(call word-colon,2,$(pair))),\
$(call word-colon,1,$(pair)):$(PRODUCT_OUT)/$(call word-colon,2,$(pair))))
INSTALLED_PERSISTIMAGE_FILES := $(call copy-many-files,$(INTERNAL_PERSISTIMAGE_FILES))
INSTALLED_PERSISTIMAGE_TARGET := $(PRODUCT_OUT)/persist.img
$(INSTALLED_PERSISTIMAGE_TARGET): $(MKEXTUSERIMG) $(MAKE_EXT4FS) $(INSTALLED_PERSISTIMAGE_FILES)
$(call pretty,"Target persist fs image: $(INSTALLED_PERSISTIMAGE_TARGET)")
@mkdir -p $(TARGET_OUT_PERSIST_IMG_PATH)
$(hide) PATH=$(HOST_OUT_EXECUTABLES):$${PATH} $(MKEXTUSERIMG) -s $(TARGET_OUT_PERSIST_IMG_PATH) $@ ext4 persist $(BOARD_PERSISTIMAGE_PARTITION_SIZE)
$(hide) chmod a+r $@
$(hide) $(call assert-max-image-size,$@,$(BOARD_PERSISTIMAGE_PARTITION_SIZE))
ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_PERSISTIMAGE_TARGET)
ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_PERSISTIMAGE_TARGET)
INSTALLED_RADIOIMAGE_TARGET += $(INSTALLED_PERSISTIMAGE_TARGET)
.PHONY: persistimage
persistimage: $(INSTALLED_PERSISTIMAGE_TARGET)
droidcore: $(INSTALLED_PERSISTIMAGE_TARGET)
# copy kernel headers to the build tree
$(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr: $(wildcard $(PRODUCT_VENDOR_KERNEL_HEADERS)/*)
rm -rf $@