diff --git a/target/board/generic/BoardConfig.mk b/target/board/generic/BoardConfig.mk index 1d09c2e35..5614f4655 100644 --- a/target/board/generic/BoardConfig.mk +++ b/target/board/generic/BoardConfig.mk @@ -32,15 +32,6 @@ TARGET_USES_64_BIT_BINDER := true # no hardware camera USE_CAMERA_STUB := true -# Enable dex-preoptimization to speed up the first boot sequence -# of an SDK AVD. Note that this operation only works on Linux for now -ifeq ($(HOST_OS),linux) - ifeq ($(WITH_DEXPREOPT),) - WITH_DEXPREOPT := true - WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false - endif -endif - TARGET_USES_HWC2 := true NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 @@ -53,7 +44,8 @@ BUILD_QEMU_IMAGES := true USE_OPENGL_RENDERER := true TARGET_USERIMAGES_USE_EXT4 := true -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2147483648 # 2 GB +# Partition size is default 1.5GB (1536MB) for 64 bits projects +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736 BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 TARGET_COPY_OUT_VENDOR := vendor # ~100 MB vendor image. Please adjust system image / vendor image sizes @@ -67,6 +59,13 @@ DEVICE_MATRIX_FILE := device/generic/goldfish/compatibility_matrix.xml BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true +ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) +# GSI is always userdebug and needs a couple of properties taking precedence +# over those set by the vendor. +TARGET_SYSTEM_PROP := build/make/target/board/treble_system.prop +endif +BOARD_VNDK_VERSION := current + # Wifi. BOARD_WLAN_DEVICE := emulator BOARD_HOSTAPD_DRIVER := NL80211 diff --git a/target/board/generic/device.mk b/target/board/generic/device.mk index f3ad03be7..d2f631090 100644 --- a/target/board/generic/device.mk +++ b/target/board/generic/device.mk @@ -23,11 +23,11 @@ PRODUCT_PROPERTY_OVERRIDES := \ PRODUCT_COPY_FILES := \ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \ - device/generic/goldfish/camera/media_profiles.xml:system/etc/media_profiles.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ - device/generic/goldfish/camera/media_codecs.xml:system/etc/media_codecs.xml \ + device/generic/goldfish/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \ + frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \ + frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \ + frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \ + device/generic/goldfish/camera/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \ hardware/libhardware_legacy/audio/audio_policy.conf:system/etc/audio_policy.conf # minimal configuration for audio policy. diff --git a/target/board/generic_arm64/BoardConfig.mk b/target/board/generic_arm64/BoardConfig.mk index d5f79f4ae..824f6a7af 100644 --- a/target/board/generic_arm64/BoardConfig.mk +++ b/target/board/generic_arm64/BoardConfig.mk @@ -61,15 +61,6 @@ TARGET_USES_64_BIT_BINDER := true # no hardware camera USE_CAMERA_STUB := true -# Enable dex-preoptimization to speed up the first boot sequence -# of an SDK AVD. Note that this operation only works on Linux for now -ifeq ($(HOST_OS),linux) - ifeq ($(WITH_DEXPREOPT),) - WITH_DEXPREOPT := true - WITH_DEXPREOPT_BOOT_IMG_AND_SYSTEM_SERVER_ONLY := false - endif -endif - TARGET_USES_HWC2 := true NUM_FRAMEBUFFER_SURFACE_BUFFERS := 3 @@ -82,7 +73,8 @@ BUILD_QEMU_IMAGES := true USE_OPENGL_RENDERER := true TARGET_USERIMAGES_USE_EXT4 := true -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 2684354560 # 2.5 GB +# Partition size is default 1.5GB (1536MB) for 64 bits projects +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1610612736 BOARD_USERDATAIMAGE_PARTITION_SIZE := 576716800 TARGET_COPY_OUT_VENDOR := vendor # ~100 MB vendor image. Please adjust system image / vendor image sizes @@ -96,6 +88,24 @@ DEVICE_MATRIX_FILE := device/generic/goldfish/compatibility_matrix.xml BOARD_PROPERTY_OVERRIDES_SPLIT_ENABLED := true BOARD_SEPOLICY_DIRS += build/target/board/generic/sepolicy +ifneq (,$(filter userdebug eng,$(TARGET_BUILD_VARIANT))) +# GSI is always userdebug and needs a couple of properties taking precedence +# over those set by the vendor. +TARGET_SYSTEM_PROP := build/make/target/board/treble_system.prop +endif +BOARD_VNDK_VERSION := current + +# Emulator system image is going to be used as GSI and some vendor still hasn't +# cleaned up all device specific directories under root! + +# TODO(jiyong) These might be SoC specific. +BOARD_ROOT_EXTRA_FOLDERS += firmware firmware/radio persist +BOARD_ROOT_EXTRA_SYMLINKS := /vendor/lib/dsp:/dsp + +# TODO(b/36764215): remove this setting when the generic system image +# no longer has QCOM-specific directories under /. +BOARD_SEPOLICY_DIRS += build/target/board/generic_arm64_ab/sepolicy + # Wifi. BOARD_WLAN_DEVICE := emulator BOARD_HOSTAPD_DRIVER := NL80211 diff --git a/target/board/generic_arm64/device.mk b/target/board/generic_arm64/device.mk index 4e33d3b9b..8d62f4bff 100644 --- a/target/board/generic_arm64/device.mk +++ b/target/board/generic_arm64/device.mk @@ -23,11 +23,11 @@ PRODUCT_PROPERTY_OVERRIDES := \ PRODUCT_COPY_FILES := \ device/generic/goldfish/data/etc/apns-conf.xml:system/etc/apns-conf.xml \ - device/generic/goldfish/camera/media_profiles.xml:system/etc/media_profiles.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:system/etc/media_codecs_google_audio.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:system/etc/media_codecs_google_telephony.xml \ - frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:system/etc/media_codecs_google_video.xml \ - device/generic/goldfish/camera/media_codecs.xml:system/etc/media_codecs.xml + device/generic/goldfish/camera/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles.xml \ + frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \ + frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \ + frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \ + device/generic/goldfish/camera/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml # minimal configuration for audio policy. PRODUCT_COPY_FILES += \