From f1c349301ebc73496885f0ccdc2ad41958b72355 Mon Sep 17 00:00:00 2001 From: Chih-Wei Huang Date: Thu, 12 Aug 2010 14:18:01 +0800 Subject: [PATCH] add persistent mode support In this mode, the first Linux partition is mounted as /data, and the first fat partition is mounted as /mnt/sdcard. --- AndroidBoard.mk | 2 ++ vm_info | 3 +++ vold.fstab | 1 + 3 files changed, 6 insertions(+) create mode 100644 vold.fstab diff --git a/AndroidBoard.mk b/AndroidBoard.mk index 05936ea..831624a 100644 --- a/AndroidBoard.mk +++ b/AndroidBoard.mk @@ -4,4 +4,6 @@ TARGET_INITRD_SCRIPTS := $(LOCAL_PATH)/vm_info TARGET_PREBUILT_APPS := $(subst $(LOCAL_PATH)/,,$(wildcard $(LOCAL_PATH)/app/*)) TARGET_KERNEL_CONFIG := $(LOCAL_PATH)/vm_defconfig +PRODUCT_COPY_FILES += $(LOCAL_PATH)/vold.fstab:system/etc/vold.fstab + include $(GENERIC_X86_ANDROID_MK) diff --git a/vm_info b/vm_info index 1886821..119c292 100644 --- a/vm_info +++ b/vm_info @@ -11,6 +11,9 @@ detect_hardware() ;; esac + # try to find the first Linux partition + [ -z "$DATA" ] && DATA=`fdisk -l /dev/sd? | grep ^/dev | grep '83.*Linux' | head -1 | awk '{ print $1 }'` + # return error to use auto-detect return 1 } diff --git a/vold.fstab b/vold.fstab new file mode 100644 index 0000000..05067fc --- /dev/null +++ b/vold.fstab @@ -0,0 +1 @@ +dev_mount sdcard /mnt/sdcard auto /devices/pci0000:00/0000:00:01.1/host0/target0:0:0/0:0:0:0/block/sda -- 2.11.0