blob: 0c395013386ecb392e6f11eebec14cf8783d746c [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",
Jiyong Park753553b2021-07-12 21:21:09 +090033 "android.os.permissions_aidl-rust",
Andrew Walbranbf1fb042021-03-15 16:54:09 +000034 "libandroid_logger",
Andrew Walbranb12a43e2020-11-10 14:22:42 +000035 "libanyhow",
Jiyong Parkd7bd2f22023-08-10 20:41:19 +090036 "libavflog",
Inseob Kim1b95f2e2021-08-19 13:17:40 +090037 "libbinder_rs",
Shikha Panwar61a74b52024-02-16 13:17:01 +000038 "libhex",
Alice Wangb5b90322023-11-14 07:38:18 +000039 "libhypervisor_props",
Jakob Vukalovicd42aa2c2023-11-09 16:04:00 +000040 "liblazy_static",
David Brazdila07a1792022-10-25 13:37:57 +010041 "liblibc",
David Drysdale79af2662024-02-19 14:50:31 +000042 "liblibsqlite3_sys",
Andrew Walbran3a5a9212021-05-04 17:09:08 +000043 "liblog_rust",
Andrew Walbranb27681f2022-02-23 15:11:52 +000044 "libnix",
Alice Wangfc5a44a2023-12-21 12:22:40 +000045 "libopenssl",
Shikha Panwar61a74b52024-02-16 13:17:01 +000046 "librand",
Alice Wangbff017f2023-11-09 14:43:28 +000047 "librkpd_client",
David Drysdale79af2662024-02-19 14:50:31 +000048 "librusqlite",
Jiyong Parkd50a0242021-09-16 21:00:14 +090049 "librustutils",
Treehugger Robot3ffa8322021-11-22 12:06:47 +000050 "libstatslog_virtualization_rust",
Shikha Panwar7afc1392022-03-24 08:54:43 +000051 "libtombstoned_client_rust",
Jiyong Park8611a6c2021-07-09 18:17:44 +090052 "libvsock",
Inseob Kimc4a774d2023-08-30 12:48:43 +090053 "libserde",
54 "libserde_xml_rs",
Alice Wanga4486592023-09-05 08:25:59 +000055 "libservice_vm_comm",
Alice Wang734801c2023-09-05 11:46:50 +000056 "libservice_vm_manager",
David Brazdil1f530702022-10-03 12:18:10 +010057 ],
Jiyong Park8d1eb7e2021-02-16 13:23:00 +090058 apex_available: ["com.android.virt"],
Andrew Walbranb12a43e2020-11-10 14:22:42 +000059}
Inseob Kimc4a774d2023-08-30 12:48:43 +090060
Alice Wang4c6c5582023-11-23 15:07:18 +000061rust_binary {
62 name: "virtualizationservice",
63 defaults: ["virtualizationservice_defaults"],
64}
65
Inseob Kimc4a774d2023-08-30 12:48:43 +090066xsd_config {
67 name: "assignable_devices",
68 srcs: ["assignable_devices.xsd"],
69 api_dir: "schema",
70 package_name: "android.system.virtualizationservice",
71}
Alice Wang4c6c5582023-11-23 15:07:18 +000072
73rust_test {
74 name: "virtualizationservice_test",
David Drysdale79af2662024-02-19 14:50:31 +000075 defaults: [
76 "authgraph_use_latest_hal_aidl_rust",
77 "virtualizationservice_defaults",
78 ],
Alice Wang4c6c5582023-11-23 15:07:18 +000079 test_suites: ["general-tests"],
David Drysdalecf8875c2024-03-15 18:16:02 +000080 rustlibs: [
81 "libtempfile",
82 ],
Alice Wang4c6c5582023-11-23 15:07:18 +000083 data: [
84 ":test_rkp_cert_chain",
85 ],
86}
87
88// The chain originates from a CTS test for Keymint, with the Keymint certificate
89// (leaf certificate) truncated.
90//
91// The certificate chain begins with a leaf certificate obtained from RKP and ends
92// with a root certificate. Each certificate in the chain possesses a signature that
93// is signed by the private key of the subsequent certificate in the chain.
94filegroup {
95 name: "test_rkp_cert_chain",
96 srcs: ["testdata/rkp_cert_chain.der"],
97}