Support vendor boot
Rev'd boot image header to version 3.
Added in dummy dtb to fulfill recovery image deps requirement
Bug: 138199351
Bug: 140529116
Test: Treehugger
Change-Id: Ibfe5cd3a76b500da1b5bee47fc9e60a60826d73e
diff --git a/dtb.img b/dtb.img
new file mode 100644
index 0000000..9d6cec7
--- /dev/null
+++ b/dtb.img
@@ -0,0 +1 @@
+workaround
diff --git a/shared/BoardConfig.mk b/shared/BoardConfig.mk
index 8569141..9aa7253 100644
--- a/shared/BoardConfig.mk
+++ b/shared/BoardConfig.mk
@@ -151,3 +151,11 @@
# To see full logs from init, disable ratelimiting.
# The default is 5 messages per second amortized, with a burst of up to 10.
BOARD_KERNEL_CMDLINE += printk.devkmsg=on
+
+BOARD_INCLUDE_DTB_IN_BOOTIMG := true
+BOARD_BOOT_HEADER_VERSION := 3
+BOARD_USES_RECOVERY_AS_BOOT := true
+BOARD_MKBOOTIMG_ARGS += --header_version $(BOARD_BOOT_HEADER_VERSION)
+BOARD_PREBUILT_DTBIMAGE_DIR += device/google/cuttlefish
+PRODUCT_COPY_FILES += device/google/cuttlefish/dtb.img:dtb.img
+BOARD_BUILD_SYSTEM_ROOT_IMAGE := false
diff --git a/shared/device.mk b/shared/device.mk
index 5a84cd1..fdd14b2 100644
--- a/shared/device.mk
+++ b/shared/device.mk
@@ -162,8 +162,12 @@
device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_ivsh \
device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_RAMDISK)/fstab.cutf_cvm \
device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.cutf_cvm \
+ device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.cutf_ivsh \
+ device/google/cuttlefish/shared/config/fstab:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.cutf_cvm \
device/google/cuttlefish/shared/config/fstab.composite:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.composite.cutf_ivsh \
device/google/cuttlefish/shared/config/fstab.composite:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.composite.cutf_cvm \
+ device/google/cuttlefish/shared/config/fstab.composite:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.composite.cutf_ivsh \
+ device/google/cuttlefish/shared/config/fstab.composite:$(TARGET_COPY_OUT_RECOVERY)/root/first_stage_ramdisk/fstab.composite.cutf_cvm \
#
# USB Specific