Home | History | Annotate | Download | only in blueline
      1 LOCAL_PATH := $(call my-dir)
      2 
      3 #A/B builds require us to create the mount points at compile time.
      4 #Just creating it for all cases since it does not hurt.
      5 FIRMWARE_MOUNT_POINT := $(TARGET_OUT_VENDOR)/firmware_mnt
      6 ALL_DEFAULT_INSTALLED_MODULES += $(FIRMWARE_MOUNT_POINT)
      7 
      8 $(FIRMWARE_MOUNT_POINT):
      9 	@echo "Creating $(FIRMWARE_MOUNT_POINT)"
     10 	@mkdir -p $(TARGET_OUT_VENDOR)/firmware_mnt
     11 
     12 #----------------------------------------------------------------------
     13 # Generate persist image (persist.img)
     14 #----------------------------------------------------------------------
     15 TARGET_OUT_PERSIST_IMG_PATH := $(PRODUCT_OUT)/persist
     16 
     17 INTERNAL_PERSISTIMAGE_FILES := \
     18     $(foreach pair,$(PRODUCT_COPY_FILES),\
     19         $(if $(filter persist/%,$(call word-colon,2,$(pair))),\
     20             $(call word-colon,1,$(pair)):$(PRODUCT_OUT)/$(call word-colon,2,$(pair))))
     21 
     22 INSTALLED_PERSISTIMAGE_FILES := $(call copy-many-files,$(INTERNAL_PERSISTIMAGE_FILES))
     23 INSTALLED_PERSISTIMAGE_TARGET := $(PRODUCT_OUT)/persist.img
     24 
     25 $(INSTALLED_PERSISTIMAGE_TARGET): $(MKEXTUSERIMG) $(MAKE_EXT4FS) $(INSTALLED_PERSISTIMAGE_FILES)
     26 	$(call pretty,"Target persist fs image: $(INSTALLED_PERSISTIMAGE_TARGET)")
     27 	@mkdir -p $(TARGET_OUT_PERSIST_IMG_PATH)
     28 	$(hide) PATH=$(HOST_OUT_EXECUTABLES):$${PATH} $(MKEXTUSERIMG) -s $(TARGET_OUT_PERSIST_IMG_PATH) $@ ext4 persist $(BOARD_PERSISTIMAGE_PARTITION_SIZE)
     29 	$(hide) chmod a+r $@
     30 	$(hide) $(call assert-max-image-size,$@,$(BOARD_PERSISTIMAGE_PARTITION_SIZE))
     31 
     32 ALL_DEFAULT_INSTALLED_MODULES += $(INSTALLED_PERSISTIMAGE_TARGET)
     33 ALL_MODULES.$(LOCAL_MODULE).INSTALLED += $(INSTALLED_PERSISTIMAGE_TARGET)
     34 INSTALLED_RADIOIMAGE_TARGET += $(INSTALLED_PERSISTIMAGE_TARGET)
     35 
     36 .PHONY: persistimage
     37 persistimage: $(INSTALLED_PERSISTIMAGE_TARGET)
     38 
     39 droidcore: $(INSTALLED_PERSISTIMAGE_TARGET)
     40 
     41 
     42 # copy kernel headers to the build tree
     43 $(TARGET_OUT_INTERMEDIATES)/KERNEL_OBJ/usr: $(wildcard $(PRODUCT_VENDOR_KERNEL_HEADERS)/*)
     44 	rm -rf $@
     45 	mkdir -p $@/include
     46 	cp -a $(PRODUCT_VENDOR_KERNEL_HEADERS)/. $@/include
     47 
     48 #----------------------------------------------------------------------
     49 # build and sign the final stage of bootloader
     50 #----------------------------------------------------------------------
     51 .PHONY: aboot
     52 ifeq ($(USESECIMAGETOOL), true)
     53 aboot: gensecimage_target gensecimage_install
     54 else
     55 aboot: $(INSTALLED_BOOTLOADER_MODULE)
     56 endif
     57