Add prebuilt kernel that supports loading modules
So far this kernel is based on GKI with some configs tweaked. Since it
will be only used for development, a locally built kernel image is
checked in.
The PRODUCT_AVF_KERNEL_MODULES_ENABLED build flag controls whether the
com.android.virt APEX should also include kernel that supports loading
modules.
Bug: 283822676
Bug: 278008256
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid \
--protected \
--kernel=/apex/com.android.virt/etc/fs/microdroid_kernel_with_modules
Change-Id: I366fb54a3ffbb2f4a5025fa1f9d02d405a497e20
diff --git a/microdroid/kernel/with-modules/Android.bp b/microdroid/kernel/with-modules/Android.bp
new file mode 100644
index 0000000..f1ec06e
--- /dev/null
+++ b/microdroid/kernel/with-modules/Android.bp
@@ -0,0 +1,32 @@
+// Copyright (C) 2023 The Android Open Source Project
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package {
+ default_applicable_licenses: ["microdroid_kernel_with_modules_prebuilts_6.1_arm64_license"],
+}
+
+// See: http://go/android-license-faq
+license {
+ name: "microdroid_kernel_with_modules_prebuilts_6.1_arm64_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-GPL-2.0-only",
+ ],
+ // large-scale-change unable to identify any license_text files
+}
+
+filegroup {
+ name: "microdroid_kernel_with_modules_prebuilts-6.1-arm64",
+ srcs: ["kernel_with_modules-6.1"],
+}