aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher R. Palmer <crpalmer@gmail.com>2016-01-07 09:45:05 +0000
committerEthan Chen <intervigil@gmail.com>2016-01-07 12:00:11 -0800
commita4b3c8123c845b36c5841679cc3aeb07576b4d30 (patch)
tree91dc7c874fd5aab433b4c3df6a573a39ee9c86a9
parent365c3f4494a59dec4b535e4b09d0eee155f0f6c6 (diff)
msm8960dt-common: Shim libqc-opt rather than hexediting it.
Change-Id: I71cff4c7af0b79839c044edd4efe3a18c2b42ac9
-rw-r--r--libshims/Android.mk14
-rw-r--r--libshims/icu53.c26
-rw-r--r--msm8960dt-common.mk4
-rw-r--r--rootdir/etc/init.qcom.rc3
4 files changed, 47 insertions, 0 deletions
diff --git a/libshims/Android.mk b/libshims/Android.mk
new file mode 100644
index 0000000..37cca10
--- /dev/null
+++ b/libshims/Android.mk
@@ -0,0 +1,14 @@
+LOCAL_PATH := $(call my-dir)
+
+# libqc-opt
+
+include $(CLEAR_VARS)
+
+LOCAL_SRC_FILES := \
+ icu53.c
+
+LOCAL_SHARED_LIBRARIES := libicuuc libicui18n
+LOCAL_MODULE := libshim_qcopt
+LOCAL_MODULE_TAGS := optional
+
+include $(BUILD_SHARED_LIBRARY)
diff --git a/libshims/icu53.c b/libshims/icu53.c
new file mode 100644
index 0000000..65a197f
--- /dev/null
+++ b/libshims/icu53.c
@@ -0,0 +1,26 @@
+#include "unicode/utext.h"
+#include "unicode/utypes.h"
+
+U_STABLE UText * U_EXPORT2
+utext_openUChars_53(UText *ut, const UChar *s, int64_t length, UErrorCode *status)
+{
+ return utext_openUChars(ut, s, length, status);
+}
+
+U_STABLE UText * U_EXPORT2
+utext_close_53(UText *ut)
+{
+ return utext_close(ut);
+}
+
+U_STABLE int32_t U_EXPORT2
+u_digit_53(UChar32 ch, int8_t radix)
+{
+ return u_digit(ch, radix);
+}
+
+U_STABLE const char * U_EXPORT2
+u_errorName_53(UErrorCode code)
+{
+ return u_errorName(code);
+}
diff --git a/msm8960dt-common.mk b/msm8960dt-common.mk
index 262526a..43072cd 100644
--- a/msm8960dt-common.mk
+++ b/msm8960dt-common.mk
@@ -159,6 +159,10 @@ PRODUCT_BOOT_JARS += \
PRODUCT_PACKAGES += \
power.msm8960
+# Qualcomm
+PRODUCT_PACKAGES += \
+ libshim_qcopt
+
# Ramdisk
PRODUCT_PACKAGES += \
init.qcom.bt.sh \
diff --git a/rootdir/etc/init.qcom.rc b/rootdir/etc/init.qcom.rc
index 5c2c9ab..6daf96c 100644
--- a/rootdir/etc/init.qcom.rc
+++ b/rootdir/etc/init.qcom.rc
@@ -42,6 +42,9 @@ on early-init
# Create persist mount point
mkdir /persist 0771 system system
+ # Symbols required for motorola blobs
+ export LD_SHIM_LIBS "/system/lib/libqc-opt.so|libshim_qcopt.so"
+
symlink /data/tombstones /tombstones
on init