Nikita Ioffe | a2af1e4 | 2024-02-14 18:13:47 +0000 | [diff] [blame] | 1 | // Copyright (C) 2024 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package { |
| 16 | default_applicable_licenses: ["microdroid_kernel_prebuilts_license"], |
| 17 | } |
| 18 | |
| 19 | // See: http://go/android-license-faq |
| 20 | license { |
| 21 | name: "microdroid_kernel_prebuilts_license", |
| 22 | visibility: [":__subpackages__"], |
| 23 | license_kinds: [ |
| 24 | "SPDX-license-identifier-GPL-2.0-only", |
| 25 | ], |
| 26 | // large-scale-change unable to identify any license_text files |
| 27 | } |
| 28 | |
| 29 | soong_config_module_type { |
| 30 | name: "avf_microdroid_kernel_prebuilt", |
| 31 | module_type: "filegroup", |
| 32 | config_namespace: "ANDROID", |
| 33 | variables: [ |
| 34 | "release_avf_microdroid_kernel_version", |
| 35 | ], |
| 36 | properties: [ |
| 37 | "srcs", |
| 38 | ], |
| 39 | } |
| 40 | |
| 41 | soong_config_string_variable { |
| 42 | name: "release_avf_microdroid_kernel_version", |
| 43 | // TODO(b/298011555): add 15-6.6 |
| 44 | values: [ |
| 45 | "android14_61", |
| 46 | "android15_61", |
| 47 | ], |
| 48 | } |
| 49 | |
| 50 | avf_microdroid_kernel_prebuilt { |
| 51 | name: "microdroid_kernel_prebuilt-arm64", |
| 52 | // Below are properties that are conditionally set depending on value of build flags. |
| 53 | soong_config_variables: { |
| 54 | release_avf_microdroid_kernel_version: { |
| 55 | android14_61: { |
| 56 | srcs: ["android14-6.1/arm64/kernel-6.1"], |
| 57 | }, |
Nikita Ioffe | 2be8d3e | 2024-02-14 23:39:02 +0000 | [diff] [blame] | 58 | android15_61: { |
| 59 | srcs: ["android15-6.1/arm64/kernel-6.1"], |
| 60 | }, |
Nikita Ioffe | a2af1e4 | 2024-02-14 18:13:47 +0000 | [diff] [blame] | 61 | // In case release configuration doesn't specify value of the |
| 62 | // RELEASE_AVF_MICRODROID_KERNEL_VERSION fallback to the kernel we |
| 63 | // already released. |
| 64 | // TODO(b/298011555): remove this once we set the flag in all release configs. |
| 65 | conditions_default: { |
| 66 | srcs: ["android14-6.1/arm64/kernel-6.1"], |
| 67 | }, |
| 68 | }, |
| 69 | }, |
| 70 | } |
| 71 | |
| 72 | avf_microdroid_kernel_prebuilt { |
| 73 | name: "microdroid_kernel_prebuilt-x86_64", |
| 74 | // Below are properties that are conditionally set depending on value of build flags. |
| 75 | soong_config_variables: { |
| 76 | release_avf_microdroid_kernel_version: { |
| 77 | android14_61: { |
| 78 | srcs: ["android14-6.1/x86_64/kernel-6.1"], |
| 79 | }, |
Nikita Ioffe | 2be8d3e | 2024-02-14 23:39:02 +0000 | [diff] [blame] | 80 | android15_61: { |
| 81 | srcs: ["android15-6.1/x86_64/kernel-6.1"], |
| 82 | }, |
Nikita Ioffe | a2af1e4 | 2024-02-14 18:13:47 +0000 | [diff] [blame] | 83 | // In case release configuration doesn't specify value of the |
| 84 | // RELEASE_AVF_MICRODROID_KERNEL_VERSION fallback to the kernel we |
| 85 | // already released. |
| 86 | // TODO(b/298011555): remove this once we set the flag in all release configs. |
| 87 | conditions_default: { |
| 88 | srcs: ["android14-6.1/x86_64/kernel-6.1"], |
| 89 | }, |
| 90 | }, |
| 91 | }, |
| 92 | } |