Skip to main content

VxWorks ROMFS Guide: Setup, Configuration, and Usage

·565 words·3 mins
VxWorks ROMFS File System Workbench
Table of Contents
Free Training - This article is part of a series.
Part 12: This Article

VxWorks ROMFS Guide: Setup, Configuration, and Usage

🎯 Learning Objectives
#

After completing this section, you will be able to:

  • Understand the purpose and structure of ROMFS (Read-Only Memory File System)
  • Create and manage a ROMFS project in Workbench
  • Link a ROMFS image to a VxWorks Image Project (VIP)

🧩 What Is ROMFS?
#

ROMFS (Read-Only Memory File System) is a lightweight file system embedded directly into the VxWorks image. It resides at the top of the system’s memory layout and is initialized during boot.

Although optional, ROMFS is widely used to provide secure, static runtime storage.

Key characteristics:

  • Read-only at runtime → prevents accidental or malicious modification
  • Embedded into the kernel image via a generated object (content.romfs)
  • Accessible like a file system on the target (typically mounted at /romfs)

Conceptually, ROMFS behaves like a preloaded RAM disk, where all files are packaged at build time and deployed as part of the firmware.

Because ROMFS is not enabled by default, it must be explicitly configured in the build system.


⚙️ Configuring ROMFS in VxWorks
#

To enable ROMFS support, both the VxWorks Source Build (VSB) and VxWorks Image Project (VIP) must be configured.

Required Components
#

  • In VSB:

    • FS
    • FS_ROMFS
  • In VIP:

    • INCLUDE_ROMFS

Once these components are added, the system is ready to integrate a ROMFS image.


🏗️ Creating a ROMFS Project
#

You can create a ROMFS project using Wind River Workbench:

  1. Navigate to:
    File → New → Wind River Workbench Project

  2. Select:
    Platform Development

  3. Choose the build type:
    ROMFS File System

This creates a dedicated project used to define the contents of the ROMFS image.


📝 Naming and Project Location
#

During project setup:

  • Assign a project name
  • Choose where to store it:
    • Inside the workspace
    • Outside the workspace
    • Hybrid (workspace metadata with external content)

This flexibility allows better organization, especially for large projects or shared assets.


📦 Adding Files to ROMFS
#

Once the project is created, you can populate it with files that will be embedded into the final image.

Typical use cases include:

  • Real-Time Processes (RTPs)
  • Shared libraries
  • Configuration files
  • Data assets (text, binary, etc.)
  • Object files (*.o)

Files can be imported from:

  • The current workspace
  • External directories

At build time, all selected files are packaged into the ROMFS image.


🔗 Linking ROMFS to a VIP
#

To make the ROMFS available at runtime, it must be linked to a VxWorks Image Project (VIP).

Steps:
#

  1. Open the Project Explorer
  2. Drag the ROMFS project into the target VIP
  3. The system automatically:
    • Links the ROMFS image
    • Integrates it into the kernel build

After deployment, the ROMFS is accessible on the target system:

-> cd /romfs
-> ls

This allows applications to read embedded resources directly from memory.


💡 When to Use ROMFS
#

ROMFS is ideal when you need:

  • Immutable system resources (e.g., configs, binaries)
  • Secure storage with no runtime modification
  • Fast access without external storage dependencies
  • Simplified deployment (everything bundled into one image)

However, it is not suitable for:

  • Dynamic data
  • Logs or frequently updated files

🧩 Conclusion
#

ROMFS provides a simple and effective way to embed static resources directly into a VxWorks image. By integrating files at build time, it ensures reliability, security, and fast access at runtime.

For many embedded systems—especially those without persistent storage—ROMFS serves as a critical building block for application deployment.


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

Related

VxWorks Workbench Overview
·13 words·1 min
VxWorks Workbench
VxWorks & TI Boost Automotive Edge AI
·569 words·3 mins
VxWorks AI/ML ADAS Automotive
Seamless RTOS Transition - Migrating to VxWorks
·35 words·1 min
QNX VxWorks Migration RTOS