The phyCORE-AM57x Development Kit brings out SATA mass storage device connectivity to the Molex data connector at X11 and the power connector at X12. This guide will walk you through the basic usage of this interface.
|Item||Item Numbers (Description)|
SATA Power Cable
|SATA 22pin Serial ATA Data and Power Combo Cable|
Connecting Hard Drive and SATA Cable
- Ensure that your phyCORE-AM57x development kit is turned off and the power supply has been disconnected.
- Connect your SATA Mass Storage device to the connectors X11 and X12.
- Reconnect the power supply and boot into Linux.
Check that your SATA storage device was configured correctly:
dmesg | grep -i "scsi"CODE
root@am57xx-phycore-kit:~# dmesg | grep -i "scsi" [ 0.427256] SCSI subsystem initialized [ 6.035046] scsi host0: ahci [ 6.663644] scsi 0:0:0:0: Direct-Access ATA ADATA SX900 1 PQ: 0 ANSI: 5 [ 6.729211] sd 0:0:0:0: [sda] Attached SCSI diskCODE
Create a random file and copy it to the SATA drive. Notice in the above example output that the SATA drive was automatically mounted to the device sda. Make note of the device your drive was assigned to as you will need to specify this correctly in the following steps by replacing <x> (from the example above, since the SATA drive was attached to the device sda we would replace the the <x> in the following command with 'a').
dd if=/dev/urandom of=/home/root/test.dat bs=1M count=2 cp /home/root/test.dat /run/media/sd<x>1/test_w.datCODE
Copy the file back from the SATA drive to the root filesystem on the SD card.
cp /run/media/sd<x>1/test_w.dat /home/root/test_r.datCODE
Now lets check all the files to ensure they all match:
md5sum /home/root/test.dat && md5sum /run/media/sd<x>1/test_w.dat && md5sum /home/root/test_r.datCODE
The above command will generate 3 hashes that uniquely identify each file. They should all be exactly the same.
Now remove the files we generated:
rm /home/root/test.dat && rm /run/media/sd<x>1/test_w.dat && rm /home/root/test_r.datCODE