diff options
author | Christopher R. Palmer <crpalmer@gmail.com> | 2015-07-22 06:00:38 -0400 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2015-11-07 13:35:55 -0800 |
commit | a6cff51b6d9c58888c67adc1fb541cc8a4724bf3 (patch) | |
tree | 8ef4b86d0ac6f4a31601adc80e500952558cf6ce | |
parent | 7d34926b04c5c182647bc52ba38443e228df601f (diff) | |
download | system_core-a6cff51b6d9c58888c67adc1fb541cc8a4724bf3.zip system_core-a6cff51b6d9c58888c67adc1fb541cc8a4724bf3.tar.gz system_core-a6cff51b6d9c58888c67adc1fb541cc8a4724bf3.tar.bz2 |
init: Allow devices to use user-space tools to set ro.serialno
CUrrently, init will always set a ro.serialno value which means
that the kernel is the only option for configuring the serial
number.
The zenfone2 stores the serial number in a file-system that
is mounted during the boot process and provides tools that pull
the factory configuration from there.
To support this, we need to allow init to opt-out of setting
the serial number for us.
Change-Id: I9c307d91bb8d3cb1c881213dd28e4f76e6eae14f
-rw-r--r-- | init/Android.mk | 4 | ||||
-rw-r--r-- | init/init.cpp | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/init/Android.mk b/init/Android.mk index 75a3f29..1b2e79b 100644 --- a/init/Android.mk +++ b/init/Android.mk @@ -58,6 +58,10 @@ $(foreach system_core_init_define,$(SYSTEM_CORE_INIT_DEFINES), \ ) \ ) +ifneq ($(TARGET_IGNORE_RO_BOOT_SERIALNO),) +LOCAL_CFLAGS += -DIGNORE_RO_BOOT_SERIALNO +endif + LOCAL_MODULE:= init LOCAL_C_INCLUDES += \ system/extras/ext4_utils \ diff --git a/init/init.cpp b/init/init.cpp index d49ece7..e1941b3 100644 --- a/init/init.cpp +++ b/init/init.cpp @@ -799,7 +799,9 @@ static void export_kernel_boot_props() { const char *dst_prop; const char *default_value; } prop_map[] = { +#ifndef IGNORE_RO_BOOT_SERIALNO { "ro.boot.serialno", "ro.serialno", "", }, +#endif { "ro.boot.mode", "ro.bootmode", "unknown", }, { "ro.boot.baseband", "ro.baseband", "unknown", }, { "ro.boot.bootloader", "ro.bootloader", "unknown", }, |