aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Stefani <luca.stefani.ge1@gmail.com>2016-07-12 10:44:35 +0200
committervm03 <vasy@vasy.ru>2016-07-16 22:24:20 +0300
commitceabe6bc346c651c357835e73efd416024414a89 (patch)
tree21afab6a9134d66838406c81ba8c3f081a9559e7
parent32b88634151823dcd2cb215196c26f8418487102 (diff)
w7: Move to standalone libinit
Change-Id: Ie903e1203a4eca8e7ff92c173883cddea87db01c
-rw-r--r--BoardConfig.mk4
-rw-r--r--init/Android.mk11
-rw-r--r--init/init_w7.cpp6
3 files changed, 16 insertions, 5 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 475e9a3..97129be 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -27,9 +27,9 @@
# Vendor Init
TARGET_UNIFIED_DEVICE := true
-TARGET_INIT_VENDOR_LIB := libinit_msm
-TARGET_LIBINIT_DEFINES_FILE := device/lge/w7/init/init_w7.cpp
+TARGET_INIT_VENDOR_LIB := libinit_w7
TARGET_OTA_ASSERT_DEVICE := w7,w7ds,w7n,w7nds
+TARGET_RECOVERY_DEVICE_MODULES := libinit_w7
TARGET_RELEASETOOLS_EXTENSIONS := device/lge/w7
# Bootloader
diff --git a/init/Android.mk b/init/Android.mk
new file mode 100644
index 0000000..30774dc
--- /dev/null
+++ b/init/Android.mk
@@ -0,0 +1,11 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE_TAGS := optional
+LOCAL_C_INCLUDES := system/core/init
+LOCAL_CFLAGS := -Wall -DANDROID_TARGET=\"$(TARGET_BOARD_PLATFORM)\"
+LOCAL_SRC_FILES := init_w7.cpp
+LOCAL_MODULE := libinit_w7
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/init/init_w7.cpp b/init/init_w7.cpp
index 5989803..ecc7a02 100644
--- a/init/init_w7.cpp
+++ b/init/init_w7.cpp
@@ -36,7 +36,6 @@
#include "log.h"
#include "util.h"
-
#define CHUNK 2048 /* read 2048 bytes at a time */
int check_cmdline(const char param[]) {
@@ -60,12 +59,12 @@ int check_cmdline(const char param[]) {
word = strtok(NULL, delims);
}
}
- }
+ }
fclose(file);
return 0;
}
-void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *board_type)
+void vendor_load_properties()
{
char serial[PROP_VALUE_MAX];
char device[PROP_VALUE_MAX];
@@ -117,6 +116,7 @@ void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *boar
property_set("persist.radio.multisim.config", "");
property_set("persist.multisim.config", "");
}
+
property_get("ro.product.device", device);
strlcpy(devicename, device, sizeof(devicename));
ERROR("Found hardware id: %s setting build properties for %s device\n", serial, devicename);