Skip to main content

Read Only Memory File System

·412 words·2 mins
VxWorks ROMFS
Table of Contents
Free Training - This article is part of a series.
Part 12: This Article

Learning Objectives
#

After this section you will be able to:

  • Describe a ROMFS
  • Create and link a ROMFS to a VIP

You learned about the file system and different project type in this course already. This section discuss the next step, the VxWorks ROMFS.

Overview of ROMFS
#

Overview of ROMFS

ROMFS stands for read-only memory file system. The ROMFS sits on the top of the VxWorks memory layout. It is part of the kernel heap memory and is initialized during startup. Having a ROMFS is optional. It provides a secure run-time storage solution.

The ROMFS provides a RAM drive to store files. This works by statically adding files to the OS in an object called content.romfs. This object is linked to the text section of VxWorks.

Since ROMFS is an optional feature, it requires additional build configuration.

Applying the build configuration
#

To configure and add a ROMFS to your project, add the following in your project to utilize ROMFS.

  • Add the FS and FS_ROMFS VSB options
  • Add the INCLUDE ROMFS VIP component

With the VSB and VIP configured, you can create the ROMFS. This guide explains how to add a ROMFS to your VxWorks project.

Creating the ROMFS
#

Build Type

To make a ROMFS, follow the normal project creation workflow:

  • Select File > New > Wind River Workbench Project.
  • Select Platform Development in Based on Category.
  • Select ROMFS File System in Build Type.

Creating the ROMFS (Cont’d)
#

Build Name

Once you have selected the project type, you will be asked to name the project and select its location. You can choose to create it in the workspace, in an external location, or in the workspace with content in an external location.

Editing ROMFS Contents
#

Romfs Content

The ROMFS has now been created. You can open it and start to add content to the file system. A common list of files to add to a ROMFS are:

  • RTPs
  • Shared libraries
  • Text or data files
  • *.o files You can add files from the current host workspace or from external location.

Associate a ROMFS with a VIP
#

Attach to VIP

Lastly, you can make a ROMFS into a sub-project to a VIP. To attach them together, drag and drop the ROMFS project under the VIP in the Project Explorer view. This will automatically link the ROMFS to the VxWorks kernel image. Once connected you can find the contents of the ROMFS under the /romfs directory in the target.

Free Training - This article is part of a series.
Part 12: This Article

Related

The Vxprj Utility
·307 words·2 mins
VxWorks Vxprj
VxWorks Source Build and Image Projects
·300 words·2 mins
VxWorks VSB VIP
VxWorks Directory Structure and Package Management
·762 words·4 mins
VxWorks Layer