• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1package {
2    default_applicable_licenses: ["Android-Apache-2.0"],
3}
4
5bootstrap_go_package {
6    name: "cuttlefish-soong-rules",
7    pkgPath: "android/soong/cuttlefish",
8    deps: [
9        "blueprint",
10        "soong",
11        "soong-android",
12    ],
13    srcs: [
14        "cvd-host-package.go",
15    ],
16    pluginFor: ["soong_build"],
17}
18
19// Allow cvd-host-package.go to read custom action config variables
20// from ctx.Config().VendorConfig("cvd")
21soong_config_module_type {
22    name: "cvd_host_package_customization",
23    module_type: "cvd_host_package",
24    config_namespace: "cvd",
25    value_variables: [
26        "launch_configs",
27        "custom_action_config",
28        "custom_action_servers",
29    ],
30}
31
32cvd_host_tools = [
33    "android.hardware.automotive.vehicle@2.0-virtualization-grpc-server",
34    "adb",
35    "adb_connector",
36    "adbshell",
37    "allocd",
38    "allocd_client",
39    "assemble_cvd",
40    "bt_connector",
41    "common_crosvm",
42    "config_server",
43    "console_forwarder",
44    "crosvm",
45    "cvd_host_bugreport",
46    "cvd_status",
47    "extract-ikconfig",
48    "extract-vmlinux",
49    "fsck.f2fs",
50    "gnss_grpc_proxy",
51    "kernel_log_monitor",
52    "launch_cvd",
53    "libgrpc++",
54    "libgrpc++_unsecure",
55    "log_tee",
56    "logcat_receiver",
57    "lpmake",
58    "lpunpack",
59    "lz4",
60    "make_f2fs",
61    "metrics",
62    "mkbootfs",
63    "mkbootimg",
64    "mkenvimage",
65    "modem_simulator",
66    "ms-tpm-20-ref",
67    "newfs_msdos",
68    "powerwash_cvd",
69    "restart_cvd",
70    "root-canal",
71    // TODO(b/186487510): remove libchrome and libbacktrace when ASan-related dependency issue is resolved.
72    "libchrome",
73    "libbacktrace",
74    "run_cvd",
75    "secure_env",
76    "socket_vsock_proxy",
77    "stop_cvd",
78    "tapsetiff",
79    "tombstone_receiver",
80    "toybox",
81    "unpack_bootimg",
82    "vnc_server",
83    "webRTC",
84    "webrtc_operator",
85]
86
87cvd_bluetooth_config_files = [
88    "controller_properties.json",
89    "default_commands",
90]
91
92cvd_host_tests = [
93    "cuttlefish_net_tests",
94    "modem_simulator_test",
95]
96
97cvd_host_webrtc_assets = [
98    "webrtc_adb.js",
99    "webrtc_app.js",
100    "webrtc_controls.js",
101    "webrtc_cf.js",
102    "webrtc_index.html",
103    "webrtc_rootcanal.js",
104    "webrtc_server.crt",
105    "webrtc_server.key",
106    "webrtc_server.p12",
107    "webrtc_style.css",
108    "webrtc_controls.css",
109    "webrtc_trusted.pem",
110]
111
112cvd_host_model_simulator_files = [
113    "iccprofile_for_sim0.xml_host",
114    "iccprofile_for_sim0_for_CtsCarrierApiTestCases.xml_host",
115    "numeric_operator.xml_host",
116]
117
118cvd_host_seccomp_policy_x86_64 = [
119    "9p_device.policy_x86_64",
120    "balloon_device.policy_x86_64",
121    "block_device.policy_x86_64",
122    "cras_audio_device.policy_x86_64",
123    "fs_device.policy_x86_64",
124    "gpu_device.policy_x86_64",
125    "input_device.policy_x86_64",
126    "net_device.policy_x86_64",
127    "null_audio_device.policy_x86_64",
128    "pmem_device.policy_x86_64",
129    "rng_device.policy_x86_64",
130    "serial.policy_x86_64",
131    "tpm_device.policy_x86_64",
132    "vfio_device.policy_x86_64",
133    "vhost_net_device.policy_x86_64",
134    "vhost_vsock_device.policy_x86_64",
135    "video_device.policy_x86_64",
136    "vios_audio_device.policy_x86_64",
137    "wl_device.policy_x86_64",
138    "xhci.policy_x86_64",
139]
140
141cvd_host_seccomp_policy_arm64 = [
142    "9p_device.policy_aarch64",
143    "balloon_device.policy_aarch64",
144    "block_device.policy_aarch64",
145    "cras_audio_device.policy_aarch64",
146    "fs_device.policy_aarch64",
147    "gpu_device.policy_aarch64",
148    "input_device.policy_aarch64",
149    "net_device.policy_aarch64",
150    "null_audio_device.policy_aarch64",
151    "pmem_device.policy_aarch64",
152    "rng_device.policy_aarch64",
153    "serial.policy_aarch64",
154    "tpm_device.policy_aarch64",
155    "vhost_net_device.policy_aarch64",
156    "vhost_vsock_device.policy_aarch64",
157    "vios_audio_device.policy_aarch64",
158    "wl_device.policy_aarch64",
159    "xhci.policy_aarch64",
160]
161
162cvd_host_package_customization {
163    name: "cvd-host_package",
164    deps: cvd_host_tools +
165        cvd_host_tests,
166    multilib: {
167        common: {
168            deps: cvd_host_webrtc_assets +
169                cvd_host_model_simulator_files +
170                cvd_bluetooth_config_files,
171        },
172    },
173
174    arch: {
175        x86_64: {
176            multilib: {
177                common: {
178                    deps: cvd_host_seccomp_policy_x86_64,
179                },
180            },
181        },
182        arm64: {
183            multilib: {
184                common: {
185                    deps: cvd_host_seccomp_policy_arm64,
186                },
187            },
188        },
189    },
190    target: {
191        linux_bionic: {
192            multilib: {
193                common: {
194                    deps: ["tzdata_host"],
195                },
196            },
197        },
198        linux_bionic_x86_64: {
199            enabled: false,
200        },
201        darwin: {
202            enabled: false,
203        },
204    },
205}
206