target: msm8996: support boot with EMMC on msm8996

Add a define of boot device, change the rootfs name for kernel cmdline.

Change-Id: Ica522d81f69c02f8520b475b095d90738ea600f8
diff --git a/target/msm8996/init.c b/target/msm8996/init.c
index 0293764..4ad64a3 100644
--- a/target/msm8996/init.c
+++ b/target/msm8996/init.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2017 The Linux Foundation. All rights reserved.
+/* Copyright (c) 2014-2018 The Linux Foundation. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions are
@@ -76,6 +76,12 @@
 
 #include <pm_smbchg_usb_chgpth.h>
 
+#if MOUNT_EMMC_LE
+       #define ROOTFS_EMMC_PATH " root=/dev/mmcblk0p"
+#else
+       #define ROOTFS_EMMC_PATH " root=/dev/mmcblock0p"
+#endif
+
 #define CE_INSTANCE             1
 #define CE_EE                   0
 #define CE_FIFO_SIZE            64
@@ -704,7 +710,7 @@
 	char lun_char_base = 'a', lun_char_limit = 'h';
 
 	/*allocate buflen for largest possible string*/
-	uint32_t buflen = strlen(" root=/dev/mmcblock0p") + sizeof(int) + 1; /*1 character for null termination*/
+	uint32_t buflen = strlen(ROOTFS_EMMC_PATH) + sizeof(int) + 1; /*1 character for null termination*/
 
 	if (!cmdline || !part ) {
 		dprintf(CRITICAL, "WARN: Invalid input param\n");
@@ -734,7 +740,7 @@
 	else
 	{
 		if (platform_boot_dev_isemmc()) {
-			snprintf(*buf, buflen, " root=/dev/mmcblock0p%d",
+			snprintf(*buf, buflen, ROOTFS_EMMC_PATH"%d",
 					system_ptn_index + 1);
 		} else {
 			lun = partition_get_lun(system_ptn_index);