Digi 9P 9360/9750 manual JFFS2

Page 57

R o o t F i l e S y s t e m T y p e s

JFFS2

JFFS is a log-structured journaling flash file system which was designed to be used on Flash devices in embedded systems. It was originally developed for the 2.0 kernel by Axis Communications. JFFS2 is an improved version of JFFS which includes compression and improved read/write access.

Find more about JFFS2 at http://sourceware.org/jffs2

NAND chips are not guaranteed to be error free and most chips have bad blocks. Therefore, U-Boot as well as Linux has to know how to handle these bad blocks. Both use JFFS2 for this purpose.

U-boot provides the commands "nand read.jffs2.s" and "nand write.jffs2". Both commands are skipping bad blocks. Therefore, there must be some space left for reserve blocks. In U-Boot you can run the "nand bad" command for a summary of known bad blocks on the flash device.

In Linux a JFFS2 driver for NOR and NAND chips can be used.

If a jffs2 image should be copied to a partition it must be ensured that the image was created with the correct erase size of the used chip. Otherwise Linux will print error messages on the screen.

To reduce memory allocation Linux uses a virtual erase size if the physical erase size of the chip is to small. A message like the one below may be printed on the console

jffs2: Erase block size too small (XXKiB. Using virtual blocks size(XXKiB) instead

Another message which could be printed on the console is

Empty flash at 0xXXXXXXXX ends at 0xXXXXXXXX

This message doesn't indicate a problem. Instead, it is printed if a block of data is partially written. These messages will disappear when the garbage collection restructures the remaining space

5 7

Image 57
Contents LxNETES User’s Guide ConnectCore 9P 9360/9750 Page Page Page Contents Building the First Project Interfaces & Devices Appendix B Introduction OverviewCross-development environment Linux kernel sources Template projectExample applications Features General featuresWhat’s new in LxNETES 3.2? RTC Gpio This is a tip. It contains useful information about a topic Conventions used in this manualAcronyms and abbreviations Requirements System Requirements/PrerequisitesSystem requirements Optional but recommended components Disk spaceTftp daemon Applications & ServicesNFS server JTAG-Booster N E T E S U s e r ’ s G u i d e Connecting host PC with development board Getting StartedIntroduction Seyon MinicomSeyon Settings Connect powerTest Ethernet configuration # ifconfig eth0 Installing LxNETESGuided Installation Manual Installation N u a l Installation Building the Default Project Run configureBuilding the First Project Run make Run make installApplication Development Writing applicationsAdding your own applications Using C++ Included example applicationsDisplay Proc/cpuinfo contents Debugging applications Choose the right architecture for your target Shell applications busybox Included pre-built applicationsTelnet daemon utelnetd Web server BoaEmbedded Qt Nano-X/microwindowsMem Useful applicationsKernel Development What is a kernel module?Writing kernel modules Writing your own kernel modulesAdd the module to the build environment Building and loading of kernel modulesIncluded Kernel modules Minimal Advanced Topics Modifying the default projectD i f y i n g t h e d e Fault p r o j e c t Building a custom project Boot process BootIntroduction Bank # 0 00000000 32 MB ConnectCore 9P 9360/9750NAND-Flash Linux boot methodsUSB NOR FlashMMU Linux boot processV a n c e d T o p i c s Passing arguments to the kernel Automating the image downloadUpdating the Flash memory Updating a running system manually Updating a running system the easy wayDownload the new image file to RAM Erase the Flash partitionWrite the image to Flash Boot KernelRoot File System Updating a corrupted system using a debugger Root File System Types Set bootargs to be passed to the kernel Download the kernel to RAM via TftpLaunch the kernel from RAM JFFS2 Copy the kernel to RAM O t F i l e S y s t e m T y p e s N E T E S U s e r ’ s G u i d e Serial interface Interfaces & DevicesI2C interface USB host interfaceSPI interface LCD interfaceCompact flash interface How to set the initial system date and timeSD card interface Real time clock RTCPCI interface CD contents Appendix aRelated documentation Readme.txt Install.shRelNotes.txt Docs ImagesConnectCore 9P 9360 CC9P9360 SetupConnectCore 9P 9750 CC9P9750 HardwareFlash memory layout Memory layoutsConnectCore 9P 9360 / ConnectCore 9P Sdram memory layoutTextbase N E T E S U s e r ’ s G u i d e Appendix B Boot command referenceO o t c o m m a n d r e f e r e n c e Skipped CC9C CCXP270 UNC90 Example A9M24x0 User keys