From 9e31c4e95afcc88b1ad9b810d6b41d696146dd77 Mon Sep 17 00:00:00 2001 From: Ziyang Zhou Date: Mon, 8 Nov 2021 21:25:27 +0800 Subject: [PATCH] add 64bit only device support --- AndroidProducts.mk | 8 ++++++-- redroid_arm64_only.mk | 27 +++++++++++++++++++++++++++ redroid_arm64_only/BoardConfig.mk | 18 ++++++++++++++++++ redroid_x86_64_only.mk | 27 +++++++++++++++++++++++++++ redroid_x86_64_only/BoardConfig.mk | 16 ++++++++++++++++ redroid_x86_64_only/device.mk | 3 +++ 6 files changed, 97 insertions(+), 2 deletions(-) create mode 100644 redroid_arm64_only.mk create mode 100644 redroid_arm64_only/BoardConfig.mk create mode 100644 redroid_x86_64_only.mk create mode 100755 redroid_x86_64_only/BoardConfig.mk create mode 100644 redroid_x86_64_only/device.mk diff --git a/AndroidProducts.mk b/AndroidProducts.mk index 6520817..f0337fe 100644 --- a/AndroidProducts.mk +++ b/AndroidProducts.mk @@ -16,9 +16,13 @@ PRODUCT_MAKEFILES := \ $(LOCAL_DIR)/redroid_x86_64.mk \ + $(LOCAL_DIR)/redroid_x86_64_only.mk \ $(LOCAL_DIR)/redroid_arm64.mk \ + $(LOCAL_DIR)/redroid_arm64_only.mk \ COMMON_LUNCH_CHOICES := \ - redroid_x86_64-userdebug \ - redroid_arm64-userdebug \ + redroid_x86_64-userdebug \ + redroid_x86_64_only-userdebug \ + redroid_arm64-userdebug \ + redroid_arm64_only-userdebug \ diff --git a/redroid_arm64_only.mk b/redroid_arm64_only.mk new file mode 100644 index 0000000..0a2758c --- /dev/null +++ b/redroid_arm64_only.mk @@ -0,0 +1,27 @@ +# Copyright (C) 2012 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. + +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk) + +$(call inherit-product, $(LOCAL_PATH)/redroid.mk) + +# overrides +PRODUCT_NAME := redroid_arm64_only +PRODUCT_DEVICE := redroid_arm64_only +PRODUCT_BRAND := ReDroid +PRODUCT_MODEL := redroid12_arm64_only + +DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay + diff --git a/redroid_arm64_only/BoardConfig.mk b/redroid_arm64_only/BoardConfig.mk new file mode 100644 index 0000000..5eceae7 --- /dev/null +++ b/redroid_arm64_only/BoardConfig.mk @@ -0,0 +1,18 @@ +# arm64 emulator specific definitions +TARGET_ARCH := arm64 +TARGET_ARCH_VARIANT := armv8-a +TARGET_CPU_VARIANT := generic +TARGET_CPU_ABI := arm64-v8a + +include build/make/target/board/BoardConfigGsiCommon.mk + +TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true + +BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 16777216 +BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 16777216 + +BOARD_GPU_DRIVERS := virgl radeonsi + +DEVICE_MANIFEST_FILE := device/redroid/manifest.xml + diff --git a/redroid_x86_64_only.mk b/redroid_x86_64_only.mk new file mode 100644 index 0000000..fb55b98 --- /dev/null +++ b/redroid_x86_64_only.mk @@ -0,0 +1,27 @@ +# Copyright (C) 2012 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. + +$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) +$(call inherit-product, $(SRC_TARGET_DIR)/product/aosp_base.mk) + +$(call inherit-product, $(LOCAL_PATH)/redroid.mk) +$(call inherit-product, $(LOCAL_PATH)/redroid_x86_64_only/device.mk) + +PRODUCT_NAME := redroid_x86_64_only +PRODUCT_DEVICE := redroid_x86_64_only +PRODUCT_BRAND := ReDroid +PRODUCT_MODEL := redroid12_x86_64_only + +DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay + diff --git a/redroid_x86_64_only/BoardConfig.mk b/redroid_x86_64_only/BoardConfig.mk new file mode 100755 index 0000000..9bffa7f --- /dev/null +++ b/redroid_x86_64_only/BoardConfig.mk @@ -0,0 +1,16 @@ +TARGET_CPU_ABI := x86_64 +TARGET_ARCH := x86_64 +TARGET_ARCH_VARIANT := x86_64 + +include build/make/target/board/BoardConfigGsiCommon.mk + +TARGET_USERIMAGES_SPARSE_EXT_DISABLED := true + +BOARD_VENDORIMAGE_FILE_SYSTEM_TYPE := ext4 +BOARD_VENDORIMAGE_PARTITION_RESERVED_SIZE := 16777216 +BOARD_SYSTEMIMAGE_PARTITION_RESERVED_SIZE := 16777216 + +BOARD_GPU_DRIVERS := i915 i965 r300g r600g virgl iris radeonsi + +DEVICE_MANIFEST_FILE := device/redroid/manifest.xml + diff --git a/redroid_x86_64_only/device.mk b/redroid_x86_64_only/device.mk new file mode 100644 index 0000000..e967bb8 --- /dev/null +++ b/redroid_x86_64_only/device.mk @@ -0,0 +1,3 @@ +PRODUCT_PACKAGES += \ + vulkan.intel \ +