eMMC ====== The phyCORE-AM65x SOM comes with a 4GB eMMC by default and can be optionally populated with a larger eMMC storage device up to 32 GB in size. This guide provides steps to mount, read from, and write to the phyCORE-AM65x on board eMMC. .. note:: In order to follow this guide your phyCORE-AM65x development kit must be booting from SD card. Viewing available eMMC partition information ----------------------------------------------- .. warning:: Be careful with the fdisk command. You can accidentally delete the contents of other memory devices connected to the system. * The eMMC corresponds to /dev/mmcblk0 in Linux. You can verify the eMMC partitions by using the following command: .. code-block:: none :caption: Target (Linux) fdisk -l /dev/mmcblk0 * An example of a list of partitions on an eMMC device is shown below: .. code-block:: none :caption: Expected Output root@am65xx-phycore-rdk:~# fdisk -l /dev/mmcblk0 Disk /dev/mmcblk0: 3.6 GiB, 3850371072 bytes, 7520256 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: F7B887C4-C9D8-4C35-9E70-566EE5F80C56 Device Start End Sectors Size Type /dev/mmcblk0p1 34 7520222 7520189 3.6G Microsoft basic data Mounting the eMMC ------------------- * In order to read and write to the eMMC, you will need to create a directory; then mount the desired partition to that directory. Follow the steps below to mount partition 1 of the eMMC: .. code-block:: none :caption: Target (Linux) mkdir temp mount /dev/mmcblk0p1 temp/ * Use the following command to see the contents of the mounted memory device. .. code-block:: none :caption: Target (Linux) ls temp An example of what the contents would look like is provided below: .. code-block:: none :caption: Expected Output root@am65xx-phycore-rdk:~# ls temp bin dev home lib media opt run srv tmp var boot etc include lost+found mnt proc sbin sys usr www Writing to the eMMC --------------------- * You can write to the eMMC by using the copy or move commands, just like in Linux. .. code-block:: none :caption: Target (Linux) echo "Hello World" > test.txt cp test.txt temp * Use the following command again to see the contents of the eMMC: .. code-block:: none :caption: Target (Linux) ls temp An example of what the contents now look like following the copy is provided below: .. code-block:: none :caption: Expected Output root@am65xx-phycore-rdk:~# ls temp bin dev home lib media opt run srv test.txt usr www boot etc include lost+found mnt proc sbin sys tmp var ~ ~