TamuBot Version 3.0: Parker01

Gumstix


Introduction:

------------------------------------------------------------------------------------------------------------------------------------------------------

Parker01 uses a Gumstix for higher level processing. The Gumstix works on a embedded linux system and boasts an Intel XScale® PXA255 400Mhz processor.
Parker01 currently uses the Gumstix to implement a Extended Kalman Filter that obtains information from onboard sensors (other than the motor
encoders).
Communication to the Gumstix from a computer is currently via Bluetooth. The Gumstix can also be connected and programmed directly using
the 60 pin Hirose connector. The procedures for these are detailed below in the "Working of Component" section of this guide.
Communication from the Gumstix to the  TAMU Robot Controller is via the 60 pin connector on the Gumstix controller.
Gumstick to Control Board Communication is performed via SPI communication

===================================================================================

Data Sheets and Ordering Information:

------------------------------------------------------------------------------------------------------------------------------------------------------

The Parker01 Robot can use two types of Gumstix
This part can be bought online at Gumstix store :
 Gumstix basix 400xm-bt (with duck antenna)
 Gumstix connex 400xm-bt (with duck antenna)

Figure 1: The Gumstix Controller Underside showing the Hirose connector and the processor. The front view as shown on the left
shows the bluetooth "duck" antenna the bluetooth module and the MMC adapter.

===================================================================================

Features of Component:

------------------------------------------------------------------------------------------------------------------------------------------------------

1. 400 MHz -(Intel XScale® PXA255)
2. Multi-Media Card adapter to extend memory
3. 60 pin Hirose I/O connector
4. Supports UART, I2C, USB, NSSP and Bluetooth connectivity
5. Min voltage of 3.5V; Max Voltage 5V
6. 80mm X 20 mm
7. 64 mb onboard SDRAM
8. 1 MB onboard flash memory
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

===================================================================================

Working of Component

------------------------------------------------------------------------------------------------------------------------------------------------------

This part of the guide describes how the Gumstix control board works. The communication protocols used by the Gumstix control board, setting up the environment for the Gumstix
for the different protocols is also described in this section.

Detailed information is provided on a wiki site: http://docwiki.gumstix.org/index.php/Main_Page

But the settings and working of the Parker01 are given in the documentation below:
[Most of the information provided on this page is by Chang-Young Kim of Texas A&M University.]

The Gumstix control board needs to be set-up to allow a computer to communicate with it to allow programs to be executed directly from it. Since the gumstix runs a linux environment
we will focus mainly on interfacing with the Gumstix control board using a linux operating system.

1. Setting up the Computer: Using the Buildroot program
    1.1. Opertating Systems
    1.2. Getting the Buildroot System and Installing it
    1.3. Communicating via Serial Communication in Linux:
    1.4 Bluetooth Communcation on the Gumstix
    1.5 Testing the Connection- USBNet in Linux    
    1.6 Communicating with the Gumstix using I2C
    1.6 Sending Execution File to Gumstix
    1.7. NFS support for Gumstix
    1.8 Debugging with gdb
    1.9 Adding NFS support to the gumstix
    1.10 Using the the ubuntu computer.

------------------------------------------------------------------------------------------------------------------------------------------------------

1. Setting up the Computer: Using the Buildroot program:

------------------------------------------------------------------------------------------------------------------------------------------------------


In order to setup the computer to talk to the Gumstix control board we use the Buildroot program provided by Gumstix.
Buildroot is the method used by the Robotics Laboratory for the:

Buildroot allows the construction of a custom, complete Gumstix filesystem in a single command. It automates all the tedious steps in constructing the image, including
  • Downloading all necessary source code and data;
  • Building a cross-compilation toolchain to compile code for the Gumstix's ARM processor;
  • Compiling all Gumstix software, from the Linux kernel up through applications;
  • Stuffing all the results into the final filesystem image, suitable for loading into the Gumstix's flash memory.

The Buildroot also provides configuration menus, which can be used to add software to the filesystem image or remove existing packages. High level programming properties such as voice recognition and terminal emulators can be utilized using checkboxes.

------------------------------------------------------------------------------------------------------------------------------------------------------

            1.1 Operating Systems:

------------------------------------------------------------------------------------------------------------------------------------------------------

Buildroot is primarily designed to be used on a Linux operating system.

But it can be used on other Unix-like systems (like FreeBSD, Mac OS X, or Cygwin), although maintaining it  is more difficult

The default Buildroot configuration works on Linux 2.6.x-based systems. For 2.4.x systems, see the Buildroot on Linux 2.4 page for tips.

The Buildroot can be used on Windows by installing Linux in a virtual environment, such as VMware or Colinux, so that it runs in a window alongside your other applications. See the Buildroot on Windows page for details.

See Buildroot on Ubuntu for a Howto on getting Ubuntu configured for building the Buildroot.

See Buildroot on Dreamhost for a Howto on getting buildroot to build under your Dreamhost account.

See Buildroot on MacOSX for a Howto on getting buildroot to build on an Apple Mac OS X machine.

See Buildroot on SLED 10 SP1 for information on getting SLED 10 SP1 to build Buildroot.

------------------------------------------------------------------------------------------------------------------------------------------------------

            1.2. Getting the Buildroot System and Installing it

------------------------------------------------------------------------------------------------------------------------------------------------------

To use the Buildroot, you must obtain it from Gumstix's public Subversion repository.

You will need the following things on your development host machine:

  • A Subversion client, to check out the files (and, later, to get updates). You can check if your Linux box already has one by entering which svn at the command prompt.
  • A C compiler, such as gcc and associated tools. Most Linux systems already have these tools installed; if yours are missing, install your distribution's development tools package. You will need to following tools installed: autoconf, automake, bison, byacc, gcc, gcc-c++, make, ncurses-devel, subversion, zlib-devel, texinfo, flex.
  • A network connection, both to fetch the Buildroot itself, and for the Buildroot to download subsequent files.
  • About 150MB of free disk space.

A browseable version of the repository can be accessed in your web browser by navigating to:

http://svn.gumstix.com/gumstix-buildroot/trunk 

Use root as the user and root as the login.

This will always be the latest version of the gumstix Subversion repository.

To get the current revision of the Buildroot, enter the following on your development host:

svn co http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot

If you want to get a specific revision XXX, use

svn co -rXXX http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot

The gumstix is shipped with something close to revision 773. The current revision is closer to 1200. These are NOT BINARY COMPATIBLE. This means that to use the buildroot toolchain to write programs without reflashing the operating system, you MUST USE

svn co -r773 http://svn.gumstix.com/gumstix-buildroot/trunk gumstix-buildroot

This will create a new directory named gumstix-buildroot within your current directory. Using a version of buildroot which differs from the version of buildroot running on your gumstix, may result in segfaults or other errors which have nothinig to do with the program being run.

For revisions of buildroot from 865 to the present, use:

cd gumstix-buildroot
make defconfig
make

For revisions of buildroot earlier than 865, use:

cd gumstix-buildroot
make

This will generate the initial Buildroot configuration files and start the process.  This process is time consuming and the Gumstix website suggests that the user be be patient and allow the system to completely  build the configuration files and systems.

The build process will generate a lot of output, and you may see some error messages go by. Unless the build halts with a glaring error message, you can safely ignore them for now -- some application configuration scripts will try various approaches and choose the one that works.

Final Step:

            If it succeeds, the build will end with a line describing your shiny new root filesystem, which will be named rootfs.arm_nofpu.jffs2.


The Buildroot scripts produce a JFFS2 filesystem image, suitable for loading directly onto the Gumstix's flash memory, but not -- by default -- usable from an MMC or CompactFlash card. The process for flashing the image onto the Gumstix is safe and easy. See the Replacing the filesystem image page provided by Gumstix for details.

------------------------------------------------------------------------------------------------------------------------------------------------------

            1.3. Communicating via Serial Communication in Linux:

------------------------------------------------------------------------------------------------------------------------------------------------------

GumstixDocsWiki  is the existing source from which this information is obtained.

Before programming anything else, let's connect the Gumstix to your existing Linux machine. You need a terminal program such as Minicom or Kermit.

To connect to the Gumstix console, you need a serial port, found on the tweener board or one of the waysmall expansion boards. You will also need a null modem cable with appropriate connectors. For more detailed information about serial connections, see the Serial adapters and Serial voltages pages.


Fig[2] Serial and power connections to the Gumstix using the tweener board 

Contents

Connecting with Kermit

These directions are for the Kermit communications package (cKermit on Linux).

1. Connect the null-modem serial cable to the serial port on your computer and to the serial port on the Gumstix

2. Launch kermit with kermit -l /dev/ttyS0 where /dev/ttyS0 is the serial port you're using on the host computer. You may need to do this as root if regular users can't access the serial port.

3. The following configuration works when logging into the serial console:

set speed 115200
set reliable
fast
set carrier-watch off
set flow-control none
set prefixing all

Add the following if you need to transfer files to the Gumstix (for example, when Replacing the filesystem image)

set file type bin
set rec pack 4096
set send pack 4096
set window 5

4. Connect to the port by typing connect

5. Plug the power adapter into any power jack on the Gumstix. When connected and powered, you should see a message from U-Boot followed by the normal Gumstix boot sequence.

6. Log in for the first time with username root and password gumstix

7. When finished, you can return to the kermit prompt by typing [CTRL-\] then pressing c. Type quit to exit the program.

Connecting with Minicom

  1. First, configure Minicom
    1. As root, run minicom -s
    2. Under "Serial Port Setup" choose the following
      • Serial Device: /dev/ttyS0 (edit to match your system as necessary)
      • Bps/Par/Bits: 115200 8N1
      • Hardware Flow Control: No (this is important)
      • Software Flow Control: No
    3. Hit [ESC] until you return to the main configuration menu
    4. Select "Save Setup as dfl" to save the default setup
    5. Select "Exit from Minicom" to exit the program
  2. Connect the serial cable to the serial port on your computer and to the serial port on the Gumstix
  3. Run Minicom again with minicom -o. This tells it to skip all the modem initialization strings, which are unnecessary when communicating with the Gumstix. You may need to do this as root if your normal login doesn't have permission to access the serial port.
  4. Plug the power adapter into the power jack of the Gumstix. When connected and powered, you should see a message from U-Boot followed by the normal Gumstix boot sequence in the minicom window.
  5. Log in for the first time with username root and password gumstix
  6. When finished, you can exit Minicom by typing [CTRL-A] then pressing Q. This exits without running the normal modem reset sequence, which will only send garbage to the Gumstix

Transferring files

To send a file to the Gumstix:

  1. Run 'rz' on the Gumstix. No parameters are needed, generally.
  2. From the terminal, send a file using ZModem. In Minicom, this is done with [Ctrl-A] and then S, which brings up a file selection dialog.

To receive a file from the Gumstix:

  1. Transmit the file(s) using 'sz', specifying them as arguments.
  2. The terminal, ideally, will detect and accept the transfer automatically.
  3. If you encounter a "Failure executing protocol" error, trying to send a file with Zmodem under minicom, you should install a Y/Z modem. apt-get install lrzsz 


------------------------------------------------------------------------------------------------------------------------------------------------------

            1.4. Bluetooth Communcation

------------------------------------------------------------------------------------------------------------------------------------------------------

The Gumstix controller board can be used on a Bluetooth network and other networks using a TCP/IP based protocol. We shall focus on Bluetooth communication
as a Personal Area Network Node

For other communication methods use the networking link:  http://docwiki.gumstix.org/Networking


Using the Gumstix Controller for Bluetooth communication works in both the Windows and Linux Environments

--------------------------------------------------------------------------------------------------------

System Currently In Use

--------------------------------------------------------------------------------------------------------

On the Gumstix
Modify the bnep0 section of /etc/network/interfaces as below:

iface bnep0 inet static
address 192.168.1.2
netmask 255.255.255.0

Modify /etc/default/bluetooth changing only these items from the original:

RFCOMM_ENABLE=false
PAND_OPTIONS="--role PANU --service GN --search --persist"

/etc/init.d/S30bluetooth stop /etc/init.d/S30bluetooth start


On the Linux machine

Modify /etc/default/[bluetooth|bluez-utils]:

PAND_ENABLED=1

PAND_OPTIONS="--listen --role GN"

/etc/init.d/[bluetooth|bluez-utils] restart


On a Debian system:  after log in the gumstix.

ifconfig bnep0 192.168.1.1

-----------------------------------------------------------------------------------------------------
The above method is different than the one prescribed by the Gumstix website. The information from the Gumstix Networking website regarding Bluetooth communication is given below:

On the Gumstix
Modify the bnep0 section of /etc/network/interfaces as above:

iface bnep0 inet static
address 192.168.xxx.2
netmask 255.255.255.0
network 192.168.xxx.0
gateway 192.168.xxx.1
broadcast 192.168.xxx.255

Modify /etc/default/bluetooth changing only these items from the original:

RFCOMM_ENABLE=false
PAND_OPTIONS="--role PANU --service GN --search --persist"

/etc/init.d/S30bluetooth stop /etc/init.d/S30bluetooth start

On your Linux machine
On a Debian system:

Modify the bnep0 section of /etc/network/interfaces ommitting the gateway:

mapping hotplug
script grep
map bnep0
iface bnep0 inet static
address 192.168.xxx.2
netmask 255.255.255.0
#gateway 192.168.xxx.1
network 192.168.xxx.0
broadcast 192.168.xxx.255

Modify /etc/default/[bluetooth|bluez-utils]:

PAND_ENABLED=1
PAND_OPTIONS="--listen --role GN"

/etc/init.d/[bluetooth|bluez-utils] restart

Now plug in your supported USB Bluetooth dongle and wait for your network to come up.

On your Windows machine

Using the BlueSoleil Software that may come with your USB Dongle. Install sofware and reboot. Plug in bluetooth dongle. Set network device to 192.168.xxx.1 Search for gumstix. Go to: My Services -> Properties -> Personal Area Network and turn off DHCP. The gumstix does not like the packet length of the DHCP.

Go to: My Bluetooth -> Security Set the security level to Medium. Set the default passkey to for example [1234]. Restart the BlueSoleil software.

Your gumstix should come up automatically.

------------------------------------------------------------------------------------------------------------------------------------------------------

            1.5 Testing the Connection- USBNet in Linux

------------------------------------------------------------------------------------------------------------------------------------------------------

This is the method prescribed by the lab users. The alternative methods to connect via USB is given at the following website http://docwiki.gumstix.org/index.php/Setting_up_USBnet

If everything works as expected you should have an usb0 interface (ifconfig -a) on both host (if Linux) and Gumstix after having plugged the USB-cable. From here on it's standard networking. If you are unfamiliar with Linux/Windows networks here some short lines to test your connection. Under Linux type "ifconfig", and look for adresses starting with 192.168.0.X.

If you have some, replace 192.168.0.1 with 10.0.0.1 and 192.168.0.2 with 10.0.0.2 in the following lines (same applies for Windows: if you have already a network that uses 192.168.0.X, switch to another network):

On the Gumstix (over serial line):

# ifconfig usb0 192.168.1.2

On the linux-machine:

# ifconfig usb0 192.168.1.1
# ssh root@192.168.1.2

And you should be connected to your gumstix over the usb-connection. Under Windows just configure the USB-interface to have 192.168.0.1 as IP-address. You can test the connection by httping to the gumstix (http://192.168.1.2).

If you want to have a static IP on your gumstix edit /etc/network/interfaces on you gumstix and replace

with

iface usb0 inet static
address 192.168.1.2
netmask 255.255.255.0

pre-up /sbin/modprobe g_ether;/sbin/modprobe af_packet
post-down /sbin/modprobe -r g_ether


Note however, that reflashing the gumstix will erase this file!

Therefore the cleanest solution is to add a dhcp-server on the host-machine.

You might also have a look at the Ethernet gadget page.

------------------------------------------------------------------------------------------------------------------------------------------------------

            1.6 Communicating with the Gumstix using I2C

------------------------------------------------------------------------------------------------------------------------------------------------------

The I2C unit supports a fast mode operation of 400 Kbits/sec and a standard mode of 100 Kbits/sec
The I2C bus uses 3 signals, SDA, SCL, and ground, all of which are present on the 60 pin hirose connector.


Detailed information about the I2C communication is given at http://docwiki.gumstix.org/index.php/I2C_on_the_Gumstix


Configuring the kernel for master/slave

Be sure CONFIG_I2C_PXA_SLAVE is set correctly in your buildroot's linux.config (set to 'n' if your Gumstix will be the master). If this changes, you will need to rebuild the kernel.

Using precompiled modules

The precompiled modules are specific to a version of the kernel.

·       2.6.11 - i2c-modules-2.6.11.tar.gz

·       2.6.15 - i2c-modules-2.6.15.tar.gz

·       2.6.17 - i2c-modules-2.6.17.tar.gz

·       2.6.18 - i2c-modules-2.6.18-pre-1143.tar.gz for versions of 2.6.18 prior to revision 1143. These versions used the SLOB version of kmalloc.

·       2.6.18 - i2c-modules-2.6.18-1143.tar.gz for SVN revisions 1143 thru 1184. These versions used the SLAB version of kmalloc.

·       2.6.18 - i2c-modules-2.6.18-1185.tar.gz for SVN versions 1185 and onwards. These versions use GCC 4.1.1

Copy the appropriate tarball to your gumstix. Let's assume you copied it into /tmp (ramdisk). Do the following to install the precompiled i2c modules:

cd /

tar xzf /tmp/i2c-modules-2.6.11.tar.gz
cd lib/modules/2.6.11gum
cp modules.symbols modules.symbols.org
cp modules.dep modules.dep.org
cat mod.sym >> modules.symbols
cat mod.dep >> modules.dep

Once you're happy that everything is working you can remove mod.dep, mod.sym, modules.symbols.org and modules.dep.org files.

Building the modules from source

1. Begin by getting a functional Buildroot running.

2. Enter the gumstix-buildroot/target/device/Gumstix/basix-connex (if you are using ether a basix or connex board) directory and edit linux.config (backing it up first...) Add the following lines in the appropriate place (hint: search for "I2C support"):

# I2C support

#

CONFIG_I2C=m

CONFIG_I2C_CHARDEV=m

#

# I2C Algorithms

#

# CONFIG_I2C_ALGOBIT is not set

# CONFIG_I2C_ALGOPCF is not set

# CONFIG_I2C_ALGOPCA is not set

 

#

# I2C Hardware Bus support

#

# CONFIG_I2C_ISA is not set

# CONFIG_I2C_PARPORT_LIGHT is not set

# CONFIG_I2C_STUB is not set

# CONFIG_I2C_PCA_ISA is not set

CONFIG_I2C_PXA=m

or at your own risk use this linux-2.6.11.config or linux-2.6.15.config. You can also setup the i2c stuff through menuconfig:

cd gumstix-buildroot/build_arm_nofpu/linux-*

make ARCH=arm menuconfig

For the 2.6.11 kernel, under 'I2C Support -->' set 'I2C Support' to <M>. Set 'I2C device interface' to <M>. Under 'I2C Hardware Bus support --->' set 'I2C interface in Intel PXA2x0' to <M>. Exit from menuconfig, saving your changes. The .config file will now contain the appropriate settings. You may want to copy this to gumstix-buildroot/sources/linux.config.

For the 2.6.15 and newer kernels, under 'Device Drivers -->' goto 'I2C Support -->' and set 'I2C support' to <M>. Set 'I2C device interface' to <M>. Goto 'I2C Hardware Bus support' and set 'Intel PXA2XX I2C adapter (EXPERIMENTAL)' to <M>. Exit from menuconfig, saving your changes. The .config file will now contain the appropriate settings. You may want to copy this to gumstix-buildroot/target/device/Gumstix/basix-connex/linux.config.

3. If your buildroot is earlier than revision 767 (your < 767) (note: revision 767 is fairly old - Jan 25, 2006, so this only applies if you're using a really old buildroot), then you'll need to grab the 999-gumstix-i2c-bugfix.patch file and copy it into gumstix-buildroot/sources/kernel-patches . For newer versions of buildroot, the patch is either incorporated, or not required.

4. Remove the old kernel (while you're still in the linux directory). This will trigger the top-level buildroot to actually rebuild linux.

rm arch/arm/boot/compressed/vmlinux

5. Run "make" at the gumstix-buildroot directory again to build the new kernel.

6. Copy the kernel and modules across or replace the filesystem image.


Starting I2C

Boot the gumstix and then "modprobe i2c-pxa" and "modprobe i2c-dev". Under 2.6.15, you should see some output like this:

# modprobe i2c-dev

i2c /dev entries driver

# modprobe i2c-pxa

I2C: i2c-0: PXA I2C adapter{CODE}

Under 2.6.11, you should see some output like the following:

# modprobe i2c-dev

i2c /dev entries driver

# modprobe i2c-pxa

insmod: cannot insert `/lib/modules/2.6.11gum/kernel/drivers/i2c/i2c-core.ko': File exists (-1): File exists

i2c_adapter i2c-0: found device 0x20
i2c_adapter i2c-0: found device 0x7e

The warning about i2c-core.ko is really just saying that it can't load i2c-core for a second time (since it was already loaded when i2c-dev was loaded).

You can automate this step at boot time, by adding the following lines to your /etc/modules file on the gumstix:

# I2C

i2c-dev
i2c-pxa

The I2C bus should now be active.

When you do the modprobe of i2c-pxa it will report all devices that are detected on the i2c bus (2.6.11 only). The device at entry 0x20 is an LTC1663 D/A that is used to bias the feedback voltage to the core voltage generator (LTC1878) (i.e. don't mess with it). It has not yet determined whether the 0x7e entry corresponds to a real device or not.


------------------------------------------------------------------------------------------------------------------------------------------------------

            1.7 Compiling the Source code on the cross compiling environment.

------------------------------------------------------------------------------------------------------------------------------------------------------

http://docwiki.gumstix.org/Sample_code/C/Hello_World 

This Makefile assumes that a directory is created parallel to the gumstix-buildroot

(i.e. on the system in the lab, gumstix-build root can be found at /home/dhylands/gumstix/gumstix-buildroot,

so for the hello-world example,  /home/dhylands/gumstix/dcb was created ).

 2. Send the execution file to the gumstix. 

scp filename root@192.168.1.2:/root
password: gumstix

 
and on the gumstix

/root# ./filename

------------------------------------------------------------------------------------------------------------------------------------------------------

            1.8 Debugging with gdb

------------------------------------------------------------------------------------------------------------------------------------------------------

These tips are provided by Chang-Young of the Robotics Laboratory:

In this example the program to be debugged is named ‘arm_executable’:

 
    * I used ‘make menuconfig’ in the buildroot to enable building both GDB server and GDB client on host;

    * built the buildroot using ‘make’;

    * flashed the new rootfs to the gumstix;

    * ran ‘gdbserver localhost:2000 arm_executable’ on the gumstix;

    * ran gdb from directory ‘buildroot/toolchain_build_arm_nofpu/gdbclient-6.3/gdb/’ with options ‘-symbols arm_executable’ – i.e. ‘./gdb -symbols arm_executable’

    * used command ‘target remote 192.168.1.103:2000’ in gdb, where 192.168.1.103 is the IP of my gumstix;

    * and everything worked!

 
The trick here is to use the ‘-symbols’ option instead of just ‘./gdb arm_executable’; for me this got rid of a problem that manifested as “SIGILL – illegal instruction” in gdb. Another thing to watch out for is to specify a path when running gdb, because you don’t want the normal gdb likely installed on your system and in your path to be used.

 

------------------------------------------------------------------------------------------------------------------------------------------------------

            1.9 Adding NFS support to the gumstix

------------------------------------------------------------------------------------------------------------------------------------------------------

see also Root filesystems#NFS Root

Below are the steps required to generate a root filesystem with NFS support.

Adding RPC support into uClibc

First you need to add RPC support to uClibc

cd <gumstix-buildroot>/toolchain_build_arm_nofpu/uClibc

make menuconfig

· Under Networking Support, enable Remote Procedure Call (RPC) support, Full RPC support, and Reentrant RPC support.

· Hit Escape twice, then select Yes to save.

make clean 

 Adding NFS support into the kernel

Now add NFS support into the gumstix kernel

cd <gumstix-buildroot>/build_arm_nofpu/linux-2.6.20gum

make ARCH=arm menuconfig

· Under File systems, under Network File Systems, enable NFS file system support and Provide NFSv3 client support.

· Hit Escape three times, then select Yes to save.

And remove the old kernel image so it gets remade later when we regenerate the root filesystem

rm build_arm_nofpu/linux-2.6.20gum/arch/arm/boot/compressed/vmlinux

Adding NFS mount support to busybox

Now we have to enable the option in busybox so we can mount NFS filesystems

cd <gumstix-buildroot>/build_arm_nofpu/busybox-1.1.2/

make menuconfig

· Under Linux System Utilities select Support mounting NFS file systems

· Hit Escape twice, then select Yes to save.

cd ../..

make busybox-clean
[edit] Create the root filesystem image

Now we can create our new root filesystem image to flash onto the gumstix

cd <gumstix-buildroot>

make

This should give you an image with NFS client support.
[edit] Troubleshooting

If you have trouble mounting a NFS share and see errors like this to dmesg:

RPC error to dmesg:

portmap: server localhost not responding, timed out

RPC: failed to contact portmap (errno -5).

lockd_up: makesock failed, error=-5

try adding the -o nolock to your mount command

mount -t nfs -o nolock 10.1.1.1:/mnt/share /mnt/share

 

------------------------------------------------------------------------------------------------------------------------------------------------------

            1.10 Using the the ubuntu computer.

------------------------------------------------------------------------------------------------------------------------------------------------------


First install the necessary packages from your local repository. Aptitude may be switch with apt-get for a _less then modern_ installation.

1. sudo aptitude -P install nfs-kernel-server nfs-common portmap

When configuring portmap do =not= bind loopback. If you do you can either edit /etc/default/portmap by hand or run:
1. sudo dpkg-reconfigure portmap
If you have edited the file by hand you can restart portmap via:

1. sudo /etc/init.d/portmap restart
Note: It is not necessary to install NFS on client machines which are not going to be sharing any of their own directories.

Sharing Local Folders

1. mkdir /root/gumstix_share
To specify a folder you will need to edit /etc/exports, which can be done like (replace vi for your favorite editor):

1. sudo vi /etc/exports
For an example I will share, with full read/write and privileges, my temporary directory. This directory will be broad casted to every local IP from 192.168.1.1 through 192.168.1.255.

2. /root/gumstix_share 192.168.1.1/24(rw,no_root_squash,async)


Mount command on the gumstix.

mount -t nfs -o nolock 10.1.1.1:/root/gumstix_share /mnt/nfs


  Sign in   Home   Sitemap   Terms   Report Abuse   Print  |  Powered by Google Sites