blob: 36efb1b892bd07a8c47dfa09d9a676af7d1b7486 [file] [log] [blame]
Hasini Gunasinghebf839f72022-05-27 09:27:06 +00001//
2// Copyright (C) 2022 The Android Open-Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
Bob Badourbbe272b2022-12-08 05:36:04 -080016package {
17 default_applicable_licenses: ["Android-Apache-2.0"],
18}
19
Alice Wangb9b28302024-07-31 18:41:00 +000020rust_defaults {
21 name: "android.hardware.security.keymint-service.rust.trusty.default",
Hasini Gunasinghebf839f72022-05-27 09:27:06 +000022 relative_install_path: "hw",
Hasini Gunasinghebf839f72022-05-27 09:27:06 +000023 srcs: [
Arve Hjønnevågb4158e22023-09-13 18:20:38 -070024 "src/keymint_hal_main.rs",
Hasini Gunasinghebf839f72022-05-27 09:27:06 +000025 ],
26 rustlibs: [
27 "libandroid_logger",
28 "libbinder_rs",
Arve Hjønnevågb4158e22023-09-13 18:20:38 -070029 "libclap",
Hasini Gunasinghebf839f72022-05-27 09:27:06 +000030 "libkmr_wire",
31 "libkmr_hal",
32 "libtrusty-rs",
33 "liblibc",
34 "liblog_rust",
35 ],
Matthew Maurercac69b62023-07-27 22:15:46 +000036 prefer_rlib: true,
Alice Wangb9b28302024-07-31 18:41:00 +000037}
38
39rust_binary {
40 name: "android.hardware.security.keymint-service.rust.trusty",
Alice Wangd694b612024-09-02 13:03:48 +000041 vendor: true,
Alice Wangb9b28302024-07-31 18:41:00 +000042 defaults: ["android.hardware.security.keymint-service.rust.trusty.default"],
43 init_rc: ["android.hardware.security.keymint-service.rust.trusty.rc"],
44 vintf_fragments: ["android.hardware.security.keymint-service.rust.trusty.xml"],
David Drysdale5969d692024-11-11 17:52:45 +000045 required: select(release_flag("RELEASE_AIDL_USE_UNFROZEN"), {
46 true: ["android.hardware.hardware_keystore.xml"],
47 default: ["android.hardware.hardware_keystore_V3.xml"],
48 }),
Hasini Gunasinghebf839f72022-05-27 09:27:06 +000049}
Alice Wangb9b28302024-07-31 18:41:00 +000050
51rust_binary {
Alice Wangd694b612024-09-02 13:03:48 +000052 name: "android.hardware.security.keymint-service.rust.trusty.system.nonsecure",
53 system_ext_specific: true,
Alice Wangb9b28302024-07-31 18:41:00 +000054 defaults: ["android.hardware.security.keymint-service.rust.trusty.default"],
Alice Wangd694b612024-09-02 13:03:48 +000055 init_rc: ["android.hardware.security.keymint-service.rust.trusty.system.nonsecure.rc"],
Alice Wangb9b28302024-07-31 18:41:00 +000056 features: ["nonsecure"],
57 rustlibs: [
58 "libkmr_hal_nonsecure",
59 ],
60}