Add support for dtb in boot.img

we use a modified mkbootimg which has support for device tree blob.
The patches for mkbootimg are not available hence we use a prebuilt
mkbootimg.

Signed-off-by: Vishal Bhoj <vishal.bhoj@linaro.org>
diff --git a/BoardConfig.mk b/BoardConfig.mk
index ab7143d..a1257cb 100644
--- a/BoardConfig.mk
+++ b/BoardConfig.mk
@@ -13,8 +13,13 @@
 TARGET_NO_RADIOIMAGE := true
 BOARD_USES_GENERIC_AUDIO := false
 BOARD_USES_ALSA_AUDIO := false
+PREBUILT_MKBOOTIMG := vendor/hisilicon/mkbootimg_hisilicon
 HARDWARE_OMX := false
 USE_CAMERA_STUB := false
+BOARD_KERNEL_BASE := 0x00000000
+TARGET_HAS_DEVICETREE := true
+TARGET_TAG_ADDRESS := 0x01100000
+BOARD_KERNEL_CMDLINE := mem=1024M console=ttyAMA0,115200 vmalloc=128M k3v2_pmem=0 mmcparts=mmcblk0:p1(xloader),p3(nvme),p4(misc),p5(splash),p6(oeminfo),p7(reserved1),p8(reserved2),p9(recovery2),p10(recovery),p11(boot),p12(modemimage),p13(modemnvm1),p14(modemnvm2),p15(system),p16(cache),p17(cust),p18(userdata);mmcblk1:p1(ext_sdcard) androidboot.hardware=hisiliconhi4511
 
 BOARD_HAVE_BLUETOOTH := false
 
@@ -30,11 +35,12 @@
 
 TARGET_CPU_SMP := true
 
-KERNEL_CONFIG := hs_defconfig
+KERNEL_CONFIG := hs_android_defconfig
 TARGET_KERNEL_SOURCE := kernel/linaro/hisilicon/
 BUILD_KERNEL_MODULES := false
-DEVICE_TREES := hi4511:board.dtb
+DEVICE_TREES := hi4511:hi4511.dtb
 INSTALLED_KERNEL_TARGET_NAME := kernel
+INSTALLED_DTB_TARGET_NAME := hi4511.dtb
 INSTALLED_RAMDISK_TARGET_NAME := ramdisk.img
 INCLUDE_PERF := 0
 
diff --git a/init.hisiliconhi4511.rc b/init.hisiliconhi4511.rc
index b2d3ab2..e81824c 100644
--- a/init.hisiliconhi4511.rc
+++ b/init.hisiliconhi4511.rc
@@ -1,10 +1,9 @@
-on fs
-    mount_all /fstab.hisiliconhi4511
 
 on init
     # See storage config details at http://source.android.com/tech/storage/
     mkdir /mnt/shell/emulated 0700 shell shell
     mkdir /storage/emulated 0555 root root
+    mkdir /storage/emulated/legacy 0555 root root
 
     export EXTERNAL_STORAGE /storage/emulated/legacy
     export EMULATED_STORAGE_SOURCE /mnt/shell/emulated
@@ -22,6 +21,10 @@
 on post-fs-data
     mkdir /data/media 0770 media_rw media_rw
 
+on fs
+	mkdir /factory 0775 radio radio
+	mount_all /fstab.hisiliconhi4511
+
 # virtual sdcard daemon running as media_rw (1023)
 service sdcard /system/bin/sdcard /data/media /mnt/shell/emulated 1023 1023
     class late_start