AMC 68VZ328 software manual Filesystem Configuration

Page 79

Filesystem Configuration

For the dimmPCI units to be correctly configured for the subnet, the rc file must be modified. These different configurations should each be contained in a separate copy of the filesystem, since different applications will be used. Copies of the filesystem can be generated in the following way. Here we will assume that the original filesystem is /opt/newfs, and the new filesystems, sysfs is for the system slot and perfs for the peripheral slot.

cd /opt/

cp –Rpdx newfs sysfs

cp –Rpdx newfs perfs

where R, copy directories recursively

p, preserve file attributes if possible d, never follow symbolic links

x, stay in this filesystem

For both the system slot and peripheral slot dimmPCI modules, the ‘dhcp’ client must be turned off, which can be done by commenting it out with ‘#’ in front of the line. This must be done since the IP addresses and routes are set statically.

The following code should be added to the system slot rc file to set the IP information. The rc file is located in /opt/sysfs/romdisk/etc/, where sysfs is the name of filesystem for the system slot.

# attach the pci0 and eth0

/sbin/ifattach —addr 192.168.10.87 —net 192.168.10.0 —mask \ 255.255.255.0 —gw 192.168.10.1 eth0

/sbin/ifattach —addr 192.168.7.1 —net 192.168.7.0 –mask \ 255.255.255.0 pci0

eth0 will be set up as a device on the local network, so its address must be on the local network. Here, the local network is on 192.168.10.0 and the IP address has been set specifically to 192.168.10.87. The gateway 192.168.10.1 specifies the machine that acts as an interface between the local network and the outside network, and will be redirecting information from the local network to the subnet you are creating with the two dimmPCI modules. pci0 will be a device on the PCI subnet, here set as 192.168.7.0 and its IP address is set accordingly as 192.168.7.1.

Note that the ‘\’ character at the end of the lines indicated that the command continues on the next line.

For the peripheral slot dimmPCI module, pci0 is the only network interface; there is no physical ethernet connection for the peripheral module to set up. This is the code that must be added to a peripheral slot rc file

in /opt/perfs/romdisk/etc/.

# attach the pci0

/sbin/ifattach —addr 192.168.7.2 —net 192.168.7.0 \ —mask 255.255.255.0 —gw 192.168.7.1 pci0

pci0 is on the subnet (192.168.7.0), and has an IP address of 192.168.7.2. The subnet for the pci0 devices on both modules must be the same. For the peripheral module, a gateway must be

www.amctechcorp.com

79

Image 79
Contents DimmPCITM 68VZ328 Hardware / Software Manual Contact Information Copyright noticeDimmPCITM Software Development Kit NETdimm Developers Kit Quick Start Guide Etc/issue Page This page left intentionally blank Launching Linux at the embedded IntroductionPage System Requirements What’s on the CD?This page left intentionally blank Backplane FeaturesUC68VZ328 Embedded Microcontroller CPU ModuleCPU Module Description General DescriptionBackplane Description CPU Architecture ArchitectureSystem Memory MCU CoreMemory Map Memory Map MemoryLayout of the Flash and Flash Schematic Layout of the Flash Sdram Viewing the Ethernet MAC ID Ethernet ControllerNETdimm Ethernet Schematic IOdimm Digital I/ODigital Output Schematic Analog Output Schematic Analog Input Schematic Digital to Analog Converter Schematic Watchdog RS-232Highlights Usage LCD Interface LCD SchematicDimmPCITM signals for System Slot DimmPCITM Signal DescriptionsPCI Maximum Ratings Electrical CharacteristicsThis page left intentionally blank Before beginning Installing the dimmPCI TM SystemInstallation Builder KitConfiguring and compiling the µClinux kernel Customizing the filesystem Creating a ROM imageAccessing your dimmPCI development board via the serial port Static IP Accessing the NetworkDynamic IP Compiling your own source code Accessing your dimmPCI development board via telnetUsing NFS to streamline the development cycle Home directory/dimmpci/source Method Updating Applications on your dimmPCI moduleThis page left intentionally blank Loader Programming the uC68VZ328Oops Cd /opt/boottools/oops Oops -p /dev/ttyS0 -k kernel.bin Page Page This page left intentionally blank Sample Code AppendixClose the file afterwards fclose filehandle Page Longwatchdogid #include unistd.h #include stdio.h int main void This page left intentionally blank Journalling Flash File System Umount /usr Sbin/mkjffs /dev/flash0 Page This page left intentionally blank Development Tool Chains Normal Usage of the PIC-COFFTool Chain Page This page left intentionally blank Introduction D1 Application NoteKernel and Filesystem Configuration YES Kernel and Filesystem Configuration Flow ChartAvailable Digital I/O Pins List of all available digital I/O pins Dimmio structure description Programming StructureDigital I/O Functions Page In0 In1 In2 In3 In4 In5 In6 In7 Out0 Even Parity Sample ProgramsMknod io1 c 123 Page This page left intentionally blank Abstract D2 Application NoteRequirements Kernel ConfigurationAgain, from the main menu under Network device support Kernel Configuration Flow Chart AtCommandPrompt Filesystem Configuration Cd /opt/filesystem name make clean Make Modifications to ‘rc’ file Filesystem Configuration Flow ChartTesting Host machine ConfigurationPage This page left intentionally blank Application Note Using Multiple NETdimm ModulesInetd based Server & Client Simple Server & ClientPage This page left intentionally blank IOdimm Using Analog and Digital I/O withCd /opt Cp -Rpdx newfs iodimmmfs ADC MAX1203 Category Channel Backplane System Backplane Header Slot Pin Available I/O PinsDigital Inputs and Outputs Functions+ Κ Iodimm/dio Samples/cardspecific/iodimm/dio Page This page left intentionally blank Purpose & basic format of files for oops Using OopsUpload & Flash Download Upload & RunCommon oops program arguments Appendix This page left intentionally blank 104 DimmPCITM Software Development Kit Distribution Licensing, Copyrights & LiabilityPreamble 106 107 108 109 Appendix How to Apply These Terms to Your New Programs No Warranty111 112 113 This page left intentionally blank 114 References/ Suggested Reading