Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit e1034d2

Browse files
committed
thirdparty: Rebuild android-system-core against API 28
Signed-off-by: Andrew Gunnerson <andrewgunnerson@gmail.com>
1 parent 4a8b2db commit e1034d2

5 files changed

Lines changed: 26 additions & 571 deletions

thirdparty/android-system-core/0001-Make-this-NDK-buildable.patch

Lines changed: 14 additions & 209 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
From 861e11a69e0e37666dcb02efd2db4459557fc8eb Mon Sep 17 00:00:00 2001
1+
From 10135cf2a9d69eda9f516e6db5c768849a68743c Mon Sep 17 00:00:00 2001
22
From: Andrew Gunnerson <chenxiaolong@cxl.epac.to>
33
Date: Sun, 24 Dec 2017 17:28:48 -0500
4-
Subject: [PATCH 1/5] Make this NDK buildable
4+
Subject: [PATCH] Make this NDK buildable
55

66
---
77
bionic_dlmalloc/README.txt | 10 +
8-
bionic_dlmalloc/malloc.c | 6323 +++++++++++++++++++++++++++++
9-
bionic_dlmalloc/malloc.h | 620 +++
10-
bionic_include/_system_properties.h | 137 +
11-
bionic_include/set_abort_message.h | 40 +
12-
libcutils/Android.mk | 66 +
13-
liblog/Android.mk | 37 +-
8+
bionic_dlmalloc/malloc.c | 6323 +++++++++++++++++++++
9+
bionic_dlmalloc/malloc.h | 620 ++
10+
libcutils/Android.mk | 65 +
11+
liblog/Android.mk | 36 +-
1412
libpixelflinger/Android.mk | 54 +-
1513
libpixelflinger/codeflinger/CodeCache.cpp | 2 +-
1614
libutils/Android.mk | 45 +
17-
10 files changed, 7310 insertions(+), 24 deletions(-)
15+
8 files changed, 7131 insertions(+), 24 deletions(-)
1816
create mode 100644 bionic_dlmalloc/README.txt
1917
create mode 100644 bionic_dlmalloc/malloc.c
2018
create mode 100644 bionic_dlmalloc/malloc.h
21-
create mode 100644 bionic_include/_system_properties.h
22-
create mode 100644 bionic_include/set_abort_message.h
2319
create mode 100644 libcutils/Android.mk
2420
create mode 100644 libutils/Android.mk
2521

@@ -6994,201 +6990,12 @@ index 000000000..e52c9e5a4
69946990
+#endif
69956991
+
69966992
+#endif /* MALLOC_280_H */
6997-
diff --git a/bionic_include/_system_properties.h b/bionic_include/_system_properties.h
6998-
new file mode 100644
6999-
index 000000000..f8dbd3305
7000-
--- /dev/null
7001-
+++ b/bionic_include/_system_properties.h
7002-
@@ -0,0 +1,137 @@
7003-
+/*
7004-
+ * Copyright (C) 2008 The Android Open Source Project
7005-
+ * All rights reserved.
7006-
+ *
7007-
+ * Redistribution and use in source and binary forms, with or without
7008-
+ * modification, are permitted provided that the following conditions
7009-
+ * are met:
7010-
+ * * Redistributions of source code must retain the above copyright
7011-
+ * notice, this list of conditions and the following disclaimer.
7012-
+ * * Redistributions in binary form must reproduce the above copyright
7013-
+ * notice, this list of conditions and the following disclaimer in
7014-
+ * the documentation and/or other materials provided with the
7015-
+ * distribution.
7016-
+ *
7017-
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7018-
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7019-
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
7020-
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
7021-
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
7022-
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
7023-
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
7024-
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
7025-
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7026-
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
7027-
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7028-
+ * SUCH DAMAGE.
7029-
+ */
7030-
+
7031-
+#ifndef _INCLUDE_SYS__SYSTEM_PROPERTIES_H
7032-
+#define _INCLUDE_SYS__SYSTEM_PROPERTIES_H
7033-
+
7034-
+#include <sys/cdefs.h>
7035-
+#include <stdint.h>
7036-
+
7037-
+#ifndef _REALLY_INCLUDE_SYS__SYSTEM_PROPERTIES_H_
7038-
+#error you should #include <sys/system_properties.h> instead
7039-
+#endif
7040-
+
7041-
+#include <sys/system_properties.h>
7042-
+
7043-
+__BEGIN_DECLS
7044-
+
7045-
+#define PROP_SERVICE_NAME "property_service"
7046-
+#define PROP_FILENAME "/dev/__properties__"
7047-
+
7048-
+#define PROP_MSG_SETPROP 1
7049-
+#define PROP_MSG_SETPROP2 0x00020001
7050-
+
7051-
+#define PROP_SUCCESS 0
7052-
+#define PROP_ERROR_READ_CMD 0x0004
7053-
+#define PROP_ERROR_READ_DATA 0x0008
7054-
+#define PROP_ERROR_READ_ONLY_PROPERTY 0x000B
7055-
+#define PROP_ERROR_INVALID_NAME 0x0010
7056-
+#define PROP_ERROR_INVALID_VALUE 0x0014
7057-
+#define PROP_ERROR_PERMISSION_DENIED 0x0018
7058-
+#define PROP_ERROR_INVALID_CMD 0x001B
7059-
+#define PROP_ERROR_HANDLE_CONTROL_MESSAGE 0x0020
7060-
+#define PROP_ERROR_SET_FAILED 0x0024
7061-
+
7062-
+/*
7063-
+** Map the property area from the specified filename. This
7064-
+** method is for testing only.
7065-
+*/
7066-
+int __system_property_set_filename(const char *filename);
7067-
+
7068-
+/*
7069-
+** Initialize the area to be used to store properties. Can
7070-
+** only be done by a single process that has write access to
7071-
+** the property area.
7072-
+*/
7073-
+int __system_property_area_init();
7074-
+
7075-
+/* Read the global serial number of the system properties
7076-
+**
7077-
+** Called to predict if a series of cached __system_property_find
7078-
+** objects will have seen __system_property_serial values change.
7079-
+** But also aids the converse, as changes in the global serial can
7080-
+** also be used to predict if a failed __system_property_find
7081-
+** could in-turn now find a new object; thus preventing the
7082-
+** cycles of effort to poll __system_property_find.
7083-
+**
7084-
+** Typically called at beginning of a cache cycle to signal if _any_ possible
7085-
+** changes have occurred since last. If there is, one may check each individual
7086-
+** __system_property_serial to confirm dirty, or __system_property_find
7087-
+** to check if the property now exists. If a call to __system_property_add
7088-
+** or __system_property_update has completed between two calls to
7089-
+** __system_property_area_serial then the second call will return a larger
7090-
+** value than the first call. Beware of race conditions as changes to the
7091-
+** properties are not atomic, the main value of this call is to determine
7092-
+** whether the expensive __system_property_find is worth retrying to see if
7093-
+** a property now exists.
7094-
+**
7095-
+** Returns the serial number on success, -1 on error.
7096-
+*/
7097-
+uint32_t __system_property_area_serial();
7098-
+
7099-
+/* Add a new system property. Can only be done by a single
7100-
+** process that has write access to the property area, and
7101-
+** that process must handle sequencing to ensure the property
7102-
+** does not already exist and that only one property is added
7103-
+** or updated at a time.
7104-
+**
7105-
+** Returns 0 on success, -1 if the property area is full.
7106-
+*/
7107-
+int __system_property_add(const char *name, unsigned int namelen, const char *value, unsigned int valuelen);
7108-
+
7109-
+/* Update the value of a system property returned by
7110-
+** __system_property_find. Can only be done by a single process
7111-
+** that has write access to the property area, and that process
7112-
+** must handle sequencing to ensure that only one property is
7113-
+** updated at a time.
7114-
+**
7115-
+** Returns 0 on success, -1 if the parameters are incorrect.
7116-
+*/
7117-
+int __system_property_update(prop_info *pi, const char *value, unsigned int len);
7118-
+
7119-
+/* Read the serial number of a system property returned by
7120-
+** __system_property_find.
7121-
+**
7122-
+** Returns the serial number on success, -1 on error.
7123-
+*/
7124-
+uint32_t __system_property_serial(const prop_info* pi);
7125-
+
7126-
+/* Initialize the system properties area in read only mode.
7127-
+ * Should be done by all processes that need to read system
7128-
+ * properties.
7129-
+ *
7130-
+ * Returns 0 on success, -1 otherwise.
7131-
+ */
7132-
+int __system_properties_init();
7133-
+
7134-
+/* Deprecated: use __system_property_wait instead. */
7135-
+uint32_t __system_property_wait_any(uint32_t old_serial);
7136-
+
7137-
+__END_DECLS
7138-
+
7139-
+#endif
7140-
diff --git a/bionic_include/set_abort_message.h b/bionic_include/set_abort_message.h
7141-
new file mode 100644
7142-
index 000000000..18881a3a3
7143-
--- /dev/null
7144-
+++ b/bionic_include/set_abort_message.h
7145-
@@ -0,0 +1,40 @@
7146-
+/*
7147-
+ * Copyright (C) 2014 The Android Open Source Project
7148-
+ * All rights reserved.
7149-
+ *
7150-
+ * Redistribution and use in source and binary forms, with or without
7151-
+ * modification, are permitted provided that the following conditions
7152-
+ * are met:
7153-
+ * * Redistributions of source code must retain the above copyright
7154-
+ * notice, this list of conditions and the following disclaimer.
7155-
+ * * Redistributions in binary form must reproduce the above copyright
7156-
+ * notice, this list of conditions and the following disclaimer in
7157-
+ * the documentation and/or other materials provided with the
7158-
+ * distribution.
7159-
+ *
7160-
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
7161-
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
7162-
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
7163-
+ * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
7164-
+ * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
7165-
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
7166-
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
7167-
+ * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
7168-
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
7169-
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
7170-
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
7171-
+ * SUCH DAMAGE.
7172-
+ */
7173-
+
7174-
+#ifndef _SET_ABORT_MESSAGE_H
7175-
+#define _SET_ABORT_MESSAGE_H
7176-
+
7177-
+#include <sys/cdefs.h>
7178-
+
7179-
+__BEGIN_DECLS
7180-
+
7181-
+void android_set_abort_message(const char* msg) __INTRODUCED_IN(21);
7182-
+
7183-
+__END_DECLS
7184-
+
7185-
+#endif
71866993
diff --git a/libcutils/Android.mk b/libcutils/Android.mk
71876994
new file mode 100644
7188-
index 000000000..f84f6862c
6995+
index 000000000..d3e055037
71896996
--- /dev/null
71906997
+++ b/libcutils/Android.mk
7191-
@@ -0,0 +1,66 @@
6998+
@@ -0,0 +1,65 @@
71926999
+LOCAL_PATH := $(my-dir)
71937000
+
71947001
+include $(CLEAR_VARS)
@@ -7248,18 +7055,17 @@ index 000000000..f84f6862c
72487055
+LOCAL_C_INCLUDES := \
72497056
+ include \
72507057
+ ../liblog/include \
7251-
+ ../libutils/include \
7252-
+ ../bionic_include
7058+
+ ../libutils/include
72537059
+LOCAL_STATIC_LIBRARIES := liblog
72547060
+LOCAL_CFLAGS := -Werror -Wall -Wextra
72557061
+LOCAL_CONLYFLAGS := -std=gnu90
72567062
+LOCAL_CPPFLAGS := -std=gnu++11
72577063
+include $(BUILD_STATIC_LIBRARY)
72587064
diff --git a/liblog/Android.mk b/liblog/Android.mk
7259-
index 6c4dff595..deb0e9cbb 100644
7065+
index 6c4dff595..7098143aa 100644
72607066
--- a/liblog/Android.mk
72617067
+++ b/liblog/Android.mk
7262-
@@ -1,3 +1,38 @@
7068+
@@ -1,3 +1,37 @@
72637069
LOCAL_PATH := $(my-dir)
72647070

72657071
-include $(call first-makefiles-under,$(LOCAL_PATH))
@@ -7290,8 +7096,7 @@ index 6c4dff595..deb0e9cbb 100644
72907096
+ include \
72917097
+ ../libcutils/include \
72927098
+ ../libsystem/include \
7293-
+ ../libutils/include \
7294-
+ ../bionic_include
7099+
+ ../libutils/include
72957100
+LOCAL_CFLAGS := \
72967101
+ -Werror \
72977102
+ -fvisibility=hidden \
@@ -7455,5 +7260,5 @@ index 000000000..634bb955b
74557260
+ ../common/safe-iop/include
74567261
+include $(BUILD_STATIC_LIBRARY)
74577262
--
7458-
2.14.3
7263+
2.17.1
74597264

thirdparty/android-system-core/0002-Remove-support-for-arbitrary-length-properties.patch

Lines changed: 0 additions & 40 deletions
This file was deleted.

0 commit comments

Comments
 (0)