Merge "Remove sysfs_gpu type definition"
diff --git a/Android.mk b/Android.mk
index ca9d582..2b6c64a 100644
--- a/Android.mk
+++ b/Android.mk
@@ -20,7 +20,7 @@
# to only building on ARM if they include assembly. Individual makefiles
# are responsible for having their own logic, for fine-grained control.
-ifneq ($(filter db845c pixel3_mainline rb5, $(TARGET_BOARD_PLATFORM)),)
+ifneq ($(filter db845c rb5, $(TARGET_BOARD_PLATFORM)),)
LOCAL_PATH := $(call my-dir)
diff --git a/AndroidProducts.mk b/AndroidProducts.mk
index e5d63dd..3492246 100644
--- a/AndroidProducts.mk
+++ b/AndroidProducts.mk
@@ -11,10 +11,12 @@
PRODUCT_MAKEFILES := \
$(LOCAL_DIR)/db845c.mk \
+ $(LOCAL_DIR)/db845c_mini.mk \
$(LOCAL_DIR)/rb5.mk \
- $(LOCAL_DIR)/pixel3_mainline.mk
+ $(LOCAL_DIR)/rb5_mini.mk \
+ $(LOCAL_DIR)/sm8450_mini.mk \
COMMON_LUNCH_CHOICES := \
db845c-userdebug \
rb5-userdebug \
- pixel3_mainline-userdebug
+
diff --git a/BoardConfigCommon.mk b/BoardConfigCommon.mk
index 9b19707..87cde99 100644
--- a/BoardConfigCommon.mk
+++ b/BoardConfigCommon.mk
@@ -13,19 +13,6 @@
# limitations under the License.
#
-# Primary Arch
-TARGET_ARCH := arm64
-TARGET_ARCH_VARIANT := armv8-2a
-TARGET_CPU_VARIANT := kryo385
-TARGET_CPU_ABI := arm64-v8a
-
-# Secondary Arch
-TARGET_2ND_ARCH := arm
-TARGET_2ND_ARCH_VARIANT := armv8-2a
-TARGET_2ND_CPU_VARIANT := kryo385
-TARGET_2ND_CPU_ABI := armeabi-v7a
-TARGET_2ND_CPU_ABI2 := armeabi
-
TARGET_USES_64_BIT_BINDER := true
TARGET_NO_BOOTLOADER := true
@@ -55,10 +42,14 @@
BOARD_USES_DRM_HWCOMPOSER := true
BOARD_GPU_DRIVERS := freedreno
TARGET_USES_HWC2 := true
+
+ifeq ($(TARGET_BUILD_MESA),true)
BOARD_MESA3D_USES_MESON_BUILD := true
BOARD_MESA3D_GALLIUM_DRIVERS := freedreno
BOARD_MESA3D_VULKAN_DRIVERS := freedreno
-
+else
+BOARD_USE_CUSTOMIZED_MESA := true
+endif
# WiFi
WPA_SUPPLICANT_VERSION := VER_0_8_X
@@ -74,9 +65,6 @@
device/linaro/dragonboard/sepolicy \
system/bt/vendor_libs/linux/sepolicy
-DEVICE_MANIFEST_FILE := device/linaro/dragonboard/manifest.xml
-DEVICE_MATRIX_FILE := device/linaro/dragonboard/compatibility_matrix.xml
-
# Enable dex pre-opt to speed up initial boot
ifeq ($(HOST_OS),linux)
ifeq ($(WITH_DEXPREOPT),)
diff --git a/METADATA b/METADATA
index 3814b8d..9b2a1bc 100644
--- a/METADATA
+++ b/METADATA
@@ -2,5 +2,6 @@
# CONSULT THE OWNERS AND opensource-licensing@google.com BEFORE
# DEPENDING ON IT IN YOUR PROJECT. ***
third_party {
+ license_note: "proprietary"
license_type: BY_EXCEPTION_ONLY
}
diff --git a/build/tasks/kernel.mk b/build/tasks/kernel.mk
index 959347b..7723dc3 100644
--- a/build/tasks/kernel.mk
+++ b/build/tasks/kernel.mk
@@ -1,7 +1,7 @@
-ifneq ($(filter db845c, $(TARGET_DEVICE)),)
+ifneq ($(filter db845c db845c_mini, $(TARGET_DEVICE)),)
-$(PRODUCT_OUT)/dtb.img: $(DB845C_KERNEL_DIR)/sdm845-db845c.dtb
- -cat $(DB845C_KERNEL_DIR)/sdm845-db845c.dtb $(DB845C_KERNEL_DIR)/qrb5165-rb5.dtb > $@
+$(PRODUCT_OUT)/dtb.img: $(TARGET_KERNEL_DIR)/sdm845-db845c.dtb $(wildcard $(TARGET_KERNEL_DIR)/qrb5165-rb5.dtb)
+ cat $^ > $@
droidcore: $(PRODUCT_OUT)/dtb.img
diff --git a/db845c.mk b/db845c.mk
index dd5dfb0..e949af1 100644
--- a/db845c.mk
+++ b/db845c.mk
@@ -1,26 +1,9 @@
-ifndef TARGET_KERNEL_USE
-TARGET_KERNEL_USE := 5.15
-endif
-DB845C_KERNEL_DIR ?= device/linaro/dragonboard-kernel/android-$(TARGET_KERNEL_USE)
-
-# Inherit the full_base and device configurations
-$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, device/linaro/dragonboard/full.mk)
$(call inherit-product, device/linaro/dragonboard/db845c/device.mk)
-$(call inherit-product, device/linaro/dragonboard/device-common.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
+
+TARGET_USES_BOOT_HDR_V3 ?= true
# Product overrides
PRODUCT_NAME := db845c
PRODUCT_DEVICE := db845c
PRODUCT_BRAND := Android
-
-ifndef DB845C_USES_GKI
-DB845C_USES_GKI := true
-endif
-
-ifeq ($(DB845C_USES_GKI), true)
- DB845C_MODS := $(wildcard $(DB845C_KERNEL_DIR)/*.ko)
- ifneq ($(DB845C_MODS),)
- BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(DB845C_MODS)
- endif
-endif
diff --git a/db845c/BoardConfig.mk b/db845c/BoardConfig.mk
index 2a23017..018213a 100644
--- a/db845c/BoardConfig.mk
+++ b/db845c/BoardConfig.mk
@@ -1,12 +1,24 @@
include device/linaro/dragonboard/BoardConfigCommon.mk
+# Primary Arch
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-2a
+TARGET_CPU_VARIANT := kryo385
+TARGET_CPU_ABI := arm64-v8a
+
+# Secondary Arch
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv8-2a
+TARGET_2ND_CPU_VARIANT := kryo385
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+
# Board Information
TARGET_BOOTLOADER_BOARD_NAME := db845c
TARGET_BOARD_PLATFORM := db845c
TARGET_NO_KERNEL := false
BOARD_INCLUDE_DTB_IN_BOOTIMG := true
-TARGET_USES_BOOT_HDR_V3 ?= true
ifeq ($(TARGET_USES_BOOT_HDR_V3), true)
BOARD_BOOT_HEADER_VERSION := 3
BOARD_KERNEL_PAGESIZE := 4096
@@ -21,6 +33,7 @@
BOARD_KERNEL_CMDLINE += init=/init androidboot.boot_devices=soc@0/1d84000.ufshc printk.devkmsg=on
BOARD_KERNEL_CMDLINE += deferred_probe_timeout=30
BOARD_KERNEL_CMDLINE += pcie_pme=nomsi #For WiFi to work on rb5
+BOARD_KERNEL_CMDLINE += qcom_geni_serial.con_enabled=1
# Image Configuration
BOARD_BOOTIMAGE_PARTITION_SIZE := 103079215104 #96M
diff --git a/db845c/device.mk b/db845c/device.mk
index b8332a0..63e24a1 100644
--- a/db845c/device.mk
+++ b/db845c/device.mk
@@ -18,28 +18,12 @@
$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
include $(LOCAL_PATH)/../vendor-package-ver.mk
-# Enable Virtual A/B
-AB_OTA_UPDATER := true
-AB_OTA_PARTITIONS += \
- product \
- system \
- system_ext \
- vendor
-
ifeq ($(TARGET_USES_BOOT_HDR_V3), true)
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk)
else
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
endif
-PRODUCT_COPY_FILES := \
- $(DB845C_KERNEL_DIR)/Image.gz:kernel \
- device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_RAMDISK)/fstab.db845c \
- device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.db845c \
- device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.db845c.rc \
- device/linaro/dragonboard/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.db845c.usb.rc \
- device/linaro/dragonboard/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/db845c.kl
-
# Build generic Audio HAL
PRODUCT_PACKAGES := audio.primary.db845c
@@ -67,3 +51,8 @@
# Copy firmware files
$(call inherit-product-if-exists, vendor/linaro/db845c/$(EXPECTED_LINARO_VENDOR_VERSION)/device.mk)
$(call inherit-product-if-exists, vendor/linaro/rb5/$(EXPECTED_LINARO_VENDOR_VERSION)/device.mk)
+
+TARGET_HARDWARE := db845c
+TARGET_KERNEL_USE ?= 5.15
+
+include device/linaro/dragonboard/device-common.mk
diff --git a/db845c_mini.mk b/db845c_mini.mk
new file mode 100644
index 0000000..01ff129
--- /dev/null
+++ b/db845c_mini.mk
@@ -0,0 +1,7 @@
+$(call inherit-product, device/linaro/dragonboard/mini.mk)
+$(call inherit-product, device/linaro/dragonboard/db845c/device.mk)
+
+# Product overrides
+PRODUCT_NAME := db845c_mini
+PRODUCT_DEVICE := db845c
+PRODUCT_BRAND := Android
diff --git a/device-common.mk b/device-common.mk
index 87f2bb4..6601cda 100644
--- a/device-common.mk
+++ b/device-common.mk
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2014 The Android Open-Source Project
+# 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.
@@ -14,27 +14,24 @@
# limitations under the License.
#
-# Enable updating of APEXes
-$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
+TARGET_KERNEL_DIR ?= device/linaro/dragonboard-kernel/android-$(TARGET_KERNEL_USE)
-# Device overlay
-DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay
+TARGET_USES_GKI ?= true
-# Build and run only ART
-PRODUCT_RUNTIMES := runtime_libart_default
+ifeq ($(TARGET_USES_GKI), true)
+ TARGET_MODS := $(wildcard $(TARGET_KERNEL_DIR)/*.ko)
+ ifneq ($(TARGET_MODS),)
+ BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(TARGET_MODS)
+ endif
+endif
PRODUCT_SHIPPING_API_LEVEL := 31
-PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
-
-# Enable Scoped Storage related
-$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
-
# Check vendor package version
# If you need to make changes to the vendor partition,
# please modify the source git project here:
# https://staging-git.codelinaro.org/linaro/linaro-aosp/aosp-linaro-vendor-package
-include $(LOCAL_PATH)/vendor-package-ver.mk
+include device/linaro/dragonboard/vendor-package-ver.mk
ifneq (,$(wildcard $(LINARO_VENDOR_PATH)/db845c/$(EXPECTED_LINARO_VENDOR_VERSION)/version.mk))
# Unfortunately inherit-product doesn't export build variables from the
# called make file to the caller, so we have to include it directly here.
@@ -54,226 +51,29 @@
# Would be good to error out here, but that causes other issues
endif
-
-# vndk
-PRODUCT_PACKAGES := vndk-sp
+PRODUCT_SOONG_NAMESPACES += \
+ device/linaro/dragonboard \
+ vendor/linaro/linux-firmware/$(EXPECTED_LINARO_VENDOR_VERSION) \
+ vendor/linaro/db845c/$(EXPECTED_LINARO_VENDOR_VERSION) \
+ vendor/linaro/rb5/$(EXPECTED_LINARO_VENDOR_VERSION)
# Dynamic partitions
PRODUCT_BUILD_SUPER_PARTITION := true
PRODUCT_USE_DYNAMIC_PARTITIONS := true
PRODUCT_USE_DYNAMIC_PARTITION_SIZE := true
-# HACK: Avoid usb crash
-PRODUCT_PRODUCT_PROPERTIES := \
- persist.adb.nonblocking_ffs=0 \
- ro.adb.nonblocking_ffs=0
-
-# Display
-PRODUCT_PACKAGES += \
- android.hardware.drm@1.3-service.clearkey \
- android.hardware.drm@1.3-service.widevine \
- libGLES_mesa \
- libEGL_mesa \
- libGLESv1_CM_mesa \
- libGLESv2_mesa \
- libgallium_dri \
- libglapi
-
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.hardware.gralloc=minigbm_msm \
- ro.hardware.hwcomposer=drm \
- ro.opengles.version=196608 \
- persist.demo.rotationlock=1
-
-# Vulkan
-PRODUCT_PACKAGES += \
- vulkan.freedreno
+# Enable Virtual A/B
+AB_OTA_UPDATER := true
+AB_OTA_PARTITIONS += \
+ product \
+ system \
+ system_ext \
+ vendor
PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
- frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
- frameworks/native/data/etc/android.software.vulkan.deqp.level-2021-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
-
-PRODUCT_VENDOR_PROPERTIES += \
- ro.hardware.vulkan=freedreno
-
-# Will need to enable this after ANDROID_external_memory_android_hardware_buffer lands in mesa
-#TARGET_USES_VULKAN = true
-
-#
-# Hardware Composer HAL
-#
-PRODUCT_PACKAGES += \
- hwcomposer.drm \
- android.hardware.graphics.composer@2.3-impl \
- android.hardware.graphics.composer@2.3-service
-
-#
-# Gralloc HAL
-#
-PRODUCT_PACKAGES += \
- gralloc.minigbm_msm \
- android.hardware.graphics.allocator@4.0-service.minigbm_msm \
- android.hardware.graphics.mapper@4.0-impl.minigbm_msm
-
-
-# Use Launcher3QuickStep
-PRODUCT_PACKAGES += Launcher3QuickStep
-
-# Enable WiFi
-PRODUCT_PACKAGES += \
- hostapd \
- libwpa_client \
- wpa_supplicant \
- wpa_supplicant.conf \
- wificond
-
-PRODUCT_PROPERTY_OVERRIDES += \
- wifi.interface=wlan0 \
- wifi.supplicant_scan_interval=15
-
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
- frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
- $(LOCAL_PATH)/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
- $(LOCAL_PATH)/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf
-
-# Enable BT
-PRODUCT_PACKAGES += \
- android.hardware.bluetooth@1.1-service.btlinux
-
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
- frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
-
-#
-# Power HAL
-#
-PRODUCT_PACKAGES += \
- android.hardware.power-service.example
-
-#
-# PowerStats HAL
-#
-PRODUCT_PACKAGES += \
- android.hardware.power.stats-service.example
-
-
-# Audio
-PRODUCT_PACKAGES += \
- android.hardware.audio.service \
- android.hardware.audio@7.0-impl \
- android.hardware.audio.effect@7.0-impl \
- android.hardware.soundtrigger@2.3-impl \
- android.hardware.bluetooth.audio@2.0-impl
-
-# Build default bluetooth a2dp and usb audio HALs
-PRODUCT_PACKAGES += \
- audio.a2dp.default \
- audio.bluetooth.default \
- audio.usb.default \
- audio.r_submix.default
-
-# Build tinyalsa cli tools for debugging
-PRODUCT_PACKAGES += \
- tinyplay \
- tinycap \
- tinymix \
- tinypcminfo
-
-# audio policy configuration
-USE_XML_AUDIO_POLICY_CONF := 1
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/etc/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
- $(LOCAL_PATH)/etc/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
- $(LOCAL_PATH)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \
- frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
- frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
- frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \
- frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
- frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
- frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
- frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
- frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml
-
-# Copy media codecs config file
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/etc/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
- frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
- frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml
-
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/seccomp_policy/mediaswcodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
- $(LOCAL_PATH)/seccomp_policy/mediaswcodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaswcodec.policy
-
-# Copy hardware config file(s)
-PRODUCT_COPY_FILES += \
- device/linaro/dragonboard/etc/permissions/android.software.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.xml
-
-
-# External Web Cam support
-PRODUCT_PACKAGES += \
- android.hardware.camera.provider@2.4-impl \
- android.hardware.camera.provider@2.4-external-service
-
-PRODUCT_COPY_FILES += \
- frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
- $(LOCAL_PATH)/etc/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
- $(LOCAL_PATH)/etc/external_camera_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/external_camera_config.xml
-
-# Keymaster
-PRODUCT_PACKAGES += \
- android.hardware.keymaster@3.0-impl \
- android.hardware.keymaster@3.0-service
-
-# Gatekeeper
-PRODUCT_PACKAGES += \
- android.hardware.gatekeeper@1.0-service.software
-
-# Health
-PRODUCT_PACKAGES += \
- android.hardware.health@2.1-impl-cuttlefish \
- android.hardware.health@2.1-service
-
-# TODO: disable this service once we implement system suspend
-PRODUCT_PACKAGES += \
- suspend_blocker
-
-# mkbootimg host tool to build boot.img separately
-PRODUCT_HOST_PACKAGES := \
- mkbootimg
-
-# Userspace vendor services for WiFi/Audio to work
-PRODUCT_PACKAGES += \
- pd-mapper \
- qrtr-ns \
- qrtr-cfg \
- qrtr-lookup \
- rmtfs \
- tqftpserv
-
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/qcom/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.qcom.rc
-
-# Copy standard platform config files
-PRODUCT_COPY_FILES += \
- $(LOCAL_PATH)/ueventd.common.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
- frameworks/native/data/etc/android.software.cts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.cts.xml \
- frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
- frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml \
- frameworks/native/data/etc/android.software.voice_recognizers.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.voice_recognizers.xml \
- frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
- frameworks/native/data/etc/android.software.print.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.print.xml \
- frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
- frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
- frameworks/native/data/etc/android.software.opengles.deqp.level-2020-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml \
- frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml
-
-PRODUCT_SOONG_NAMESPACES += \
- device/linaro/dragonboard \
- external/mesa3d \
- vendor/linaro/linux-firmware/$(EXPECTED_LINARO_VENDOR_VERSION) \
- vendor/linaro/db845c/$(EXPECTED_LINARO_VENDOR_VERSION) \
- vendor/linaro/rb5/$(EXPECTED_LINARO_VENDOR_VERSION)
-
+ $(TARGET_KERNEL_DIR)/Image.gz:kernel \
+ device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_RAMDISK)/first_stage_ramdisk/fstab.$(TARGET_HARDWARE) \
+ device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.$(TARGET_HARDWARE) \
+ device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(TARGET_HARDWARE).rc \
+ device/linaro/dragonboard/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.$(TARGET_HARDWARE).usb.rc \
+ device/linaro/dragonboard/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/$(TARGET_HARDWARE).kl
diff --git a/full.mk b/full.mk
new file mode 100644
index 0000000..96c3f9f
--- /dev/null
+++ b/full.mk
@@ -0,0 +1,254 @@
+#
+# Copyright (C) 2014 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 updating of APEXes
+$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
+
+# Device overlay
+DEVICE_PACKAGE_OVERLAYS := $(LOCAL_PATH)/overlay
+
+# Build and run only ART
+PRODUCT_RUNTIMES := runtime_libart_default
+
+PRODUCT_OTA_ENFORCE_VINTF_KERNEL_REQUIREMENTS := false
+
+# Enable Scoped Storage related
+$(call inherit-product, $(SRC_TARGET_DIR)/product/emulated_storage.mk)
+
+# vndk
+PRODUCT_PACKAGES := vndk-sp
+
+# HACK: Avoid usb crash
+PRODUCT_PRODUCT_PROPERTIES := \
+ persist.adb.nonblocking_ffs=0 \
+ ro.adb.nonblocking_ffs=0
+
+# Display
+PRODUCT_PACKAGES += \
+ android.hardware.drm@1.3-service.clearkey \
+ android.hardware.drm@1.3-service.widevine
+
+# Mesa
+PRODUCT_PACKAGES += \
+ libGLES_mesa \
+ libEGL_mesa \
+ libGLESv1_CM_mesa \
+ libGLESv2_mesa \
+ libgallium_dri \
+ libglapi
+
+TARGET_BUILD_MESA ?= false
+ifeq ($(TARGET_BUILD_MESA), true)
+ PRODUCT_SOONG_NAMESPACES += \
+ external/mesa3d
+endif
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ ro.hardware.gralloc=minigbm_msm \
+ ro.hardware.hwcomposer=drm \
+ ro.opengles.version=196608 \
+ persist.demo.rotationlock=1
+
+# Vulkan
+PRODUCT_PACKAGES += \
+ vulkan.freedreno
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.vulkan.level-1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.level.xml \
+ frameworks/native/data/etc/android.hardware.vulkan.version-1_1.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.vulkan.version.xml \
+ frameworks/native/data/etc/android.software.vulkan.deqp.level-2021-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.vulkan.deqp.level.xml \
+
+PRODUCT_VENDOR_PROPERTIES += \
+ ro.hardware.vulkan=freedreno
+
+# Will need to enable this after ANDROID_external_memory_android_hardware_buffer lands in mesa
+#TARGET_USES_VULKAN = true
+
+#
+# Hardware Composer HAL
+#
+PRODUCT_PACKAGES += \
+ hwcomposer.drm \
+ android.hardware.graphics.composer@2.3-impl \
+ android.hardware.graphics.composer@2.3-service
+
+#
+# Gralloc HAL
+#
+PRODUCT_PACKAGES += \
+ gralloc.minigbm_msm \
+ android.hardware.graphics.allocator@4.0-service.minigbm_msm \
+ android.hardware.graphics.mapper@4.0-impl.minigbm_msm
+
+
+# Use Launcher3QuickStep
+PRODUCT_PACKAGES += Launcher3QuickStep
+
+# Enable WiFi
+PRODUCT_PACKAGES += \
+ hostapd \
+ libwpa_client \
+ wpa_supplicant \
+ wpa_supplicant.conf \
+ wificond
+
+PRODUCT_PROPERTY_OVERRIDES += \
+ wifi.interface=wlan0 \
+ wifi.supplicant_scan_interval=15
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.wifi.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.xml \
+ frameworks/native/data/etc/android.hardware.wifi.direct.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.wifi.direct.xml \
+ $(LOCAL_PATH)/wpa_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/wpa_supplicant_overlay.conf \
+ $(LOCAL_PATH)/p2p_supplicant_overlay.conf:$(TARGET_COPY_OUT_VENDOR)/etc/wifi/p2p_supplicant_overlay.conf
+
+# Enable BT
+PRODUCT_PACKAGES += \
+ android.hardware.bluetooth@1.1-service.btlinux
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.bluetooth.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth.xml \
+ frameworks/native/data/etc/android.hardware.bluetooth_le.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.bluetooth_le.xml
+
+#
+# Power HAL
+#
+PRODUCT_PACKAGES += \
+ android.hardware.power-service.example
+
+#
+# PowerStats HAL
+#
+PRODUCT_PACKAGES += \
+ android.hardware.power.stats-service.example
+
+
+# Audio
+PRODUCT_PACKAGES += \
+ android.hardware.audio.service \
+ android.hardware.audio@7.0-impl \
+ android.hardware.audio.effect@7.0-impl \
+ android.hardware.soundtrigger@2.3-impl \
+ android.hardware.bluetooth.audio@2.0-impl
+
+# Build default bluetooth a2dp and usb audio HALs
+PRODUCT_PACKAGES += \
+ audio.a2dp.default \
+ audio.bluetooth.default \
+ audio.usb.default \
+ audio.r_submix.default
+
+# Build tinyalsa cli tools for debugging
+PRODUCT_PACKAGES += \
+ tinyplay \
+ tinycap \
+ tinymix \
+ tinypcminfo
+
+# audio policy configuration
+USE_XML_AUDIO_POLICY_CONF := 1
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/etc/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
+ $(LOCAL_PATH)/etc/audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration.xml \
+ $(LOCAL_PATH)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_configuration_bluetooth_legacy_hal.xml \
+ frameworks/av/services/audiopolicy/config/a2dp_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/a2dp_in_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/a2dp_in_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/primary_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/primary_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/bluetooth_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/bluetooth_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/r_submix_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/r_submix_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/usb_audio_policy_configuration.xml:$(TARGET_COPY_OUT_VENDOR)/etc/usb_audio_policy_configuration.xml \
+ frameworks/av/services/audiopolicy/config/default_volume_tables.xml:$(TARGET_COPY_OUT_VENDOR)/etc/default_volume_tables.xml \
+ frameworks/av/services/audiopolicy/config/audio_policy_volumes.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_policy_volumes.xml
+
+# Copy media codecs config file
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/etc/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
+ frameworks/av/media/libeffects/data/audio_effects.xml:$(TARGET_COPY_OUT_VENDOR)/etc/audio_effects.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
+ frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/seccomp_policy/mediaswcodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy \
+ $(LOCAL_PATH)/seccomp_policy/mediaswcodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediaswcodec.policy
+
+# Copy hardware config file(s)
+PRODUCT_COPY_FILES += \
+ device/linaro/dragonboard/etc/permissions/android.software.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.xml
+
+
+# External Web Cam support
+PRODUCT_PACKAGES += \
+ android.hardware.camera.provider@2.4-impl \
+ android.hardware.camera.provider@2.4-external-service
+
+PRODUCT_COPY_FILES += \
+ frameworks/native/data/etc/android.hardware.camera.front.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.camera.front.xml \
+ $(LOCAL_PATH)/etc/media_profiles.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml \
+ $(LOCAL_PATH)/etc/external_camera_config.xml:$(TARGET_COPY_OUT_VENDOR)/etc/external_camera_config.xml
+
+# Keymaster
+PRODUCT_PACKAGES += \
+ android.hardware.keymaster@3.0-impl \
+ android.hardware.keymaster@3.0-service
+
+# Gatekeeper
+PRODUCT_PACKAGES += \
+ android.hardware.gatekeeper@1.0-service.software
+
+# Health
+PRODUCT_PACKAGES += \
+ android.hardware.health@2.1-impl-cuttlefish \
+ android.hardware.health@2.1-service
+
+# TODO: disable this service once we implement system suspend
+PRODUCT_PACKAGES += \
+ suspend_blocker
+
+# mkbootimg host tool to build boot.img separately
+PRODUCT_HOST_PACKAGES := \
+ mkbootimg
+
+# Userspace vendor services for WiFi/Audio to work
+PRODUCT_PACKAGES += \
+ pd-mapper \
+ qrtr-ns \
+ qrtr-cfg \
+ qrtr-lookup \
+ rmtfs \
+ tqftpserv
+
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/qcom/init.qcom.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.qcom.rc
+
+# Copy standard platform config files
+PRODUCT_COPY_FILES += \
+ $(LOCAL_PATH)/ueventd.common.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
+ frameworks/native/data/etc/android.software.cts.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.cts.xml \
+ frameworks/native/data/etc/android.software.app_widgets.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.app_widgets.xml \
+ frameworks/native/data/etc/android.software.backup.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.backup.xml \
+ frameworks/native/data/etc/android.software.voice_recognizers.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.voice_recognizers.xml \
+ frameworks/native/data/etc/android.hardware.ethernet.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.ethernet.xml \
+ frameworks/native/data/etc/android.software.print.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.print.xml \
+ frameworks/native/data/etc/android.hardware.usb.accessory.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.accessory.xml \
+ frameworks/native/data/etc/android.hardware.usb.host.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.hardware.usb.host.xml \
+ frameworks/native/data/etc/android.software.opengles.deqp.level-2020-03-01.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.opengles.deqp.level.xml \
+ frameworks/native/data/etc/android.software.device_admin.xml:$(TARGET_COPY_OUT_VENDOR)/etc/permissions/android.software.device_admin.xml
+
+DEVICE_MANIFEST_FILE := device/linaro/dragonboard/manifest.xml
+DEVICE_MATRIX_FILE := device/linaro/dragonboard/compatibility_matrix.xml
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
diff --git a/mini-manifest.xml b/mini-manifest.xml
new file mode 100644
index 0000000..6d93a06
--- /dev/null
+++ b/mini-manifest.xml
@@ -0,0 +1,2 @@
+<manifest version="1.0" type="device" target-level="4">
+</manifest>
diff --git a/mini.mk b/mini.mk
new file mode 100644
index 0000000..eb2d366
--- /dev/null
+++ b/mini.mk
@@ -0,0 +1,44 @@
+#
+# 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.
+#
+
+$(call inherit-product, $(SRC_TARGET_DIR)/product/core_no_zygote.mk)
+$(call inherit-product, device/generic/goldfish/minimal_system.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/runtime_libart.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/updatable_apex.mk)
+
+PRODUCT_PACKAGES += \
+ android.hardware.keymaster@4.1-service \
+ android.hidl.allocator@1.0-service \
+ android.system.suspend@1.0-service \
+ com.android.i18n \
+ com.android.runtime \
+ keystore2 \
+ init_vendor \
+ libstatshidl \
+ mediaserver \
+ selinux_policy_nonsystem \
+ system_compatibility_matrix.xml \
+ system_manifest.xml \
+ tune2fs \
+ vdc \
+ vendor_compatibility_matrix.xml \
+ vendor_manifest.xml \
+
+# Disable vintf manifest checking. The mini targets do not have the usual
+# set of hardware interfaces, some of which are required by the vintf
+# compatibility matrix.
+PRODUCT_ENFORCE_VINTF_MANIFEST_OVERRIDE := false
+DEVICE_MANIFEST_FILE := device/linaro/dragonboard/mini-manifest.xml
diff --git a/pixel3_mainline.mk b/pixel3_mainline.mk
deleted file mode 100644
index 1b205c2..0000000
--- a/pixel3_mainline.mk
+++ /dev/null
@@ -1,27 +0,0 @@
-PIXEL3_KERNEL_DIR := device/linaro/dragonboard-kernel/pixel3_mainline/
-
-# Inherit the full_base and device configurations
-$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
-$(call inherit-product, device/linaro/dragonboard/pixel3_mainline/device.mk)
-$(call inherit-product, device/linaro/dragonboard/device-common.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
-
-# Product overrides
-PRODUCT_NAME := pixel3_mainline
-PRODUCT_DEVICE := pixel3_mainline
-PRODUCT_BRAND := Android
-
-ifndef PIXEL3_USES_GKI
-PIXEL3_USES_GKI := true
-endif
-
-ifeq ($(PIXEL3_USES_GKI), true)
-PIXEL3_MODS := $(wildcard $(PIXEL3_KERNEL_DIR)/*.ko)
-ifneq ($(PIXEL3_MODS),)
- BOARD_VENDOR_KERNEL_MODULES += $(PIXEL3_MODS)
- P3_ONLY_VENDOR := %/msm.ko %/dwc3.ko %/dwc3-qcom.ko %/hci_uart.ko %/btqca.ko %/incrementalfs.ko
- P3_ONLY_VENDOR += %/ath10k_core.ko %/ath10k_pci.ko %/ath10k_snoc.ko %/ath.ko
-
- BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(filter-out $(P3_ONLY_VENDOR),$(PIXEL3_MODS))
-endif
-endif
diff --git a/pixel3_mainline/BoardConfig.mk b/pixel3_mainline/BoardConfig.mk
deleted file mode 100644
index 1ee5544..0000000
--- a/pixel3_mainline/BoardConfig.mk
+++ /dev/null
@@ -1,23 +0,0 @@
-include device/linaro/dragonboard/BoardConfigCommon.mk
-
-# Board Information
-TARGET_BOOTLOADER_BOARD_NAME := pixel3_mainline
-TARGET_BOARD_PLATFORM := pixel3_mainline
-
-ifeq ($(PIXEL3_KERNEL_FOUND), true)
- # Bootloader/Kernel Configuration
- TARGET_NO_KERNEL := false
- BOARD_KERNEL_BAS := 0x00000000
- BOARD_KERNEL_PAGESIZE := 4096
- BOARD_KERNEL_TAGS_OFFSET := 0x01E00000
- BOARD_RAMDISK_OFFSET := 0x02000000
-endif
-
-# Image Configuration
-BOARD_BOOTIMAGE_PARTITION_SIZE := 0x04000000
-BOARD_USERDATAIMAGE_PARTITION_SIZE := 10737418240
-BOARD_FLASH_BLOCK_SIZE := 131072
-# Super partition
-BOARD_SUPER_PARTITION_SIZE := 2952790016
-BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 2948595712 # Reserve 4M for DAP metadata
-BOARD_SUPER_PARTITION_METADATA_DEVICE := system_b
diff --git a/pixel3_mainline/device.mk b/pixel3_mainline/device.mk
deleted file mode 100644
index f1af165..0000000
--- a/pixel3_mainline/device.mk
+++ /dev/null
@@ -1,42 +0,0 @@
-#
-# Copyright (C) 2011 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.
-#
-
-# copied from crosshatch
-# setup dalvik vm configs
-$(call inherit-product, frameworks/native/build/phone-xhdpi-2048-dalvik-heap.mk)
-
-PRODUCT_COPY_FILES := \
- device/linaro/dragonboard/pixel3_mainline/fstab.pixel3_mainline:$(TARGET_COPY_OUT_RAMDISK)/fstab.pixel3_mainline \
- device/linaro/dragonboard/pixel3_mainline/fstab.pixel3_mainline:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.pixel3_mainline \
- device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.pixel3_mainline.rc \
- device/linaro/dragonboard/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.pixel3_mainline.usb.rc \
- device/linaro/dragonboard/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/pixel3_mainline.kl
-
-ifneq (,$(wildcard $(PIXEL3_KERNEL_DIR)/Image.gz-dtb))
- PRODUCT_COPY_FILES += $(PIXEL3_KERNEL_DIR)/Image.gz-dtb:kernel
- PIXEL3_KERNEL_FOUND := true
-else
- PIXEL3_KERNEL_FOUND := false
-endif
-
-# Build generic Audio HAL
-PRODUCT_PACKAGES := audio.primary.pixel3_mainline
-
-PRODUCT_PROPERTY_OVERRIDES += \
- ro.sf.lcd_density=443
-
-# Copy firmware files
-$(call inherit-product-if-exists, $(LOCAL_PATH)/firmware/device.mk)
diff --git a/pixel3_mainline/fstab.pixel3_mainline b/pixel3_mainline/fstab.pixel3_mainline
deleted file mode 100644
index 5d82515..0000000
--- a/pixel3_mainline/fstab.pixel3_mainline
+++ /dev/null
@@ -1,8 +0,0 @@
-system /system ext4 noatime,ro,errors=panic wait,logical,first_stage_mount
-/dev/block/platform/soc@0/1d84000.ufshc/by-name/userdata /data ext4 discard,noatime,noauto_da_alloc,data=ordered,user_xattr,barrier=1,inlinecrypt wait,formattable,fileencryption=aes-256-xts:aes-256-cts:v2+inlinecrypt_optimized,quota
-/dev/block/platform/soc@0/1d84000.ufshc/by-name/metadata /metadata ext4 noatime,nosuid,nodev,discard wait,formattable
-#/dev/block/platform/soc@0/1d84000.ufshc/by-name/misc /misc emmc defaults defaults
-/devices/platform/soc@0/8804000.sdhci/mmc_host/mmc* auto auto defaults voldmanaged=sdcard1:auto
-vendor /vendor ext4 noatime,ro,errors=panic wait,logical,first_stage_mount
-system_ext /system_ext ext4 noatime,ro,errors=panic wait,logical,first_stage_mount
-product /product ext4 noatime,ro,errors=panic wait,logical,first_stage_mount
diff --git a/rb5.mk b/rb5.mk
index 2cda9b0..8d4f174 100644
--- a/rb5.mk
+++ b/rb5.mk
@@ -1,27 +1,7 @@
-ifndef TARGET_KERNEL_USE
-TARGET_KERNEL_USE := 5.15
-endif
-RB5_KERNEL_DIR := device/linaro/dragonboard-kernel/android-$(TARGET_KERNEL_USE)
-
-# Inherit the full_base and device configurations
-$(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk)
+$(call inherit-product, device/linaro/dragonboard/full.mk)
$(call inherit-product, device/linaro/dragonboard/rb5/device.mk)
-$(call inherit-product, device/linaro/dragonboard/device-common.mk)
-$(call inherit-product, $(SRC_TARGET_DIR)/product/full_base.mk)
# Product overrides
PRODUCT_NAME := rb5
PRODUCT_DEVICE := rb5
PRODUCT_BRAND := Android
-
-ifndef RB5_USES_GKI
- RB5_USES_GKI := true
-endif
-
-ifeq ($(RB5_USES_GKI), true)
- RB5_MODS := $(wildcard $(RB5_KERNEL_DIR)/*.ko)
- ifneq ($(RB5_MODS),)
- RB5_SKIP_MODS := %/venus-core.ko %/venus-dec.ko %/venus-enc.ko
- BOARD_VENDOR_RAMDISK_KERNEL_MODULES := $(filter-out $(RB5_SKIP_MODS),$(RB5_MODS))
- endif
-endif
diff --git a/rb5/BoardConfig.mk b/rb5/BoardConfig.mk
index 272f697..53b21f0 100644
--- a/rb5/BoardConfig.mk
+++ b/rb5/BoardConfig.mk
@@ -1,5 +1,18 @@
include device/linaro/dragonboard/BoardConfigCommon.mk
+# Primary Arch
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-2a
+TARGET_CPU_VARIANT := kryo385
+TARGET_CPU_ABI := arm64-v8a
+
+# Secondary Arch
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv8-2a
+TARGET_2ND_CPU_VARIANT := kryo385
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+
# Board Information
TARGET_BOOTLOADER_BOARD_NAME := rb5
TARGET_BOARD_PLATFORM := rb5
@@ -16,6 +29,7 @@
BOARD_KERNEL_CMDLINE += init=/init androidboot.boot_devices=soc@0/1d84000.ufshc printk.devkmsg=on
BOARD_KERNEL_CMDLINE += pcie_pme=nomsi #For WiFi to work
BOARD_KERNEL_CMDLINE += deferred_probe_timeout=30
+BOARD_KERNEL_CMDLINE += qcom_geni_serial.con_enabled=1
# Image Configuration
BOARD_BOOTIMAGE_PARTITION_SIZE := 103079215104 #96M
diff --git a/rb5/device.mk b/rb5/device.mk
index 55388d9..8fc29a5 100644
--- a/rb5/device.mk
+++ b/rb5/device.mk
@@ -19,25 +19,10 @@
include $(LOCAL_PATH)/../vendor-package-ver.mk
-# Enable Virtual A/B
-AB_OTA_UPDATER := true
-AB_OTA_PARTITIONS += \
- product \
- system \
- system_ext \
- vendor
-
$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota/launch_with_vendor_ramdisk.mk)
PRODUCT_COPY_FILES := \
- $(RB5_KERNEL_DIR)/Image.gz:kernel \
- $(RB5_KERNEL_DIR)/qrb5165-rb5.dtb:dtb.img \
$(LOCAL_PATH)/mixer_paths.xml:$(TARGET_COPY_OUT_VENDOR)/etc/mixer_paths.xml \
- device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_RAMDISK)/fstab.rb5 \
- device/linaro/dragonboard/fstab.common:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.rb5 \
- device/linaro/dragonboard/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.rb5.rc \
- device/linaro/dragonboard/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.rb5.usb.rc \
- device/linaro/dragonboard/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/rb5.kl
# Build generic Audio HAL
PRODUCT_PACKAGES := audio.primary.rb5
@@ -48,6 +33,10 @@
android.hardware.boot@1.2-impl.recovery \
android.hardware.boot@1.2-service
+# Install scripts to set vendor.* properties
+PRODUCT_COPY_FILES += \
+ device/linaro/dragonboard/qcom/set_hw.sh:$(TARGET_COPY_OUT_VENDOR)/bin/set_hw.sh
+
PRODUCT_VENDOR_PROPERTIES += ro.soc.manufacturer=Qualcomm
PRODUCT_VENDOR_PROPERTIES += ro.soc.model=QRB5165
@@ -55,3 +44,11 @@
# Copy firmware files
$(call inherit-product-if-exists, vendor/linaro/rb5/$(EXPECTED_LINARO_VENDOR_VERSION)/device.mk)
+
+TARGET_DTB := qrb5165-rb5.dtb
+TARGET_HARDWARE := rb5
+TARGET_KERNEL_USE ?= 5.15
+
+include device/linaro/dragonboard/device-common.mk
+
+PRODUCT_COPY_FILES += $(TARGET_KERNEL_DIR)/qrb5165-rb5.dtb:dtb.img
diff --git a/rb5_mini.mk b/rb5_mini.mk
new file mode 100644
index 0000000..302e217
--- /dev/null
+++ b/rb5_mini.mk
@@ -0,0 +1,7 @@
+$(call inherit-product, device/linaro/dragonboard/mini.mk)
+$(call inherit-product, device/linaro/dragonboard/rb5/device.mk)
+
+# Product overrides
+PRODUCT_NAME := rb5_mini
+PRODUCT_DEVICE := rb5
+PRODUCT_BRAND := Android
diff --git a/sepolicy/genfs_contexts b/sepolicy/genfs_contexts
index e8ddb12..2a50d9c 100644
--- a/sepolicy/genfs_contexts
+++ b/sepolicy/genfs_contexts
@@ -1,4 +1,5 @@
genfscon sysfs /devices/platform/88f00000.memory/rmtfs u:object_r:sysfs_rmtfs:s0
+genfscon sysfs /devices/platform/88f00000.rmtfs/rmtfs u:object_r:sysfs_rmtfs:s0
genfscon sysfs /devices/platform/remoteproc-adsp/remoteproc u:object_r:sysfs_remoteproc:s0
genfscon sysfs /devices/platform/remoteproc-cdsp/remoteproc u:object_r:sysfs_remoteproc:s0
genfscon sysfs /devices/platform/soc@0/4080000.remoteproc u:object_r:sysfs_remoteproc:s0
diff --git a/sepolicy/kernel.te b/sepolicy/kernel.te
index 3fad122..176d6f6 100644
--- a/sepolicy/kernel.te
+++ b/sepolicy/kernel.te
@@ -2,6 +2,10 @@
allow kernel device:chr_file { create setattr };
allow kernel device:dir { add_name create write };
allow kernel self:capability mknod;
-allow kernel vendor_file:file { open read };
+allow kernel vendor_file:file { open read getattr};
+allow kernel vendor_file:dir read;
allow kernel self:system module_request;
allow vendor_init kernel:system module_request;
+allow kernel sepolicy_file:file getattr;
+allow kernel system_bootstrap_lib_file:dir getattr;
+allow kernel system_bootstrap_lib_file:file getattr;
diff --git a/sepolicy/surfaceflinger.te b/sepolicy/surfaceflinger.te
index 17b66a8..9bffa3f 100644
--- a/sepolicy/surfaceflinger.te
+++ b/sepolicy/surfaceflinger.te
@@ -1 +1,2 @@
gpu_access(surfaceflinger)
+allow surfaceflinger vendor_file:dir read;
diff --git a/sepolicy/system_server.te b/sepolicy/system_server.te
index 80957cc..e801436 100644
--- a/sepolicy/system_server.te
+++ b/sepolicy/system_server.te
@@ -1 +1,3 @@
gpu_access(system_server)
+allow system_server wifi_hal_prop:file {open read getattr map};
+allow system_server vendor_file:dir read;
diff --git a/sm8450/BoardConfig.mk b/sm8450/BoardConfig.mk
new file mode 100644
index 0000000..de61cea
--- /dev/null
+++ b/sm8450/BoardConfig.mk
@@ -0,0 +1,58 @@
+#
+# 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.
+#
+
+include device/linaro/dragonboard/BoardConfigCommon.mk
+
+# Primary Arch
+TARGET_ARCH := arm64
+TARGET_ARCH_VARIANT := armv8-a-branchprot
+TARGET_CPU_VARIANT := kryo385
+TARGET_CPU_ABI := arm64-v8a
+
+# Secondary Arch
+TARGET_2ND_ARCH := arm
+TARGET_2ND_ARCH_VARIANT := armv8-2a
+TARGET_2ND_CPU_VARIANT := kryo385
+TARGET_2ND_CPU_ABI := armeabi-v7a
+TARGET_2ND_CPU_ABI2 := armeabi
+
+# Board Information
+TARGET_BOOTLOADER_BOARD_NAME := sm8450
+TARGET_BOARD_PLATFORM := sm8450
+
+TARGET_NO_KERNEL := false
+BOARD_KERNEL_BASE := 0x80000000
+BOARD_KERNEL_PAGESIZE := 4096
+
+BOARD_INCLUDE_DTB_IN_BOOTIMG := true
+BOARD_BOOT_HEADER_VERSION := 2
+BOARD_MKBOOTIMG_ARGS := --header_version $(BOARD_BOOT_HEADER_VERSION)
+
+BOARD_KERNEL_CMDLINE := earlycon firmware_class.path=/vendor/firmware/ androidboot.hardware=sm8450
+BOARD_KERNEL_CMDLINE += init=/init androidboot.boot_devices=soc@0/1d84000.ufshc printk.devkmsg=on
+BOARD_KERNEL_CMDLINE += allow_mismatched_32bit_el0
+
+# Image Configuration
+BOARD_BOOTIMAGE_PARTITION_SIZE := 67108864 #64M
+BOARD_VENDOR_BOOTIMAGE_PARTITION_SIZE := 67108864 #64M
+BOARD_USERDATAIMAGE_PARTITION_SIZE := 21474836480
+BOARD_FLASH_BLOCK_SIZE := 131072
+
+# Super/Dynamic partition
+BOARD_SUPER_PARTITION_SIZE := 6442450944
+BOARD_DB_DYNAMIC_PARTITIONS_SIZE := 6438256640 # Reserve 4M for DAP metadata
+BOARD_SUPER_PARTITION_METADATA_DEVICE := super
+BOARD_SUPER_IMAGE_IN_UPDATE_PACKAGE := true
diff --git a/sm8450/device.mk b/sm8450/device.mk
new file mode 100644
index 0000000..90b5c12
--- /dev/null
+++ b/sm8450/device.mk
@@ -0,0 +1,26 @@
+#
+# 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.
+#
+
+# setup dalvik vm configs
+$(call inherit-product, frameworks/native/build/tablet-10in-xhdpi-2048-dalvik-heap.mk)
+$(call inherit-product, $(SRC_TARGET_DIR)/product/virtual_ab_ota.mk)
+
+TARGET_HARDWARE := sm8450
+TARGET_KERNEL_USE ?= mainline
+
+include device/linaro/dragonboard/device-common.mk
+
+PRODUCT_COPY_FILES += $(TARGET_KERNEL_DIR)/sm8450-qrd.dtb:dtb.img
diff --git a/sm8450_mini.mk b/sm8450_mini.mk
new file mode 100644
index 0000000..c286d32
--- /dev/null
+++ b/sm8450_mini.mk
@@ -0,0 +1,7 @@
+$(call inherit-product, device/linaro/dragonboard/mini.mk)
+$(call inherit-product, device/linaro/dragonboard/sm8450/device.mk)
+
+# Product overrides
+PRODUCT_NAME := sm8450_mini
+PRODUCT_DEVICE := sm8450
+PRODUCT_BRAND := Android
diff --git a/vendor-package-ver.sh b/vendor-package-ver.sh
index 12f4a6f..6179fc9 100755
--- a/vendor-package-ver.sh
+++ b/vendor-package-ver.sh
@@ -1,8 +1,9 @@
#!/bin/bash
-export EXPECTED_LINARO_VENDOR_VERSION=20220210
-export EXPECTED_LINARO_VENDOR_SHA=75efc8471f299f64716140712c0785b8e8aeaf5aa7e389a6f12f78ad4962420740da32f4535d795006e78c5f0b77a1cee8c168192a87f668103c00d87d480e6d
-export VND_PKG_URL=https://releases.linaro.org/android/aosp-linaro-vendor-package/extract-linaro_devices-20220210.tgz
+export EXPECTED_LINARO_VENDOR_VERSION=20220303
+#make sure to use sha512sum here
+export EXPECTED_LINARO_VENDOR_SHA=1119c59e80094fc11624b19531f584e798fd048f0adfdbb5113d2539202898c7d2b13dc1d2ad679c555f1c79a64d3ffc1b45cdf414787e5a821499276ca0b36c
+export VND_PKG_URL=https://releases.linaro.org/android/aosp-linaro-vendor-package/extract-linaro_devices-20220303.tgz
if [ "$1" = "url" ]; then
echo $VND_PKG_URL