fstab: Add external sdcard support and a small cleanup

Add external sdcard support and merge fstab.aosp_beryllium
and aosp_beryllium/fstab.ramdisk.

Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
diff --git a/aosp_beryllium/device.mk b/aosp_beryllium/device.mk
index 4b85567..0717c1a 100644
--- a/aosp_beryllium/device.mk
+++ b/aosp_beryllium/device.mk
@@ -23,7 +23,6 @@
 
 
 PRODUCT_COPY_FILES := \
-    $(LOCAL_PATH)/fstab.aosp_beryllium:$(TARGET_COPY_OUT_VENDOR)/etc/init/fstab.aosp_beryllium \
     $(LOCAL_PATH)/fstab.ramdisk:$(TARGET_COPY_OUT_RAMDISK)/fstab.aosp_beryllium \
     $(LOCAL_PATH)/fstab.ramdisk:$(TARGET_COPY_OUT_VENDOR)/etc/fstab.aosp_beryllium \
     device/xiaomi/beryllium/init.common.rc:$(TARGET_COPY_OUT_VENDOR)/etc/init/init.aosp_beryllium.rc \
diff --git a/aosp_beryllium/fstab.aosp_beryllium b/aosp_beryllium/fstab.aosp_beryllium
deleted file mode 100644
index b2865c3..0000000
--- a/aosp_beryllium/fstab.aosp_beryllium
+++ /dev/null
@@ -1,5 +0,0 @@
-# Android fstab file.
-#<src>                  <mnt_point>         <type>    <mnt_flags and options>                              <fs_mgr_flags>
-# 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
-LABEL=data         /data               ext4      discard,noauto_da_alloc,data=ordered,user_xattr,barrier=1    wait
diff --git a/aosp_beryllium/fstab.ramdisk b/aosp_beryllium/fstab.ramdisk
index 9bfe979..0c15b79 100644
--- a/aosp_beryllium/fstab.ramdisk
+++ b/aosp_beryllium/fstab.ramdisk
@@ -1,2 +1,4 @@
 /dev/block/platform/soc@0/1d84000.ufshc/by-name/system /system ext4 noatime,ro,errors=panic wait,first_stage_mount
 /dev/block/platform/soc@0/1d84000.ufshc/by-name/vendor /vendor ext4 noatime,ro,errors=panic wait,first_stage_mount
+LABEL=data         /data               ext4      discard,noauto_da_alloc,data=ordered,user_xattr,barrier=1    wait
+/devices/platform/soc@0/8804000.sdhci/mmc_host/mmc*    auto    auto    defaults    voldmanaged=sdcard1:auto,noemulatedsd
diff --git a/init.common.rc b/init.common.rc
index 5a1cc78..a8a6342 100644
--- a/init.common.rc
+++ b/init.common.rc
@@ -2,19 +2,14 @@
 import init.${ro.hardware}.power.rc
 
 on fs
-    mount_all /vendor/etc/init/fstab.${ro.hardware}
-    swapon_all /vendor/etc/init/fstab.${ro.hardware}
+    mount_all /vendor/etc/fstab.${ro.hardware}
+    swapon_all /vendor/etc/fstab.${ro.hardware}
 
 on post-fs
     # set RLIMIT_MEMLOCK to 64MB
     setrlimit 8 67108864 67108864
 
 on init
-    # For legacy support
-    # See storage config details at http://source.android.com/tech/storage/
-    # since /storage is mounted on post-fs in init.rc
-    symlink /sdcard /storage/sdcard0
-
     # Initialize cpusets to boot-time values
     write /dev/cpuset/foreground/cpus 0-7
     write /dev/cpuset/background/cpus 0-7