target: init: Add support for system-As-Root on non-A/B for VB1/VB2 targets.

According to System-As-Root behavior, system.img should contain both
system content and ramdisk content, and should be mounted at root(a/b).

This change adds api to check if the target uses system as root build.

Change-Id: Ieb52de6ac5e464c94128e322b9d92e46114abf03
diff --git a/include/target.h b/include/target.h
index 2151f05..52543ef 100644
--- a/include/target.h
+++ b/include/target.h
@@ -100,7 +100,7 @@
 bool target_build_variant_user();
 void pmic_reset_configure(uint8_t reset_type);
 bool is_display_disabled(void);
-
+bool target_uses_system_as_root(void);
 struct qmp_reg *target_get_qmp_settings();
 int target_get_qmp_regsize();
 uint32_t target_ddr_cfg_reg();
diff --git a/target/init.c b/target/init.c
index 80c95c3..72ae157 100644
--- a/target/init.c
+++ b/target/init.c
@@ -268,6 +268,16 @@
 	return DDR_CONFIG_VAL;
 }
 
+/* Target uses system as root */
+bool target_uses_system_as_root(void)
+{
+#if TARGET_USE_SYSTEM_AS_ROOT_IMAGE
+	if (target_get_vb_version() >= VB_M)
+		return true;
+#endif
+		return false;
+}
+
 /* Default CFG register value */
 uint32_t target_ddr_cfg_reg()
 {