From 966d041f7a87dd5c035c4027280676f4b8f0fe91 Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Tue, 10 Sep 2019 14:42:07 +0200 Subject: [PATCH] a3xelte: convert libinit to Android.bp * also rename it to avoid collisions while at it Change-Id: Ibdb0ddbd729201e1be9adc5566ca61a900be7aa4 --- BoardConfig.mk | 2 +- init/Android.bp | 12 ++++++++++++ init/Android.mk | 14 -------------- init/{init_sec.cpp => init_a3xelte.cpp} | 5 ----- 4 files changed, 13 insertions(+), 20 deletions(-) create mode 100644 init/Android.bp delete mode 100644 init/Android.mk rename init/{init_sec.cpp => init_a3xelte.cpp} (97%) diff --git a/BoardConfig.mk b/BoardConfig.mk index d3e0eea..d4d107f 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -33,7 +33,7 @@ BOARD_PROVIDES_LIBRIL := true BOARD_NEEDS_ROAMING_PROTOCOL_FIELD := true # Init -TARGET_INIT_VENDOR_LIB := libinit_sec +TARGET_INIT_VENDOR_LIB := libinit_a3xelte # Partitions BOARD_HAS_NO_MISC_PARTITION:= false diff --git a/init/Android.bp b/init/Android.bp new file mode 100644 index 0000000..ac4ff96 --- /dev/null +++ b/init/Android.bp @@ -0,0 +1,12 @@ +cc_library_static { + name: "libinit_a3xelte", + recovery_available: true, + srcs: [ + "init_a3xelte.cpp", + ], + whole_static_libs: ["libbase"], + include_dirs: [ + "system/core/base/include", + "system/core/init", + ], +} \ No newline at end of file diff --git a/init/Android.mk b/init/Android.mk deleted file mode 100644 index ab4cf5d..0000000 --- a/init/Android.mk +++ /dev/null @@ -1,14 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := optional -LOCAL_C_INCLUDES := \ - system/core/base/include \ - system/core/init -LOCAL_CFLAGS := -Wall -DANDROID_TARGET=\"$(TARGET_BOARD_PLATFORM)\" -LOCAL_SRC_FILES := init_sec.cpp -LOCAL_MODULE := libinit_sec -LOCAL_STATIC_LIBRARIES += libbase - -include $(BUILD_STATIC_LIBRARY) diff --git a/init/init_sec.cpp b/init/init_a3xelte.cpp similarity index 97% rename from init/init_sec.cpp rename to init/init_a3xelte.cpp index 999621f..ac71d8e 100644 --- a/init/init_sec.cpp +++ b/init/init_a3xelte.cpp @@ -82,14 +82,9 @@ void set_sim_info() void vendor_load_properties() { - std::string platform; std::string bootloader = GetProperty("ro.bootloader", ""); std::string device; - platform = GetProperty("ro.board.platform", ""); - if (platform != ANDROID_TARGET) - return; - if (bootloader.find("A310F") != std::string::npos) { /* SM-A310F */ property_override_dual("ro.build.fingerprint", "ro.vendor.build.fingerprint", "samsung/a3xeltexx/a3xelte:7.0/NRD90M/A310FXXU3CQL3:user/release-keys"); -- 2.20.1