summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Deymo <deymo@google.com>2017-03-04 01:46:19 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-03-04 01:46:20 +0000
commitdbcd26053b5fe35b72126e1aab131341cd7d973c (patch)
tree6050a86f5f0029b1b00121985d428ec37718d914
parent0e82c84abaa3a6368d17545d9f9e494f462c95cd (diff)
parentb6cfdd3ffbaa48a1006b6ce6e4f129ceffa287b8 (diff)
downloadextras-o-preview.tar.gz
Merge "Put product_id and product_version to OEM partition."android-o-preview-1o-preview
-rw-r--r--brillo_config/Android.mk18
1 files changed, 11 insertions, 7 deletions
diff --git a/brillo_config/Android.mk b/brillo_config/Android.mk
index 8946e784..b4d8c932 100644
--- a/brillo_config/Android.mk
+++ b/brillo_config/Android.mk
@@ -20,8 +20,8 @@ ifdef OSRELEASED_DIRECTORY
include $(CLEAR_VARS)
LOCAL_MODULE := product_id
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/$(OSRELEASED_DIRECTORY)
+LOCAL_MODULE_CLASS := FAKE
+LOCAL_MODULE_PATH := $(TARGET_OUT_OEM)/$(OSRELEASED_DIRECTORY)
include $(BUILD_SYSTEM)/base_rules.mk
# Attempt to populate the product id from a file in the product path.
@@ -31,16 +31,18 @@ LOADED_BRILLO_PRODUCT_ID := $(call cfgtree-get-if-exists,brillo/product_id)
# interaction will not work if this is not set correctly.
$(LOCAL_BUILT_MODULE): BRILLO_PRODUCT_ID ?= "$(LOADED_BRILLO_PRODUCT_ID)"
$(LOCAL_BUILT_MODULE):
- $(hide)mkdir -p $(dir $@)
+ $(hide) mkdir -p $(dir $@)
echo $(BRILLO_PRODUCT_ID) > $@
+ $(hide) mkdir -p $(TARGET_OUT_ETC)/$(OSRELEASED_DIRECTORY)
+ ln -sf /oem/$(OSRELEASED_DIRECTORY)/product_id $(TARGET_OUT_ETC)/$(OSRELEASED_DIRECTORY)
+
include $(CLEAR_VARS)
LOCAL_MODULE := product_version
-LOCAL_MODULE_CLASS := ETC
-LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/$(OSRELEASED_DIRECTORY)
+LOCAL_MODULE_CLASS := FAKE
+LOCAL_MODULE_PATH := $(TARGET_OUT_OEM)/$(OSRELEASED_DIRECTORY)
include $(BUILD_SYSTEM)/base_rules.mk
-
# The version is set to 0.0.0 if the user did not set the actual version and
# a version cannot be loaded from the product cfgtree.
# This allows us to have a valid version number while being easy to filter.
@@ -63,11 +65,13 @@ endif
# If you don' want this to change at every build, you can define BUILD_NUMBER in
# your product makefile and increase it manually.
$(LOCAL_BUILT_MODULE):
- $(hide)mkdir -p $(dir $@)
+ $(hide) mkdir -p $(dir $@)
ifeq ($(shell echo $(BUILD_NUMBER) | grep -E '[^0-9]'),)
echo $(BRILLO_PRODUCT_VERSION).$(BUILD_NUMBER) > $@
else
echo $(BRILLO_PRODUCT_VERSION).$(BUILD_DATETIME) > $@
endif
+ $(hide) mkdir -p $(TARGET_OUT_ETC)/$(OSRELEASED_DIRECTORY)
+ ln -sf /oem/$(OSRELEASED_DIRECTORY)/product_version $(TARGET_OUT_ETC)/$(OSRELEASED_DIRECTORY)
endif