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 #
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 #
Follow the normal project creation workflow:
- Go to File > New > Wind River Workbench Project.
- Select Platform Development under Based on Category.
- Choose ROMFS File System as the Build Type.
Naming and Locating the ROMFS #
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 #
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 #
Finally, link your ROMFS to a VIP:
- In the Project Explorer, drag the ROMFS project under the VIP.
- This action automatically links the ROMFS to the VxWorks kernel image.
- On the target, you can access the ROMFS contents under the
/romfs
directory.