[Feature]add MT2731_MP2_MR2_SVN388 baseline version
Change-Id: Ief04314834b31e27effab435d3ca8ba33b499059
diff --git a/meta/meta-mediatek-ivt/recipes-platform/platform-libs/files/logwrap.patch b/meta/meta-mediatek-ivt/recipes-platform/platform-libs/files/logwrap.patch
new file mode 100644
index 0000000..d07e6bc
--- /dev/null
+++ b/meta/meta-mediatek-ivt/recipes-platform/platform-libs/files/logwrap.patch
@@ -0,0 +1,79 @@
+diff --git a/system/core/logwrapper/logwrap.c b/system/core/logwrapper/logwrap.c
+old mode 100644
+new mode 100755
+index ccbe0bf..62b66d0
+--- a/system/core/logwrapper/logwrap.c
++++ b/system/core/logwrapper/logwrap.c
+@@ -156,9 +156,11 @@ static void add_line_to_circular_buf(struct ending_buf *e_buf,
+
+ /* Log directly to the specified log */
+ static void do_log_line(struct log_info *log_info, char *line) {
++ #if 0
+ if (log_info->log_target & LOG_KLOG) {
+ klog_write(6, log_info->klog_fmt, line);
+ }
++ #endif
+ if (log_info->log_target & LOG_ALOG) {
+ ALOG(LOG_INFO, log_info->btag, "%s", line);
+ }
+@@ -349,14 +351,14 @@ static int parent(const char *tag, int parent_read, pid_t pid,
+ log_info.abbreviated = abbreviated;
+
+ while (!found_child) {
+- if (TEMP_FAILURE_RETRY(poll(poll_fds, ARRAY_SIZE(poll_fds), -1)) < 0) {
++ if ((poll(poll_fds, ARRAY_SIZE(poll_fds), -1)) < 0) {
+ ERROR("poll failed\n");
+ rc = -1;
+ goto err_poll;
+ }
+
+ if (poll_fds[0].revents & POLLIN) {
+- sz = TEMP_FAILURE_RETRY(
++ sz = (
+ read(parent_read, &buffer[b], sizeof(buffer) - 1 - b));
+
+ for (size_t i = 0; sz > 0 && i < opts_len; ++i) {
+@@ -408,7 +410,7 @@ static int parent(const char *tag, int parent_read, pid_t pid,
+ if (poll_fds[0].revents & POLLHUP) {
+ int ret;
+
+- ret = TEMP_FAILURE_RETRY(waitpid(pid, &status, 0));
++ ret = (waitpid(pid, &status, 0));
+ if (ret < 0) {
+ rc = errno;
+ ALOG(LOG_ERROR, "logwrap", "waitpid failed with %s\n", strerror(errno));
+@@ -500,7 +502,7 @@ int android_fork_execvp_ext(int argc, char* argv[], int *status, bool ignore_int
+ }
+
+ /* Use ptty instead of socketpair so that STDOUT is not buffered */
+- parent_ptty = TEMP_FAILURE_RETRY(open("/dev/ptmx", O_RDWR));
++ parent_ptty = (open("/dev/ptmx", O_RDWR));
+ if (parent_ptty < 0) {
+ ERROR("Cannot create parent ptty\n");
+ rc = -1;
+@@ -515,7 +517,7 @@ int android_fork_execvp_ext(int argc, char* argv[], int *status, bool ignore_int
+ goto err_ptty;
+ }
+
+- child_ptty = TEMP_FAILURE_RETRY(open(child_devname, O_RDWR));
++ child_ptty = (open(child_devname, O_RDWR));
+ if (child_ptty < 0) {
+ ERROR("Cannot open child_ptty\n");
+ rc = -1;
+@@ -526,7 +528,6 @@ int android_fork_execvp_ext(int argc, char* argv[], int *status, bool ignore_int
+ sigaddset(&blockset, SIGINT);
+ sigaddset(&blockset, SIGQUIT);
+ pthread_sigmask(SIG_BLOCK, &blockset, &oldset);
+-
+ pid = fork();
+ if (pid < 0) {
+ close(child_ptty);
+@@ -567,7 +568,7 @@ int android_fork_execvp_ext(int argc, char* argv[], int *status, bool ignore_int
+ const uint8_t* input = opts[i].opt_input.input;
+ while (left > 0) {
+ ssize_t res =
+- TEMP_FAILURE_RETRY(write(parent_ptty, input, left));
++ (write(parent_ptty, input, left));
+ if (res < 0) {
+ break;
+ }