blob: f9034afd8c33e67b312357f4d216ee141c50a45c [file] [log] [blame]
Bob Badourbd1037f2021-02-12 15:54:17 -08001package {
2 default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
Alice Wang4c6c5582023-11-23 15:07:18 +00005rust_defaults {
6 name: "virtualizationservice_defaults",
Andrew Walbranf6bf6862021-05-21 12:41:13 +00007 crate_name: "virtualizationservice",
David Drysdale79af2662024-02-19 14:50:31 +00008 defaults: [
9 "avf_build_flags_rust",
10 "secretkeeper_use_latest_hal_aidl_rust",
11 ],
Alan Stokes6472ccd2022-08-31 13:41:28 +010012 edition: "2021",
David Brazdil3f0f1e82023-01-12 16:18:43 +000013 srcs: ["src/main.rs"],
Andrew Walbrandfc953d2021-06-10 13:59:56 +000014 // 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 Park26bdf442021-04-05 16:04:49 +090025 prefer_rlib: true,
Andrew Walbranb12a43e2020-11-10 14:22:42 +000026 rustlibs: [
Alice Wang15f6d082023-08-25 09:11:07 +000027 "android.hardware.security.rkp-V3-rust",
Alan Stokes2bead0d2022-09-05 16:58:34 +010028 "android.system.virtualizationcommon-rust",
Alan Stokesea1f0462024-02-19 16:25:47 +000029 "android.system.virtualizationmaintenance-rust",
Andrew Walbranf6bf6862021-05-21 12:41:13 +000030 "android.system.virtualizationservice-rust",
David Brazdil528e0472022-10-10 15:06:02 +010031 "android.system.virtualizationservice_internal-rust",
Inseob Kim1b95f2e2021-08-19 13:17:40 +090032 "android.system.virtualmachineservice-rust",
Seungjae Yoob6e4f1d2024-06-17 15:13:12 +090033 "android.system.vmtethering-rust",
Jiyong Park753553b2021-07-12 21:21:09 +090034 "android.os.permissions_aidl-rust",
Andrew Walbranbf1fb042021-03-15 16:54:09 +000035 "libandroid_logger",
Andrew Walbranb12a43e2020-11-10 14:22:42 +000036 "libanyhow",
Jiyong Parkd7bd2f22023-08-10 20:41:19 +090037 "libavflog",
Inseob Kim1b95f2e2021-08-19 13:17:40 +090038 "libbinder_rs",
Shikha Panwar61a74b52024-02-16 13:17:01 +000039 "libhex",
Alice Wangb5b90322023-11-14 07:38:18 +000040 "libhypervisor_props",
Jakob Vukalovicd42aa2c2023-11-09 16:04:00 +000041 "liblazy_static",
David Brazdila07a1792022-10-25 13:37:57 +010042 "liblibc",
David Drysdale79af2662024-02-19 14:50:31 +000043 "liblibsqlite3_sys",
Andrew Walbran3a5a9212021-05-04 17:09:08 +000044 "liblog_rust",
Andrew Walbranb27681f2022-02-23 15:11:52 +000045 "libnix",
Alice Wangfc5a44a2023-12-21 12:22:40 +000046 "libopenssl",
Shikha Panwar61a74b52024-02-16 13:17:01 +000047 "librand",
Alice Wangbff017f2023-11-09 14:43:28 +000048 "librkpd_client",
David Drysdale79af2662024-02-19 14:50:31 +000049 "librusqlite",
Jiyong Parkd50a0242021-09-16 21:00:14 +090050 "librustutils",
Treehugger Robot3ffa8322021-11-22 12:06:47 +000051 "libstatslog_virtualization_rust",
Shikha Panwar7afc1392022-03-24 08:54:43 +000052 "libtombstoned_client_rust",
Jiyong Park8611a6c2021-07-09 18:17:44 +090053 "libvsock",
Inseob Kimc4a774d2023-08-30 12:48:43 +090054 "libserde",
55 "libserde_xml_rs",
Alice Wanga4486592023-09-05 08:25:59 +000056 "libservice_vm_comm",
Alice Wang734801c2023-09-05 11:46:50 +000057 "libservice_vm_manager",
David Brazdil1f530702022-10-03 12:18:10 +010058 ],
Jiyong Park8d1eb7e2021-02-16 13:23:00 +090059 apex_available: ["com.android.virt"],
Andrew Walbranb12a43e2020-11-10 14:22:42 +000060}
Inseob Kimc4a774d2023-08-30 12:48:43 +090061
Alice Wang4c6c5582023-11-23 15:07:18 +000062rust_binary {
63 name: "virtualizationservice",
64 defaults: ["virtualizationservice_defaults"],
65}
66
Inseob Kimc4a774d2023-08-30 12:48:43 +090067xsd_config {
68 name: "assignable_devices",
69 srcs: ["assignable_devices.xsd"],
70 api_dir: "schema",
71 package_name: "android.system.virtualizationservice",
72}
Alice Wang4c6c5582023-11-23 15:07:18 +000073
74rust_test {
75 name: "virtualizationservice_test",
David Drysdale79af2662024-02-19 14:50:31 +000076 defaults: [
77 "authgraph_use_latest_hal_aidl_rust",
78 "virtualizationservice_defaults",
79 ],
Alice Wang4c6c5582023-11-23 15:07:18 +000080 test_suites: ["general-tests"],
David Drysdalecf8875c2024-03-15 18:16:02 +000081 rustlibs: [
82 "libtempfile",
83 ],
Alice Wang4c6c5582023-11-23 15:07:18 +000084 data: [
85 ":test_rkp_cert_chain",
86 ],
87}
88
89// The chain originates from a CTS test for Keymint, with the Keymint certificate
90// (leaf certificate) truncated.
91//
92// The certificate chain begins with a leaf certificate obtained from RKP and ends
93// with a root certificate. Each certificate in the chain possesses a signature that
94// is signed by the private key of the subsequent certificate in the chain.
95filegroup {
96 name: "test_rkp_cert_chain",
97 srcs: ["testdata/rkp_cert_chain.der"],
98}