Skip to main content

VxWorks ROMFS: Read-Only Memory File System Explained

·330 words·2 mins
VxWorks ROMFS File System Workbench
Free Training - This article is part of a series.
Part 12: This Article

Learning Objectives
#

After completing this section, you will be able to:

  • Describe the ROMFS (Read-Only Memory File System)
  • Create a ROMFS project
  • Link a ROMFS to a VIP in VxWorks

Overview of ROMFS
#

Overview of ROMFS

ROMFS stands for Read-Only Memory File System. It resides at the top of the VxWorks memory layout and is initialized during system startup.

ROMFS is optional but provides a secure runtime storage solution. It effectively acts as a RAM drive, storing files by embedding them into an object called content.romfs, which is linked to the text section of the VxWorks kernel.

Since ROMFS is optional, adding it requires additional build configuration in your project.


Configuring ROMFS in Your Project
#

To include a ROMFS in your VxWorks project, follow these configuration steps:

  • Add the FS and FS_ROMFS options in your VSB.
  • Add the INCLUDE_ROMFS VIP component.

Once the VSB and VIP are configured, you can create and populate your ROMFS.


Creating the ROMFS Project
#

Build Type

Follow the normal project creation workflow:

  1. Go to File > New > Wind River Workbench Project.
  2. Select Platform Development under Based on Category.
  3. Choose ROMFS File System as the Build Type.

Naming and Locating the ROMFS
#

Build Name

After selecting the project type:

  • Name your ROMFS project.
  • Choose the location:
    • Inside the workspace
    • External location
    • Workspace with content in an external location

Adding Content to ROMFS
#

Romfs Content

Once created, open the ROMFS project and add files to the file system. Common contents include:

  • Real-Time Processes (RTPs)
  • Shared libraries
  • Text or data files
  • Object files (*.o)

Files can be added from either the current host workspace or an external location.


Linking ROMFS to a VIP
#

Attach to VIP

Finally, link your ROMFS to a VIP:

  1. In the Project Explorer, drag the ROMFS project under the VIP.
  2. This action automatically links the ROMFS to the VxWorks kernel image.
  3. On the target, you can access the ROMFS contents under the /romfs directory.

For more detailed guidance, refer to the VxWorks File Systems and I/O Programmer’s Guide
Free Training - This article is part of a series.
Part 12: This Article

Related

Mastering the Vxprj Utility in VxWorks
·371 words·2 mins
VxWorks Vxprj CLI Workbench
VxWorks Workbench Tools Architecture: Connecting to Targets
·438 words·3 mins
Workbench VxWorks Target Communication Framework TCF
VxWorks Workbench Overview
·13 words·1 min
VxWorks Workbench