diff options
author | Sen Jiang <senj@google.com> | 2017-03-24 12:44:58 -0700 |
---|---|---|
committer | Sen Jiang <senj@google.com> | 2017-03-29 21:28:09 +0000 |
commit | f318ca5110149a99d8eace1ce8fc4598ae49d606 (patch) | |
tree | b8f649fa48a911af8ce6005b84066055269ce50c | |
parent | 68b15e1f28c172ca60b0eb443c9f5809136eff8f (diff) | |
download | extras-f318ca5110149a99d8eace1ce8fc4598ae49d606.tar.gz |
os-release.d: Add system_id.
This is the app id of the SoM stored in the system.
Test: adb shell cat /etc/os-release.d/system_id
Change-Id: Iba7ac028ffa7402f06fbf9c4a3a077eb3414940e
(cherry picked from commit d41148b6c8d59d4f35711028248fc644428ddc57)
-rw-r--r-- | brillo_config/Android.mk | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/brillo_config/Android.mk b/brillo_config/Android.mk index 7c1dd6c2..fb0cd754 100644 --- a/brillo_config/Android.mk +++ b/brillo_config/Android.mk @@ -36,6 +36,20 @@ $(LOCAL_BUILT_MODULE): $(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 := system_id +LOCAL_MODULE_CLASS := ETC +LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/$(OSRELEASED_DIRECTORY) +include $(BUILD_SYSTEM)/base_rules.mk + +# Attempt to populate the system id from a file in the product path. +LOADED_BRILLO_SYSTEM_ID := $(call cfgtree-get-if-exists,brillo/system_id) + +$(LOCAL_BUILT_MODULE): BRILLO_SYSTEM_ID ?= "$(LOADED_BRILLO_SYSTEM_ID)" +$(LOCAL_BUILT_MODULE): + $(hide) mkdir -p $(dir $@) + echo $(BRILLO_SYSTEM_ID) > $@ + include $(CLEAR_VARS) LOCAL_MODULE := product_version |