How to use external mass storage devices: Difference between revisions

From RidgeRun Developer Wiki
(Created page with '= Introduction = This whitepaper shows how to use a SD card or an USB drive as an storage media when using a LeopardBoard DM36x. = How to use a SD card as storage media? = In...')
(No difference)

Revision as of 21:32, 25 May 2011

Introduction

This whitepaper shows how to use a SD card or an USB drive as an storage media when using a LeopardBoard DM36x.


How to use a SD card as storage media?

In order to use a SD card as a storage media you must insert it into the MMC/SD card slot located in the LeopardBoard DM365 as is shown in the Figure 1.

Figure 1. MMC/SD Card connection.

Once you have inserted the SD card into the slot you will be able to see an output like the showed below, if you started the board with the SD card plugged, you must type the dmesg command in your target and look for the output into the log message.

mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new high speed SD card at address 0002
mmcblk0: mmc0:0002 00000 1.86 GiB 
 mmcblk0: p1

In the example showed the SD card was detected with the device name mmcblk0 and there was only one partition detected p1. In order to get access to the SD card you must mount it first following the next steps:

1. Create a directory where to mount the device

mkdir <directory> i.e. ''mkdir -p /media/sd''

2. Mount the device

mount /dev/<device name> <target directory> i.e. ''mount /dev/mmcblk0p1 /media/sd''

Once your SD have been mounted, you can access its content by entering into the directory where you mounted it. Everything you write into this directory will be written into the SD card. When you finish to write data into the SD card you must unmount it before you extract it by running the following command:

umount <directory> i.e. umount /media/sd


How to use a USB drive as storage media?