Use the filesystem manager to mount and check filesystems

fs_mgr reads /fstab.<device> to determine what to mount and what to
check, and removes the details from the init.<device>.rc file.

Change-Id: I59a77bd9d9c52247400826dc9a887ee97b6fb898
diff --git a/device.mk b/device.mk
index 26fdd63..708dd43 100644
--- a/device.mk
+++ b/device.mk
@@ -24,6 +24,7 @@
 	$(LOCAL_KERNEL):kernel \
 	device/ti/panda/init.omap4pandaboard.rc:root/init.omap4pandaboard.rc \
 	device/ti/panda/init.omap4pandaboard.usb.rc:root/init.omap4pandaboard.usb.rc \
+        device/ti/panda/fstab.omap4pandaboard:root/fstab.omap4pandaboard \
 	device/ti/panda/ueventd.omap4pandaboard.rc:root/ueventd.omap4pandaboard.rc \
 	device/ti/panda/media_profiles.xml:system/etc/media_profiles.xml \
 	device/ti/panda/android.hardware.bluetooth.xml:system/etc/permissions/android.hardware.bluetooth.xml \
diff --git a/fstab.omap4pandaboard b/fstab.omap4pandaboard
new file mode 100644
index 0000000..7a40110
--- /dev/null
+++ b/fstab.omap4pandaboard
@@ -0,0 +1,10 @@
+# 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
+
+
+/dev/block/platform/omap/omap_hsmmc.0/by-name/system    /system             ext4      ro                                                    wait
+/dev/block/platform/omap/omap_hsmmc.0/by-name/cache     /cache              ext4      noatime,nosuid,nodev,nomblk_io_submit,errors=panic    wait
+/dev/block/platform/omap/omap_hsmmc.0/by-name/userdata  /data               ext4      noatime,nosuid,nodev,nomblk_io_submit,errors=panic    wait
+
diff --git a/init.omap4pandaboard.rc b/init.omap4pandaboard.rc
index 8c8b28f..fd16fc4 100644
--- a/init.omap4pandaboard.rc
+++ b/init.omap4pandaboard.rc
@@ -22,9 +22,7 @@
 	chmod 0666 /dev/pvrsrvkm
 
 on fs
-	mount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/system /system wait ro
-	mount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/userdata /data wait noatime nosuid nodev
-	mount ext4 /dev/block/platform/omap/omap_hsmmc.0/by-name/cache /cache wait noatime nosuid nodev
+	mount_all /fstab.omap4pandaboard
 
 # change permissions for Bluetooth/FM/GPS
     chmod 0600 /sys/class/rfkill/rfkill0/state