Bob Badour | bd1037f | 2021-02-12 15:54:17 -0800 | [diff] [blame] | 1 | package { |
| 2 | default_applicable_licenses: ["Android-Apache-2.0"], |
| 3 | } |
| 4 | |
Alice Wang | 4c6c558 | 2023-11-23 15:07:18 +0000 | [diff] [blame] | 5 | rust_defaults { |
| 6 | name: "virtualizationservice_defaults", |
Andrew Walbran | f6bf686 | 2021-05-21 12:41:13 +0000 | [diff] [blame] | 7 | crate_name: "virtualizationservice", |
David Drysdale | 79af266 | 2024-02-19 14:50:31 +0000 | [diff] [blame] | 8 | defaults: [ |
| 9 | "avf_build_flags_rust", |
| 10 | "secretkeeper_use_latest_hal_aidl_rust", |
| 11 | ], |
Alan Stokes | 6472ccd | 2022-08-31 13:41:28 +0100 | [diff] [blame] | 12 | edition: "2021", |
David Brazdil | 3f0f1e8 | 2023-01-12 16:18:43 +0000 | [diff] [blame] | 13 | srcs: ["src/main.rs"], |
Andrew Walbran | dfc953d | 2021-06-10 13:59:56 +0000 | [diff] [blame] | 14 | // Only build on targets which crosvm builds on. |
| 15 | enabled: false, |
| 16 | target: { |
| 17 | android64: { |
| 18 | compile_multilib: "64", |
| 19 | enabled: true, |
| 20 | }, |
| 21 | linux_bionic_arm64: { |
| 22 | enabled: true, |
| 23 | }, |
| 24 | }, |
Jiyong Park | 26bdf44 | 2021-04-05 16:04:49 +0900 | [diff] [blame] | 25 | prefer_rlib: true, |
Andrew Walbran | b12a43e | 2020-11-10 14:22:42 +0000 | [diff] [blame] | 26 | rustlibs: [ |
Alice Wang | 15f6d08 | 2023-08-25 09:11:07 +0000 | [diff] [blame] | 27 | "android.hardware.security.rkp-V3-rust", |
Alan Stokes | 2bead0d | 2022-09-05 16:58:34 +0100 | [diff] [blame] | 28 | "android.system.virtualizationcommon-rust", |
Alan Stokes | ea1f046 | 2024-02-19 16:25:47 +0000 | [diff] [blame] | 29 | "android.system.virtualizationmaintenance-rust", |
Andrew Walbran | f6bf686 | 2021-05-21 12:41:13 +0000 | [diff] [blame] | 30 | "android.system.virtualizationservice-rust", |
David Brazdil | 528e047 | 2022-10-10 15:06:02 +0100 | [diff] [blame] | 31 | "android.system.virtualizationservice_internal-rust", |
Inseob Kim | 1b95f2e | 2021-08-19 13:17:40 +0900 | [diff] [blame] | 32 | "android.system.virtualmachineservice-rust", |
Jiyong Park | 753553b | 2021-07-12 21:21:09 +0900 | [diff] [blame] | 33 | "android.os.permissions_aidl-rust", |
Andrew Walbran | bf1fb04 | 2021-03-15 16:54:09 +0000 | [diff] [blame] | 34 | "libandroid_logger", |
Andrew Walbran | b12a43e | 2020-11-10 14:22:42 +0000 | [diff] [blame] | 35 | "libanyhow", |
Jiyong Park | d7bd2f2 | 2023-08-10 20:41:19 +0900 | [diff] [blame] | 36 | "libavflog", |
Inseob Kim | 1b95f2e | 2021-08-19 13:17:40 +0900 | [diff] [blame] | 37 | "libbinder_rs", |
Shikha Panwar | 61a74b5 | 2024-02-16 13:17:01 +0000 | [diff] [blame] | 38 | "libhex", |
Alice Wang | b5b9032 | 2023-11-14 07:38:18 +0000 | [diff] [blame] | 39 | "libhypervisor_props", |
Jakob Vukalovic | d42aa2c | 2023-11-09 16:04:00 +0000 | [diff] [blame] | 40 | "liblazy_static", |
David Brazdil | a07a179 | 2022-10-25 13:37:57 +0100 | [diff] [blame] | 41 | "liblibc", |
David Drysdale | 79af266 | 2024-02-19 14:50:31 +0000 | [diff] [blame] | 42 | "liblibsqlite3_sys", |
Andrew Walbran | 3a5a921 | 2021-05-04 17:09:08 +0000 | [diff] [blame] | 43 | "liblog_rust", |
Andrew Walbran | b27681f | 2022-02-23 15:11:52 +0000 | [diff] [blame] | 44 | "libnix", |
Alice Wang | fc5a44a | 2023-12-21 12:22:40 +0000 | [diff] [blame] | 45 | "libopenssl", |
Shikha Panwar | 61a74b5 | 2024-02-16 13:17:01 +0000 | [diff] [blame] | 46 | "librand", |
Alice Wang | bff017f | 2023-11-09 14:43:28 +0000 | [diff] [blame] | 47 | "librkpd_client", |
David Drysdale | 79af266 | 2024-02-19 14:50:31 +0000 | [diff] [blame] | 48 | "librusqlite", |
Jiyong Park | d50a024 | 2021-09-16 21:00:14 +0900 | [diff] [blame] | 49 | "librustutils", |
Treehugger Robot | 3ffa832 | 2021-11-22 12:06:47 +0000 | [diff] [blame] | 50 | "libstatslog_virtualization_rust", |
Shikha Panwar | 7afc139 | 2022-03-24 08:54:43 +0000 | [diff] [blame] | 51 | "libtombstoned_client_rust", |
Jiyong Park | 8611a6c | 2021-07-09 18:17:44 +0900 | [diff] [blame] | 52 | "libvsock", |
Inseob Kim | c4a774d | 2023-08-30 12:48:43 +0900 | [diff] [blame] | 53 | "libserde", |
| 54 | "libserde_xml_rs", |
Alice Wang | a448659 | 2023-09-05 08:25:59 +0000 | [diff] [blame] | 55 | "libservice_vm_comm", |
Alice Wang | 734801c | 2023-09-05 11:46:50 +0000 | [diff] [blame] | 56 | "libservice_vm_manager", |
David Brazdil | 1f53070 | 2022-10-03 12:18:10 +0100 | [diff] [blame] | 57 | ], |
Jiyong Park | 8d1eb7e | 2021-02-16 13:23:00 +0900 | [diff] [blame] | 58 | apex_available: ["com.android.virt"], |
Andrew Walbran | b12a43e | 2020-11-10 14:22:42 +0000 | [diff] [blame] | 59 | } |
Inseob Kim | c4a774d | 2023-08-30 12:48:43 +0900 | [diff] [blame] | 60 | |
Alice Wang | 4c6c558 | 2023-11-23 15:07:18 +0000 | [diff] [blame] | 61 | rust_binary { |
| 62 | name: "virtualizationservice", |
| 63 | defaults: ["virtualizationservice_defaults"], |
| 64 | } |
| 65 | |
Inseob Kim | c4a774d | 2023-08-30 12:48:43 +0900 | [diff] [blame] | 66 | xsd_config { |
| 67 | name: "assignable_devices", |
| 68 | srcs: ["assignable_devices.xsd"], |
| 69 | api_dir: "schema", |
| 70 | package_name: "android.system.virtualizationservice", |
| 71 | } |
Alice Wang | 4c6c558 | 2023-11-23 15:07:18 +0000 | [diff] [blame] | 72 | |
| 73 | rust_test { |
| 74 | name: "virtualizationservice_test", |
David Drysdale | 79af266 | 2024-02-19 14:50:31 +0000 | [diff] [blame] | 75 | defaults: [ |
| 76 | "authgraph_use_latest_hal_aidl_rust", |
| 77 | "virtualizationservice_defaults", |
| 78 | ], |
Alice Wang | 4c6c558 | 2023-11-23 15:07:18 +0000 | [diff] [blame] | 79 | test_suites: ["general-tests"], |
| 80 | data: [ |
| 81 | ":test_rkp_cert_chain", |
| 82 | ], |
| 83 | } |
| 84 | |
| 85 | // The chain originates from a CTS test for Keymint, with the Keymint certificate |
| 86 | // (leaf certificate) truncated. |
| 87 | // |
| 88 | // The certificate chain begins with a leaf certificate obtained from RKP and ends |
| 89 | // with a root certificate. Each certificate in the chain possesses a signature that |
| 90 | // is signed by the private key of the subsequent certificate in the chain. |
| 91 | filegroup { |
| 92 | name: "test_rkp_cert_chain", |
| 93 | srcs: ["testdata/rkp_cert_chain.der"], |
| 94 | } |