Chapter 32. Configuring the FAT Filesystem

This chapter shows how to include the FAT filesystem into an eCos configuration and how to configure it once installed.

Including FAT Filesystem in a Configuration

The FAT filesystem is contained in a single eCos package, CYGPKG_FS_FAT. However, it depends on the services of a collection of other packages for complete functionality:


The File IO package. This provides the POSIX compatible API by which the FAT filesystem is accessed.


Device IO package. This provides all the infrastructure for the disk devices.


Disk device IO support. This provides the top level generic disk driver functions. It also interprets partition tables and provides a separate access channel for each partition. This package is described in detail elsewhere.


Linux compatibility library. The FAT filesystem only used the list and RBtree features of this library.


Strings library. This provides the string and memory move and compare routines used by the filesystem.


The FAT filesystem currently uses malloc() to allocate its memory resources, such as the node and block caches, so this package is required.

To add the FAT filesystem to a configuration, it is necessary to add all of these packages. This is best done by using an import file. The following file will add the FAT filesystem and all the necessary packages to any configuration:

cdl_savefile_version 1;
cdl_savefile_command cdl_savefile_version {};
cdl_savefile_command cdl_savefile_command {};
cdl_savefile_command cdl_configuration { description hardware template package };
cdl_savefile_command cdl_package { value_source user_value wizard_value inferred_value };
cdl_savefile_command cdl_component { value_source user_value wizard_value inferred_value };
cdl_savefile_command cdl_option { value_source user_value wizard_value inferred_value };
cdl_savefile_command cdl_interface { value_source user_value wizard_value inferred_value };

cdl_configuration eCos {

    package CYGPKG_FS_FAT current ;
    package CYGPKG_IO_DISK current ;
    package CYGPKG_LINUX_COMPAT current ;
    package CYGPKG_IO_FILEIO current ;
    package CYGPKG_IO current ;
    package CYGPKG_LIBC_STRING current ;
    package CYGPKG_MEMALLOC current ;

In addition to these packages, hardware-specific device driver packages will be needed for the disk devices to be used. These device drivers are usually part of the target description in the eCos database and will be enabled if the CYGPKG_IO_DISK package is included.

Documentation license for this page: eCosPro License