aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAshwin <ashwinr64@gmail.com>2016-05-11 15:46:37 +0530
committerAshwin Ramesh <ashwinr64@gmail.com>2016-05-11 03:21:46 -0700
commite27abd03beef3971461a8e368c2808dfc55b50be (patch)
treeda19a4f0a4abfa4835f4d2257e9e650e9fcdabda
parent8f8db6e232af8d03cb6020e97885d107f5a44adb (diff)
condor: Switch to standalone libinit
* No need to build the msm one. * Simplify init. * Logging on the proper device identification isn't an error. Change-Id: Ife4293a454aa2ba7b6f1031c63442622b2dec8a8
-rw-r--r--BoardConfig.mk3
-rw-r--r--init/Android.mk27
-rw-r--r--init/init_condor.cpp16
3 files changed, 34 insertions, 12 deletions
diff --git a/BoardConfig.mk b/BoardConfig.mk
index 2460234..191d934 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -38,7 +38,8 @@ TARGET_RECOVERY_FSTAB := $(LOCAL_PATH)/ramdisk/fstab.qcom
TARGET_OTA_ASSERT_DEVICE := xt1021,xt1022,xt1023,condor_umts,condor_umtsds,condor
# Init
-TARGET_LIBINIT_DEFINES_FILE := $(LOCAL_PATH)/init/init_condor.cpp
+TARGET_INIT_VENDOR_LIB := libinit_condor
+TARGET_RECOVERY_DEVICE_MODULES := libinit_condor
BOARD_SEPOLICY_DIRS += \
device/motorola/condor/sepolicy
diff --git a/init/Android.mk b/init/Android.mk
new file mode 100644
index 0000000..9fbfa34
--- /dev/null
+++ b/init/Android.mk
@@ -0,0 +1,27 @@
+#
+# Copyright (C) 2016 The CyanogenMod Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+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_condor.cpp
+LOCAL_MODULE := libinit_condor
+
+include $(BUILD_STATIC_LIBRARY)
diff --git a/init/init_condor.cpp b/init/init_condor.cpp
index bf1bfae..013bc1d 100644
--- a/init/init_condor.cpp
+++ b/init/init_condor.cpp
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2014, The Linux Foundation. All rights reserved.
+ Copyright (c) 2016, The CyanogenMod Project
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
@@ -35,25 +35,20 @@
#include "log.h"
#include "util.h"
-#include "init_msm.h"
+#define ISMATCH(a,b) (!strncmp(a,b,PROP_VALUE_MAX))
-void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *board_type)
+void vendor_load_properties()
{
char platform[PROP_VALUE_MAX];
char radio[PROP_VALUE_MAX];
char device[PROP_VALUE_MAX];
- char devicename[PROP_VALUE_MAX];
int rc;
- UNUSED(msm_id);
- UNUSED(msm_ver);
- UNUSED(board_type);
-
rc = property_get("ro.board.platform", platform);
if (!rc || !ISMATCH(platform, ANDROID_TARGET))
return;
- property_set("ro.product.model", "Moto E");
+ property_set("ro.product.model", "Moto E");
property_get("ro.boot.radio", radio);
if (ISMATCH(radio, "0x1")) {
/* xt1021 */
@@ -87,6 +82,5 @@ void init_msm_properties(unsigned long msm_id, unsigned long msm_ver, char *boar
property_set("persist.radio.multisim.config", "");
}
property_get("ro.product.device", device);
- strlcpy(devicename, device, sizeof(devicename));
- ERROR("Found radio id: %s setting build properties for %s device\n", radio, devicename);
+ INFO("Found radio id: %s setting build properties for %s device\n", radio, device);
}