Moxa Technologies EM-1240-LX How to Mount a Remote NFS Server, Dynamic Driver Module Load/Unload

Page 42

EM-1240-LX User’s Manual

Configuring EM-1240-LX

<USER_PASSWORD>: Password for user account

To check if PPPOE is successfully connected, use the command:

y/>ifconfig ppp0

How to Mount a Remote NFS Server

Currently, the EM-1240-LX only supports NFS (Network File System) clients. Users can open NFS service on a Linux PC to enable the EM-1240-LX to push data to it. The EM-1240-LX can use NFS to mount a remote disk as a local disk for data or log purposes.

1.First, the NFS server must open an export directory and allow access to the IP address. Edit the file “/etc/exports” on your Linux PC, and then run the NFS daemon. The following example gives one possibility (refer to the NFS-HOWTO document at http://nfs.sourceforge.net/nfs-howto/server.html):

/home/usr 192.168.3.1 (rw,no_root_squash,no_all_squash)

2.The EM-1240-LX must run the “portmap” utility. This program is enabled by default in the “/etc/rc” file. Use the following command to mount the remote NFS server:

/>mount –t nfs <remote-ip>:<remote-export-directory> <local-directory>

Dynamic Driver Module Load/Unload

Besides supporting traditional static drivers, the EM-1240-LX also supports the dynamic driver module load / unload mechanism. It allows user to load a special driver into the kernel to enable hardware features for specific applications. To load / unload dynamic driver module, use the following commands.

Load module:

/>insmod <module-directory>/<module file name>

For example, to load the UART driver, type the following command:

/>insmod /lib/modules/2.6.9-MoXaRt/kernel/drivers/char/mxser.ko

Show module list:

/>lsmod

Unload module:

/>rmmod <module-name listed by lsmod command>

For example, to unload the UART driver, type the following command:

/>rmmod mxser

For the EM-1240-LX, the factory default is to load the UART driver “mxser.ko”. The additional driver module to control SD/MMC memory card is loaded for the EM-1240-LX. Please see the following information below to know the location and file name for these driver modules.

UART:

/lib/modules/2.6.9-MoXaRt/kernel/drivers/char/mxser.ko

SD/MMC:

/lib/modules/2.6.9-MoXaRt/kernel/drivers/mmc/mmc_core.ko /lib/modules/2.6.9-MoXaRt/kernel/drivers/mmc/mmc_block.ko /lib/modules/2.6.9-MoXaRt/kernel/drivers/mmc/moxasd.ko

4-9

Image 42
Contents EM-1240-LX User’s Manual First Edition, NovemberCopyright Notice Table of Contents Chapter EM-1240-LX Device API Introduction Overview Package ChecklistProduct Features EM-1240-LXProduct Specifications Hardware SpecificationsSoftware Specifications Hardware Block Diagram Appearance EM-1240 Development Kit Embedded ModuleEM-1240 Embedded Module EM-1240 Development Kit Dimensions Installing the EM-1240-LX LED IndicatorsWiring Requirements Connecting Data Transmission Cables Connecting the PowerGrounding the EM-1240-LX Connecting to the Network Connecting to a Serial DeviceAdditional Functions Reset ButtonInternal SD Socket Serial Console PortReal-time Clock Getting Started Powering on the EM-1240-LX Connecting the EM-1240-LX to a PCConsole Port 192.168.3.127 255.255.255.0 Default IP Address Default NetmaskTelnet 192.168.4.127 255.255.255.0Configuring the Ethernet Interface Ifconfig eth0 Dhcpcd -p -a eth0 & dhcpcd -p -a eth1Installing a Secure Digital SD Memory Card Step Installing the EM-1240-LX Tool ChainDeveloping Your Applications #mount -t iso9660 /dev/cdrom /mnt/cdromEM-1240-LX User’s Manual Compiling Hello.c PATH=/usr/local/arm-elf/bin$PATHUploading Hello to the EM-1240-LX #makeRunning Hello on the EM-1240-LX # chmod 755 hello #./helloMake File Example Code Cflags =Software Package EM-1240-LX Software Architecture Flash Context Flash Address Size Access control Journaling Flash File System JFFS2Additional information about JFFS2 is available at EM-1240-LX Software Package Bin DevPtyp0 Ppp Pio Rtc Ram1 Ram0 Null Kmem Mem Cua0 Console Tty Configuring the EM-1240-LX ‰ Iptables ‰ NATExample default enable Enabling and Disabling DaemonsDefault Home Page address Adding a WebLocal Host Packets Define policy rules, and Append or delete rules UsageExamples Define policy for chain rules Enabling NAT at Bootup NAT ExampleDial-out Service Configuring Dial-in/Dial-out ServiceConfiguring PPPoE Dial-in ServiceHow to Mount a Remote NFS Server Dynamic Driver Module Load/UnloadUpramdisk Ramdiskupkernel em1240-1.x.bin /ramdiskrebootUpgrading the Kernel Cd ramdiskUpgrading the Root File System & User Directory Upramdisk Cd ramdiskUser Directory Backup-EM-1240-LX to PC Ramdiskbackupfs /ramdisk/usrdisk-backupAutostarting User Applications on Bootup Loading Factory DefaultsMirroring the Application Program and Configuration Checking the Kernel and Root File System VersionsFsversion Cat /etc/versionEM-1240-LX Device API RTC Real-time Clock BuzzerUart Interface UC Finder Windows UC Finder EM-1240-LX User’s Manual UC Finder EM-1240-LX User’s Manual UC Finder Linux UC Finder File manager System CommandsBusybox µClinux normal command utility collection EditorOther NetworkProcess Moxa Special UtilitiesSnmp Agent with MIB II & RS-232 Like Group Snmp Agent with MIB II & RS-232 Like Group Ip MIB Tcp MIB Udp MIBSnmp MIB RFC1317 RS-232 like group supported variables Rs232 MIBEM-1240-LX FAQ Service Information Moxa Internet Services Following services are providedProblem Report Form Moxa Product † EM-1240-LX Serial NumberProduct Return Procedure