From 8029384c013ae47ada3871fc374afbf8b31d69d6 Mon Sep 17 00:00:00 2001 From: Jan Altensen Date: Tue, 10 Sep 2019 14:42:07 +0200 Subject: [PATCH] j7elte: 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_j7elte.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_j7elte.cpp} (97%) diff --git a/BoardConfig.mk b/BoardConfig.mk index 292dc56..674c8ce 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -23,7 +23,7 @@ TARGET_OTA_ASSERT_DEVICE := j7elte BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := $(LOCAL_PATH)/bluetooth # Init -TARGET_INIT_VENDOR_LIB := libinit_sec +TARGET_INIT_VENDOR_LIB := libinit_j7elte # Kernel TARGET_KERNEL_CONFIG := lineageos_j7elte_defconfig diff --git a/init/Android.bp b/init/Android.bp new file mode 100644 index 0000000..31ec75b --- /dev/null +++ b/init/Android.bp @@ -0,0 +1,12 @@ +cc_library_static { + name: "libinit_j7elte", + recovery_available: true, + srcs: [ + "init_j7elte.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_j7elte.cpp similarity index 97% rename from init/init_sec.cpp rename to init/init_j7elte.cpp index a87faab..b12a151 100644 --- a/init/init_sec.cpp +++ b/init/init_j7elte.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("J700F") != std::string::npos) { /* SM-J700F */ property_override_dual("ro.build.fingerprint", "ro.vendor.build.fingerprint", "samsung/j7eltexx/j7elte:6.0.1/MMB29K/J700FXXU4BRL2:user/release-keys"); -- 2.20.1