From 90d266b30082d1036721853189c3ab1f50bffe34 Mon Sep 17 00:00:00 2001 From: Daniel Norman Date: Thu, 24 Sep 2020 11:35:47 -0700 Subject: [PATCH 1/2] Introduce aosp_redfin_vf product. - This product is a system-only partial build of aosp_redfin. - This product inherits from aosp_redfin, after disabling certain vendor partitions and including VNDK v30. - This build can be merged with a vendor (or full) build of aosp_redfin from Android 11 using merge_target_files.py to create a merged Vendor-Freeze build. Test: lunch aosp_redfin_vf-userdebug, m dist merge_target_files.py to merge with Android R vendor build Device boots. Bug: 169968221 Change-Id: Iecac1afbd8fe298bd5dc74d509333f1ff303467a --- AndroidProducts.mk | 2 ++ aosp_redfin_vf.mk | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 aosp_redfin_vf.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 3e36787..ab194ca 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -16,6 +16,8 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/aosp_redfin.mk \ + $(LOCAL_DIR)/aosp_redfin_vf.mk \ COMMON_LUNCH_CHOICES := \ aosp_redfin-userdebug \ + aosp_redfin_vf-userdebug \ diff --git a/aosp_redfin_vf.mk b/aosp_redfin_vf.mk new file mode 100644 index 0000000..7e8d389 --- /dev/null +++ b/aosp_redfin_vf.mk @@ -0,0 +1,34 @@ +# +# Copyright 2020 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. +# + +# Makefile for the system-only partial build of aosp_redfin. +# Used for creating a merged Vendor Freeze device. + +PRODUCT_VENDOR_FREEZE_SYSTEM_BUILD := true + +# Include VNDK v30, needed by the Android 11 vendor half. +PRODUCT_EXTRA_VNDK_VERSIONS = 30 + +# Disable building certain non-system partitions in this build. +PRODUCT_BUILD_BOOT_IMAGE := false +PRODUCT_BUILD_RECOVERY_IMAGE := false +PRODUCT_BUILD_VBMETA_IMAGE := false +PRODUCT_BUILD_VENDOR_IMAGE := false +PRODUCT_BUILD_VENDOR_BOOT_IMAGE := false + +$(call inherit-product, device/google/redfin/aosp_redfin.mk) + +PRODUCT_NAME := aosp_redfin_vf From 583ad117fd613ab047a179a2cb7ed354bb6e91c8 Mon Sep 17 00:00:00 2001 From: Daniel Norman Date: Tue, 6 Oct 2020 11:28:17 -0700 Subject: [PATCH 2/2] Stops using VNDK-current on vendor for vendor-freeze system builds. VNDK-current on vendor is not supported for Android R. When creating a merged S-system R-vendor build, VNDK-current needs to come from the system build. Bug: 169968221 Test: Build and merge a vendor-freeze S system R vendor build. Observe VNDK current apex on /system. Device boots. Change-Id: I6baaed10fb83f24c1141f454052a1ac543c60914 --- aosp_redfin.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/aosp_redfin.mk b/aosp_redfin.mk index d633bae..6844c9f 100644 --- a/aosp_redfin.mk +++ b/aosp_redfin.mk @@ -49,11 +49,13 @@ $(call inherit-product-if-exists, vendor/google_devices/redfin/prebuilts/device- PRODUCT_COPY_FILES += \ frameworks/native/data/etc/aosp_excluded_hardware.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/aosp_excluded_hardware.xml -# Keep the VNDK APEX in /system partition for REL branches as these branches are -# expected to have stable API/ABI surfaces. +# Keep the VNDK APEX in /system partition for REL branches and Vendor Freeze targets +# as these are expected to have stable API/ABI surfaces. ifneq (REL,$(PLATFORM_VERSION_CODENAME)) +ifneq ($(PRODUCT_VENDOR_FREEZE_SYSTEM_BUILD),true) PRODUCT_PACKAGES += com.android.vndk.current.on_vendor endif +endif # Don't build super.img. PRODUCT_BUILD_SUPER_PARTITION := false