blob: c7078452750eca9d2dd1679b01ca4ec948810a4d [file] [log] [blame]
Bob Badourb224b362021-02-12 20:13:01 -08001package {
2 // See: http://go/android-license-faq
3 // A large-scale-change added 'default_applicable_licenses' to import
4 // all of the 'license_kinds' from "hardware_interfaces_license"
5 // to get the below license kinds:
6 // SPDX-license-identifier-Apache-2.0
7 default_applicable_licenses: ["hardware_interfaces_license"],
8}
9
David Drysdale764199f2024-03-07 09:42:48 +000010cc_binary {
Shawn Willden08a7e432020-12-11 13:05:27 +000011 name: "android.hardware.security.keymint-service",
12 relative_install_path: "hw",
David Drysdale764199f2024-03-07 09:42:48 +000013 init_rc: ["android.hardware.security.keymint-service.rc"],
14 vintf_fragments: [
15 "android.hardware.security.keymint-service.xml",
16 "android.hardware.security.sharedsecret-service.xml",
17 "android.hardware.security.secureclock-service.xml",
18 ],
19 vendor: true,
20 cflags: [
21 "-Wall",
22 "-Wextra",
23 ],
24 defaults: [
25 "keymint_use_latest_hal_aidl_ndk_shared",
26 ],
27 shared_libs: [
28 "android.hardware.security.rkp-V3-ndk",
29 "android.hardware.security.sharedsecret-V1-ndk",
30 "android.hardware.security.secureclock-V1-ndk",
31 "libbase",
32 "libbinder_ndk",
33 "libcppbor_external",
34 "libcrypto",
35 "libkeymaster_portable",
36 "libkeymint",
37 "liblog",
38 "libpuresoftkeymasterdevice",
39 "libutils",
40 ],
41 srcs: [
42 "service.cpp",
43 ],
44 required: [
45 "android.hardware.hardware_keystore.xml",
46 ],
47}
48
49rust_binary {
50 name: "android.hardware.security.keymint-service.nonsecure",
51 relative_install_path: "hw",
David Drysdale30196cf2023-12-02 19:24:15 +000052 vendor: true,
A. Cody Schuffelenddc6a8d2024-03-26 15:40:37 -070053 init_rc: ["android.hardware.security.keymint-service.nonsecure.rc"],
Chirag Pathak8960aae2021-01-25 21:37:06 +000054 vintf_fragments: [
55 "android.hardware.security.keymint-service.xml",
56 "android.hardware.security.sharedsecret-service.xml",
57 "android.hardware.security.secureclock-service.xml",
58 ],
David Drysdale49255342021-11-22 14:32:31 +000059 defaults: [
David Drysdale30196cf2023-12-02 19:24:15 +000060 "keymint_use_latest_hal_aidl_rust",
Shawn Willden08a7e432020-12-11 13:05:27 +000061 ],
62 srcs: [
David Drysdale30196cf2023-12-02 19:24:15 +000063 "main.rs",
64 ],
65 rustlibs: [
66 "libandroid_logger",
67 "libbinder_rs",
68 "liblog_rust",
69 "libkmr_hal",
70 "libkmr_hal_nonsecure",
71 "libkmr_ta_nonsecure",
Shawn Willden08a7e432020-12-11 13:05:27 +000072 ],
David Zeuthen7f8ccb52021-03-10 14:40:17 -050073 required: [
David Zeuthen7f8ccb52021-03-10 14:40:17 -050074 "android.hardware.hardware_keystore.xml",
75 ],
76}
77
78prebuilt_etc {
79 name: "android.hardware.hardware_keystore.xml",
80 sub_dir: "permissions",
81 vendor: true,
82 src: "android.hardware.hardware_keystore.xml",
Shawn Willden08a7e432020-12-11 13:05:27 +000083}
David Drysdale30196cf2023-12-02 19:24:15 +000084
85rust_library {
86 name: "libkmr_hal_nonsecure",
87 crate_name: "kmr_hal_nonsecure",
88 vendor_available: true,
89 lints: "android",
90 rustlibs: [
91 "libbinder_rs",
92 "libhex",
93 "liblibc",
94 "liblog_rust",
95 "libkmr_hal",
96 "libkmr_wire",
97 ],
98 srcs: ["hal/lib.rs"],
99
100}
101
102rust_library {
103 name: "libkmr_ta_nonsecure",
104 crate_name: "kmr_ta_nonsecure",
105 vendor_available: true,
106 host_supported: true,
107 lints: "android",
108 rustlibs: [
109 "libhex",
110 "liblibc",
111 "liblog_rust",
112 "libkmr_common",
113 "libkmr_crypto_boring",
114 "libkmr_ta",
115 "libkmr_wire",
116 ],
117 srcs: ["ta/lib.rs"],
118
119}