aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 05:07:53 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-07-07 05:07:53 +0000
commit21deb1f23b4284bcbc57ddc94aa2d676ce1c662c (patch)
tree9eba7ed9de4a3d6dd474733722cf66d55ad5a6e7
parent743b0f0be053f263374c5d663393d638f5f52b4a (diff)
parent3c5896d68f8d264272e01af4c3c82a9ffaa64864 (diff)
downloadcommon-android14-mainline-uwb-release.tar.gz
Change-Id: I060b58663c8c64dc439c3a4cd5b1c9ce7f49bad7
-rw-r--r--Android.bp29
-rw-r--r--AndroidProducts.mk1
-rw-r--r--README.md53
-rw-r--r--gki419_arm64.mk49
-rw-r--r--gki419_arm64/BoardConfig.mk44
-rw-r--r--gki_arm64.mk8
-rw-r--r--gki_arm64/BoardConfig.mk4
-rw-r--r--gsi_arm.mk3
-rw-r--r--gsi_arm64.mk6
-rw-r--r--gsi_x86.mk3
-rw-r--r--gsi_x86_64.mk6
-rw-r--r--overlays/SystemUI/Android.bp29
-rw-r--r--overlays/SystemUI/AndroidManifest.xml26
-rw-r--r--overlays/SystemUI/res/values/config.xml20
-rw-r--r--overlays/overlay-config.xml22
15 files changed, 291 insertions, 12 deletions
diff --git a/Android.bp b/Android.bp
new file mode 100644
index 0000000..d84260b
--- /dev/null
+++ b/Android.bp
@@ -0,0 +1,29 @@
+//
+// Copyright (C) 2021 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: ["device_generic_common_license"],
+}
+
+// Added automatically by a large-scale-change
+// See: http://go/android-license-faq
+license {
+ name: "device_generic_common_license",
+ visibility: [":__subpackages__"],
+ license_kinds: [
+ "SPDX-license-identifier-Apache-2.0",
+ ],
+ // large-scale-change unable to identify any license_text files
+}
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index 32ac42d..5b1b4c5 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -17,6 +17,7 @@
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/gki_arm64.mk \
$(LOCAL_DIR)/gki_x86_64.mk \
+ $(LOCAL_DIR)/gki419_arm64.mk \
$(LOCAL_DIR)/gsi_arm.mk \
$(LOCAL_DIR)/gsi_arm64.mk \
$(LOCAL_DIR)/gsi_x86.mk \
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..fcb14e6
--- /dev/null
+++ b/README.md
@@ -0,0 +1,53 @@
+# GSI
+
+This document introduces special GSI settings for facilitating xTS-on-GSI with
+a single image.
+
+### Support system_dlkm partition
+
+```
+[BoardConfigGsiCommon.mk]
+
+BOARD_USES_SYSTEM_DLKMIMAGE := true
+BOARD_SYSTEM_DLKMIMAGE_FILE_SYSTEM_TYPE := ext4
+TARGET_COPY_OUT_SYSTEM_DLKM := system_dlkm
+
+[gsi_release.mk]
+
+PRODUCT_BUILD_SYSTEM_DLKM_IMAGE := false
+```
+
+Starting from Android 13, all devices must include a [system_dlkm partition].
+GSI enables system_dlkm to support the devices with system_dlkm partition,
+and be compatible with old devices without a system_dlkm partition.
+
+With these configurations, `/system/system_dlkm` would not be created.
+Instead, a `/system/lib/modules` -> `/system_dlkm/lib/modules` symlink is
+created.
+
+For device without system_dlkm partition, the symlink would be dangling.
+The dangling symlink shouldn't be followed anyway because the device doesn't
+use system_dlkm.
+
+For device with system_dlkm, they can load modules via that path normally like
+when they are using their original system image.
+
+[system_dlkm partition]: https://source.android.com/docs/core/architecture/bootloader/partitions/gki-partitions
+
+### SystemUI overlays
+
+Some devices access the private android framework resource by `@*android:`
+while overlaying their SystemUI setting `status_bar_header_height_keyguard`.
+However, referencing private framework resource IDs from RRO packages in the
+vendor partition crashes on these devices when GSI is used. This is because
+private framework resource don't have a stable ID, and these vendor RRO
+packages would be referencing to dangling resource references after GSI is
+used (b/245806899).
+
+In order to prevent SystemUI crash, GSI adds a runtime resource overlay in
+the system_ext partition, which have higher overlay precedence than RROs on
+vendor partition, so the problematic vendor RROs would be overridden.
+
+Lifetime of this package:
+* Starts at: Android 14.
+* Deprecation plan: TBD, depends on b/254581880.
diff --git a/gki419_arm64.mk b/gki419_arm64.mk
new file mode 100644
index 0000000..15e6038
--- /dev/null
+++ b/gki419_arm64.mk
@@ -0,0 +1,49 @@
+#
+# Copyright (C) 2022 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.
+#
+
+#
+# TODO (b/212486689): The minimum system stuff for build pass.
+#
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk)
+
+#
+# Build GKI boot images
+#
+include device/generic/common/gki_common.mk
+
+PRODUCT_COPY_FILES += \
+ kernel/prebuilts/4.19/arm64/kernel-4.19:kernel-4.19 \
+ kernel/prebuilts/4.19/arm64/kernel-4.19-gz:kernel-4.19-gz \
+ kernel/prebuilts/4.19/arm64/kernel-4.19-lz4:kernel-4.19-lz4 \
+
+$(call dist-for-goals,dist_files,kernel/prebuilts/4.19/arm64/prebuilt-info.txt:kernel/4.19/prebuilt-info.txt)
+
+ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
+PRODUCT_COPY_FILES += \
+ kernel/prebuilts/4.19/arm64/kernel-4.19-allsyms:kernel-4.19-allsyms \
+ kernel/prebuilts/4.19/arm64/kernel-4.19-gz-allsyms:kernel-4.19-gz-allsyms \
+ kernel/prebuilts/4.19/arm64/kernel-4.19-lz4-allsyms:kernel-4.19-lz4-allsyms \
+
+$(call dist-for-goals,dist_files,kernel/prebuilts/4.19/arm64/prebuilt-info.txt:kernel/4.19-debug/prebuilt-info.txt)
+
+endif
+
+
+PRODUCT_NAME := gki419_arm64
+PRODUCT_DEVICE := gki419_arm64
+PRODUCT_BRAND := Android
+PRODUCT_MODEL := GKI on ARM64
diff --git a/gki419_arm64/BoardConfig.mk b/gki419_arm64/BoardConfig.mk
new file mode 100644
index 0000000..aada36a
--- /dev/null
+++ b/gki419_arm64/BoardConfig.mk
@@ -0,0 +1,44 @@
+# Copyright (C) 2022 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.
+#
+
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-a
+TARGET_CPU_ABI := arm64-v8a
+TARGET_CPU_ABI2 :=
+TARGET_CPU_VARIANT := generic
+
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv8-a
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+TARGET_2ND_CPU_VARIANT := generic
+
+include device/generic/common/BoardConfigGkiCommon.mk
+
+# Boot image with ramdisk and kernel
+BOARD_RAMDISK_USE_LZ4 := true
+BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK := false
+
+BOARD_KERNEL-4.19-GZ_BOOTIMAGE_PARTITION_SIZE := 47185920
+BOARD_KERNEL-4.19-GZ-ALLSYMS_BOOTIMAGE_PARTITION_SIZE := 47185920
+
+BOARD_KERNEL_BINARIES := \
+ kernel-4.19-gz \
+
+ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
+BOARD_KERNEL_BINARIES += \
+ kernel-4.19-gz-allsyms \
+
+endif
diff --git a/gki_arm64.mk b/gki_arm64.mk
index 3ff21cd..f826bb4 100644
--- a/gki_arm64.mk
+++ b/gki_arm64.mk
@@ -26,9 +26,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk)
include device/generic/common/gki_common.mk
PRODUCT_COPY_FILES += \
- kernel/prebuilts/4.19/arm64/kernel-4.19:kernel-4.19 \
- kernel/prebuilts/4.19/arm64/kernel-4.19-gz:kernel-4.19-gz \
- kernel/prebuilts/4.19/arm64/kernel-4.19-lz4:kernel-4.19-lz4 \
kernel/prebuilts/5.10/arm64/kernel-5.10:kernel-5.10 \
kernel/prebuilts/5.10/arm64/kernel-5.10-gz:kernel-5.10-gz \
kernel/prebuilts/5.10/arm64/kernel-5.10-lz4:kernel-5.10-lz4 \
@@ -36,15 +33,11 @@ PRODUCT_COPY_FILES += \
kernel/prebuilts/5.15/arm64/kernel-5.15-gz:kernel-5.15-gz \
kernel/prebuilts/5.15/arm64/kernel-5.15-lz4:kernel-5.15-lz4 \
-$(call dist-for-goals,dist_files,kernel/prebuilts/4.19/arm64/prebuilt-info.txt:kernel/4.19/prebuilt-info.txt)
$(call dist-for-goals,dist_files,kernel/prebuilts/5.10/arm64/prebuilt-info.txt:kernel/5.10/prebuilt-info.txt)
$(call dist-for-goals,dist_files,kernel/prebuilts/5.15/arm64/prebuilt-info.txt:kernel/5.15/prebuilt-info.txt)
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
PRODUCT_COPY_FILES += \
- kernel/prebuilts/4.19/arm64/kernel-4.19-allsyms:kernel-4.19-allsyms \
- kernel/prebuilts/4.19/arm64/kernel-4.19-gz-allsyms:kernel-4.19-gz-allsyms \
- kernel/prebuilts/4.19/arm64/kernel-4.19-lz4-allsyms:kernel-4.19-lz4-allsyms \
kernel/prebuilts/5.10/arm64/kernel-5.10-allsyms:kernel-5.10-allsyms \
kernel/prebuilts/5.10/arm64/kernel-5.10-gz-allsyms:kernel-5.10-gz-allsyms \
kernel/prebuilts/5.10/arm64/kernel-5.10-lz4-allsyms:kernel-5.10-lz4-allsyms \
@@ -52,7 +45,6 @@ PRODUCT_COPY_FILES += \
kernel/prebuilts/5.15/arm64/kernel-5.15-gz-allsyms:kernel-5.15-gz-allsyms \
kernel/prebuilts/5.15/arm64/kernel-5.15-lz4-allsyms:kernel-5.15-lz4-allsyms \
-$(call dist-for-goals,dist_files,kernel/prebuilts/4.19/arm64/prebuilt-info.txt:kernel/4.19-debug/prebuilt-info.txt)
$(call dist-for-goals,dist_files,kernel/prebuilts/5.10/arm64/prebuilt-info.txt:kernel/5.10-debug/prebuilt-info.txt)
$(call dist-for-goals,dist_files,kernel/prebuilts/5.15/arm64/prebuilt-info.txt:kernel/5.15-debug/prebuilt-info.txt)
diff --git a/gki_arm64/BoardConfig.mk b/gki_arm64/BoardConfig.mk
index 0263549..224c0c0 100644
--- a/gki_arm64/BoardConfig.mk
+++ b/gki_arm64/BoardConfig.mk
@@ -27,8 +27,6 @@ TARGET_2ND_CPU_VARIANT := generic
include device/generic/common/BoardConfigGkiCommon.mk
-BOARD_KERNEL-4.19-GZ_BOOTIMAGE_PARTITION_SIZE := 47185920
-BOARD_KERNEL-4.19-GZ-ALLSYMS_BOOTIMAGE_PARTITION_SIZE := 47185920
BOARD_KERNEL-5.10_BOOTIMAGE_PARTITION_SIZE := 67108864
BOARD_KERNEL-5.10-ALLSYMS_BOOTIMAGE_PARTITION_SIZE := 67108864
BOARD_KERNEL-5.10-GZ_BOOTIMAGE_PARTITION_SIZE := 47185920
@@ -43,13 +41,11 @@ BOARD_KERNEL-5.15-LZ4_BOOTIMAGE_PARTITION_SIZE := 53477376
BOARD_KERNEL-5.15-LZ4-ALLSYMS_BOOTIMAGE_PARTITION_SIZE := 53477376
BOARD_KERNEL_BINARIES := \
- kernel-4.19-gz \
kernel-5.10 kernel-5.10-gz kernel-5.10-lz4 \
kernel-5.15 kernel-5.15-gz kernel-5.15-lz4 \
ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT)))
BOARD_KERNEL_BINARIES += \
- kernel-4.19-gz-allsyms \
kernel-5.10-allsyms kernel-5.10-gz-allsyms kernel-5.10-lz4-allsyms \
kernel-5.15-allsyms kernel-5.15-gz-allsyms kernel-5.15-lz4-allsyms \
diff --git a/gsi_arm.mk b/gsi_arm.mk
index 1a28cc8..6272fb5 100644
--- a/gsi_arm.mk
+++ b/gsi_arm.mk
@@ -29,6 +29,9 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk)
# Enable mainline checking
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
+# Always build modules from source
+MODULE_BUILD_FROM_SOURCE := true
+
#
# All components inherited here go to system_ext image
#
diff --git a/gsi_arm64.mk b/gsi_arm64.mk
index d792cd9..ceb2e94 100644
--- a/gsi_arm64.mk
+++ b/gsi_arm64.mk
@@ -30,11 +30,17 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk)
# Enable mainline checking
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
+# Always build modules from source
+MODULE_BUILD_FROM_SOURCE := true
+
#
# All components inherited here go to system_ext image
#
$(call inherit-product, device/generic/common/gsi_system_ext.mk)
+# pKVM
+$(call inherit-product, packages/modules/Virtualization/apex/product_packages.mk)
+
#
# All components inherited here go to product image
#
diff --git a/gsi_x86.mk b/gsi_x86.mk
index 0dfde63..030d9b4 100644
--- a/gsi_x86.mk
+++ b/gsi_x86.mk
@@ -22,6 +22,9 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk)
# Enable mainline checking
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
+# Always build modules from source
+MODULE_BUILD_FROM_SOURCE := true
+
#
# All components inherited here go to system_ext image
#
diff --git a/gsi_x86_64.mk b/gsi_x86_64.mk
index eb5bd97..d21d0b9 100644
--- a/gsi_x86_64.mk
+++ b/gsi_x86_64.mk
@@ -23,11 +23,17 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk)
# Enable mainline checking
PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true
+# Always build modules from source
+MODULE_BUILD_FROM_SOURCE := true
+
#
# All components inherited here go to system_ext image
#
$(call inherit-product, device/generic/common/gsi_system_ext.mk)
+# pKVM
+$(call inherit-product, packages/modules/Virtualization/apex/product_packages.mk)
+
#
# All components below go to product image
#
diff --git a/overlays/SystemUI/Android.bp b/overlays/SystemUI/Android.bp
new file mode 100644
index 0000000..361729a
--- /dev/null
+++ b/overlays/SystemUI/Android.bp
@@ -0,0 +1,29 @@
+//
+// Copyright 2022 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 {
+ // See: http://go/android-license-faq
+ // A large-scale-change added 'default_applicable_licenses' to import
+ // all of the 'license_kinds' from "device_generic_common_license"
+ // to get the below license kinds:
+ // SPDX-license-identifier-Apache-2.0
+ default_applicable_licenses: ["device_generic_common_license"],
+}
+
+runtime_resource_overlay {
+ name: "gsi_overlay_systemui",
+ system_ext_specific: true,
+}
diff --git a/overlays/SystemUI/AndroidManifest.xml b/overlays/SystemUI/AndroidManifest.xml
new file mode 100644
index 0000000..d76b302
--- /dev/null
+++ b/overlays/SystemUI/AndroidManifest.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2022 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.
+ -->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.systemui.gsi.overlay">
+
+ <application android:hasCode="false" />
+
+ <overlay
+ android:targetPackage="com.android.systemui"
+ />
+</manifest>
diff --git a/overlays/SystemUI/res/values/config.xml b/overlays/SystemUI/res/values/config.xml
new file mode 100644
index 0000000..87bf621
--- /dev/null
+++ b/overlays/SystemUI/res/values/config.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+ * Copyright (C) 2022 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.
+-->
+
+<resources>
+ <dimen name="status_bar_header_height_keyguard">@*android:dimen/status_bar_height</dimen>
+</resources>
diff --git a/overlays/overlay-config.xml b/overlays/overlay-config.xml
new file mode 100644
index 0000000..8ef8a81
--- /dev/null
+++ b/overlays/overlay-config.xml
@@ -0,0 +1,22 @@
+<!--
+ * Copyright (C) 2022 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.
+ -->
+
+<config>
+ <!-- Immutable overlays must precede mutable ones -->
+ <overlay package="com.android.systemui.gsi.overlay" mutable="false" enabled="true" />
+
+ <!-- Mutable overlays -->
+</config>