Factor out the full device configuration.

In an upcoming patch we are going to add "mini" device configurations
that avoid most of the usual driver dependencies. This requires
splitting out the device-specific configuration from the configuration
required for a full device image.

Bug: 217455793
Change-Id: Id17d162d142a2595e54e163f5faaf7dcf9b68e35
diff --git a/rb5/device.mk b/rb5/device.mk
index 55388d9..c5f6774 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
@@ -55,3 +40,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