aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-03-05 00:43:36 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-03-05 00:43:36 +0000
commit9d5134760c36f37f279c0d48ce2f2a6f2a7814e4 (patch)
tree710cc29fe3f6c69b8700b6259b2bda4f93dfa49a
parenta78856cee6de9e15558053dc393de66ce3ee734e (diff)
parent28a7820be2c9813b31cc22ca0f03436c32b33a15 (diff)
downloadbuild-android10-sidebranch.tar.gz
Merge "initial GKI boot.img support" am: 28a7820be2android10-sidebranch
Change-Id: I620304b97f0ab8f9f440aab1c5dc8e4fe18c4819
-rw-r--r--core/board_config.mk4
-rw-r--r--target/board/generic_arm64/BoardConfig.mk8
-rw-r--r--target/board/generic_arm64/device.mk10
-rw-r--r--target/product/aosp_arm64.mk1
-rw-r--r--target/product/sdk_phone_arm64.mk1
5 files changed, 22 insertions, 2 deletions
diff --git a/core/board_config.mk b/core/board_config.mk
index 61abc36e10..a7879583b4 100644
--- a/core/board_config.mk
+++ b/core/board_config.mk
@@ -362,7 +362,9 @@ endif
BUILDING_VENDOR_BOOT_IMAGE :=
ifdef BOARD_BOOT_HEADER_VERSION
ifneq ($(call math_gt_or_eq,$(BOARD_BOOT_HEADER_VERSION),3),)
- BUILDING_VENDOR_BOOT_IMAGE := true
+ ifneq ($(TARGET_NO_VENDOR_BOOT),true)
+ BUILDING_VENDOR_BOOT_IMAGE := true
+ endif
ifdef BUILDING_RECOVERY_IMAGE
ifneq ($(BOARD_USES_RECOVERY_AS_BOOT),true)
$(error Boot header version >=3 requires recovery as boot)
diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk
index f5caf7015e..8f30e6d4e2 100644
--- a/target/board/generic_arm64/BoardConfig.mk
+++ b/target/board/generic_arm64/BoardConfig.mk
@@ -55,8 +55,16 @@ endif
include build/make/target/board/BoardConfigGsiCommon.mk
include build/make/target/board/BoardConfigEmuCommon.mk
+TARGET_NO_KERNEL := false
+TARGET_NO_VENDOR_BOOT := true
+BOARD_USES_RECOVERY_AS_BOOT := true
+
+BOARD_BOOTIMAGE_PARTITION_SIZE := 0x02000000
BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800
+BOARD_BOOT_HEADER_VERSION := 3
+BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
+
# Emulator system image is going to be used as GSI and some vendor still hasn't
# cleaned up all device specific directories under root!
diff --git a/target/board/generic_arm64/device.mk b/target/board/generic_arm64/device.mk
index e5d8e61d02..4fcae46285 100644
--- a/target/board/generic_arm64/device.mk
+++ b/target/board/generic_arm64/device.mk
@@ -14,6 +14,16 @@
# limitations under the License.
#
+# Cuttlefish has GKI kernel prebuilts, so use those for the GKI boot.img.
+ifeq ($(TARGET_PREBUILT_KERNEL),)
+ LOCAL_KERNEL := device/google/cuttlefish_kernel/5.4-arm64/kernel
+else
+ LOCAL_KERNEL := $(TARGET_PREBUILT_KERNEL)
+endif
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_KERNEL):kernel
+
# Adjust the Dalvik heap to be appropriate for a tablet.
$(call inherit-product-if-exists, frameworks/base/build/tablet-dalvik-heap.mk)
$(call inherit-product-if-exists, frameworks/native/build/tablet-dalvik-heap.mk)
diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk
index e133db4dbd..491397f2d4 100644
--- a/target/product/aosp_arm64.mk
+++ b/target/product/aosp_arm64.mk
@@ -53,7 +53,6 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_product.mk)
#
# All components inherited here go to vendor image
#
-$(call inherit-product-if-exists, device/generic/goldfish/arm64-vendor.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/product/emulator_vendor.mk)
$(call inherit-product, $(SRC_TARGET_DIR)/board/generic_arm64/device.mk)
diff --git a/target/product/sdk_phone_arm64.mk b/target/product/sdk_phone_arm64.mk
index ad726333a7..9024890d2c 100644
--- a/target/product/sdk_phone_arm64.mk
+++ b/target/product/sdk_phone_arm64.mk
@@ -16,6 +16,7 @@
QEMU_USE_SYSTEM_EXT_PARTITIONS := true
$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_arm64.mk)
+$(call inherit-product-if-exists, device/generic/goldfish/arm64-vendor.mk)
# Define the host tools and libs that are parts of the SDK.
$(call inherit-product, sdk/build/product_sdk.mk)