SD Card
The SD card interface can be used as a boot device or plug-and-play external media. This guide will walk through reading and writing to the phyCORE-AM64x development kit’s mirco-SD card. For information on how to boot the development kit from SD card see the guide SD Card. More information on the SD card interface all together can be found in the section 6.2.2 in the Hardware Manual.

Requirements
SDHC SD card, at least 8GB for PHYTEC’s BSP image (Included in development kit)
Transfering Media on Target
This portion of the guide will show how to read and write files with the SD card interface from the development kit.
Mounting the SD card
When an external SD card is inserted, it will only be mounted automatically when the development kit booted from it.
Verify that the SD card has been mounted.
sh-phyboard-electra-am64xx-2:~# mount | grep /dev/mmcblk1p1
/dev/mmcblk1p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
Mount the SD card manually in case the last command didn’t return any output.
sh-phyboard-electra-am64xx-2:~# umount /boot
sh-phyboard-electra-am64xx-2:~# mount /dev/mmcblk1p1 /boot/
See the contents of the SD card.
sh-phyboard-electra-am64xx-2:~# ls /boot
Write to the SD Card
Create a text file and copy (cp) the file to the SD card.
sh-phyboard-electra-am64xx-2:~# echo "SD card Test" > sdcard.txt
sh-phyboard-electra-am64xx-2:~# cp sdcard.txt /boot/sdcard.txt
Verify that the file wasn’t corrupted with md5sum. Both the hashes should match.
sh-phyboard-electra-am64xx-2:~# md5sum sdcard.txt /boot/sdcard.txt
cf7b014f4f2517400c1fc33b851e7da4 sdcard.txt
cf7b014f4f2517400c1fc33b851e7da4 /boot/sdcard.txt
Read from the SD Card
Copy the file from the SD card to the root directory.
sh-phyboard-electra-am64xx-2:~# cp /boot/sdcard.txt ~/read-sd.txt
Verify that the file wasn’t corrupted with md5sum. Both the hashes should match.
sh-phyboard-electra-am64xx-2:~# md5sum read-sd.txt /boot/sdcard.txt
cf7b014f4f2517400c1fc33b851e7da4 read-sd.txt
cf7b014f4f2517400c1fc33b851e7da4 /boot/sdcard.txt