2.3   BSP-Specific Examples of Using TrueFFS

The following subsections give examples of how to set up TrueFFS for Tornado on each of the non-x86 BSPs that now ship with a WRS-supplied sysTffs.c.1

The examples given are meant to be illustrative, but they do not show all the configurations possible for each BSP. For example, only the ads860, the iq960rp, and the pid7t examples use a TrueFFS format offset (to leave room on the medium for a boot image). However, all BSPs support the use of this formatting feature.


*   

NOTE: The instructions below do not modify the define statements in sysTffs.c that are used to determine which MTDs are included in TrueFFS. As a result, all MTDs are included. In your deployed system, you might want to trim the list of included MTDs. For more information on how to do this, see Choosing MTDs.

2.3.1   ads860 with a Board-Resident Flash Array and a PCMCIA Slot

The following instructions show you how to setup two TrueFFS devices for a target using the ads860 BSP. The first flash device, the board-resident flash array, is formatted using sysTffsFormat( ). This leaves room for a boot image. The second device, the flash card in the PCMCIA slot, is dedicated entirely to TrueFFS and so is formatted using tffsDevFormat( ).

  1. To config.h, add the lines:

#define INCLUDE_TFFS 
#define INCLUDE_SHOW_ROUTINES       /* optional */ 
#define INCLUDE_DOSFS 

  1. In config.h, change the value of ROM_SIZE from 1MB to 2MB:

#define ROM_SIZE          0x00200000      /* 2M ROM space */

  1. Define the following addresses in ads860.h:

#define    PC_BASE_ADRS_0  0x02000000  
#define    PC_SIZE_0       0x00100000 
#define    PC_BASE_ADRS_1  0x04000000 
#define    PC_SIZE_1       0x02000000

  1. In sysLib.c, edit sysPhysMemDesc[ ] to add the following two entries:

{ 
(void *) PC_BASE_ADRS_0, 
(void *) PC_BASE_ADRS_0, 
PC_SIZE_0,                          /* 1 m - PCMCIA window 0 */ 
VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE|VM_STATE_MASK_CACHEABLE, 
VM_STATE_VALID      | VM_STATE_WRITABLE     |VM_STATE_CACHEABLE_NOT 
} 
and

{ 
(void *) PC_BASE_ADRS_1, 
(void *) PC_BASE_ADRS_1, 
PC_SIZE_1,                          /* 32 m - PCMCIA window 1 */ 
VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE|VM_STATE_MASK_CACHEABLE, 
VM_STATE_VALID      | VM_STATE_WRITABLE     |VM_STATE_CACHEABLE_NOT 
}

  1. Change the Makefile as specified in Changing the Makefile.

  1. Remake VxWorks.

  1. Reboot the target.

  1. Insert a flash card in the PCMCIA socket.

  1. At the target shell prompt, enter the following commands:

-> sysTffsFormat 
-> tffsDevFormat 1,0 
-> usrTffsConfig 0,0,"/RFA/" 
-> usrTffsConfig 1,1,"/PCMCIA1/"
RFA stands for "resident flash array."

2.3.2   hkbaja47 a Board-Resident Flash Array

The following instructions show you how to setup and instantiate a single TrueFFS device for a target using the hkbaja47 BSP. This flash device, a board-resident flash array, is dedicated entirely to TrueFFS and so is formatted using tffsDevFormat( ).

  1. To config.h, add the lines:

#define INCLUDE_TFFS 
#define INCLUDE_SHOW_ROUTINES       /* optional */ 
#define INCLUDE_DOSFS

  1. Change the Makefile as specified in Changing the Makefile.

  1. Remake VxWorks.

  1. Reboot the target.

  1. At the target shell prompt, enter the following commands:

-> tffsDevFormat 0, 0 
-> usrTffsConfig 0,0,"/RFA/"

2.3.3   iq960rp with a Board-Resident Flash Array

The following instructions show you how to setup and instantiate a single TrueFFS device for a target using the iq960rp BSP. This flash device, a board-resident flash array, is formatted using sysTffsFormat( ) to leave room for a boot image.


*   

NOTE: The iq960rp BSP was designed to support the iq960rp board. However, if you apply a patch available from WRS, this BSP can support the iq960rd board as well as TrueFFS for Tornado.

  1. To config.h, add the lines:

#define INCLUDE_TFFS 
#define INCLUDE_SHOW_ROUTINES       /* optional */ 
#define INCLUDE_DOSFS

  1. Change the Makefile as specified in Changing the Makefile.

  1. Remake VxWorks.

  1. Reboot the target.

  1. At the target shell prompt, enter the following commands:

-> sysTffsFormat 
-> usrTffsConfig 0,0,"/RFA/"

2.3.4   mv177 with a Board-Resident Flash Array

The following instructions show you how to setup and instantiate a single TrueFFS device for a target using the mv177 BSP. The board-resident flash array is dedicated entirely to TrueFFS and so is formatted using tffsDevFormat( ).

  1. To config.h, add the lines:

#define INCLUDE_TFFS 
#define INCLUDE_SHOW_ROUTINES       /* optional */ 
#define INCLUDE_DOSFS

  1. In sysLib.c, change the VM_STATE of the ROM region from WRITABLE_NOT to WRITEABLE:

/* ROM */ 
{ 
(void *) ROM_BASE_ADRS, 
(void *) ROM_BASE_ADRS, 
0x400000, 
VM_STATE_MASK_VALID | VM_STATE_MASK_WRITABLE|VM_STATE_MASK_CACHEABLE, 
VM_STATE_VALID      | VM_STATE_WRITABLE     |VM_STATE_CACHEABLE_NOT 
},

  1. Change the Makefile as specified in Changing the Makefile.

  1. Remake VxWorks.

  1. Reboot the target.

  1. Insert a flash card in each PCMCIA socket.

  1. At the target shell prompt, enter the following commands:

-> tffsDevFormat 0,0 
-> usrTffsConfig 0,0,"/RFA/"

2.3.5   pid7t or pid7t_t with a Board-Resident Flash Array

The following instructions show you how to setup and instantiate a TrueFFS device for a target using either the pid7t or pid7t_t BSP. The flash device, a board-resident flash array, is formatted using sysTffsFormat( ). This leaves room for a boot image.

  1. To config.h, add the lines:

#define INCLUDE_TFFS 
#define INCLUDE_SHOW_ROUTINES       /* optional */ 
#define INCLUDE_DOSFS

  1. Change the Makefile as specified in Changing the Makefile.

  1. Remake VxWorks.

  1. Reboot the target.

  1. At the target shell prompt, enter the following commands:

-> sysTffsFormat  
-> usrTffsConfig 0,0,"/RFA/"

2.3.6   ss5 with a Board-Resident Flash Array

The following instructions show you how to setup and instantiate a TrueFFS device for a target using the ss5 BSP. This flash device, a board-resident flash array, is dedicated entirely to TrueFFS and so is formatted using tffsDevFormat( ).

In addition to the usual changes to config.h, the instructions below require that you undefine INCLUDE_D_CACHE_ENABLE. TrueFFS is incompatible with data caching. Additionally, you must define INCLUDE_FLASH. This configures sysLib.c to include special functions necessary to TrueFFS on the ss5 BSP.

  1. To config.h, add the lines:

#define INCLUDE_TFFS 
#define INCLUDE_SHOW_ROUTINES       /* optional */ 
#define INCLUDE_DOSFS 
#undef  INCLUDE_D_CACHE_ENABLE      /* disable data cache */ 
#define INCLUDE_FLASH               /* make flash writable */

  1. Change the Makefile as specified in Changing the Makefile.

  1. Remake VxWorks.

  1. Reboot the target.

  1. At the target shell prompt, enter the following commands:

-> tffsDevFormat 0, 0 
-> usrTffsConfig 0,0,"/RFA/"

1:  The pc386 and pc486 BSPs support a socket interface driver not available to other BSPs. For more information, see 2.4 Socket Layer Options for the pc386 and pc486 BSPs.