Bob Badour | 77c910d | 2021-06-07 22:20:50 -0700 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2021 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | |
| 16 | package { |
Alan Stokes | 8704861 | 2024-02-08 17:08:31 +0000 | [diff] [blame] | 17 | default_team: "trendy_team_virtualization", |
Alan Stokes | 94475b8 | 2023-10-25 15:54:21 +0100 | [diff] [blame] | 18 | default_applicable_licenses: ["Android-Apache-2.0"], |
Bob Badour | 77c910d | 2021-06-07 22:20:50 -0700 | [diff] [blame] | 19 | } |
Nikita Ioffe | 3973d38 | 2023-08-31 17:53:25 +0100 | [diff] [blame] | 20 | |
| 21 | soong_config_module_type { |
| 22 | name: "avf_flag_aware_rust_defaults", |
| 23 | module_type: "rust_defaults", |
| 24 | config_namespace: "ANDROID", |
| 25 | bool_variables: [ |
Nikita Ioffe | 94a8a18 | 2023-11-16 16:37:48 +0000 | [diff] [blame] | 26 | "release_avf_enable_device_assignment", |
Alan Stokes | 7f27c0d | 2023-09-07 16:22:58 +0100 | [diff] [blame] | 27 | "release_avf_enable_dice_changes", |
Shikha Panwar | 95084df | 2023-07-22 11:47:45 +0000 | [diff] [blame] | 28 | "release_avf_enable_llpvm_changes", |
Nikita Ioffe | 3973d38 | 2023-08-31 17:53:25 +0100 | [diff] [blame] | 29 | "release_avf_enable_multi_tenant_microdroid_vm", |
Seungjae Yoo | 529d53c | 2024-05-14 14:36:18 +0900 | [diff] [blame] | 30 | "release_avf_enable_network", |
Alice Wang | e9ac2db | 2023-09-08 15:13:13 +0000 | [diff] [blame] | 31 | "release_avf_enable_remote_attestation", |
Nikita Ioffe | 631717e | 2023-09-05 13:38:07 +0100 | [diff] [blame] | 32 | "release_avf_enable_vendor_modules", |
David Dai | e6f5bb0 | 2024-01-25 19:17:02 -0800 | [diff] [blame] | 33 | "release_avf_enable_virt_cpufreq", |
Jeongik Cha | 798401c | 2024-04-11 21:54:49 +0900 | [diff] [blame] | 34 | "release_avf_support_custom_vm_with_paravirtualized_devices", |
Nikita Ioffe | 3973d38 | 2023-08-31 17:53:25 +0100 | [diff] [blame] | 35 | ], |
| 36 | properties: [ |
| 37 | "cfgs", |
| 38 | ], |
| 39 | } |
| 40 | |
| 41 | avf_flag_aware_rust_defaults { |
| 42 | name: "avf_build_flags_rust", |
| 43 | soong_config_variables: { |
Nikita Ioffe | 94a8a18 | 2023-11-16 16:37:48 +0000 | [diff] [blame] | 44 | release_avf_enable_device_assignment: { |
| 45 | cfgs: ["device_assignment"], |
| 46 | }, |
Alan Stokes | 7f27c0d | 2023-09-07 16:22:58 +0100 | [diff] [blame] | 47 | release_avf_enable_dice_changes: { |
| 48 | cfgs: ["dice_changes"], |
| 49 | }, |
Shikha Panwar | 95084df | 2023-07-22 11:47:45 +0000 | [diff] [blame] | 50 | release_avf_enable_llpvm_changes: { |
| 51 | cfgs: ["llpvm_changes"], |
| 52 | }, |
Nikita Ioffe | 3973d38 | 2023-08-31 17:53:25 +0100 | [diff] [blame] | 53 | release_avf_enable_multi_tenant_microdroid_vm: { |
Alan Stokes | 27f3ef0 | 2023-09-29 15:09:35 +0100 | [diff] [blame] | 54 | cfgs: ["multi_tenant"], |
Nikita Ioffe | 3973d38 | 2023-08-31 17:53:25 +0100 | [diff] [blame] | 55 | }, |
Seungjae Yoo | 529d53c | 2024-05-14 14:36:18 +0900 | [diff] [blame] | 56 | release_avf_enable_network: { |
| 57 | cfgs: ["network"], |
| 58 | }, |
Alice Wang | e9ac2db | 2023-09-08 15:13:13 +0000 | [diff] [blame] | 59 | release_avf_enable_remote_attestation: { |
| 60 | cfgs: ["remote_attestation"], |
| 61 | }, |
Nikita Ioffe | 631717e | 2023-09-05 13:38:07 +0100 | [diff] [blame] | 62 | release_avf_enable_vendor_modules: { |
| 63 | cfgs: ["vendor_modules"], |
| 64 | }, |
David Dai | e6f5bb0 | 2024-01-25 19:17:02 -0800 | [diff] [blame] | 65 | release_avf_enable_virt_cpufreq: { |
| 66 | cfgs: ["virt_cpufreq"], |
| 67 | }, |
Jeongik Cha | 798401c | 2024-04-11 21:54:49 +0900 | [diff] [blame] | 68 | release_avf_support_custom_vm_with_paravirtualized_devices: { |
| 69 | cfgs: ["paravirtualized_devices"], |
| 70 | }, |
Nikita Ioffe | 3973d38 | 2023-08-31 17:53:25 +0100 | [diff] [blame] | 71 | }, |
| 72 | } |
Jaewan Kim | 0df5fb1 | 2023-09-24 23:33:54 +0900 | [diff] [blame] | 73 | |
Nikita Ioffe | 38b9e71 | 2024-02-08 15:55:07 +0000 | [diff] [blame] | 74 | soong_config_module_type { |
| 75 | name: "avf_flag_aware_cc_defaults", |
| 76 | module_type: "cc_defaults", |
| 77 | config_namespace: "ANDROID", |
| 78 | bool_variables: [ |
Nikita Ioffe | fd10953 | 2024-03-04 13:58:01 +0000 | [diff] [blame] | 79 | "release_avf_enable_dice_changes", |
Seungjae Yoo | 329f286 | 2024-04-08 11:21:53 +0900 | [diff] [blame] | 80 | "release_avf_enable_vendor_modules", |
Nikita Ioffe | 38b9e71 | 2024-02-08 15:55:07 +0000 | [diff] [blame] | 81 | "release_avf_enable_virt_cpufreq", |
| 82 | ], |
| 83 | properties: [ |
| 84 | "cflags", |
| 85 | ], |
| 86 | } |
| 87 | |
| 88 | avf_flag_aware_cc_defaults { |
| 89 | name: "avf_build_flags_cc", |
| 90 | soong_config_variables: { |
Nikita Ioffe | fd10953 | 2024-03-04 13:58:01 +0000 | [diff] [blame] | 91 | release_avf_enable_dice_changes: { |
| 92 | cflags: ["-DAVF_OPEN_DICE_CHANGES=1"], |
| 93 | }, |
Seungjae Yoo | 329f286 | 2024-04-08 11:21:53 +0900 | [diff] [blame] | 94 | release_avf_enable_vendor_modules: { |
| 95 | cflags: ["-DAVF_ENABLE_VENDOR_MODULES=1"], |
| 96 | }, |
Nikita Ioffe | 38b9e71 | 2024-02-08 15:55:07 +0000 | [diff] [blame] | 97 | release_avf_enable_virt_cpufreq: { |
| 98 | cflags: ["-DAVF_ENABLE_VIRT_CPUFREQ=1"], |
| 99 | }, |
| 100 | }, |
| 101 | } |
| 102 | |
Jaewan Kim | 0df5fb1 | 2023-09-24 23:33:54 +0900 | [diff] [blame] | 103 | genrule_defaults { |
| 104 | name: "dts_to_dtb", |
| 105 | tools: ["dtc"], |
Jaewan Kim | a232ed0 | 2024-02-25 16:08:14 +0000 | [diff] [blame] | 106 | cmd: "FILES=($(in)) && $(location dtc) -@ -I dts -O dtb $${FILES[-1]} -o $(out)", |
Jaewan Kim | 0df5fb1 | 2023-09-24 23:33:54 +0900 | [diff] [blame] | 107 | } |
Nikita Ioffe | e3a049f | 2024-02-15 15:47:23 +0000 | [diff] [blame] | 108 | |
| 109 | // This is a temporary workaround until b/309090563 is implemented. |
| 110 | aconfig_declarations { |
| 111 | name: "avf_aconfig_flags", |
| 112 | package: "com.android.system.virtualmachine.flags", |
Yu Liu | 6c8ce02 | 2024-03-28 17:30:05 +0000 | [diff] [blame] | 113 | container: "com.android.virt", |
Nikita Ioffe | e3a049f | 2024-02-15 15:47:23 +0000 | [diff] [blame] | 114 | srcs: [ |
| 115 | "avf_flags.aconfig", |
| 116 | ], |
| 117 | } |
| 118 | |
| 119 | java_aconfig_library { |
| 120 | name: "avf_aconfig_flags_java", |
| 121 | aconfig_declarations: "avf_aconfig_flags", |
| 122 | sdk_version: "module_current", |
| 123 | apex_available: ["com.android.virt"], |
| 124 | } |