From 5aa98d8ae121be14c1f72b832d3b05dadb7bf8a7 Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Tue, 7 Apr 2020 11:30:32 +0800 Subject: CSI to use framework's fallback home activity CSI currently uses Shell's null home activity, which is not recognized by Settings and listed for user to select in: Settings > Apps & notifications > Default apps > Home app while it is not supposed to be used by normal users. This change lets CSI use the framework's fallback home, which is enabled when ro.system_user_home_needed is true. Bug: 149307007 Bug: 149780604 Test: $ lunch csi_x86-userdebug; m $ lunch csi_arm64-userdebug; m # flash the system.img built to crosshatch $ atest DeviceHealthTests Change-Id: I87ee8e4b8238b348145ad507e0ef347198f56eab Merged-In: I87ee8e4b8238b348145ad507e0ef347198f56eab --- mgsi/csi_arm64.mk | 4 ++++ mgsi/csi_x86.mk | 4 ++++ .../SettingsProvider/res/values/defaults.xml | 23 ++++++++++++++++++++++ 3 files changed, 31 insertions(+) create mode 100644 mgsi/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml diff --git a/mgsi/csi_arm64.mk b/mgsi/csi_arm64.mk index 142a8ec..ac0cb12 100644 --- a/mgsi/csi_arm64.mk +++ b/mgsi/csi_arm64.mk @@ -44,6 +44,10 @@ $(call inherit-product, device/generic/common/mgsi/mgsi_release.mk) # Don't build super.img. PRODUCT_BUILD_SUPER_PARTITION := false +# Instruct AM to enable framework's fallback home activity +PRODUCT_SYSTEM_EXT_PROPERTIES += ro.system_user_home_needed=true +# Add RRO needed by CSI +PRODUCT_PACKAGE_OVERLAYS := device/generic/common/mgsi/overlay PRODUCT_NAME := csi_arm64 PRODUCT_DEVICE := dummy_arm64 diff --git a/mgsi/csi_x86.mk b/mgsi/csi_x86.mk index 07cc5bd..070f4dd 100644 --- a/mgsi/csi_x86.mk +++ b/mgsi/csi_x86.mk @@ -43,6 +43,10 @@ $(call inherit-product, device/generic/common/mgsi/mgsi_release.mk) # Don't build super.img. PRODUCT_BUILD_SUPER_PARTITION := false +# Instruct AM to enable framework's fallback home activity +PRODUCT_SYSTEM_EXT_PROPERTIES += ro.system_user_home_needed=true +# Add RRO needed by CSI +PRODUCT_PACKAGE_OVERLAYS := device/generic/common/mgsi/overlay PRODUCT_NAME := csi_x86 PRODUCT_DEVICE := dummy_x86 diff --git a/mgsi/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml b/mgsi/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml new file mode 100644 index 0000000..188916d --- /dev/null +++ b/mgsi/overlay/frameworks/base/packages/SettingsProvider/res/values/defaults.xml @@ -0,0 +1,23 @@ + + + + + + true + -- cgit v1.2.3 From cbc6c48cda04dbdf8578959677862cf237d5f0ba Mon Sep 17 00:00:00 2001 From: Bob Badour Date: Fri, 1 May 2020 08:02:15 -0700 Subject: Add METADATA to common: Apache2=NOTICE Bug: 68860345 Bug: 69058154 Bug: 151953481 Test: no code changes Exempt-From-Owner-Approval: jannitorial work Change-Id: I15ae3d78dadd9674dc2b70e85b83f32b7e25e328 --- METADATA | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 METADATA diff --git a/METADATA b/METADATA new file mode 100644 index 0000000..d97975c --- /dev/null +++ b/METADATA @@ -0,0 +1,3 @@ +third_party { + license_type: NOTICE +} -- cgit v1.2.3 From 0990fe00f21f9d5c7834eb3fa92b1374d400d0d1 Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Mon, 25 May 2020 14:42:53 +0800 Subject: Add Goldfish to soong name spaces of CSI products We need mk_combined_img in GF products to create mixed images. Bug: 157212511 Test: $ lunch csi_x86-userdebug; m mk_combined_img Change-Id: I1ca43de02909fb1d98a79a90e2facd8bb06cc2f0 --- mgsi/csi_arm64.mk | 2 ++ mgsi/csi_x86.mk | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mgsi/csi_arm64.mk b/mgsi/csi_arm64.mk index ac0cb12..cbe69f6 100644 --- a/mgsi/csi_arm64.mk +++ b/mgsi/csi_arm64.mk @@ -49,6 +49,8 @@ PRODUCT_SYSTEM_EXT_PROPERTIES += ro.system_user_home_needed=true # Add RRO needed by CSI PRODUCT_PACKAGE_OVERLAYS := device/generic/common/mgsi/overlay +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish + PRODUCT_NAME := csi_arm64 PRODUCT_DEVICE := dummy_arm64 PRODUCT_BRAND := Android diff --git a/mgsi/csi_x86.mk b/mgsi/csi_x86.mk index 070f4dd..a041f14 100644 --- a/mgsi/csi_x86.mk +++ b/mgsi/csi_x86.mk @@ -48,6 +48,8 @@ PRODUCT_SYSTEM_EXT_PROPERTIES += ro.system_user_home_needed=true # Add RRO needed by CSI PRODUCT_PACKAGE_OVERLAYS := device/generic/common/mgsi/overlay +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish + PRODUCT_NAME := csi_x86 PRODUCT_DEVICE := dummy_x86 PRODUCT_BRAND := Android -- cgit v1.2.3 From ce6013b8c1d4acc0d1437e1ee4c043ec56d7e790 Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Mon, 1 Jun 2020 17:27:08 +0800 Subject: Add Goldfish to soong name spaces of MGSI products We need mk_combined_img in GF products to create mixed images. Bug: 157212511 Test: $ lunch mgsi_arm-userdebug; m mk_combined_img $ lunch mgsi_arm64-userdebug; m mk_combined_img $ lunch mgsi_x86-userdebug; m mk_combined_img $ lunch mgsi_x86_64-userdebug; m mk_combined_img Change-Id: I62cafb087f4c918a5469e5ad76ee18f9fde42d4e --- mgsi/mgsi_arm.mk | 1 + mgsi/mgsi_arm64.mk | 1 + mgsi/mgsi_x86.mk | 2 ++ mgsi/mgsi_x86_64.mk | 1 + 4 files changed, 5 insertions(+) diff --git a/mgsi/mgsi_arm.mk b/mgsi/mgsi_arm.mk index 653bf09..5068311 100644 --- a/mgsi/mgsi_arm.mk +++ b/mgsi/mgsi_arm.mk @@ -35,6 +35,7 @@ $(call inherit-product, device/generic/common/mgsi/mgsi_release.mk) # Don't build super.img. PRODUCT_BUILD_SUPER_PARTITION := false +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish PRODUCT_NAME := mgsi_arm PRODUCT_DEVICE := dummy_arm diff --git a/mgsi/mgsi_arm64.mk b/mgsi/mgsi_arm64.mk index 7353e63..89753f3 100644 --- a/mgsi/mgsi_arm64.mk +++ b/mgsi/mgsi_arm64.mk @@ -36,6 +36,7 @@ $(call inherit-product, device/generic/common/mgsi/mgsi_release.mk) # Don't build super.img. PRODUCT_BUILD_SUPER_PARTITION := false +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish PRODUCT_NAME := mgsi_arm64 PRODUCT_DEVICE := dummy_arm64 diff --git a/mgsi/mgsi_x86.mk b/mgsi/mgsi_x86.mk index 38a8bb1..3a10aa5 100644 --- a/mgsi/mgsi_x86.mk +++ b/mgsi/mgsi_x86.mk @@ -35,6 +35,8 @@ $(call inherit-product, device/generic/common/mgsi/mgsi_release.mk) # Don't build super.img. PRODUCT_BUILD_SUPER_PARTITION := false +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish + PRODUCT_NAME := mgsi_x86 PRODUCT_DEVICE := dummy_x86 PRODUCT_BRAND := Android diff --git a/mgsi/mgsi_x86_64.mk b/mgsi/mgsi_x86_64.mk index da8a36e..9a409ee 100644 --- a/mgsi/mgsi_x86_64.mk +++ b/mgsi/mgsi_x86_64.mk @@ -35,6 +35,7 @@ $(call inherit-product, device/generic/common/mgsi/mgsi_release.mk) PRODUCT_BUILD_SUPER_PARTITION := false +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish PRODUCT_NAME := mgsi_x86_64 PRODUCT_DEVICE := dummy_x86_64 -- cgit v1.2.3 From 4178eeb2561e22374dcb1b213a0b53a5b62c9f2c Mon Sep 17 00:00:00 2001 From: Yo Chiang Date: Tue, 23 Jun 2020 16:27:26 +0800 Subject: Clean up device/generic/common/nfc/libnfc-nci.conf usages Default libnfc-nci.conf is now provided by libnfc-nci.so. Bug: 157704723 Test: TH presubmit Change-Id: Ibb5ab6b76ee240eb057adeaa856cdc6b94af16a3 --- mgsi/csi_arm64.mk | 2 -- mgsi/csi_x86.mk | 2 -- mgsi/mgsi_product.mk | 5 ----- 3 files changed, 9 deletions(-) diff --git a/mgsi/csi_arm64.mk b/mgsi/csi_arm64.mk index cbe69f6..4155257 100644 --- a/mgsi/csi_arm64.mk +++ b/mgsi/csi_arm64.mk @@ -32,8 +32,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/media_system_ext.mk) # # All components below go to product image # -# NFC: Provide a libnfc-nci.conf to CSI (to avoid nfc related exceptions) -PRODUCT_COPY_FILES += device/generic/common/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf # # Special settings to skip mount product and system_ext on the device, diff --git a/mgsi/csi_x86.mk b/mgsi/csi_x86.mk index a041f14..801f236 100644 --- a/mgsi/csi_x86.mk +++ b/mgsi/csi_x86.mk @@ -31,8 +31,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/media_system_ext.mk) # # All components below go to product image # -# NFC: Provide a libnfc-nci.conf to CSI (to avoid nfc related exceptions) -PRODUCT_COPY_FILES += device/generic/common/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf # # Special settings to skip mount product and system_ext on the device, diff --git a/mgsi/mgsi_product.mk b/mgsi/mgsi_product.mk index 2bc04b9..fd92388 100644 --- a/mgsi/mgsi_product.mk +++ b/mgsi/mgsi_product.mk @@ -36,8 +36,3 @@ PRODUCT_PRODUCT_PROPERTIES += \ # Provide a APN configuration to GSI product PRODUCT_COPY_FILES += \ device/sample/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml - -# NFC: -# Provide a libnfc-nci.conf to GSI product -PRODUCT_COPY_FILES += \ - device/generic/common/nfc/libnfc-nci.conf:$(TARGET_COPY_OUT_PRODUCT)/etc/libnfc-nci.conf -- cgit v1.2.3 From ffefa6396b5f872f1f30d8a5e2496e8858224fb1 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Sat, 13 Jun 2020 11:04:48 -0700 Subject: Use inclusive language for PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST Bug: 158889297 Test: m checkbuild Change-Id: I09b88cf8439402ad948e31c3c6ff2f2fdd605ced Merged-In: I09b88cf8439402ad948e31c3c6ff2f2fdd605ced Exempt-From-Owner-Approval: cherry-pick (cherry picked from commit a1c7121c265308d2d570500d0ea36d02acc6dd2b) --- mgsi/mgsi_release.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mgsi/mgsi_release.mk b/mgsi/mgsi_release.mk index 9169d29..f697b8a 100644 --- a/mgsi/mgsi_release.mk +++ b/mgsi/mgsi_release.mk @@ -25,7 +25,7 @@ # # Exclude all files under system/product and system/system_ext -PRODUCT_ARTIFACT_PATH_REQUIREMENT_WHITELIST += \ +PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ system/product/% \ system/system_ext/% -- cgit v1.2.3 From 4c4d48aa616d7567afdc840f60c1a8c39c7d82f6 Mon Sep 17 00:00:00 2001 From: Yo Chiang Date: Sun, 5 Jul 2020 16:23:36 +0800 Subject: Retire device/generic/common/nfc/libnfc-nci.conf This file has no user anymore. Bug: 157704723 Test: TH build_test Change-Id: I597905e58cca968b15ef6b497e8154f4fd2f97cd --- nfc/libnfc-nci.conf | 82 ----------------------------------------------------- 1 file changed, 82 deletions(-) delete mode 100644 nfc/libnfc-nci.conf diff --git a/nfc/libnfc-nci.conf b/nfc/libnfc-nci.conf deleted file mode 100644 index 7c686fb..0000000 --- a/nfc/libnfc-nci.conf +++ /dev/null @@ -1,82 +0,0 @@ -############################################################################### -# Debug options -NFC_DEBUG_ENABLED=0 - -############################################################################### -# File used for NFA storage -NFA_STORAGE="/data/nfc" -PRESERVE_STORAGE=0x01 - -############################################################################### -# When screen is turned off, specify the desired power state of the controller. -# 0: power-off-sleep state; DEFAULT -# 1: full-power state -# 2: screen-off card-emulation (CE4/CE3/CE1 modes are used) -SCREEN_OFF_POWER_STATE=1 - -############################################################################### -# Default poll duration (in ms) -# The defualt is 500ms if not set (see nfc_target.h) -#NFA_DM_DISC_DURATION_POLL=333 - -############################################################################### -# Force tag polling for the following technology(s). -# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. -# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | -# NFA_TECHNOLOGY_MASK_F | NFA_TECHNOLOGY_MASK_ISO15693 | -# NFA_TECHNOLOGY_MASK_B_PRIME | NFA_TECHNOLOGY_MASK_KOVIO | -# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE. -# -# Notable bits: -# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ -# NFA_TECHNOLOGY_MASK_B 0x02 /* NFC Technology B */ -# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ -# NFA_TECHNOLOGY_MASK_ISO15693 0x08 /* Proprietary Technology */ -# NFA_TECHNOLOGY_MASK_KOVIO 0x20 /* Proprietary Technology */ -# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */ -# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */ -POLLING_TECH_MASK=0x2F - -############################################################################### -# Force P2P to only listen for the following technology(s). -# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. -# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_F | -# NFA_TECHNOLOGY_MASK_A_ACTIVE | NFA_TECHNOLOGY_MASK_F_ACTIVE -# -# Notable bits: -# NFA_TECHNOLOGY_MASK_A 0x01 /* NFC Technology A */ -# NFA_TECHNOLOGY_MASK_F 0x04 /* NFC Technology F */ -# NFA_TECHNOLOGY_MASK_A_ACTIVE 0x40 /* NFC Technology A active mode */ -# NFA_TECHNOLOGY_MASK_F_ACTIVE 0x80 /* NFC Technology F active mode */ -P2P_LISTEN_TECH_MASK=0x00 - -############################################################################### -# Force UICC to only listen to the following technology(s). -# The bits are defined as tNFA_TECHNOLOGY_MASK in nfa_api.h. -# Default is NFA_TECHNOLOGY_MASK_A | NFA_TECHNOLOGY_MASK_B | NFA_TECHNOLOGY_MASK_F -UICC_LISTEN_TECH_MASK=0x07 - -############################################################################### -# Override the stack default for NFA_EE_MAX_EE_SUPPORTED set in nfc_target.h. -# The value is set to 3 by default as it assumes we will discover 0xF2, -# 0xF3, and 0xF4. If a platform will exclude and SE, this value can be reduced -# so that the stack will not wait any longer than necessary. -# Maximum EE supported number -# NXP PN547C2 0x02 -# NXP PN65T 0x03 -# NXP PN548C2 0x02 -# NXP PN66T 0x03 -NFA_MAX_EE_SUPPORTED=0x02 - -############################################################################### -# AID for Empty Select command -# If specified, this AID will be substituted when an Empty SELECT command is -# detected. The first byte is the length of the AID. Maximum length is 16. -AID_FOR_EMPTY_SELECT={08:A0:00:00:01:51:00:00:00} - -############################################################################### -# AID_MATCHING constants -# AID_MATCHING_EXACT_ONLY 0x00 -# AID_MATCHING_EXACT_OR_PREFIX 0x01 -# AID_MATCHING_PREFIX_ONLY 0x02 -AID_MATCHING_MODE=0x01 -- cgit v1.2.3 From 4d462570b7b353aaa6648f20705358ded00f19fb Mon Sep 17 00:00:00 2001 From: JaeMan Date: Tue, 14 Jul 2020 01:38:38 +0000 Subject: Rename mainline_system(.*).mk to generic_system(.*).mk Rename mainline_system to generic_system in mk files to avoid confusion with mainline module. Bug: 160649682 Test: lunch csi_arm64 && m nothing Test: lunch csi_x86 && m nothing Test: lunch mgsi_arm && m nothing Test: lunch mgsi_arm64 && m nothing Test: lunch mgsi_x86 && m nothing Test: lunch mgsi_x86_64 && m nothing Change-Id: I3609ec2d91b0f08859a36cac75c25876b1db6d6a --- mgsi/csi_arm64.mk | 2 +- mgsi/csi_x86.mk | 2 +- mgsi/mgsi_arm.mk | 2 +- mgsi/mgsi_arm64.mk | 2 +- mgsi/mgsi_x86.mk | 2 +- mgsi/mgsi_x86_64.mk | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mgsi/csi_arm64.mk b/mgsi/csi_arm64.mk index 4155257..401ae8f 100644 --- a/mgsi/csi_arm64.mk +++ b/mgsi/csi_arm64.mk @@ -18,7 +18,7 @@ # All components inherited here go to system image # $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) # Enable mainline checking PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed diff --git a/mgsi/csi_x86.mk b/mgsi/csi_x86.mk index 801f236..46ab8cd 100644 --- a/mgsi/csi_x86.mk +++ b/mgsi/csi_x86.mk @@ -17,7 +17,7 @@ # # All components inherited here go to system image # -$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) # Enable mainline checking PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed diff --git a/mgsi/mgsi_arm.mk b/mgsi/mgsi_arm.mk index 5068311..c1011c4 100644 --- a/mgsi/mgsi_arm.mk +++ b/mgsi/mgsi_arm.mk @@ -17,7 +17,7 @@ # # All components inherited here go to system image # -$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) # Enable mainline checking PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed diff --git a/mgsi/mgsi_arm64.mk b/mgsi/mgsi_arm64.mk index 89753f3..1c1a4ee 100644 --- a/mgsi/mgsi_arm64.mk +++ b/mgsi/mgsi_arm64.mk @@ -18,7 +18,7 @@ # All components inherited here go to system image # $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) # Enable mainline checking PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed diff --git a/mgsi/mgsi_x86.mk b/mgsi/mgsi_x86.mk index 3a10aa5..bd73319 100644 --- a/mgsi/mgsi_x86.mk +++ b/mgsi/mgsi_x86.mk @@ -17,7 +17,7 @@ # # All components inherited here go to system image # -$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) # Enable mainline checking for excat this product name PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed diff --git a/mgsi/mgsi_x86_64.mk b/mgsi/mgsi_x86_64.mk index 9a409ee..e16deaf 100644 --- a/mgsi/mgsi_x86_64.mk +++ b/mgsi/mgsi_x86_64.mk @@ -18,7 +18,7 @@ # All components inherited here go to system image # $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/mainline_system.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) # Enable mainline checking PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed -- cgit v1.2.3 From 824d7bf8d9c1c0c5c12e5649ecb023e3e976714b Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Thu, 3 Dec 2020 12:07:20 +0800 Subject: Enable updatable apex and vndk 30 for CSI Updatable apex has the CTS shim needed for some CTS modules, e.g., CtsAppSecurityHostTestCases, and also takes less space in the system and system_ext image. VNDK 28 and 29 are not really used for now, so this CL only includes 30 (Android R), which can also reduces the image size. Bug: 158438410 Bug: 174442566 Test: $ lunch csi_x86-userdebug; m $ ls $OUT/system/apex $OUT/system/system_ext/apex # Check if apex files, instead of directories, exist. $ lunch csi_arm64-userdebug; m # Check similarly. Change-Id: I41a1b87ff411a9742c441429f6cd829fb5ee401b --- mgsi/BoardConfigMgsiCommon.mk | 4 ---- mgsi/mgsi_release.mk | 7 +------ 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/mgsi/BoardConfigMgsiCommon.mk b/mgsi/BoardConfigMgsiCommon.mk index a6b1f4f..82efc09 100644 --- a/mgsi/BoardConfigMgsiCommon.mk +++ b/mgsi/BoardConfigMgsiCommon.mk @@ -55,7 +55,3 @@ BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 # Disable 64 bit mediadrmserver TARGET_ENABLE_MEDIADRM_64 := - -# Ordinary (non-flattened) APEX may require kernel changes. For maximum compatibility, -# use flattened APEX for MGSI -TARGET_FLATTEN_APEX := true diff --git a/mgsi/mgsi_release.mk b/mgsi/mgsi_release.mk index f697b8a..d93bdec 100644 --- a/mgsi/mgsi_release.mk +++ b/mgsi/mgsi_release.mk @@ -29,11 +29,6 @@ PRODUCT_ARTIFACT_PATH_REQUIREMENT_ALLOWED_LIST += \ system/product/% \ system/system_ext/% -# apex is not available before Q -# Properties set in system (here) take precedence over those in vendor. -PRODUCT_PRODUCT_PROPERTIES += \ - ro.apex.updatable=false - # Split selinux policy PRODUCT_FULL_TREBLE_OVERRIDE := true @@ -49,4 +44,4 @@ PRODUCT_PACKAGES += \ init.gsi.rc \ # Support additional P and Q VNDK packages -PRODUCT_EXTRA_VNDK_VERSIONS := 28 29 +PRODUCT_EXTRA_VNDK_VERSIONS := 30 -- cgit v1.2.3 From fe5bd4b1c42ec4d1e803d08e7dddf8912e214f29 Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Mon, 11 Jan 2021 16:53:20 +0800 Subject: Create CSI products: csi_x86_64 and csi_arm Bug: 177190102 Test: $ lunch csi_x86_64-userdebug; m $ lunch csi_arm-userdebug; m Change-Id: I6e02dad2212c459e5e90c17a91e83b6008e70604 --- mgsi/AndroidProducts.mk | 2 ++ mgsi/csi_arm.mk | 54 ++++++++++++++++++++++++++++++++++++++++++++++++ mgsi/csi_x86_64.mk | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 111 insertions(+) create mode 100644 mgsi/csi_arm.mk create mode 100644 mgsi/csi_x86_64.mk diff --git a/mgsi/AndroidProducts.mk b/mgsi/AndroidProducts.mk index f6b0bfc..1b1f66e 100644 --- a/mgsi/AndroidProducts.mk +++ b/mgsi/AndroidProducts.mk @@ -15,8 +15,10 @@ # PRODUCT_MAKEFILES := \ + device/generic/common/mgsi/csi_arm.mk \ device/generic/common/mgsi/csi_arm64.mk \ device/generic/common/mgsi/csi_x86.mk \ + device/generic/common/mgsi/csi_x86_64.mk \ device/generic/common/mgsi/mgsi_arm.mk \ device/generic/common/mgsi/mgsi_arm64.mk \ device/generic/common/mgsi/mgsi_x86.mk \ diff --git a/mgsi/csi_arm.mk b/mgsi/csi_arm.mk new file mode 100644 index 0000000..2739ec1 --- /dev/null +++ b/mgsi/csi_arm.mk @@ -0,0 +1,54 @@ +# +# 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. +# + +# +# All components inherited here go to system image +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) + +# Enable mainline checking +PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed + +# +# All components inherited here go to system_ext image +# +# VNDK snapshot is needed to support older vendor images +$(call inherit-product, $(SRC_TARGET_DIR)/product/media_system_ext.mk) + +# +# All components below go to product image +# + +# +# Special settings to skip mount product and system_ext on the device, +# so this product can be tested isolated from those partitions. +# +$(call inherit-product, device/generic/common/mgsi/mgsi_release.mk) + +# Don't build super.img. +PRODUCT_BUILD_SUPER_PARTITION := false + +# Instruct AM to enable framework's fallback home activity +PRODUCT_SYSTEM_EXT_PROPERTIES += ro.system_user_home_needed=true +# Add RRO needed by CSI +PRODUCT_PACKAGE_OVERLAYS := device/generic/common/mgsi/overlay + +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish + +PRODUCT_NAME := csi_arm +PRODUCT_DEVICE := dummy_arm +PRODUCT_BRAND := Android +PRODUCT_MODEL := arm CSI diff --git a/mgsi/csi_x86_64.mk b/mgsi/csi_x86_64.mk new file mode 100644 index 0000000..cceed35 --- /dev/null +++ b/mgsi/csi_x86_64.mk @@ -0,0 +1,55 @@ +# +# 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. +# + +# +# All components inherited here go to system image +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) + +# Enable mainline checking +PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed + +# +# All components inherited here go to system_ext image +# +# VNDK snapshot is needed to support older vendor images +$(call inherit-product, $(SRC_TARGET_DIR)/product/media_system_ext.mk) + +# +# All components below go to product image +# + +# +# Special settings to skip mount product and system_ext on the device, +# so this product can be tested isolated from those partitions. +# +$(call inherit-product, device/generic/common/mgsi/mgsi_release.mk) + +# Don't build super.img. +PRODUCT_BUILD_SUPER_PARTITION := false + +# Instruct AM to enable framework's fallback home activity +PRODUCT_SYSTEM_EXT_PROPERTIES += ro.system_user_home_needed=true +# Add RRO needed by CSI +PRODUCT_PACKAGE_OVERLAYS := device/generic/common/mgsi/overlay + +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish + +PRODUCT_NAME := csi_x86_64 +PRODUCT_DEVICE := dummy_x86_64 +PRODUCT_BRAND := Android +PRODUCT_MODEL := x86_64 CSI -- cgit v1.2.3 From a6bf35cd4f19d455ad764a6aebc00f9277b46aea Mon Sep 17 00:00:00 2001 From: Yo Chiang Date: Fri, 15 Jan 2021 16:12:44 +0800 Subject: Move gsi_arm64 makefile to device/generic/common Prepare for compliance GSI release. Consolidate GSI related files to one common directory. Bug: 177495624 Test: TH build_test Change-Id: If61223bfe50d0cf3b0736a36c859f465b4377050 --- AndroidProducts.mk | 18 ++++++++++++++++++ gsi_arm64.mk | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 AndroidProducts.mk create mode 100644 gsi_arm64.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk new file mode 100644 index 0000000..7f4fdfb --- /dev/null +++ b/AndroidProducts.mk @@ -0,0 +1,18 @@ +# +# 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. +# + +PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/gsi_arm64.mk \ diff --git a/gsi_arm64.mk b/gsi_arm64.mk new file mode 100644 index 0000000..30a7e5b --- /dev/null +++ b/gsi_arm64.mk @@ -0,0 +1,46 @@ +# +# 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. +# + +# +# All components inherited here go to system image +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) + +# Enable mainline checking +PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed + +# +# All components inherited here go to system_ext image +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk) + +# +# All components inherited here go to product image +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk) + +# +# Special settings for GSI releasing +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk) + + +PRODUCT_NAME := gsi_arm64 +PRODUCT_DEVICE := gsi_arm64 +PRODUCT_BRAND := generic +PRODUCT_MODEL := GSI on ARM64 -- cgit v1.2.3 From e4fb3c84372d8d8f0f4e2461772fb8b7cdd18bd7 Mon Sep 17 00:00:00 2001 From: Yo Chiang Date: Mon, 18 Jan 2021 17:38:09 +0800 Subject: Change the board of gsi_arm64 to generic_arm64 Bug: 177495624 Test: Build gsi_arm64-userdebug Change-Id: Ifc5a1298a74604b5b1c7cea081b8cfbae26ce563 --- gsi_arm64.mk | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gsi_arm64.mk b/gsi_arm64.mk index 30a7e5b..1c24ec2 100644 --- a/gsi_arm64.mk +++ b/gsi_arm64.mk @@ -14,6 +14,13 @@ # limitations under the License. # +# The system image of gsi_arm64-userdebug is the GSI for devices with: +# - ARM 64-bit userspace +# - 64-bit binder interface +# - system-as-root +# - VNDK enforcement +# - compatible property override enabled + # # All components inherited here go to system image # @@ -21,7 +28,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) # Enable mainline checking -PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := relaxed +PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true # # All components inherited here go to system_ext image @@ -34,6 +41,11 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk) # $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk) +# +# All components inherited here go to boot image +# +$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk) + # # Special settings for GSI releasing # @@ -41,6 +53,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk) PRODUCT_NAME := gsi_arm64 -PRODUCT_DEVICE := gsi_arm64 -PRODUCT_BRAND := generic +PRODUCT_DEVICE := generic_arm64 +PRODUCT_BRAND := Android PRODUCT_MODEL := GSI on ARM64 -- cgit v1.2.3 From 84351f0684b53fd5390ddf80a2e93996582e7947 Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Thu, 21 Jan 2021 15:15:13 +0800 Subject: Create gsi_x86 and gsi_x86_64 products These gsi_$arch products are going to be used as GSI for compliance in S. They are basically csi_$arch plus a few more modules needed for CTS, or stripped-down versions of aosp_$arch. Bug: 177495405 Test: $ lunch gsi_x86-userdebug; m $ lunch gsi_x86_64-userdebug; m # Mixed the system.img with aosp_cf_x86(_64)_phone and booted OK. Change-Id: Ic59a0bfa95759c6e3cecf70668235632e3f94267 --- AndroidProducts.mk | 10 ++++++++++ gsi_product.mk | 37 +++++++++++++++++++++++++++++++++++++ gsi_system_ext.mk | 31 +++++++++++++++++++++++++++++++ gsi_x86.mk | 47 +++++++++++++++++++++++++++++++++++++++++++++++ gsi_x86_64.mk | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ mgsi/AndroidProducts.mk | 25 ------------------------- 6 files changed, 173 insertions(+), 25 deletions(-) create mode 100644 gsi_product.mk create mode 100644 gsi_system_ext.mk create mode 100644 gsi_x86.mk create mode 100644 gsi_x86_64.mk delete mode 100644 mgsi/AndroidProducts.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 7f4fdfb..658333d 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -16,3 +16,13 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/gsi_arm64.mk \ + $(LOCAL_DIR)/gsi_x86.mk \ + $(LOCAL_DIR)/gsi_x86_64.mk \ + $(LOCAL_DIR)/mgsi/csi_arm.mk \ + $(LOCAL_DIR)/mgsi/csi_arm64.mk \ + $(LOCAL_DIR)/mgsi/csi_x86.mk \ + $(LOCAL_DIR)/mgsi/csi_x86_64.mk \ + $(LOCAL_DIR)/mgsi/mgsi_arm.mk \ + $(LOCAL_DIR)/mgsi/mgsi_arm64.mk \ + $(LOCAL_DIR)/mgsi/mgsi_x86.mk \ + $(LOCAL_DIR)/mgsi/mgsi_x86_64.mk diff --git a/gsi_product.mk b/gsi_product.mk new file mode 100644 index 0000000..f955e2a --- /dev/null +++ b/gsi_product.mk @@ -0,0 +1,37 @@ +# +# 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. +# + +# This makefile contains the product partition contents for CTS on +# GSI compliance testing. Only add something here for this purpose. +$(call inherit-product, $(SRC_TARGET_DIR)/product/media_product.mk) + +PRODUCT_PACKAGES += \ + Browser2 \ + Camera2 \ + Dialer \ + messaging \ + +# Default AOSP sounds +$(call inherit-product-if-exists, frameworks/base/data/sounds/AllAudio.mk) + +# Additional settings used in all AOSP builds +PRODUCT_PRODUCT_PROPERTIES += \ + ro.config.ringtone?=Ring_Synth_04.ogg \ + ro.config.notification_sound?=pixiedust.ogg \ + ro.com.android.dataroaming?=true \ + +PRODUCT_COPY_FILES += \ + device/sample/etc/apns-full-conf.xml:$(TARGET_COPY_OUT_PRODUCT)/etc/apns-conf.xml diff --git a/gsi_system_ext.mk b/gsi_system_ext.mk new file mode 100644 index 0000000..45ff91f --- /dev/null +++ b/gsi_system_ext.mk @@ -0,0 +1,31 @@ +# +# 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. +# + +# This makefile contains the system_ext partition contents for CTS on +# GSI compliance testing. Only add something here for this purpose. +$(call inherit-product, $(SRC_TARGET_DIR)/product/media_system_ext.mk) + +# handheld packages +PRODUCT_PACKAGES += \ + Launcher3QuickStep \ + Provision \ + Settings \ + StorageManager \ + SystemUI + +# telephony packages +PRODUCT_PACKAGES += \ + CarrierConfig diff --git a/gsi_x86.mk b/gsi_x86.mk new file mode 100644 index 0000000..ca88bed --- /dev/null +++ b/gsi_x86.mk @@ -0,0 +1,47 @@ +# +# 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. +# + +# +# All components inherited here go to system image +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) + +# Enable mainline checking +PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true + +# +# All components inherited here go to system_ext image +# +$(call inherit-product, device/generic/common/gsi_system_ext.mk) + +# +# All components below go to product image +# +$(call inherit-product, device/generic/common/gsi_product.mk) + +# +# Special settings to skip mount product and system_ext on the device, +# so this product can be tested isolated from those partitions. +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk) + +# Needed to build mk_combined_img used for creating mixed GSI/emu image +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish + +PRODUCT_NAME := gsi_x86 +PRODUCT_DEVICE := generic_x86 +PRODUCT_BRAND := Android +PRODUCT_MODEL := x86 GSI diff --git a/gsi_x86_64.mk b/gsi_x86_64.mk new file mode 100644 index 0000000..d2e3b3a --- /dev/null +++ b/gsi_x86_64.mk @@ -0,0 +1,48 @@ +# +# 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. +# + +# +# All components inherited here go to system image +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) + +# Enable mainline checking +PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true + +# +# All components inherited here go to system_ext image +# +$(call inherit-product, device/generic/common/gsi_system_ext.mk) + +# +# All components below go to product image +# +$(call inherit-product, device/generic/common/gsi_product.mk) + +# +# Special settings to skip mount product and system_ext on the device, +# so this product can be tested isolated from those partitions. +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk) + +# Needed to build mk_combined_img used for creating mixed GSI/emu image +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish + +PRODUCT_NAME := gsi_x86_64 +PRODUCT_DEVICE := generic_x86_64 +PRODUCT_BRAND := Android +PRODUCT_MODEL := x86_64 GSI diff --git a/mgsi/AndroidProducts.mk b/mgsi/AndroidProducts.mk deleted file mode 100644 index 1b1f66e..0000000 --- a/mgsi/AndroidProducts.mk +++ /dev/null @@ -1,25 +0,0 @@ -# -# Copyright 2019 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. -# - -PRODUCT_MAKEFILES := \ - device/generic/common/mgsi/csi_arm.mk \ - device/generic/common/mgsi/csi_arm64.mk \ - device/generic/common/mgsi/csi_x86.mk \ - device/generic/common/mgsi/csi_x86_64.mk \ - device/generic/common/mgsi/mgsi_arm.mk \ - device/generic/common/mgsi/mgsi_arm64.mk \ - device/generic/common/mgsi/mgsi_x86.mk \ - device/generic/common/mgsi/mgsi_x86_64.mk \ -- cgit v1.2.3 From bc98c698a2e4192c0c70ed106b8dc821851d6a29 Mon Sep 17 00:00:00 2001 From: Yo Chiang Date: Fri, 22 Jan 2021 00:35:05 +0800 Subject: Update gsi_arm64 to use gsi_product.mk & gsi_system_ext.mk Bug: 177495407 Test: lunch gsi_arm64-userdebug && m Change-Id: I2daa601eaa66618a84a0e367f76b70bc99f3f2f3 --- gsi_arm64.mk | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gsi_arm64.mk b/gsi_arm64.mk index 1c24ec2..53c8300 100644 --- a/gsi_arm64.mk +++ b/gsi_arm64.mk @@ -33,13 +33,12 @@ PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true # # All components inherited here go to system_ext image # -$(call inherit-product, $(SRC_TARGET_DIR)/product/handheld_system_ext.mk) -$(call inherit-product, $(SRC_TARGET_DIR)/product/telephony_system_ext.mk) +$(call inherit-product, device/generic/common/gsi_system_ext.mk) # # All components inherited here go to product image # -$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk) +$(call inherit-product, device/generic/common/gsi_product.mk) # # All components inherited here go to boot image -- cgit v1.2.3 From cdc8ca9c1a740a437bae07c54da1a3d726db70de Mon Sep 17 00:00:00 2001 From: Yo Chiang Date: Fri, 22 Jan 2021 15:27:06 +0800 Subject: Add gsi_arm.mk product makefile GSI product makefile for compliance GSI release. Bug: 177495407 Test: lunch gsi_arm-userdebug && m Test: lunch gsi_arm64-userdebug && m Test: Boot with gsi_arm64 as system partition on bramble Change-Id: Ida75e3715427f91153a4f0062cb70d3694dd9a81 --- AndroidProducts.mk | 1 + gsi_arm.mk | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 gsi_arm.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 658333d..b002607 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -15,6 +15,7 @@ # PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/gsi_arm.mk \ $(LOCAL_DIR)/gsi_arm64.mk \ $(LOCAL_DIR)/gsi_x86.mk \ $(LOCAL_DIR)/gsi_x86_64.mk \ diff --git a/gsi_arm.mk b/gsi_arm.mk new file mode 100644 index 0000000..1a28cc8 --- /dev/null +++ b/gsi_arm.mk @@ -0,0 +1,51 @@ +# +# 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. +# + +# The system image of gsi_arm-userdebug is the GSI for devices with: +# - ARM 32-bit userspace +# - 64-bit binder interface +# - system-as-root +# - VNDK enforcement +# - compatible property override enabled + +# +# All components inherited here go to system image +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_system.mk) + +# Enable mainline checking +PRODUCT_ENFORCE_ARTIFACT_PATH_REQUIREMENTS := true + +# +# All components inherited here go to system_ext image +# +$(call inherit-product, device/generic/common/gsi_system_ext.mk) + +# +# All components inherited here go to product image +# +$(call inherit-product, device/generic/common/gsi_product.mk) + +# +# Special settings for GSI releasing +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk) + + +PRODUCT_NAME := gsi_arm +PRODUCT_DEVICE := generic +PRODUCT_BRAND := Android +PRODUCT_MODEL := GSI on ARM -- cgit v1.2.3 From b25bd5c15623772c7dadcb631f534a360316d84d Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Wed, 27 Jan 2021 13:55:48 +0800 Subject: Consistent PRODUCT_MODEL name for x86(_64) GSI The product model names of all other aosp_$arch and gsi_$arch are of the form: "xxx on $arch". So let's use the same format for gsi_x86(_64). Bug: 177495405 Test: $ lunch gsi_x86-userdebug; get_build_var PRODUCT_MODEL GSI on x86 $ lunch gsi_x86_64-userdebug; get_build_var PRODUCT_MODEL GSI on x86_64 Change-Id: I4c361600ce4f2a5b90cd22b79416e251803b09f0 --- gsi_x86.mk | 2 +- gsi_x86_64.mk | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gsi_x86.mk b/gsi_x86.mk index ca88bed..0dfde63 100644 --- a/gsi_x86.mk +++ b/gsi_x86.mk @@ -44,4 +44,4 @@ PRODUCT_SOONG_NAMESPACES += device/generic/goldfish PRODUCT_NAME := gsi_x86 PRODUCT_DEVICE := generic_x86 PRODUCT_BRAND := Android -PRODUCT_MODEL := x86 GSI +PRODUCT_MODEL := GSI on x86 diff --git a/gsi_x86_64.mk b/gsi_x86_64.mk index d2e3b3a..eb5bd97 100644 --- a/gsi_x86_64.mk +++ b/gsi_x86_64.mk @@ -45,4 +45,4 @@ PRODUCT_SOONG_NAMESPACES += device/generic/goldfish PRODUCT_NAME := gsi_x86_64 PRODUCT_DEVICE := generic_x86_64 PRODUCT_BRAND := Android -PRODUCT_MODEL := x86_64 GSI +PRODUCT_MODEL := GSI on x86_64 -- cgit v1.2.3 From f7bf4219466d6798b6deea8fb2b8bd3b78968157 Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Mon, 8 Feb 2021 19:14:14 +0800 Subject: Add a basic IME to gsi_$arch products LatinIME is added to provide a basic input method. Bug: 179652260 Test: $ lunch gsi_arm64-userdebug; m # Flash the resulted system.img to a Pixel w/ AVB disabled. # Make sure a URL can be typed into the browser address bar. Change-Id: I0427e22953bee3e56799f654a4e4b4a79ff90c4f --- gsi_product.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/gsi_product.mk b/gsi_product.mk index f955e2a..aad06d2 100644 --- a/gsi_product.mk +++ b/gsi_product.mk @@ -22,6 +22,7 @@ PRODUCT_PACKAGES += \ Browser2 \ Camera2 \ Dialer \ + LatinIME \ messaging \ # Default AOSP sounds -- cgit v1.2.3 From 0f87b5dc1dfd45995a73436362f6315ed6e95bd8 Mon Sep 17 00:00:00 2001 From: Hsin-Yi Chen Date: Sat, 8 May 2021 20:53:33 +0800 Subject: Add GKI to gsi_x86_64 build Test: lunch gsi_x86_64-userdebug ; make dist Bug: 181277965 Change-Id: Ie48a32e87df0ac6518f376e08957b6c11faddee4 --- gsi_x86_64.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gsi_x86_64.mk b/gsi_x86_64.mk index eb5bd97..da7e093 100644 --- a/gsi_x86_64.mk +++ b/gsi_x86_64.mk @@ -33,6 +33,11 @@ $(call inherit-product, device/generic/common/gsi_system_ext.mk) # $(call inherit-product, device/generic/common/gsi_product.mk) +# +# All components inherited here go to boot image +# +$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk) + # # Special settings to skip mount product and system_ext on the device, # so this product can be tested isolated from those partitions. -- cgit v1.2.3 From 033d50e2298811d81de7db8cdea63e349a96c9ba Mon Sep 17 00:00:00 2001 From: Hsin-Yi Chen Date: Sat, 8 May 2021 20:53:33 +0800 Subject: Add GKI to gsi_x86_64 build Test: lunch gsi_x86_64-userdebug ; make dist Bug: 181277965 Change-Id: Ie48a32e87df0ac6518f376e08957b6c11faddee4 Merged-In: Ie48a32e87df0ac6518f376e08957b6c11faddee4 (cherry picked from commit 0f87b5dc1dfd45995a73436362f6315ed6e95bd8) --- gsi_x86_64.mk | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gsi_x86_64.mk b/gsi_x86_64.mk index eb5bd97..da7e093 100644 --- a/gsi_x86_64.mk +++ b/gsi_x86_64.mk @@ -33,6 +33,11 @@ $(call inherit-product, device/generic/common/gsi_system_ext.mk) # $(call inherit-product, device/generic/common/gsi_product.mk) +# +# All components inherited here go to boot image +# +$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk) + # # Special settings to skip mount product and system_ext on the device, # so this product can be tested isolated from those partitions. -- cgit v1.2.3 From c329a3a362bdbbc4ebe1123b1d9e835ed68a4b7d Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Fri, 17 Sep 2021 20:55:31 +0800 Subject: Add a copy of debug policy to GSI system image Bug: 188067818 Test: Flash RQ2A.201207.001 bramble-user with debug ramdisk & flash gsi_arm64-user from master, device can boot and `adb root` works Change-Id: I37ef02628b8635e88a9e8ef917da71c8957c4be1 --- gsi_system_ext.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gsi_system_ext.mk b/gsi_system_ext.mk index 45ff91f..7a43c5c 100644 --- a/gsi_system_ext.mk +++ b/gsi_system_ext.mk @@ -29,3 +29,7 @@ PRODUCT_PACKAGES += \ # telephony packages PRODUCT_PACKAGES += \ CarrierConfig + +# Install a copy of the debug policy in GSI. +PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT := true +PRODUCT_PACKAGES += system_ext_userdebug_plat_sepolicy.cil -- cgit v1.2.3 From a172c9e3fbd293d0ee21caa47f13667b38df8c78 Mon Sep 17 00:00:00 2001 From: Santiago Seifert Date: Thu, 23 Sep 2021 13:07:25 +0000 Subject: Revert "Add a copy of debug policy to GSI system image" Revert "Add PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT" Revert "Add system_ext_userdebug_plat_sepolicy.cil for GSI" Revert submission 1824717-gsi_debug_policy Reason for revert: Breaks the build (see b/200933187). Reverted Changes: I37ef02628:Add a copy of debug policy to GSI system image I9c3dad8bb:Add PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT I43adc6ada:Add system_ext_userdebug_plat_sepolicy.cil for GSI... I4d6235c73:Add /system_ext/etc/selinux/ to the debug policy s... Change-Id: I91d1bf9e80a31a06ce2a35494b98663a28ef929e --- gsi_system_ext.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/gsi_system_ext.mk b/gsi_system_ext.mk index 7a43c5c..45ff91f 100644 --- a/gsi_system_ext.mk +++ b/gsi_system_ext.mk @@ -29,7 +29,3 @@ PRODUCT_PACKAGES += \ # telephony packages PRODUCT_PACKAGES += \ CarrierConfig - -# Install a copy of the debug policy in GSI. -PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT := true -PRODUCT_PACKAGES += system_ext_userdebug_plat_sepolicy.cil -- cgit v1.2.3 From 7c26d079be25b25da85a0b4eefd9edcfbcb374d1 Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Thu, 23 Sep 2021 14:14:16 +0000 Subject: Reland: Add a copy of debug policy to GSI system image Bug: 188067818 Test: Flash RQ2A.201207.001 bramble-user with debug ramdisk & flash gsi_arm64-user from master, device can boot and `adb root` works Change-Id: Idc699b2db549464056857a69140c6634f2a8ec3b --- gsi_system_ext.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gsi_system_ext.mk b/gsi_system_ext.mk index 45ff91f..7a43c5c 100644 --- a/gsi_system_ext.mk +++ b/gsi_system_ext.mk @@ -29,3 +29,7 @@ PRODUCT_PACKAGES += \ # telephony packages PRODUCT_PACKAGES += \ CarrierConfig + +# Install a copy of the debug policy in GSI. +PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT := true +PRODUCT_PACKAGES += system_ext_userdebug_plat_sepolicy.cil -- cgit v1.2.3 From 0dac1b32e4480dea97420c11efcb6e542a0e4b4a Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Tue, 5 Oct 2021 19:21:41 +0800 Subject: Stop building boot-with-debug-*.img for GKI Bug: 200945738 Test: Presubmit Change-Id: I361a4c495bbf0e079d020b4dd1d94f68a1d87c16 --- gsi_arm64.mk | 5 +++++ gsi_x86_64.mk | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/gsi_arm64.mk b/gsi_arm64.mk index 53c8300..066c515 100644 --- a/gsi_arm64.mk +++ b/gsi_arm64.mk @@ -44,6 +44,11 @@ $(call inherit-product, device/generic/common/gsi_product.mk) # All components inherited here go to boot image # $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk) +ifeq ($(TARGET_PRODUCT),gsi_arm64) + # GKI devices should use vendor_boot-debug.img from device build instead. + PRODUCT_BUILD_DEBUG_BOOT_IMAGE := false + PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE := false +endif # # Special settings for GSI releasing diff --git a/gsi_x86_64.mk b/gsi_x86_64.mk index da7e093..5f74c55 100644 --- a/gsi_x86_64.mk +++ b/gsi_x86_64.mk @@ -37,6 +37,11 @@ $(call inherit-product, device/generic/common/gsi_product.mk) # All components inherited here go to boot image # $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk) +ifeq ($(TARGET_PRODUCT),gsi_x86_64) + # GKI devices should use vendor_boot-debug.img from device build instead. + PRODUCT_BUILD_DEBUG_BOOT_IMAGE := false + PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE := false +endif # # Special settings to skip mount product and system_ext on the device, -- cgit v1.2.3 From e1ade023244046d842a6569c51748e81fa94aa81 Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Thu, 14 Oct 2021 09:19:25 +0000 Subject: Revert "Stop building boot-with-debug-*.img for GKI" This reverts commit 0dac1b32e4480dea97420c11efcb6e542a0e4b4a. Reason for revert: superseded by I3161e42b00a93177a1a4cb3b22da2218d294b7a7 Bug: 202129499 Test: Presubmit Change-Id: Ib4096cb131b5143d4c82e7bef92b1fbb94a29114 --- gsi_arm64.mk | 5 ----- gsi_x86_64.mk | 5 ----- 2 files changed, 10 deletions(-) diff --git a/gsi_arm64.mk b/gsi_arm64.mk index 066c515..53c8300 100644 --- a/gsi_arm64.mk +++ b/gsi_arm64.mk @@ -44,11 +44,6 @@ $(call inherit-product, device/generic/common/gsi_product.mk) # All components inherited here go to boot image # $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk) -ifeq ($(TARGET_PRODUCT),gsi_arm64) - # GKI devices should use vendor_boot-debug.img from device build instead. - PRODUCT_BUILD_DEBUG_BOOT_IMAGE := false - PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE := false -endif # # Special settings for GSI releasing diff --git a/gsi_x86_64.mk b/gsi_x86_64.mk index 5f74c55..da7e093 100644 --- a/gsi_x86_64.mk +++ b/gsi_x86_64.mk @@ -37,11 +37,6 @@ $(call inherit-product, device/generic/common/gsi_product.mk) # All components inherited here go to boot image # $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk) -ifeq ($(TARGET_PRODUCT),gsi_x86_64) - # GKI devices should use vendor_boot-debug.img from device build instead. - PRODUCT_BUILD_DEBUG_BOOT_IMAGE := false - PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE := false -endif # # Special settings to skip mount product and system_ext on the device, -- cgit v1.2.3 From 1ecdb401602b09cd49efe281f3ea3094ea35b8df Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Mon, 18 Oct 2021 18:29:35 +0800 Subject: Verbose comment for PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT Bug: 188067818 Test: Presubmit Change-Id: I12ea6fdddb230ad30d51173315eddce23b8de7d0 --- gsi_system_ext.mk | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gsi_system_ext.mk b/gsi_system_ext.mk index 7a43c5c..ff487e2 100644 --- a/gsi_system_ext.mk +++ b/gsi_system_ext.mk @@ -30,6 +30,8 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ CarrierConfig -# Install a copy of the debug policy in GSI. +# Install a copy of the debug policy to the system_ext partition, and allow +# init-second-stage to load debug policy from system_ext. +# This option is only meant to be set by compliance GSI targets. PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT := true PRODUCT_PACKAGES += system_ext_userdebug_plat_sepolicy.cil -- cgit v1.2.3 From fa8bd0fb060527f6a8b1bf855356df207e250160 Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Fri, 17 Sep 2021 20:55:31 +0800 Subject: Add a copy of debug policy to GSI system image Bug: 188067818 Test: Flash RQ2A.201207.001 bramble-user with debug ramdisk & flash gsi_arm64-user from master, device can boot and `adb root` works Change-Id: I37ef02628b8635e88a9e8ef917da71c8957c4be1 Merged-In: I37ef02628b8635e88a9e8ef917da71c8957c4be1 (cherry picked from commit c329a3a362bdbbc4ebe1123b1d9e835ed68a4b7d) --- gsi_system_ext.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gsi_system_ext.mk b/gsi_system_ext.mk index 45ff91f..7a43c5c 100644 --- a/gsi_system_ext.mk +++ b/gsi_system_ext.mk @@ -29,3 +29,7 @@ PRODUCT_PACKAGES += \ # telephony packages PRODUCT_PACKAGES += \ CarrierConfig + +# Install a copy of the debug policy in GSI. +PRODUCT_INSTALL_DEBUG_POLICY_TO_SYSTEM_EXT := true +PRODUCT_PACKAGES += system_ext_userdebug_plat_sepolicy.cil -- cgit v1.2.3 From e25376e509c52c28d266d9fe8071b9f597d58c47 Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Fri, 24 Dec 2021 14:47:04 +0800 Subject: Let gsi_arm* products build mk_combined_img mk_combined_img is in device/generic/goldfish name space. Bug: 211941819 Test: m mk_combined_img Change-Id: I61a5b436b955b8052afc0fa91ed9836e307c5c08 --- gsi_arm.mk | 2 ++ gsi_arm64.mk | 2 ++ 2 files changed, 4 insertions(+) diff --git a/gsi_arm.mk b/gsi_arm.mk index 1a28cc8..869e852 100644 --- a/gsi_arm.mk +++ b/gsi_arm.mk @@ -44,6 +44,8 @@ $(call inherit-product, device/generic/common/gsi_product.mk) # $(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk) +# Needed to build mk_combined_img used for creating mixed GSI/emu image +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish PRODUCT_NAME := gsi_arm PRODUCT_DEVICE := generic diff --git a/gsi_arm64.mk b/gsi_arm64.mk index 53c8300..d1c10ff 100644 --- a/gsi_arm64.mk +++ b/gsi_arm64.mk @@ -50,6 +50,8 @@ $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk) # $(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk) +# Needed to build mk_combined_img used for creating mixed GSI/emu image +PRODUCT_SOONG_NAMESPACES += device/generic/goldfish PRODUCT_NAME := gsi_arm64 PRODUCT_DEVICE := generic_arm64 -- cgit v1.2.3 From cb1d863daf9539927bb3575eba00cd88a22b93df Mon Sep 17 00:00:00 2001 From: Isaac Chen Date: Mon, 27 Dec 2021 07:47:28 +0000 Subject: Revert "Let gsi_arm* products build mk_combined_img" This reverts commit e25376e509c52c28d266d9fe8071b9f597d58c47. Reason for revert: A modification to acloud is used instead. Change-Id: I3a9380927ddf25ff684193e989e0760c728e64b6 --- gsi_arm.mk | 2 -- gsi_arm64.mk | 2 -- 2 files changed, 4 deletions(-) diff --git a/gsi_arm.mk b/gsi_arm.mk index 869e852..1a28cc8 100644 --- a/gsi_arm.mk +++ b/gsi_arm.mk @@ -44,8 +44,6 @@ $(call inherit-product, device/generic/common/gsi_product.mk) # $(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk) -# Needed to build mk_combined_img used for creating mixed GSI/emu image -PRODUCT_SOONG_NAMESPACES += device/generic/goldfish PRODUCT_NAME := gsi_arm PRODUCT_DEVICE := generic diff --git a/gsi_arm64.mk b/gsi_arm64.mk index d1c10ff..53c8300 100644 --- a/gsi_arm64.mk +++ b/gsi_arm64.mk @@ -50,8 +50,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk) # $(call inherit-product, $(SRC_TARGET_DIR)/product/gsi_release.mk) -# Needed to build mk_combined_img used for creating mixed GSI/emu image -PRODUCT_SOONG_NAMESPACES += device/generic/goldfish PRODUCT_NAME := gsi_arm64 PRODUCT_DEVICE := generic_arm64 -- cgit v1.2.3 From f1efada227bf5e2d211a8c4fb1f1928b1c3e5aeb Mon Sep 17 00:00:00 2001 From: SzuWei Lin Date: Tue, 4 Jan 2022 15:11:47 +0800 Subject: 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: I698238ec582b5eabdc3635cad8585fcf16fc478f --- gsi_arm64.mk | 5 ----- gsi_x86_64.mk | 5 ----- 2 files changed, 10 deletions(-) diff --git a/gsi_arm64.mk b/gsi_arm64.mk index 53c8300..d792cd9 100644 --- a/gsi_arm64.mk +++ b/gsi_arm64.mk @@ -40,11 +40,6 @@ $(call inherit-product, device/generic/common/gsi_system_ext.mk) # $(call inherit-product, device/generic/common/gsi_product.mk) -# -# All components inherited here go to boot image -# -$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk) - # # Special settings for GSI releasing # diff --git a/gsi_x86_64.mk b/gsi_x86_64.mk index da7e093..eb5bd97 100644 --- a/gsi_x86_64.mk +++ b/gsi_x86_64.mk @@ -33,11 +33,6 @@ $(call inherit-product, device/generic/common/gsi_system_ext.mk) # $(call inherit-product, device/generic/common/gsi_product.mk) -# -# All components inherited here go to boot image -# -$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_x86_64/device.mk) - # # Special settings to skip mount product and system_ext on the device, # so this product can be tested isolated from those partitions. -- cgit v1.2.3 From f346c9a7479e5400dc1cec281d6a31e79f064cad Mon Sep 17 00:00:00 2001 From: SzuWei Lin Date: Thu, 30 Dec 2021 18:40:38 +0800 Subject: Add targets for building boot.img with GKI The patch adds 2 targets gki_arm64 and gki_x86_64 for building all boot.img with GKI. The new targets also output init_boot.img. The patch initials the new targets by including minimum modules as possible. With the patch, it is no need to build GKI from GSI targets, and will remove outputting GKI from GSI targets, such as gsi_$arch and aosp_$arch. Bug: 212486689 Test: lunch gki_arm64-userdebug; make dist Test: lunch gki_x86_64-userdebug; make bootimage dist Change-Id: I90ecfddbc080086b549545415506867633133a45 --- AndroidProducts.mk | 2 + BoardConfigGkiCommon.mk | 62 ++++++++++++++++++++++++++ gki_arm64.mk | 34 ++++++++++++++ gki_arm64/BoardConfig.mk | 48 ++++++++++++++++++++ gki_common.mk | 111 ++++++++++++++++++++++++++++++++++++++++++++++ gki_x86_64.mk | 33 ++++++++++++++ gki_x86_64/BoardConfig.mk | 38 ++++++++++++++++ 7 files changed, 328 insertions(+) create mode 100644 BoardConfigGkiCommon.mk create mode 100644 gki_arm64.mk create mode 100644 gki_arm64/BoardConfig.mk create mode 100644 gki_common.mk create mode 100644 gki_x86_64.mk create mode 100755 gki_x86_64/BoardConfig.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index b002607..32ac42d 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -15,6 +15,8 @@ # PRODUCT_MAKEFILES := \ + $(LOCAL_DIR)/gki_arm64.mk \ + $(LOCAL_DIR)/gki_x86_64.mk \ $(LOCAL_DIR)/gsi_arm.mk \ $(LOCAL_DIR)/gsi_arm64.mk \ $(LOCAL_DIR)/gsi_x86.mk \ diff --git a/BoardConfigGkiCommon.mk b/BoardConfigGkiCommon.mk new file mode 100644 index 0000000..681b3b7 --- /dev/null +++ b/BoardConfigGkiCommon.mk @@ -0,0 +1,62 @@ +# 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. +# + +# Enable GKI 2.0 certification +BOARD_GKI_SIGNING_KEY_PATH := build/make/target/product/gsi/testkey_rsa2048.pem +BOARD_GKI_SIGNING_ALGORITHM := SHA256_RSA2048 + +# Enable chained vbmeta for boot and init_boot images +BOARD_AVB_ENABLE := true +BOARD_AVB_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) + +BOARD_AVB_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem +BOARD_AVB_BOOT_ALGORITHM := SHA256_RSA4096 +BOARD_AVB_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) +BOARD_AVB_BOOT_ROLLBACK_INDEX_LOCATION := 2 + +BOARD_AVB_INIT_BOOT_KEY_PATH := external/avb/test/data/testkey_rsa4096.pem +BOARD_AVB_INIT_BOOT_ALGORITHM := SHA256_RSA4096 +BOARD_AVB_INIT_BOOT_ROLLBACK_INDEX := $(PLATFORM_SECURITY_PATCH_TIMESTAMP) +BOARD_AVB_INIT_BOOT_ROLLBACK_INDEX_LOCATION := 3 + +# Sets boot SPL. +BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH) + +# Boot image with ramdisk and kernel +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 + +# Init boot image +BOARD_RAMDISK_USE_LZ4 := true +BOARD_INIT_BOOT_HEADER_VERSION := 4 +BOARD_MKBOOTIMG_INIT_ARGS += --header_version $(BOARD_INIT_BOOT_HEADER_VERSION) +# TODO(b/212486689) Need to confirm the size +BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE := 8388608 + +# 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 system image +BOARD_SYSTEMIMAGE_PARTITION_SIZE := + +# No vendor_boot +BOARD_MOVE_RECOVERY_RESOURCES_TO_VENDOR_BOOT := + +# No recovery +BOARD_EXCLUDE_KERNEL_FROM_RECOVERY_IMAGE := diff --git a/gki_arm64.mk b/gki_arm64.mk new file mode 100644 index 0000000..9597d84 --- /dev/null +++ b/gki_arm64.mk @@ -0,0 +1,34 @@ +# +# 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 +$(call output-kernel,kernel/prebuilts/4.19/arm64,kernel/4.19) +$(call output-kernel,kernel/prebuilts/5.10/arm64,kernel/5.10) + + +PRODUCT_NAME := gki_arm64 +PRODUCT_DEVICE := gki_arm64 +PRODUCT_BRAND := Android +PRODUCT_MODEL := GKI on ARM64 diff --git a/gki_arm64/BoardConfig.mk b/gki_arm64/BoardConfig.mk new file mode 100644 index 0000000..c5d81b0 --- /dev/null +++ b/gki_arm64/BoardConfig.mk @@ -0,0 +1,48 @@ +# 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 + +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_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 diff --git a/gki_common.mk b/gki_common.mk new file mode 100644 index 0000000..b2b717d --- /dev/null +++ b/gki_common.mk @@ -0,0 +1,111 @@ +# +# 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. +# + +# The files will be copy from the source folder to the dist folder +_output-kernel-info-files := \ + prebuilt-info.txt \ + manifest.xml \ + + +# Copy the files from the source folder to the dist folder +# +# Skip if the file is not existing. +# +# $(1): file list +# $(2): the source folder +# $(3): the dist folder +define _output_kernel_files +$(foreach f,$(1), \ + $(if $(wildcard $(2)/$(f)), \ + $(call dist-for-goals,dist_files,$(2)/$(f):$(3)/$(f)))) +endef + + +# Output the release kernel prebuilt files to dist folder +# +# $(1): the source folder contains the kernel prebuilt files +# $(2): the dist folder +# +# Notes: +# For mainline kernel, it outputs -allsyms kernel as release kernel. +# +define _output-kernel-user +$(if $(findstring mainline,$(1)), \ + $(eval PRODUCT_COPY_FILES += \ + $(foreach f,$(wildcard $(1)/kernel-*-allsyms), \ + $(f):$(subst -allsyms,,$(notdir $(f))))), \ + $(eval PRODUCT_COPY_FILES += \ + $(call copy-files,$(filter-out *-allsyms,$(wildcard $(1)/kernel-*)),.))) +endef + + +# Output the debug kernel prebuilt files to dist folder +# +# $(1): the source folder contains the kernel prebuilt files +# $(2): the dist folder +# +# Note: +# For mainline kernel, it outputs -allsyms kernel as release kernel, +# so there is no need to output -allsyms again. +# +define _output-kernel-debug +$(if $(findstring mainline,$(1)),, \ + $(eval PRODUCT_COPY_FILES += \ + $(call copy-files,$(wildcard $(1)/kernel-*-allsyms),.))) +endef + + +# Output the kernel prebuilt files to dist folder +# +# $(1): the source folder contains the kernel prebuilt files +# $(2): the dist folder +# +# Example: +# $(call output-kernel,kernel/prebuilts/5.10/arm64,kernel/5.10) +# +define output-kernel +$(call _output-kernel-user,$(1),$(2)) +$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)), \ + $(call _output-kernel-debug,$(1),$(2))) +$(call _output_kernel_files,$(_output-kernel-info-files),$(1),$(2)) +endef + +# +# Output boot.img and init-boot.img +# +$(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk) +PRODUCT_BUILD_BOOT_IMAGE := true +PRODUCT_BUILD_INIT_BOOT_IMAGE := true + +PRODUCT_BUILD_CACHE_IMAGE := false +PRODUCT_BUILD_ODM_IMAGE := false +PRODUCT_BUILD_VENDOR_DLKM_IMAGE := false +PRODUCT_BUILD_ODM_DLKM_IMAGE := false +PRODUCT_BUILD_PRODUCT_IMAGE := false +PRODUCT_BUILD_RAMDISK_IMAGE := true +PRODUCT_BUILD_SYSTEM_IMAGE := false +PRODUCT_BUILD_SYSTEM_EXT_IMAGE := false +PRODUCT_BUILD_SYSTEM_OTHER_IMAGE := false +PRODUCT_BUILD_USERDATA_IMAGE := false +PRODUCT_BUILD_VENDOR_IMAGE := false +PRODUCT_BUILD_VENDOR_BOOT_IMAGE := false +PRODUCT_BUILD_RECOVERY_IMAGE := false +PRODUCT_BUILD_VBMETA_IMAGE := false +PRODUCT_BUILD_DEBUG_BOOT_IMAGE := false +PRODUCT_BUILD_DEBUG_VENDOR_BOOT_IMAGE := false + +MODULE_BUILD_FROM_SOURCE := true +PRODUCT_EXPORT_BOOT_IMAGE_TO_DIST := true diff --git a/gki_x86_64.mk b/gki_x86_64.mk new file mode 100644 index 0000000..d01767b --- /dev/null +++ b/gki_x86_64.mk @@ -0,0 +1,33 @@ +# +# 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 +$(call output-kernel,kernel/prebuilts/5.10/arm64,kernel/5.10) + + +PRODUCT_NAME := gki_x86_64 +PRODUCT_DEVICE := gki_x86_64 +PRODUCT_BRAND := Android +PRODUCT_MODEL := GKI on x86_64 diff --git a/gki_x86_64/BoardConfig.mk b/gki_x86_64/BoardConfig.mk new file mode 100755 index 0000000..48a1499 --- /dev/null +++ b/gki_x86_64/BoardConfig.mk @@ -0,0 +1,38 @@ +# 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_CPU_ABI := x86_64 +TARGET_ARCH := x86_64 +TARGET_ARCH_VARIANT := x86_64 + +TARGET_2ND_CPU_ABI := x86 +TARGET_2ND_ARCH := x86 +TARGET_2ND_ARCH_VARIANT := x86_64 + +include device/generic/common/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 + +# Boot images +BOARD_KERNEL_BINARIES := \ + kernel-5.10 \ + +ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) +BOARD_KERNEL_BINARIES += \ + kernel-5.10-allsyms \ + +endif -- cgit v1.2.3 From a5dd19b8cdb206d2665322601709784889393fd3 Mon Sep 17 00:00:00 2001 From: Yi-Yo Chiang Date: Tue, 11 Jan 2022 17:14:33 +0800 Subject: Remove obsolete option BOARD_COPY_BOOT_IMAGE_TO_TARGET_FILES This is not used at the moment, so remove it to make the build rules more understandable. We can add this back in the future if we ever need it again. Bug: 212486689 Test: m dist should invoke add_img_to_target_files to build boot.img Change-Id: I6bfdc5e2aa4185e84ac79eb084fa8266ac467072 --- BoardConfigGkiCommon.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/BoardConfigGkiCommon.mk b/BoardConfigGkiCommon.mk index 681b3b7..662e0ec 100644 --- a/BoardConfigGkiCommon.mk +++ b/BoardConfigGkiCommon.mk @@ -48,10 +48,6 @@ BOARD_MKBOOTIMG_INIT_ARGS += --header_version $(BOARD_INIT_BOOT_HEADER_VERSION) # TODO(b/212486689) Need to confirm the size BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE := 8388608 -# 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 system image BOARD_SYSTEMIMAGE_PARTITION_SIZE := -- cgit v1.2.3 From 3d13b35c52aea31891b7f51f08303cce9e935cab Mon Sep 17 00:00:00 2001 From: SzuWei Lin Date: Fri, 21 Jan 2022 12:12:19 +0800 Subject: Output boot images with kernel 5.15 in gki_$arch Bug: 215643838 Test: build gki_$arch-userdebug; check the outputs Change-Id: I629a526c9be883a3075d79ade0f2c551130430c5 --- gki_arm64.mk | 1 + gki_arm64/BoardConfig.mk | 8 ++++++++ gki_x86_64.mk | 3 ++- gki_x86_64/BoardConfig.mk | 4 ++++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/gki_arm64.mk b/gki_arm64.mk index 9597d84..ede3001 100644 --- a/gki_arm64.mk +++ b/gki_arm64.mk @@ -26,6 +26,7 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk) include device/generic/common/gki_common.mk $(call output-kernel,kernel/prebuilts/4.19/arm64,kernel/4.19) $(call output-kernel,kernel/prebuilts/5.10/arm64,kernel/5.10) +$(call output-kernel,kernel/prebuilts/5.15/arm64,kernel/5.15) PRODUCT_NAME := gki_arm64 diff --git a/gki_arm64/BoardConfig.mk b/gki_arm64/BoardConfig.mk index c5d81b0..0263549 100644 --- a/gki_arm64/BoardConfig.mk +++ b/gki_arm64/BoardConfig.mk @@ -35,14 +35,22 @@ 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_KERNEL-5.15_BOOTIMAGE_PARTITION_SIZE := 67108864 +BOARD_KERNEL-5.15-ALLSYMS_BOOTIMAGE_PARTITION_SIZE := 67108864 +BOARD_KERNEL-5.15-GZ_BOOTIMAGE_PARTITION_SIZE := 47185920 +BOARD_KERNEL-5.15-GZ-ALLSYMS_BOOTIMAGE_PARTITION_SIZE := 47185920 +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 \ endif diff --git a/gki_x86_64.mk b/gki_x86_64.mk index d01767b..75f5ff7 100644 --- a/gki_x86_64.mk +++ b/gki_x86_64.mk @@ -24,7 +24,8 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk) # Build GKI boot images # include device/generic/common/gki_common.mk -$(call output-kernel,kernel/prebuilts/5.10/arm64,kernel/5.10) +$(call output-kernel,kernel/prebuilts/5.10/x86_64,kernel/5.10) +$(call output-kernel,kernel/prebuilts/5.15/x86_64,kernel/5.15) PRODUCT_NAME := gki_x86_64 diff --git a/gki_x86_64/BoardConfig.mk b/gki_x86_64/BoardConfig.mk index 48a1499..6321edc 100755 --- a/gki_x86_64/BoardConfig.mk +++ b/gki_x86_64/BoardConfig.mk @@ -26,13 +26,17 @@ include device/generic/common/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_KERNEL-5.15_BOOTIMAGE_PARTITION_SIZE := 67108864 +BOARD_KERNEL-5.15-ALLSYMS_BOOTIMAGE_PARTITION_SIZE := 67108864 # Boot images BOARD_KERNEL_BINARIES := \ kernel-5.10 \ + kernel-5.15 \ ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) BOARD_KERNEL_BINARIES += \ kernel-5.10-allsyms \ + kernel-5.15-allsyms \ endif -- cgit v1.2.3 From bb49c7b474b0b5b6ab7e0a6b89bf1b9906b2d5c5 Mon Sep 17 00:00:00 2001 From: SzuWei Lin Date: Mon, 21 Feb 2022 17:38:14 +0800 Subject: Remove init_boot.img from gki_$arch init_boot.img is a part of platform. gki_$arch does not need to include it. Bug: 216601612 Test: lunch gki_arm64-userdebug; make -j dist Change-Id: I6d6d3ab146be397486ab851e9daccb2c6fef527c --- BoardConfigGkiCommon.mk | 7 ------- gki_common.mk | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/BoardConfigGkiCommon.mk b/BoardConfigGkiCommon.mk index 662e0ec..09b77d6 100644 --- a/BoardConfigGkiCommon.mk +++ b/BoardConfigGkiCommon.mk @@ -41,13 +41,6 @@ BOARD_USES_RECOVERY_AS_BOOT := TARGET_NO_KERNEL := false BOARD_USES_GENERIC_KERNEL_IMAGE := true -# Init boot image -BOARD_RAMDISK_USE_LZ4 := true -BOARD_INIT_BOOT_HEADER_VERSION := 4 -BOARD_MKBOOTIMG_INIT_ARGS += --header_version $(BOARD_INIT_BOOT_HEADER_VERSION) -# TODO(b/212486689) Need to confirm the size -BOARD_INIT_BOOT_IMAGE_PARTITION_SIZE := 8388608 - # No system image BOARD_SYSTEMIMAGE_PARTITION_SIZE := diff --git a/gki_common.mk b/gki_common.mk index b2b717d..33a9701 100644 --- a/gki_common.mk +++ b/gki_common.mk @@ -88,8 +88,8 @@ endef # $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk) PRODUCT_BUILD_BOOT_IMAGE := true -PRODUCT_BUILD_INIT_BOOT_IMAGE := true +PRODUCT_BUILD_INIT_BOOT_IMAGE := false PRODUCT_BUILD_CACHE_IMAGE := false PRODUCT_BUILD_ODM_IMAGE := false PRODUCT_BUILD_VENDOR_DLKM_IMAGE := false -- cgit v1.2.3 From e7eb3657a68d4e979debfb6682f2d5c3095dc3a5 Mon Sep 17 00:00:00 2001 From: Bowgo Tsai Date: Tue, 22 Feb 2022 23:25:58 +0800 Subject: Excluding the ramdisk from GKI boot images By default, the build system assumes the ramdisk is either in the boot.img or in the init_boot.img. In gki_arm64, we've removed init_boot.img so the ramdisk will be included in the boot.img. However, GKI boot images should not include a ramdisk. Sets BOARD_BUILD_SYSTEM_ROOT_IMAGE to true to exclude the ramdisk. Bug: 220834917 Test: lunch gki_arm64-user; make -j dist; then unpack_bootimg boot-*.img Change-Id: I441592c141d6cfdb19a13c98cfca9a976af12604 --- BoardConfigGkiCommon.mk | 5 ++++- gki_common.mk | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/BoardConfigGkiCommon.mk b/BoardConfigGkiCommon.mk index 09b77d6..059eeec 100644 --- a/BoardConfigGkiCommon.mk +++ b/BoardConfigGkiCommon.mk @@ -34,13 +34,16 @@ BOARD_AVB_INIT_BOOT_ROLLBACK_INDEX_LOCATION := 3 # Sets boot SPL. BOOT_SECURITY_PATCH = $(PLATFORM_SECURITY_PATCH) -# Boot image with ramdisk and kernel +# Boot image with kernel only (no ramdisk) 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 +# Pretend as a no-ramdisk device to exclude the ramdisk from the GKI boot image +BOARD_BUILD_SYSTEM_ROOT_IMAGE := true + # No system image BOARD_SYSTEMIMAGE_PARTITION_SIZE := diff --git a/gki_common.mk b/gki_common.mk index 33a9701..4e21af1 100644 --- a/gki_common.mk +++ b/gki_common.mk @@ -84,7 +84,7 @@ $(call _output_kernel_files,$(_output-kernel-info-files),$(1),$(2)) endef # -# Output boot.img and init-boot.img +# Output boot.img # $(call inherit-product, $(SRC_TARGET_DIR)/product/generic_ramdisk.mk) PRODUCT_BUILD_BOOT_IMAGE := true -- cgit v1.2.3 From bb034031a1a773b730797a6c561d151f3daae8ad Mon Sep 17 00:00:00 2001 From: SzuWei Lin Date: Mon, 14 Mar 2022 13:58:35 +0800 Subject: Output debug kernel prebuilt files to dist kernel/*-debug folder Bug: 212486689 Test: lunch gki_arm64-userdebug; make -j dist; check out/dist Change-Id: Ib6e7f395cad54b7ee94ec42ce281e4d343d3f1cc --- gki_common.mk | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/gki_common.mk b/gki_common.mk index 4e21af1..1d301c0 100644 --- a/gki_common.mk +++ b/gki_common.mk @@ -37,7 +37,6 @@ endef # Output the release kernel prebuilt files to dist folder # # $(1): the source folder contains the kernel prebuilt files -# $(2): the dist folder # # Notes: # For mainline kernel, it outputs -allsyms kernel as release kernel. @@ -55,7 +54,6 @@ endef # Output the debug kernel prebuilt files to dist folder # # $(1): the source folder contains the kernel prebuilt files -# $(2): the dist folder # # Note: # For mainline kernel, it outputs -allsyms kernel as release kernel, @@ -77,10 +75,11 @@ endef # $(call output-kernel,kernel/prebuilts/5.10/arm64,kernel/5.10) # define output-kernel -$(call _output-kernel-user,$(1),$(2)) -$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)), \ - $(call _output-kernel-debug,$(1),$(2))) +$(call _output-kernel-user,$(1)) $(call _output_kernel_files,$(_output-kernel-info-files),$(1),$(2)) +$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)), \ + $(call _output-kernel-debug,$(1)) \ + $(call _output_kernel_files,$(_output-kernel-info-files),$(1),$(2)-debug)) endef # -- cgit v1.2.3 From f4c89a2a805a68472f81562c403cf31b1e4fcf21 Mon Sep 17 00:00:00 2001 From: Daniel Norman Date: Wed, 23 Mar 2022 18:26:34 +0000 Subject: Allow BOARD_BUILD_SYSTEM_ROOT_IMAGE override by command line flag. This allows users to optionally include ramdisk in their GKI build until they have swapped to using the init-boot partition. Bug: 224481030 Change-Id: I6fb6a474763261f0963ea6358717cefb645d8690 --- BoardConfigGkiCommon.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BoardConfigGkiCommon.mk b/BoardConfigGkiCommon.mk index 059eeec..eedfe28 100644 --- a/BoardConfigGkiCommon.mk +++ b/BoardConfigGkiCommon.mk @@ -42,7 +42,7 @@ TARGET_NO_KERNEL := false BOARD_USES_GENERIC_KERNEL_IMAGE := true # Pretend as a no-ramdisk device to exclude the ramdisk from the GKI boot image -BOARD_BUILD_SYSTEM_ROOT_IMAGE := true +BOARD_BUILD_SYSTEM_ROOT_IMAGE ?= true # No system image BOARD_SYSTEMIMAGE_PARTITION_SIZE := -- cgit v1.2.3 From 3456f2d62af277bf1623744955c860eaa0d0ec3b Mon Sep 17 00:00:00 2001 From: Bowgo Tsai Date: Tue, 19 Apr 2022 10:49:32 +0800 Subject: Removing BOARD_BUILD_SYSTEM_ROOT_IMAGE BOARD_BUILD_SYSTEM_ROOT_IMAGE is deprecated, so using another new flag: BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK, to exclude the ramdisk from GKI boot images. Bug: 220834917 Test: build and `unpack_bootimg` Change-Id: Ia207f2ffbbefa55884e533260440edef7dc4f770 --- BoardConfigGkiCommon.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/BoardConfigGkiCommon.mk b/BoardConfigGkiCommon.mk index eedfe28..c7970d7 100644 --- a/BoardConfigGkiCommon.mk +++ b/BoardConfigGkiCommon.mk @@ -40,9 +40,7 @@ BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION) BOARD_USES_RECOVERY_AS_BOOT := TARGET_NO_KERNEL := false BOARD_USES_GENERIC_KERNEL_IMAGE := true - -# Pretend as a no-ramdisk device to exclude the ramdisk from the GKI boot image -BOARD_BUILD_SYSTEM_ROOT_IMAGE ?= true +BOARD_BUILD_GKI_BOOT_IMAGE_WITHOUT_RAMDISK ?= true # No system image BOARD_SYSTEMIMAGE_PARTITION_SIZE := -- cgit v1.2.3 From 239b3e9cdaa980c64eb8698ea3821aa46985b2e3 Mon Sep 17 00:00:00 2001 From: SzuWei Lin Date: Fri, 22 Apr 2022 13:05:30 +0800 Subject: Unfold the result of output-kernel The number of file kernel versions and output files are not reduced. We don't need output-kernel now. Bug: 230047219 Test: TH with gki_arm64 and gki_x86_64 Change-Id: I7d74595dce9e398990ea08ed805ce0bb81df7f97 (cherry picked from commit ceb6b290af57b33217128c93325303a84ec77c64) --- gki_arm64.mk | 36 ++++++++++++++++++++++++++++--- gki_common.mk | 68 ----------------------------------------------------------- gki_x86_64.mk | 20 ++++++++++++++++-- 3 files changed, 51 insertions(+), 73 deletions(-) diff --git a/gki_arm64.mk b/gki_arm64.mk index ede3001..3ff21cd 100644 --- a/gki_arm64.mk +++ b/gki_arm64.mk @@ -24,9 +24,39 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk) # Build GKI boot images # include device/generic/common/gki_common.mk -$(call output-kernel,kernel/prebuilts/4.19/arm64,kernel/4.19) -$(call output-kernel,kernel/prebuilts/5.10/arm64,kernel/5.10) -$(call output-kernel,kernel/prebuilts/5.15/arm64,kernel/5.15) + +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 \ + kernel/prebuilts/5.15/arm64/kernel-5.15:kernel-5.15 \ + 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 \ + kernel/prebuilts/5.15/arm64/kernel-5.15-allsyms:kernel-5.15-allsyms \ + 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) + +endif PRODUCT_NAME := gki_arm64 diff --git a/gki_common.mk b/gki_common.mk index 1d301c0..42b9a6c 100644 --- a/gki_common.mk +++ b/gki_common.mk @@ -14,74 +14,6 @@ # limitations under the License. # -# The files will be copy from the source folder to the dist folder -_output-kernel-info-files := \ - prebuilt-info.txt \ - manifest.xml \ - - -# Copy the files from the source folder to the dist folder -# -# Skip if the file is not existing. -# -# $(1): file list -# $(2): the source folder -# $(3): the dist folder -define _output_kernel_files -$(foreach f,$(1), \ - $(if $(wildcard $(2)/$(f)), \ - $(call dist-for-goals,dist_files,$(2)/$(f):$(3)/$(f)))) -endef - - -# Output the release kernel prebuilt files to dist folder -# -# $(1): the source folder contains the kernel prebuilt files -# -# Notes: -# For mainline kernel, it outputs -allsyms kernel as release kernel. -# -define _output-kernel-user -$(if $(findstring mainline,$(1)), \ - $(eval PRODUCT_COPY_FILES += \ - $(foreach f,$(wildcard $(1)/kernel-*-allsyms), \ - $(f):$(subst -allsyms,,$(notdir $(f))))), \ - $(eval PRODUCT_COPY_FILES += \ - $(call copy-files,$(filter-out *-allsyms,$(wildcard $(1)/kernel-*)),.))) -endef - - -# Output the debug kernel prebuilt files to dist folder -# -# $(1): the source folder contains the kernel prebuilt files -# -# Note: -# For mainline kernel, it outputs -allsyms kernel as release kernel, -# so there is no need to output -allsyms again. -# -define _output-kernel-debug -$(if $(findstring mainline,$(1)),, \ - $(eval PRODUCT_COPY_FILES += \ - $(call copy-files,$(wildcard $(1)/kernel-*-allsyms),.))) -endef - - -# Output the kernel prebuilt files to dist folder -# -# $(1): the source folder contains the kernel prebuilt files -# $(2): the dist folder -# -# Example: -# $(call output-kernel,kernel/prebuilts/5.10/arm64,kernel/5.10) -# -define output-kernel -$(call _output-kernel-user,$(1)) -$(call _output_kernel_files,$(_output-kernel-info-files),$(1),$(2)) -$(if $(filter userdebug eng,$(TARGET_BUILD_VARIANT)), \ - $(call _output-kernel-debug,$(1)) \ - $(call _output_kernel_files,$(_output-kernel-info-files),$(1),$(2)-debug)) -endef - # # Output boot.img # diff --git a/gki_x86_64.mk b/gki_x86_64.mk index 75f5ff7..2dc7919 100644 --- a/gki_x86_64.mk +++ b/gki_x86_64.mk @@ -24,8 +24,24 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk) # Build GKI boot images # include device/generic/common/gki_common.mk -$(call output-kernel,kernel/prebuilts/5.10/x86_64,kernel/5.10) -$(call output-kernel,kernel/prebuilts/5.15/x86_64,kernel/5.15) + +PRODUCT_COPY_FILES += \ + kernel/prebuilts/5.10/x86_64/kernel-5.10:kernel-5.10 \ + kernel/prebuilts/5.15/x86_64/kernel-5.15:kernel-5.15 \ + +$(call dist-for-goals,dist_files,kernel/prebuilts/5.10/x86_64/prebuilt-info.txt:kernel/5.10/prebuilt-info.txt) +$(call dist-for-goals,dist_files,kernel/prebuilts/5.15/x86_64/prebuilt-info.txt:kernel/5.15/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 \ + kernel/prebuilts/5.15/x86_64/kernel-5.15-allsyms:kernel-5.15-allsyms \ + +$(call dist-for-goals,dist_files,kernel/prebuilts/5.10/x86_64/prebuilt-info.txt:kernel/5.10-debug/prebuilt-info.txt) +$(call dist-for-goals,dist_files,kernel/prebuilts/5.15/x86_64/prebuilt-info.txt:kernel/5.15-debug/prebuilt-info.txt) + +endif PRODUCT_NAME := gki_x86_64 -- cgit v1.2.3