step1: see mmc disk
#dmesg | tail
get mmcblk0
step2: umount mmc card
#umount /medisk/disk
step3: list mmc
#sudo su -
#fdisk -l /dev/mmcblk0
step4: format mmc card
#sudo ./mmc.sh
--------------------------------------------------------------------------------
#! /bin/sh
MMCDEV="/dev/mmcblk0"
DISKSIZE=`fdisk -l ${MMCDEV} | awk '/[^=] [0-9]+ bytes/{print $5}'`
CYLINDERS=`echo "${DISKSIZE} 255 63 512 **/f" | dc`
/bin/echo -e "p\nn\np\n1\n\n+64M\nn\np\n2\n\n\n\na\n1\nt\n1\nc\np\nw\nq\n" | fdisk -H 255 -S 63 -C ${CYLINDERS} ${MMCDEV}
------------------------------------------------------------------------------
#mkdosfs -F 32 /dev/mmcblk0p1
#mke2fs -j /dev/mmcblk0p2
----------------------------------------------------------------------------------
step5: insert mmc card
#mount
沒有留言:
張貼留言