Home
Developer Resources
Technical Articles

QNX Technical Articles

QNX® Momentics® Flash Filesystem & Embedding Technology Development Kit 1.0.1 Release Notes

QNX® Momentics®

Date of this edition: October 03, 2005

Target OS: QNX® Neutrino® 6.3.0 SP1 or later

Host OS: Microsoft Windows XP SP1 or SP2, 2000 SP4, NT SP6a; Sun Solaris 7, 8, or 9; QNX® Neutrino® 6.3.0 SP1 or later; Linux Red Hat 8, 9, or Enterprise WS 3 or 4


Note:
  • For information on installing this TDK, see the installation note.
  • For the most up-to-date version of these release notes, log into your myQNX account, and then go to the Download Center area of www.qnx.com.
  • QNX Neutrino 6.3 supports only the new flash filesystem (FFS3). The older flash filesystem (FFS2) has been discontinued.

Contents


Note: Throughout this document, you may see reference numbers associated with particular issues, changes, etc. When corresponding with our Technical Support staff about a given issue, please quote the relevant reference number. You might also find the reference numbers useful for tracking issues as they become fixed.


Note: The content of the Flash File System & Embedding TDK 1.0.1 has changed compared to the previous version (V6.3.0). It used to provide precompiled flash driver binaries for BSPs. Only three flash driver binaries are now provided:
  • devf-ram
  • devf-i365sl
  • devf-generic

All other flash binaries can be compiled from the source provided with the BSP source distribution and linked against the Flash File System library included in this TDK.


What's in this TDK?

Binaries

This TDK contains drivers and libraries for NOR and NAND flash filesystems.

A new version of the NOR flash filesystem library offers significantly improved resistance to power-loss corruption. However, this improvement isn't backwards-compatible with the older version of the library.

The older library (libfs-flash.a) has been removed from this release. All flash drivers (devf-generic, devf-ram, etc.) now link against the version 3 library, i.e. libfs-flash3.a.

If your existing code links against libfs-flash.a, you must now use the version 3 library. For more information, please refer to the documentation on the new version 3 flash filesystem as well as the migration technote.

Installed files

These files are installed under $QNX_TARGET/, under the subdirectories for each supported target-platform:

  • ARMBE/LE
    • armbe/sbin/devf-ram
    • armbe/sbin/inflator
    • armbe/usr/bin/flashctl
    • armbe/usr/lib/libflash-nand.a
    • armbe/usr/lib/libfs-flash3.a
    • armle/sbin/devf-generic
    • armle/sbin/devf-ram
    • armle/sbin/inflator
    • armle/usr/bin/flashctl
    • armle/usr/lib/libflash-nand.a
    • armle/usr/lib/libfs-flash3.a
  • MIPSBE/LE
    • mipsbe/sbin/devf-generic
    • mipsbe/sbin/devf-ram
    • mipsbe/sbin/inflator
    • mipsbe/usr/bin/flashctl
    • mipsbe/usr/lib/libflash-nand.a
    • mipsbe/usr/lib/libfs-flash3.a
    • mipsle/sbin/devf-generic
    • mipsle/sbin/devf-ram
    • mipsle/sbin/inflator
    • mipsle/usr/bin/flashctl
    • mipsle/usr/lib/libflash-nand.a
    • mipsle/usr/lib/libfs-flash3.a
  • PPCBE
    • ppcbe/sbin/devf-generic
    • ppcbe/sbin/devf-ram
    • ppcbe/sbin/inflator
    • ppcbe/usr/bin/flashctl
    • ppcbe/usr/lib/libflash-nand.a
    • ppcbe/usr/lib/libfs-flash3.a
  • SHLE
    • shle/sbin/devf-generic
    • shle/sbin/devf-ram
    • shle/sbin/inflator
    • shle/usr/bin/flashctl
    • shle/usr/lib/libflash-nand.a
    • shle/usr/lib/libfs-flash3.a
  • X86
    • x86/sbin/devf-generic
    • x86/sbin/devf-i365sl
    • x86/sbin/devf-ram
    • x86/sbin/inflator
    • x86/usr/bin/flashctl
    • x86/usr/lib/libflash-nand.a
    • x86/usr/lib/libfs-flash3.a
  • Header files
    • usr/include/fs/f3s_api.h
    • usr/include/fs/f3s_flash.h
    • usr/include/fs/f3s_socket.h
    • usr/include/fs/f3s_spec.h
    • usr/include/sys/dcmd_f3s.h
    • usr/include/sys/dcmd_mem.h
    • usr/include/sys/f3s_api.h
    • usr/include/sys/f3s_comp.h
    • usr/include/sys/f3s_flash.h
    • usr/include/sys/f3s_socket.h
    • usr/include/sys/f3s_spec.h
    • usr/include/sys/nand.h

Source Code

If you've also purchased the source code associated with this TDK, you'll have the source to the following binaries: flashctl, inflator, libflash-nand.a, and libfs-flash3.a.

After you've installed a source bundle, you can find the associated archive in $QNX_TARGET/usr/src/archives/qnx/tdk-efsys-src.zip.

If you have QNX Momentics PE, you can compile the source using the IDE or the command-line tools; if you have SE, you have to use the command-line tools.

Compiling with the IDE

Once you've installed the TDK, you can simply import the source into a project by doing the following:

  1. Start the IDE.
  2. Select File-->Import and select QNX Source Package.
  3. Select the source package that you want to import, then follow the instructions on the screen.

Compiling with the command-line tools

Here's how to compile the source from the command line:

  1. Decompress the archive:
    • On Windows, use Winzip.
    • On Linux, Solaris, and QNX Neutrino, type:
      unzip -d dirname $QNX_TARGET/usr/src/archives/qnx/tdk-efsys-src.zip
          

      where dirname is the directory where you'd like to put the source files.

  2. On Windows, start a bash shell in which to run the commands below.
  3. Go to the directory where you saved the source:
    cd dirname
      
  4. Run the setenv.sh script to configure the environment to build things locally and not install over any existing binaries:
    . ./setenv.sh
      
  5. Type make to build the software. You'll find the results of the build in the dirname/install directory.

Flash TDK and BSPs

Once you've installed both the Flash TDK as well as a BSP that supports flash devices, you must rebuild your OS image in order to incorporate flash support. To do this, you'll need to modify the buildfile that generates the image:

  1. Locate the following lines in your buildfile:
    # devf-name_of_board
    # flashctl

    where name_of_board identifies the specific flash driver (e.g. devf-mgt5200). Note that your buildfile may call the devf-generic driver.

  2. Uncomment those two lines by deleting the # character at the start of each line.
  3. Now generate a new OS image from your modified buildfile (e.g. mkifs buildfile).

Note: If you're using the IDE, you can modify and rebuild your OS image using the System Builder (Window-->Open Perspective-->Other...-->QNX System Builder).

Fixed issues

This version of the TDK addresses the following issues in the devf-* drivers:

  • SH4 compiler optimizations may result in flash write failures. (Ref# 21612)
  • Flash lock / unlock / unlockall operations formerly might have completed prematurely if the flash was interleaved. Polling for completion now takes interleaved flash into consideration. (Ref# 20908)
  • Power loss during a reclaim cleanup used to cause corruption. We've modified the repair code to prevent stale space reclaim while repairing flash corruption. Flash is properly repaired before reclaims are allowed. (Ref# 21105)
  • Allocated but unwritten flash extents formerly caused corruption. Repair code used to try to recover an allocated but unwritten extent from previous power loss, causing unrecoverable corruption. Dangling extents are now always repaired by marking them as invalid / stale. They're cleaned up when the block is later reclaimed. (Ref# 21121)
  • Power loss while creating a spare block (part of reclaim) used to cause unrecoverable corruption. Fixed to scrutinize spare blocks for corruption. (Ref# 21123)
  • When a block was retired due to an erase failure, no permanent markers were written to indicate this state. If the failed erase left enough data intact, the next power cycle may have accidentally used the block's stale data. The driver now properly tags retired blocks to avoid accidentally reusing their old data. (Ref# 21040)
  • It was possible for the driver to SIGSEGV while manipulating files. We added a missing check for a NULL pointer. (Ref# 21110)
  • If the flash filesystem was corrupted externally (e.g. by bad hardware, faulty address lines, or a DMA overrun), the filesystem may have reformatted the affected blocks as spares before determining that the corruption was unrecoverable. To aid in postmortem analysis of this corruption, checks were added to prevent the creation of more spares than what the filesystem was formatted to have. (Ref# 20312)
  • If power was lost while an extent was being initialized, certain fields may have been written before the extent was marked as active. The repair code was enhanced to better detect and repair such corruption. (Ref# 20150)

Known issues

  • When compiling the source code, two benign warnings will be reported:
    • Warning: implicit declaration of function `exit' debug.c os-efsys_efsys/lib/flash-nand line 33
    • Warning: implicit declaration of function `memcmp' ecc.c os-efsys_efsys/lib/flash-nand line 245
  • In Microsoft Windows, certain programs (e.g. Norton Ghost) add directories inside double quotation marks (e.g. ...;"c:\Program Files\Norton Ghost\";...) to your PATH environment variable. This causes the Cygwin spawn() function to fail, which in turn causes cp to fail when called by ln-w. (Ref# 20046)

    Workaround: Modify your PATH environment variable and remove any quotation marks.

Be sure to check the QNX Momentics release notes for related issues.

Documentation

The functionality provided by the TDKs is already described within the QNX Momentics documentation set. For information on flash, see:

  • Filesystems chapter of the System Architecture guide
  • Working with Filesystems chapter of the Neutrino User's Guide
  • Customizing the Flash Filesystem chapter of Building Embedded Systems
  • devf-* entries in the Utilities Reference

Technical support

If you have any questions, comments, or problems with a QNX product, please contact Technical Support. For more information, see the How to Get Help chapter of the Welcome to QNX Momentics guide or visit our website, www.qnx.com.