i.MX Create NFS Server and Export USB Drive: Yocto Project Distribution

Document created by Curtis Wald Employee on Apr 29, 2014
Version 1Show Document
  • View in full screen mode

Overview

This document describes the steps for configuring a NFS Server running on an i.MX Application Processor - in this case the evaluation board i.MX28 EVK. Once the NFS server is running, an Ubuntu 12.04 Linux host is then configured to NFS mount the i.MX28EVK exported directory. The Ethernet interface is used for the connection transport.

 

A block diagram of the connection setup is shown below: An Ethernet switch provided the Ethernet connection between the Linux Host and the i.MX28EVK. A thumb drive was connected to the USB port on the i.MX28EVK which was used for the exported directory.

imx28diag.png

i.MX28EVK Setup

Build Yocto Project image

Use core-image-minimal and add packages to conf/local.conf to support NFS

MACHINE=imx28evk source setup-environment mx28-evk
echo "CORE_IMAGE_EXTRA_INSTALL += \"bash kernel-modules nfs-utils\" " >> conf/local.conf
bitbake core-image-minimal

When bitbake finishes the images are found in tmp/deploy/images/imx28evk

Create a SDCARD from the Linux Host

sudo dd if=/tmp/deploy/images/imx28evk/core-image-minimal-imx28evk.sdcard of=/dev/sdc bs=4M && sync

Boot i.MX28EVK

Insert the SDCARD into slot 0 on the bottom side of the i.MX28EVK and connect the serial console. Power-on and push the POWER button on the lower conner to turn on. The Login credentials are User Name: root      There is no password configured by default.

Create file system on USB

The USB drive had one partition which was formatted with vfat file system:

mkfs.vfat /dev/sdb1

Create Mount Point and Mount the USB device

mkdir /mnt/usb
mount /dev/sdb1 /mnt/usb

Create 250 MB File

dd if=/dev/zero of=/mnt/usb/file1.txt bs=512K count=500

Create Exports File

echo "/mnt/usb *(rw,sync,no_root_squash,no_subtree_check)" > /etc/exports

Restart NFS Server

/etc/init.d/nfsserver stop
/etc/init.d/nfsserver start

 

Ubuntu Linux Host Setup

Create Mount Directory

sudo mkdir /mnt/remote

Mount i.MX28EVK Exported Directory

sudo mount -t nfs 10.85.1.10:/mnt/usb /mnt/remote

 

Access the NFS mounted directory

ls /mnt/remote

1 person found this helpful

Attachments

    Outcomes