Menu

Add SDcard and USB auto mount in panther omap3

###########################################################
#    Add SD/USB Disk auto-mount Feature (2)
###########################################################

diff --git a/device/ti/beagleboard/overlay/frameworks/base/core/res/res/xml/storage_list.xml b/device/ti/beagleboard/overlay/frameworks/base/core/res/res/xml/storage_list.xml
index 043530d..333880d 100644
--- a/device/ti/beagleboard/overlay/frameworks/base/core/res/res/xml/storage_list.xml
+++ b/device/ti/beagleboard/overlay/frameworks/base/core/res/res/xml/storage_list.xml
@@ -34,8 +34,16 @@
 

<StorageList xmlns:android="http://schemas.android.com/apk/res/android">
-    <storage android:mountPoint="/storage/sdcard0"
+    <storage android:mountPoint="/data"
+             android:storageDescription="@string/storage_internal"
+             android:primary="true"
+             android:emulated="true"
+             android:mtpReserve="100"
+             android:allowMassStorage="true" />
-    <storage android:mountPoint="/storage/usb1"
-             android:storageDescription="@string/storage_usb"
-             android:removable="true" />
+    <storage android:mountPoint="/storage/sdcard0"
+             android:storageDescription="@string/storage_sd_card"
+             android:removable="true" />
+    <storage android:mountPoint="/mnt/usb-disk1"
+             android:storageDescription="@string/storage_usb"
+             android:removable="true" />
+    <storage android:mountPoint="/mnt/usb-disk2"
+             android:storageDescription="@string/storage_usb"
+             android:removable="true" />
+    <storage android:mountPoint="/mnt/usb-disk3"
+             android:storageDescription="@string/storage_usb"
+             android:removable="true" />
 </StorageList>

###########################################################
# Add SD/USB Disk auto-mount Feature
###########################################################
diff --git a/device/ti/beagleboard/init.rc b/device/ti/beagleboard/init.rc index 2ade576..74f8487 100755 --- a/device/ti/beagleboard/init.rc +++ b/device/ti/beagleboard/init.rc @@ -7,6 +7,9 @@ on early-init # create mountpoints mkdir /mnt 0775 root system mkdir /mnt/sdcard 0000 system system + mkdir /mnt/usb-disk1 0000 system system + mkdir /mnt/usb-disk2 0000 system system + mkdir /mnt/usb-disk3 0000 system system on init @@ -22,6 +25,9 @@ loglevel 3 export ANDROID_ASSETS /system/app export ANDROID_DATA /data export EXTERNAL_STORAGE /mnt/sdcard + export EXTERNAL_STORAGE /mnt/usb-disk1 + export EXTERNAL_STORAGE /mnt/usb-disk2 + export EXTERNAL_STORAGE /mnt/usb-disk3 export ASEC_MOUNTPOINT /mnt/asec export LOOP_MOUNTPOINT /mnt/obb export BOOTCLASSPATH /system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar @@ -30,7 +36,9 @@ loglevel 3 symlink /system/etc /etc symlink /sys/kernel/debug /d symlink /mnt/sdcard /sdcard - + symlink /mnt/usb-disk1 /usb3 + symlink /mnt/usb-disk2 /usb4 + symlink /mnt/usb-disk3 /usb5 # Right now vendor lives on the same filesystem as system, # but someday that may change. diff --git a/device/ti/beagleboard/vold.fstab b/device/ti/beagleboard/vold.fstab index 598ceaf..0171f66 100644 --- a/device/ti/beagleboard/vold.fstab +++ b/device/ti/beagleboard/vold.fstab @@ -1 +1,4 @@ -dev_mount sdcard /mnt/sdcard 3 /devices/platform/mmci-omap-hs.0/mmc_host/mmc0 -dev_mount sdcard /mnt/sdcard auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc0 +dev_mount sdcard /storage/sdcard0 auto /devices/platform/mmci-omap-hs.0/mmc_host/mmc0 +dev_mount usb /mnt/usb-disk1 auto /devices/platform/ehci-omap.0/usb1/1-2/1-2.3/ +dev_mount usb /mnt/usb-disk2 auto /devices/platform/ehci-omap.0/usb1/1-2/1-2.4/ +dev_mount usb /mnt/usb-disk3 auto /devices/platform/ehci-omap.0/usb1/1-2/1-2.5/ 


Không có nhận xét nào :

Đăng nhận xét