Skip to content

Commit

Permalink
Update makefiles for new build methods
Browse files Browse the repository at this point in the history
Move prebuilt files to recovery/root so they are automatically copied by
recovery_root_private (no need for PRODUCT_COPY_FILES or prebuilt
modules).

Add chargeled under TARGET_RECOVERY_DEVICE_MODULES so that it becomes a
dependency of recovery.

Change-Id: I6f6022c6027f22f74dd0810f7701281e69a4b129
  • Loading branch information
mdmower committed Nov 6, 2014
1 parent 40d33ae commit 52ae6b9
Show file tree
Hide file tree
Showing 58 changed files with 2 additions and 62 deletions.
1 change: 1 addition & 0 deletions BoardConfig.mk
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,4 @@ TW_INCLUDE_JB_CRYPTO := true
TW_NO_USB_STORAGE := true
BOARD_RECOVERY_BLDRMSG_OFFSET := 2048
RECOVERY_VARIANT := twrp
TARGET_RECOVERY_DEVICE_MODULES := chargeled
14 changes: 0 additions & 14 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,6 @@ endif

COMMON_GLOBAL_CFLAGS += -DNO_SECURE_DISCARD

PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/recovery/etc/fstab.qcom:recovery/root/fstab.qcom \
$(LOCAL_PATH)/recovery/etc/init.recovery.qcom.rc:root/init.recovery.qcom.rc \
$(LOCAL_PATH)/recovery/etc/lpm.rc:recovery/root/lpm.rc \
$(LOCAL_PATH)/recovery/sbin/choice_fn:recovery/root/sbin/choice_fn \
$(LOCAL_PATH)/recovery/sbin/detect_key:recovery/root/sbin/detect_key \
$(LOCAL_PATH)/recovery/sbin/offmode_charging:recovery/root/sbin/offmode_charging \
$(LOCAL_PATH)/recovery/sbin/power_test:recovery/root/sbin/power_test

PRODUCT_PACKAGES += \
chargeled \
offmode_charging_res_images \
offmode_charging_warn_res_images

$(call inherit-product, build/target/product/full.mk)

PRODUCT_BUILD_PROP_OVERRIDES += BUILD_UTC_DATE=0
Expand Down
49 changes: 1 addition & 48 deletions recovery/Android.mk
Original file line number Diff line number Diff line change
@@ -1,49 +1,2 @@
LOCAL_PATH := $(call my-dir)

define _add-offmode_charging-image
include $$(CLEAR_VARS)
LOCAL_MODULE := offmode_charging_$(notdir $(1))
LOCAL_MODULE_STEM := $(notdir $(1))
_img_modules += $$(LOCAL_MODULE)
LOCAL_SRC_FILES := $1
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $$(TARGET_RECOVERY_ROOT_OUT)/res/offmode_charging_images
include $$(BUILD_PREBUILT)
endef

_img_modules :=
$(foreach _img, $(call find-subdir-subdir-files, "res/offmode_charging_images", "*.png"), \
$(eval $(call _add-offmode_charging-image,$(_img))))

include $(CLEAR_VARS)
LOCAL_MODULE := offmode_charging_res_images
LOCAL_MODULE_TAGS := optional
LOCAL_REQUIRED_MODULES := $(_img_modules)
include $(BUILD_PHONY_PACKAGE)

define _add-offmode_charging_warn-image
include $$(CLEAR_VARS)
LOCAL_MODULE := offmode_charging_warn_$(notdir $(1))
LOCAL_MODULE_STEM := $(notdir $(1))
_img_modules += $$(LOCAL_MODULE)
LOCAL_SRC_FILES := $1
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := ETC
LOCAL_MODULE_PATH := $$(TARGET_RECOVERY_ROOT_OUT)/res/offmode_charging_warn_images
include $$(BUILD_PREBUILT)
endef

_img_modules :=
$(foreach _img, $(call find-subdir-subdir-files, "res/offmode_charging_warn_images", "*.png"), \
$(eval $(call _add-offmode_charging_warn-image,$(_img))))

include $(CLEAR_VARS)
LOCAL_MODULE := offmode_charging_warn_res_images
LOCAL_MODULE_TAGS := optional
LOCAL_REQUIRED_MODULES := $(_img_modules)
include $(BUILD_PHONY_PACKAGE)

_add-offmode_charging-image :=
_add-offmode_charging_warn-image :=
_img_modules :=
include $(call first-makefiles-under, $(LOCAL_PATH))
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 52ae6b9

Please sign in to comment.