Enable FULL_TREBLE on hikey/hikey960

This is basically the current state of the rest of the
FULL_TREBLE enablement bits for both hikey/hikey960

This patch also requires kernels that are rebuilt to include the
DTS fstab changes seen here:
https://git.linaro.org/people/john.stultz/android-dev.git/log/?h=dev/treble

Credit for this patch goes to Vishal Bhoj <vishal.bhoj@linaro.org>
who basically was the original author and magician
who got things working.

I've only refactored and split up his changes to help
with the submissions.

Change-Id: Iab0f5fc93bdfd1b86c98aa1d54974fde33514063
Signed-off-by: John Stultz <john.stultz@linaro.org>
diff --git a/hikey/BoardConfig.mk b/hikey/BoardConfig.mk
index f984c26..c76ad35 100644
--- a/hikey/BoardConfig.mk
+++ b/hikey/BoardConfig.mk
@@ -12,6 +12,9 @@
 BOARD_KERNEL_CMDLINE := console=ttyFIQ0 androidboot.console=ttyFIQ0 androidboot.hardware=hikey firmware_class.path=/vendor/firmware efi=noruntime
 endif
 
+#Enable dtb fstab for treble
+BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_enable_android_fstab
+
 ifneq ($(TARGET_SENSOR_MEZZANINE),)
 BOARD_KERNEL_CMDLINE += overlay_mgr.overlay_dt_entry=hardware_cfg_$(TARGET_SENSOR_MEZZANINE)
 endif
diff --git a/hikey/device-hikey.mk b/hikey/device-hikey.mk
index 4063c81..5e15cd5 100644
--- a/hikey/device-hikey.mk
+++ b/hikey/device-hikey.mk
@@ -16,12 +16,12 @@
 
 PRODUCT_COPY_FILES +=   $(TARGET_PREBUILT_KERNEL):kernel \
                         $(TARGET_PREBUILT_DTB):hi6220-hikey.dtb \
-			$(LOCAL_PATH)/$(TARGET_FSTAB):root/fstab.hikey \
-			device/linaro/hikey/init.common.rc:root/init.hikey.rc \
-			device/linaro/hikey/init.hikey.power.rc:root/init.hikey.power.rc \
-			device/linaro/hikey/init.common.usb.rc:root/init.hikey.usb.rc \
-			device/linaro/hikey/ueventd.common.rc:root/ueventd.hikey.rc \
-			device/linaro/hikey/common.kl:system/usr/keylayout/hikey.kl
+			$(LOCAL_PATH)/$(TARGET_FSTAB):$(TARGET_COPY_OUT_VENDOR)/etc/init/fstab.hikey \
+			device/linaro/hikey/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.hikey.rc \
+			device/linaro/hikey/init.hikey.power.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.hikey.power.rc \
+			device/linaro/hikey/init.common.usb.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.hikey.usb.rc \
+			device/linaro/hikey/ueventd.common.rc:$(TARGET_COPY_OUT_VENDOR)/ueventd.rc \
+			device/linaro/hikey/common.kl:$(TARGET_COPY_OUT_VENDOR)/usr/keylayout/hikey.kl
 
 # Copy BT firmware
 PRODUCT_COPY_FILES += \
diff --git a/hikey/fstab.hikey b/hikey/fstab.hikey
index e70b2c6..a1ccdac 100644
--- a/hikey/fstab.hikey
+++ b/hikey/fstab.hikey
@@ -3,8 +3,6 @@
 # The filesystem that contains the filesystem checker binary (typically /system) cannot
 # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
 
-/dev/block/platform/soc/f723d000.dwmmc0/by-name/system      /system             ext4      ro                                                           wait,verify
-/dev/block/platform/soc/f723d000.dwmmc0/by-name/vendor      /vendor             ext4      ro                                                           wait,verify
 /dev/block/platform/soc/f723d000.dwmmc0/by-name/cache       /cache              ext4      discard,noatime,noauto_da_alloc,data=ordered,user_xattr,barrier=1    wait
 /dev/block/platform/soc/f723d000.dwmmc0/by-name/userdata    /data               f2fs      discard,noatime,nosuid,nodev                                 wait,check,fileencryption=software,quota
 /dev/block/platform/soc/f723d000.dwmmc0/by-name/userdata    /data               ext4      discard,noatime,noauto_da_alloc,data=ordered,user_xattr,barrier=1    wait,formattable
diff --git a/hikey/fstab.hikey-3.18 b/hikey/fstab.hikey-3.18
index 6e184c5..05f427f 100644
--- a/hikey/fstab.hikey-3.18
+++ b/hikey/fstab.hikey-3.18
@@ -3,9 +3,9 @@
 # The filesystem that contains the filesystem checker binary (typically /system) cannot
 # specify MF_CHECK, and must come before any filesystems that do specify MF_CHECK
 
-/dev/block/platform/f723d000.dwmmc0/by-name/system      /system             ext4      ro                                                           wait
-/dev/block/platform/f723d000.dwmmc0/by-name/system      /system             squashfs  ro                                                           wait
-/dev/block/platform/f723d000.dwmmc0/by-name/vendor      /vendor             ext4      ro                                                           wait
+#/dev/block/platform/f723d000.dwmmc0/by-name/system      /system             ext4      ro                                                           wait
+#/dev/block/platform/f723d000.dwmmc0/by-name/system      /system             squashfs  ro                                                           wait
+#/dev/block/platform/f723d000.dwmmc0/by-name/vendor      /vendor             ext4      ro                                                           wait
 /dev/block/platform/f723d000.dwmmc0/by-name/cache       /cache              ext4      discard,noatime,noauto_da_alloc,data=ordered,user_xattr,barrier=1    wait
 /dev/block/platform/f723d000.dwmmc0/by-name/userdata    /data               f2fs      discard,noatime,nosuid,nodev                                 wait,check,fileencryption=software,quota
 /dev/block/platform/f723d000.dwmmc0/by-name/userdata    /data               ext4      discard,noatime,noauto_da_alloc,data=ordered,user_xattr,barrier=1    wait,formattable