Hasini Gunasinghe | bf839f7 | 2022-05-27 09:27:06 +0000 | [diff] [blame] | 1 | // |
| 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 Badour | bbe272b | 2022-12-08 05:36:04 -0800 | [diff] [blame] | 16 | package { |
| 17 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 18 | } |
| 19 | |
Alice Wang | b9b2830 | 2024-07-31 18:41:00 +0000 | [diff] [blame] | 20 | rust_defaults { |
| 21 | name: "android.hardware.security.keymint-service.rust.trusty.default", |
Hasini Gunasinghe | bf839f7 | 2022-05-27 09:27:06 +0000 | [diff] [blame] | 22 | relative_install_path: "hw", |
Hasini Gunasinghe | bf839f7 | 2022-05-27 09:27:06 +0000 | [diff] [blame] | 23 | srcs: [ |
Arve Hjønnevåg | b4158e2 | 2023-09-13 18:20:38 -0700 | [diff] [blame] | 24 | "src/keymint_hal_main.rs", |
Hasini Gunasinghe | bf839f7 | 2022-05-27 09:27:06 +0000 | [diff] [blame] | 25 | ], |
| 26 | rustlibs: [ |
| 27 | "libandroid_logger", |
| 28 | "libbinder_rs", |
Arve Hjønnevåg | b4158e2 | 2023-09-13 18:20:38 -0700 | [diff] [blame] | 29 | "libclap", |
Hasini Gunasinghe | bf839f7 | 2022-05-27 09:27:06 +0000 | [diff] [blame] | 30 | "libkmr_wire", |
| 31 | "libkmr_hal", |
| 32 | "libtrusty-rs", |
| 33 | "liblibc", |
| 34 | "liblog_rust", |
| 35 | ], |
Matthew Maurer | cac69b6 | 2023-07-27 22:15:46 +0000 | [diff] [blame] | 36 | prefer_rlib: true, |
Alice Wang | b9b2830 | 2024-07-31 18:41:00 +0000 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | rust_binary { |
| 40 | name: "android.hardware.security.keymint-service.rust.trusty", |
Alice Wang | d694b61 | 2024-09-02 13:03:48 +0000 | [diff] [blame] | 41 | vendor: true, |
Alice Wang | b9b2830 | 2024-07-31 18:41:00 +0000 | [diff] [blame] | 42 | 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 Drysdale | 5969d69 | 2024-11-11 17:52:45 +0000 | [diff] [blame^] | 45 | 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 Gunasinghe | bf839f7 | 2022-05-27 09:27:06 +0000 | [diff] [blame] | 49 | } |
Alice Wang | b9b2830 | 2024-07-31 18:41:00 +0000 | [diff] [blame] | 50 | |
| 51 | rust_binary { |
Alice Wang | d694b61 | 2024-09-02 13:03:48 +0000 | [diff] [blame] | 52 | name: "android.hardware.security.keymint-service.rust.trusty.system.nonsecure", |
| 53 | system_ext_specific: true, |
Alice Wang | b9b2830 | 2024-07-31 18:41:00 +0000 | [diff] [blame] | 54 | defaults: ["android.hardware.security.keymint-service.rust.trusty.default"], |
Alice Wang | d694b61 | 2024-09-02 13:03:48 +0000 | [diff] [blame] | 55 | init_rc: ["android.hardware.security.keymint-service.rust.trusty.system.nonsecure.rc"], |
Alice Wang | b9b2830 | 2024-07-31 18:41:00 +0000 | [diff] [blame] | 56 | features: ["nonsecure"], |
| 57 | rustlibs: [ |
| 58 | "libkmr_hal_nonsecure", |
| 59 | ], |
| 60 | } |