summaryrefslogtreecommitdiff
path: root/verity
diff options
context:
space:
mode:
authorDan Willemsen <dwillemsen@google.com>2018-05-09 16:26:42 -0700
committerDan Willemsen <dwillemsen@google.com>2018-05-09 16:39:41 -0700
commit9f022b4b5d6b7dde25290e793eb8b5c5239659af (patch)
treec9d82f2cc68caf511e8c1e47b3963e709173d818 /verity
parentdc0191161cb4557535e89d45c8cfdd2305dcef4e (diff)
downloadextras-9f022b4b5d6b7dde25290e793eb8b5c5239659af.tar.gz
Convert more of system/extras to Soong
See build/soong/README.md for more information. Some modules are no longer installed by default on eng/debug builds, but I didn't see any automatic references to them. If they're commonly used by users, they can be added into build/make with PRODUCT_PACKAGES_ENG / PRODUCT_PACKAGES_DEBUG. Otherwise everyone's compiles get a little smaller. Some modules also moved from /system/xbin to /system/bin, as we've deprecated xbin. I checked codesearch for references to the full paths and couldn't find any. Test: cd system/extras; mma Test: for the modules changing locations, check cs/ for references Change-Id: I4ffd99d3dcf50e4d5cb2197824abc11973214133
Diffstat (limited to 'verity')
-rw-r--r--verity/Android.bp85
-rw-r--r--verity/Android.mk57
-rw-r--r--verity/fec/Android.bp33
-rw-r--r--verity/fec/Android.mk22
4 files changed, 118 insertions, 79 deletions
diff --git a/verity/Android.bp b/verity/Android.bp
new file mode 100644
index 00000000..2c7cda73
--- /dev/null
+++ b/verity/Android.bp
@@ -0,0 +1,85 @@
+cc_binary_host {
+ name: "generate_verity_key",
+ srcs: ["generate_verity_key.c"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+
+ shared_libs: [
+ "libcrypto_utils",
+ "libcrypto",
+ ],
+}
+
+java_library_host {
+ name: "VeritySigner",
+ srcs: [
+ "VeritySigner.java",
+ "Utils.java",
+ ],
+ manifest: "VeritySigner.mf",
+
+ static_libs: ["bouncycastle"],
+}
+
+java_library_host {
+ name: "BootSignature",
+ srcs: [
+ "BootSignature.java",
+ "VeritySigner.java",
+ "Utils.java",
+ ],
+ manifest: "BootSignature.mf",
+
+ static_libs: ["bouncycastle"],
+}
+
+cc_binary_host {
+ name: "verity_verifier",
+ srcs: ["verity_verifier.cpp"],
+
+ target: {
+ darwin: {
+ enabled: false,
+ },
+ },
+
+ sanitize: {
+ misc_undefined: ["integer"],
+ },
+ static_libs: [
+ "libfec",
+ "libfec_rs",
+ "libcrypto_utils",
+ "libcrypto",
+ "libext4_utils",
+ "libsparse",
+ "libsquashfs_utils",
+ "libbase",
+ "libz",
+ ],
+
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
+
+cc_binary_host {
+ name: "build_verity_tree",
+ srcs: ["build_verity_tree.cpp"],
+
+ static_libs: [
+ "libsparse",
+ "libz",
+ ],
+ shared_libs: [
+ "libcrypto",
+ "libbase",
+ ],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ ],
+}
diff --git a/verity/Android.mk b/verity/Android.mk
index 2e4ac273..4cf136a0 100644
--- a/verity/Android.mk
+++ b/verity/Android.mk
@@ -1,52 +1,6 @@
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_MODULE := generate_verity_key
-LOCAL_SRC_FILES := generate_verity_key.c
-LOCAL_CFLAGS := -Wall -Werror
-LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_MODULE_TAGS := optional
-LOCAL_SHARED_LIBRARIES := libcrypto_utils libcrypto
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := VeritySigner.java Utils.java
-LOCAL_MODULE := VeritySigner
-LOCAL_JAR_MANIFEST := VeritySigner.mf
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_JAVA_LIBRARIES := bouncycastle-host
-include $(BUILD_HOST_JAVA_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := BootSignature.java VeritySigner.java Utils.java
-LOCAL_MODULE := BootSignature
-LOCAL_JAR_MANIFEST := BootSignature.mf
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_JAVA_LIBRARIES := bouncycastle-host
-include $(BUILD_HOST_JAVA_LIBRARY)
-
-include $(CLEAR_VARS)
-LOCAL_SRC_FILES := verity_verifier.cpp
-LOCAL_MODULE := verity_verifier
-LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_MODULE_HOST_OS := linux
-LOCAL_IS_HOST_MODULE := true
-LOCAL_MODULE_TAGS := optional
-LOCAL_SANITIZE := integer
-LOCAL_STATIC_LIBRARIES := \
- libfec \
- libfec_rs \
- libcrypto_utils \
- libcrypto \
- libext4_utils \
- libsparse \
- libsquashfs_utils \
- libbase \
- libz
-LOCAL_CFLAGS := -Wall -Werror
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(CLEAR_VARS)
LOCAL_SRC_FILES := verity_signer
LOCAL_MODULE := verity_signer
LOCAL_MODULE_CLASS := EXECUTABLES
@@ -71,14 +25,3 @@ LOCAL_SRC_FILES := build_verity_metadata.py
LOCAL_IS_HOST_MODULE := true
LOCAL_MODULE_TAGS := optional
include $(BUILD_PREBUILT)
-
-include $(CLEAR_VARS)
-LOCAL_MODULE := build_verity_tree
-LOCAL_SRC_FILES := build_verity_tree.cpp
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_LIBRARIES := libsparse libz
-LOCAL_SHARED_LIBRARIES := libcrypto libbase
-LOCAL_CFLAGS += -Wall -Werror
-include $(BUILD_HOST_EXECUTABLE)
-
-include $(call first-makefiles-under,$(LOCAL_PATH))
diff --git a/verity/fec/Android.bp b/verity/fec/Android.bp
new file mode 100644
index 00000000..823404b1
--- /dev/null
+++ b/verity/fec/Android.bp
@@ -0,0 +1,33 @@
+cc_binary_host {
+ name: "fec",
+
+ target: {
+ linux_glibc: {
+ sanitize: {
+ misc_undefined: ["integer"],
+ },
+ },
+ },
+
+ srcs: [
+ "main.cpp",
+ "image.cpp",
+ ],
+
+ static_libs: [
+ "libsparse",
+ "libz",
+ "libcrypto_utils",
+ "libcrypto",
+ "libfec",
+ "libfec_rs",
+ "libext4_utils",
+ "libsquashfs_utils",
+ ],
+ shared_libs: ["libbase"],
+ cflags: [
+ "-Wall",
+ "-Werror",
+ "-O3",
+ ],
+}
diff --git a/verity/fec/Android.mk b/verity/fec/Android.mk
deleted file mode 100644
index 8273d0d1..00000000
--- a/verity/fec/Android.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-LOCAL_PATH:= $(call my-dir)
-
-include $(CLEAR_VARS)
-ifeq ($(HOST_OS),linux)
-LOCAL_SANITIZE := integer
-endif
-LOCAL_MODULE := fec
-LOCAL_SRC_FILES := main.cpp image.cpp
-LOCAL_MODULE_TAGS := optional
-LOCAL_STATIC_LIBRARIES := \
- libsparse \
- libz \
- libcrypto_utils \
- libcrypto \
- libfec \
- libfec_rs \
- libext4_utils \
- libsquashfs_utils
-LOCAL_SHARED_LIBRARIES := libbase
-LOCAL_CFLAGS += -Wall -Werror -O3
-LOCAL_C_INCLUDES += external/fec
-include $(BUILD_HOST_EXECUTABLE)