From eec848fd6a85e834c47769e51ef076d819504dc1 Mon Sep 17 00:00:00 2001 From: SzuWei Lin Date: Tue, 4 Jan 2022 14:29:21 +0800 Subject: [PATCH] Remove GKI from gsi_$arch After having gki_$arch, there is no longer need for building GKI by target gsi_$arch. The BoardConfigGkiCommon.mk is also moved to /device/generic/common. The patch removes all GKI related settings and files from target gsi_$arch. Bug: 212486689 Test: build dist of gsi_arm64-userdebug Test: build dist of aosp_arm64-userdebug Change-Id: I369f42ad1f6e3f519bb62c3f035e699df1c7468f --- target/board/BoardConfigGkiCommon.mk | 40 ---------------------- target/board/BoardConfigGsiCommon.mk | 6 ---- target/board/generic_arm64/BoardConfig.mk | 23 ------------- target/board/generic_arm64/device.mk | 23 ------------- target/board/generic_x86_64/BoardConfig.mk | 22 ++---------- target/board/generic_x86_64/device.mk | 16 --------- 6 files changed, 2 insertions(+), 128 deletions(-) delete mode 100644 target/board/BoardConfigGkiCommon.mk diff --git a/target/board/BoardConfigGkiCommon.mk b/target/board/BoardConfigGkiCommon.mk deleted file mode 100644 index 63ef2b485a..0000000000 --- a/target/board/BoardConfigGkiCommon.mk +++ /dev/null @@ -1,40 +0,0 @@ -# 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. -# - -# Enable GKI 2.0 signing. -BOARD_GKI_SIGNING_KEY_PATH := build/make/target/product/gsi/testkey_rsa2048.pem -BOARD_GKI_SIGNING_ALGORITHM := SHA256_RSA2048 -BOARD_GKI_SIGNING_SIGNATURE_ARGS := - -# Sets boot SPL. -BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH) - -# Boot image with ramdisk and kernel -BOARD_RAMDISK_USE_LZ4 := true -BOARD_BOOT_HEADER_VERSION := 4 -BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) -BOARD_USES_RECOVERY_AS_BOOT := -TARGET_NO_KERNEL := false -BOARD_USES_GENERIC_KERNEL_IMAGE := true - -# Copy boot image in $OUT to target files. This is defined for targets where -# the installed GKI APEXes are built from source. -BOARD_COPY_BOOT_IMAGE_TO_TARGET_FILES := true - -# No vendor_boot -BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := - -# No recovery -BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE := diff --git a/target/board/BoardConfigGsiCommon.mk b/target/board/BoardConfigGsiCommon.mk index c577870de5..8e062bac8c 100644 --- a/target/board/BoardConfigGsiCommon.mk +++ b/target/board/BoardConfigGsiCommon.mk @@ -57,12 +57,6 @@ endif # This flag is set by mainline but isn't desired for GSI BOARD_BLUETOOTH_BDROID_BUILDCFG_INCLUDE_DIR := -# Enable chain partition for boot, mainly for GKI images. -BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa2048.pem -BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA2048 -BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) -BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2 - # GSI specific System Properties ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) TARGET_SYSTEM_EXT_PROP := build/make/target/board/gsi_system_ext.prop diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk index b0c9950e33..45ed3daa7c 100644 --- a/target/board/generic_arm64/BoardConfig.mk +++ b/target/board/generic_arm64/BoardConfig.mk @@ -53,29 +53,6 @@ TARGET_2ND_CPU_VARIANT := generic endif include build/make/target/board/BoardConfigGsiCommon.mk -include build/make/target/board/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 -BOARD_KERNEL-5.10-GZ-ALLSYMS_BOOTIMAGE_PARTITION_SIZE := 47185920 -BOARD_KERNEL-5.10-LZ4_BOOTIMAGE_PARTITION_SIZE := 53477376 -BOARD_KERNEL-5.10-LZ4-ALLSYMS_BOOTIMAGE_PARTITION_SIZE := 53477376 - -BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 - -BOARD_KERNEL_BINARIES := \ - kernel-4.19-gz \ - kernel-5.10 kernel-5.10-gz kernel-5.10-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 \ - -endif # Some vendors still haven't cleaned up all device specific directories under # root! diff --git a/target/board/generic_arm64/device.mk b/target/board/generic_arm64/device.mk index 0a05d9c13d..598bef1d3b 100644 --- a/target/board/generic_arm64/device.mk +++ b/target/board/generic_arm64/device.mk @@ -13,26 +13,3 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -PRODUCT_COPY_FILES += \ - kernel/prebuilts/4.19/arm64/kernel-4.19-gz:kernel-4.19-gz \ - 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 \ - -$(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) - -ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) -PRODUCT_COPY_FILES += \ - kernel/prebuilts/4.19/arm64/kernel-4.19-gz-allsyms:kernel-4.19-gz-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 \ - -endif - -PRODUCT_BUILD_VENDOR_BOOT_IMAGE := false -PRODUCT_BUILD_RECOVERY_IMAGE := false - -$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk) diff --git a/target/board/generic_x86_64/BoardConfig.mk b/target/board/generic_x86_64/BoardConfig.mk index 640216c0bf..93694f2d4f 100755 --- a/target/board/generic_x86_64/BoardConfig.mk +++ b/target/board/generic_x86_64/BoardConfig.mk @@ -24,25 +24,7 @@ TARGET_2ND_ARCH_VARIANT := x86_64 include build/make/target/board/BoardConfigGsiCommon.mk -ifdef BUILDING_GSI -include build/make/target/board/BoardConfigGkiCommon.mk - -BOARD_KERNEL-5.4_BOOTIMAGE_PARTITION_SIZE := 67108864 -BOARD_KERNEL-5.10_BOOTIMAGE_PARTITION_SIZE := 67108864 -BOARD_KERNEL-5.10-ALLSYMS_BOOTIMAGE_PARTITION_SIZE := 67108864 - -BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 - -BOARD_KERNEL_BINARIES := \ - kernel-5.10 \ - -ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) -BOARD_KERNEL_BINARIES += \ - kernel-5.10-allsyms \ - -endif - -else # BUILDING_GSI +ifndef BUILDING_GSI include build/make/target/board/BoardConfigEmuCommon.mk BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 @@ -60,4 +42,4 @@ WIFI_DRIVER_FW_PATH_PARAM := "/dev/null" WIFI_DRIVER_FW_PATH_STA := "/dev/null" WIFI_DRIVER_FW_PATH_AP := "/dev/null" -endif # BUILDING_GSI +endif # !BUILDING_GSI diff --git a/target/board/generic_x86_64/device.mk b/target/board/generic_x86_64/device.mk index d28ace7ab0..fa1eb67f61 100755 --- a/target/board/generic_x86_64/device.mk +++ b/target/board/generic_x86_64/device.mk @@ -13,19 +13,3 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -PRODUCT_COPY_FILES += \ - kernel/prebuilts/5.10/x86_64/kernel-5.10:kernel-5.10 \ - -$(call dist-for-goals, dist_files, kernel/prebuilts/5.10/x86_64/prebuilt-info.txt:kernel/5.10/prebuilt-info.txt) - -ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) -PRODUCT_COPY_FILES += \ - kernel/prebuilts/5.10/x86_64/kernel-5.10-allsyms:kernel-5.10-allsyms \ - -endif - -PRODUCT_BUILD_VENDOR_BOOT_IMAGE := false -PRODUCT_BUILD_RECOVERY_IMAGE := false - -$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk)