blob: 5dd1e0f712cc54b524648ac3faedc0e120ab8318 [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",
Nikita Ioffeda1b2732023-09-04 13:46:56 +01008 defaults: ["avf_build_flags_rust"],
Alan Stokes6472ccd2022-08-31 13:41:28 +01009 edition: "2021",
David Brazdil3f0f1e82023-01-12 16:18:43 +000010 srcs: ["src/main.rs"],
Andrew Walbrandfc953d2021-06-10 13:59:56 +000011 // Only build on targets which crosvm builds on.
12 enabled: false,
13 target: {
14 android64: {
15 compile_multilib: "64",
16 enabled: true,
17 },
18 linux_bionic_arm64: {
19 enabled: true,
20 },
21 },
Jiyong Park26bdf442021-04-05 16:04:49 +090022 prefer_rlib: true,
Andrew Walbranb12a43e2020-11-10 14:22:42 +000023 rustlibs: [
Alice Wang15f6d082023-08-25 09:11:07 +000024 "android.hardware.security.rkp-V3-rust",
Alan Stokes2bead0d2022-09-05 16:58:34 +010025 "android.system.virtualizationcommon-rust",
Alan Stokesea1f0462024-02-19 16:25:47 +000026 "android.system.virtualizationmaintenance-rust",
Andrew Walbranf6bf6862021-05-21 12:41:13 +000027 "android.system.virtualizationservice-rust",
David Brazdil528e0472022-10-10 15:06:02 +010028 "android.system.virtualizationservice_internal-rust",
Inseob Kim1b95f2e2021-08-19 13:17:40 +090029 "android.system.virtualmachineservice-rust",
Jiyong Park753553b2021-07-12 21:21:09 +090030 "android.os.permissions_aidl-rust",
Andrew Walbranbf1fb042021-03-15 16:54:09 +000031 "libandroid_logger",
Andrew Walbranb12a43e2020-11-10 14:22:42 +000032 "libanyhow",
Jiyong Parkd7bd2f22023-08-10 20:41:19 +090033 "libavflog",
Inseob Kim1b95f2e2021-08-19 13:17:40 +090034 "libbinder_rs",
Shikha Panwar61a74b52024-02-16 13:17:01 +000035 "libhex",
Alice Wangb5b90322023-11-14 07:38:18 +000036 "libhypervisor_props",
Jakob Vukalovicd42aa2c2023-11-09 16:04:00 +000037 "liblazy_static",
David Brazdila07a1792022-10-25 13:37:57 +010038 "liblibc",
Andrew Walbran3a5a9212021-05-04 17:09:08 +000039 "liblog_rust",
Andrew Walbranb27681f2022-02-23 15:11:52 +000040 "libnix",
Alice Wangfc5a44a2023-12-21 12:22:40 +000041 "libopenssl",
Shikha Panwar61a74b52024-02-16 13:17:01 +000042 "librand",
Alice Wangbff017f2023-11-09 14:43:28 +000043 "librkpd_client",
Jiyong Parkd50a0242021-09-16 21:00:14 +090044 "librustutils",
Treehugger Robot3ffa8322021-11-22 12:06:47 +000045 "libstatslog_virtualization_rust",
Shikha Panwar7afc1392022-03-24 08:54:43 +000046 "libtombstoned_client_rust",
Jiyong Park8611a6c2021-07-09 18:17:44 +090047 "libvsock",
Inseob Kimc4a774d2023-08-30 12:48:43 +090048 "libserde",
49 "libserde_xml_rs",
Alice Wanga4486592023-09-05 08:25:59 +000050 "libservice_vm_comm",
Alice Wang734801c2023-09-05 11:46:50 +000051 "libservice_vm_manager",
David Brazdil1f530702022-10-03 12:18:10 +010052 ],
Jiyong Park8d1eb7e2021-02-16 13:23:00 +090053 apex_available: ["com.android.virt"],
Andrew Walbranb12a43e2020-11-10 14:22:42 +000054}
Inseob Kimc4a774d2023-08-30 12:48:43 +090055
Alice Wang4c6c5582023-11-23 15:07:18 +000056rust_binary {
57 name: "virtualizationservice",
58 defaults: ["virtualizationservice_defaults"],
59}
60
Inseob Kimc4a774d2023-08-30 12:48:43 +090061xsd_config {
62 name: "assignable_devices",
63 srcs: ["assignable_devices.xsd"],
64 api_dir: "schema",
65 package_name: "android.system.virtualizationservice",
66}
Alice Wang4c6c5582023-11-23 15:07:18 +000067
68rust_test {
69 name: "virtualizationservice_test",
70 defaults: ["virtualizationservice_defaults"],
71 test_suites: ["general-tests"],
72 data: [
73 ":test_rkp_cert_chain",
74 ],
75}
76
77// The chain originates from a CTS test for Keymint, with the Keymint certificate
78// (leaf certificate) truncated.
79//
80// The certificate chain begins with a leaf certificate obtained from RKP and ends
81// with a root certificate. Each certificate in the chain possesses a signature that
82// is signed by the private key of the subsequent certificate in the chain.
83filegroup {
84 name: "test_rkp_cert_chain",
85 srcs: ["testdata/rkp_cert_chain.der"],
86}