Moxa Technologies UC-7420/7410 user manual Journaling Flash File System JFFS2, Software Package

Page 18

UC-7420/7410 User’s Manual

Introduction

services and daemons. During this time, the kernel will start searching for system configuration parameters via rc or inittab.

Normally, the kernel uses the User Root File System to boot up the system. The Mini Root File System is protected, and cannot be changed by the user, providing a “safe” zone. The kernel will only use the Mini Root File System when the User Root File System crashes.

For more information about the memory map and programming, refer to Chapter 5, “Programmer’s Guide.”

Journaling Flash File System (JFFS2)

The User Root File System in the flash memory is formatted with the Journaling Flash File System (JFFS2). The formatting process places a compressed file system in the flash memory, transparent to the user.

The Journaling Flash File System (JFFS2), which was developed by Axis Communications in Sweden, puts a file system directly on the flash, instead of emulating a block device. It is designed for use on flash-ROM chips and recognizes the special write requirements of a flash-ROM chip. JFFS2 implements wear-leveling to extend the life of the flash disk, and stores the flash directory structure in the RAM. A log-structured file system is maintained at all times. The system is always consistent, even if it encounters crashes or improper power-downs, and does not require fsck (file system check) on boot-up.

JFFS2 is the newest version of JFFS. It provides improved wear-leveling and garbage-collection performance; improved RAM footprint and response to system-memory pressure, improved concurrency and support for suspending flash erases; marking of bad sectors with continued use of the remaining good sectors, which enhances the write-life of the devices; native data compression inside the file system design; support for hard links.

The key features of JFFS2 are:

yTargets the Flash ROM Directly

yRobustness

yConsistency across power failures

yNo integrity scan (fsck) is required at boot time after normal or abnormal shutdown

yExplicit wear leveling

yTransparent compression

Although JFFS2 is a journaling file system, this does not preclude the loss of data. The file system will remain in a consistent state across power failures and will always be mountable. However, if the board is powered down during a write then the incomplete write will be rolled back on the next boot, but writes that have already been completed will not be affected.

Additional information about JFFS2 is available at:

http://sources.redhat.com/jffs2/jffs2.pdf

http://developer.axis.com/software/jffs/

http://www.linux-mtd.infradead.org/

Software Package

Boot Loader

Redboot (V1.92)

Kernel

MontaVista embedded Linux 2.4.18

Protocol Stack

ARP, PPP, CHAP, PAP, IPv4, ICMP, TCP, UDP, DHCP, FTP, SNMP

 

V1/V3, HTTP, NTP, NFS, SMTP, SSH 1.0/2.0, SSL, Telnet, PPPoE,

 

OpenVPN

File System

JFFS2, NFS, Ext2, Ext3, VFAT/FAT

1-13

Image 18
Contents UC-7420/7410 User’s Manual Third Edition, JuneCopyright Notice TrademarksDisclaimer Table of Contents Chapter UC Finder Appendix B Windows Tool Chain Introduction Introduction ‰ Hardware IntroductionOverview Package ChecklistProduct Features UC-7410-LXProduct Hardware Specifications Appearance and Dimensions Hardware IntroductionAppearance Dimensions Hardware Block Diagram LED IndicatorsLED Name Color Meaning Reset to default Button Reset-type ButtonsReset Button Real Time ClockPlacement Options Wall or CabinetWiring Requirements Hardware Connection DescriptionDIN-Rail Mounting Pin Signal Connecting the PowerConnecting to the Network Grounding UC-7420/7410CompactFlash Connecting to a Serial DeviceConnecting to the Console Port Pin RS-232 RS-422 RS-485Software Introduction Software ArchitectureJournaling Flash File System JFFS2 Software PackageSoftware Version Comparison Table Protocol stacks and utilities Directory Change‰ Configuring the Ethernet Interface Getting StartedPowering on UC-7420/7410 Connecting UC-7420/7410 to a PCSerial Console 192.168.3.127 255.255.255.0 Default IP Address NetmaskTelnet Console 192.168.4.127 255.255.255.0SSH Console Windows UsersLinux Users Configuring the Ethernet InterfaceModifying Network Settings with the Serial Console Static IP addressesDynamic IP addresses Default IP address is 192.168.5.127, netmask Configuring the Wlan via the Pcmcia InterfaceModifying Network Settings over the Network IEEE802.11b#vi /etc/wlan/wlancfg-any IEEE802.11g Setting Explanation SettingKey1Str, Key2Str, Key3Str, Key4Str-Sets strings Key1 to Key4 TurboRate-Enables or disables TurboRate Checking the Flash Memory Space Installing the Tool Chain LinuxTest Program-Developing Hello.c StepCompiling Hello.c You should receive the following responseTesting Environment Developing Your First ApplicationUploading Hello to UC-7420/7410 and Running the Program Compiling tcps2.c #mount -t iso9660 /dev/cdrom /mnt/cdromUploading tcps2-release and Running the Program PuTTY#jobs // use this command to check if the program is running Testing Procedure Summary UC-7420/7410 User’s ManualUC-7420/7410 User’s Manual ‰ System Version Information ‰ System Image Backup Managing Embedded LinuxUpgrading the Firmware System Image BackupSystem Version Information Upgrading the firmware will erase all data on the Flash ROM#upramdisk #cd /mnt/ramdisk Loading Factory Defaults Backing Up the User File System Firmware versions earlier than V1.5 not includingFirmware version V1.5 and later versions Enabling and Disabling Daemons UC-7420/7410 User’s Manual Managing Embedded Linux Setting the Run-Level Adjusting the System Time Setting the Time ManuallyExample shell script to update the system time periodically NTP ClientUpdating the Time Automatically Enable the cron daemon manually Cron-daemon to Execute Scheduled CommandsChange mode of fixtime.sh Enable cron when the system boots upConnecting Peripherals USB Mass StorageCF Mass Storage Managing Communications ‰ Iptables ‰ NATEnabling the Telnet/ftp server Web Service-ApacheTelnet / FTP Disabling the Telnet/ftp serverUsr/www/cgi-bin Saving a Web Page to the CF Card Use the following commands to restart the Apache web server Iptables Local Host Packets Usage Observe and erase chain rulesDefine policy for chain rules ExamplesAppend or delete rules IptmacEnabling NAT at Bootup NAT ExampleDial-up Service-PPP Example 2 Connecting to a PPP server over a hard-wired link How to check the connection UP Loopback RunningNFS Network File System Setting up UC-7420/7410 as an NFS ServerSetting up a Machine for Incoming PPP Connections #vi /etc/exportsSetting up UC-7420/7410 as an NFS Client Mail Steps 2Open VPN Internet IFS=‘ Create link symbols to enable this script at boot time Destination Gateway Genmsk Flags Metric Use Iface Now ping Host B from Host a by typing Setup 3 Routed IP Destination Gateway Genmsk Flags Metric Use Iface Programmer’s Guide Address Size Contents Flash Memory MapLinux Tool Chain Introduction Cross Compiling Applications and Libraries Debugging with GDBObtaining help Tools Available in the Host EnvironmentDevice API RTC Real Time ClockBuzzer WDT Watch Dog Timer Input Int fd File handle from swtdopen return value Output Special Note User application example ExampleSwtddisableswtdfd Int mainint argc, char *argv Pidt sonpid Example to set the baud rate Example to get the baud rateSpecial Note KeyPadBaud rate inaccuracy ExamplesMake File Example UC Finder Installing the Software Windows UC FinderUC-7420/7410 User’s Manual UC Finder Broadcast Search Linux ucfinder File manager System CommandsBusybox V0.60.4 Linux normal command utility collection EditorProcess OtherMoxa special utilities Windows Tool Chain Introduction Introduction Installation Procedure Select the Root DirectoryUC-7420/7410 User’s Manual Windows Tool Chain Introduction UC-7420/7410 User’s Manual Windows Tool Chain Introduction Using the Bash Shell GDB debug tool-Insight UC-7420/7410 User’s Manual Windows Tool Chain IntroductionUC-7420/7410 User’s Manual Windows Tool Chain Introduction Service Information Moxa Internet Services Following services are providedProblem Report Form Moxa Product † UC-7410-LX † UC-7420-LX Serial NumberProduct Return Procedure