Get SD Card Working
The virtual SD card was not setup, because the "on nonencrypted" trigger
that launches the "late_start" action class was not being called. The
sdcard service is part of the late_start action class.
A mount_all command is necessary to trigger it which requires a fstab.mako
file. Create fstab.mako with one entry for /system in it, so that
nonencrypted trigger is fired. This converted entry is probably missing
some options in the conversion like e2fsck. The rest of the mount commands
from init.mako.rc need to be converted as well.
Change-Id: Ifdf489a4edb323ce05ca8b2df18892cfcf72043c
diff --git a/device.mk b/device.mk
index edc2908..bfca18c 100644
--- a/device.mk
+++ b/device.mk
@@ -52,6 +52,7 @@
PRODUCT_COPY_FILES += \
device/lge/mako/init.mako.rc:root/init.mako.rc \
device/lge/mako/init.mako.usb.rc:root/init.mako.usb.rc \
+ device/lge/mako/fstab.mako:root/fstab.mako \
device/lge/mako/ueventd.mako.rc:root/ueventd.mako.rc \
device/lge/mako/media_profiles.xml:system/etc/media_profiles.xml \
device/lge/mako/media_codecs.xml:system/etc/media_codecs.xml
diff --git a/fstab.mako b/fstab.mako
new file mode 100644
index 0000000..015651e
--- /dev/null
+++ b/fstab.mako
@@ -0,0 +1,7 @@
+# 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/msm_sdcc.1/by-name/system /system ext4 ro,barrier=1 wait
+
diff --git a/init.mako.rc b/init.mako.rc
index 8a4e14f..0a6c465 100644
--- a/init.mako.rc
+++ b/init.mako.rc
@@ -40,10 +40,16 @@
mkdir /persist 0771 system system
on fs
- wait /dev/block/platform/msm_sdcc.1/by-name/system
- chmod 0777 /sbin/e2fsck_static
- exec /sbin/e2fsck_static -y /dev/block/platform/msm_sdcc.1/by-name/system
- mount ext4 /dev/block/platform/msm_sdcc.1/by-name/system /system ro barrier=1
+
+ mount_all ./fstab.mako
+
+ # TODO: Move the following mount commands into the fstab. /system has
+ # been moved to the fstab but is probably missing some options
+ # to run a fsck.
+ # wait /dev/block/platform/msm_sdcc.1/by-name/system
+ # chmod 0777 /sbin/e2fsck_static
+ # exec /sbin/e2fsck_static -y /dev/block/platform/msm_sdcc.1/by-name/system
+ # mount ext4 /dev/block/platform/msm_sdcc.1/by-name/system /system ro barrier=1
#userdata
wait /dev/block/platform/msm_sdcc.1/by-name/userdata