linux加载s3c6410 sd卡

时间:2021-08-31 02:29:42

linux启动有如下sd卡初始化打印信息:

sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
s3c-sdhci s3c-sdhci.0: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.0: clock source 2: mmc_bus (24000000 Hz)
mmc0: SDHCI controller on samsung-hsmmc [s3c-sdhci.0] using ADMA
s3c-sdhci s3c-sdhci.1: clock source 0: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 1: hsmmc (133000000 Hz)
s3c-sdhci s3c-sdhci.1: clock source 2: mmc_bus (24000000 Hz)
mmc1: SDHCI controller on samsung-hsmmc [s3c-sdhci.1] using ADMA


查看sd卡信息:

# fdisk -l /dev/mmcblk0


Disk /dev/mmcblk0: 7948 MB, 7948206080 bytes
81 heads, 10 sectors/track, 19165 cylinders
Units = cylinders of 810 * 512 = 414720 bytes


        Device Boot      Start         End      Blocks  Id System
/dev/mmcblk0p1              11       19166     7757824   b Win95 FAT32


加载sd卡

 mount -t vfat /dev/mmcblk0p1  /mnt/
FAT-fs (mmcblk0p1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!


# ls /mnt
# mount
rootfs on / type rootfs (rw)
192.168.1.106:/home/zlx/S5-driver/lesson7/rootfs/ on / type nfs (rw,relatime,vers=2,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=udp,timeo=11,retrans=3,sec=sys,mountaddr=192.168.1.106,mountvers=1,mountproto=udp,local_lock=all,addr=192.168.1.106)
devtmpfs on /dev type devtmpfs (rw,relatime,size=103456k,nr_inodes=25864,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
mdev on /dev type tmpfs (rw,relatime)
/dev/mmcblk0p1 on /mnt type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=cp936,iocharset=utf8,shortname=mixed,errors=remount-ro)
# cd /mnt
# touch test
# echo test > test
# cd /
# umount /mnt
# mount
rootfs on / type rootfs (rw)
192.168.1.106:/home/zlx/S5-driver/lesson7/rootfs/ on / type nfs (rw,relatime,vers=2,rsize=4096,wsize=4096,namlen=255,hard,nolock,proto=udp,timeo=11,retrans=3,sec=sys,mountaddr=192.168.1.106,mountvers=1,mountproto=udp,local_lock=all,addr=192.168.1.106)
devtmpfs on /dev type devtmpfs (rw,relatime,size=103456k,nr_inodes=25864,mode=755)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
mdev on /dev type tmpfs (rw,relatime)
# ls /mnt
# mount -t vfat /dev/mmcblk0p1  /mnt/
FAT-fs (mmcblk0p1): utf8 is not a recommended IO charset for FAT filesystems, filesystem will be case sensitive!


# ls /mnt
test
# cat /mnt/test 
test