android2.2 、 android2.3 sd卡挂载

1,android2.3.4_kernel_2.6.35_T34H\arch\arm\mach-s5pv210\Kconfig

select S3C_DEV_HSMMC

       select S3C_DEV_HSMMC1 if !S5PV210_SD_CH0_8BIT

       select S3C_DEV_HSMMC2 if !S5PV210_SD_CH1_8BIT

       select S3C_DEV_HSMMC3 if !S5PV210_SD_CH2_8BIT

加入上面后,内核中的打印信息可以看到以下:

有扫描到卡。

[   73.852104] MMC e_removed

[   74.058867] mmc_rescan mmc2,  search for SDIO

[   74.063104] mmc_rescan mmc2,  search for SD

[   74.157214] mmc2: new high speed SD card at address dda5

[   74.171162] mmcblk1: mmc2:dda5 SD02G 1.83 GiB

[   74.180370]  mmcblk1: p1

[   75.149051] MMC e_inserted

[   75.350940] mmc2: card dda5 removed

[   75.607378] MMC e_removed

2,  修改系统的启动信息

(1)init.rc

android2.3.4_GB_T34H\device\samsung\smdkc110\inti.rc对比T34H的init.rc加入:

………………

    #export EXTERNAL_STORAGE /mnt/sdcard

    export EXTERNAL_STORAGE /sdcard

export EXTERNAL_SDCARD_STORAGE /sdcard/sd

………………

# create mountpoints

    mkdir /mnt 0775 root system

    mkdir /mnt/sdcard 0000 system system

    mkdir /sdcard 0000 system system

(2),vold.fstab

android2.3.4_GB_T34H\device\samsung\smdkc110 \vold.fstab对比T34H的vold.fstab加入:

## Vold 2.0 Generic fstab

## - San Mehat ([email protected])

##

#######################

## Regular device mount

##

## Format: dev_mount <label> <mount_point> <part> <sysfs_path1...>

## label        - Label for the volume

## mount_point  - Where the volume will be mounted

## part         - Partition # (1 based), or 'auto' for first usable partition.

## <sysfs_path> - List of sysfs paths to source devices

######################

#dev_mount sdcard /mnt/sdcard auto /devices/platform/s3c-sdhci.0/mmc_host/mmc0

dev_mount sdcard /sdcard 1 /devices/platform/s3c-sdhci.0/mmc_host/mmc0

dev_mount sdcard2 /sdcard/sd auto /devices/platform/s3c-sdhci.2/mmc_host/mmc2

3,完成内核和系统中的配置,就可以挂到sd卡,如下图所示。

/sdcard/sd就为我们要挂载的sd卡。

android2.2 、 android2.3 sd卡挂载_第1张图片

你可能感兴趣的:(android2.2 、 android2.3 sd卡挂载)