romfs is a tiny read-only file system for embedded Linux and initial ramdisks (Linux 2.1). SquashFS, cramfs and EROFS have taken over most uses, so it is rare today.
Overview
romfs is a packed, read-only layout. The volume begins with the signature -rom1fs-, the volume size and a checksum, followed by a name and then file headers aligned to 16 bytes. Each header gives the next-file offset, type bits, size and a checksum, followed by the name and the data.
History
- Written by Janos Farkas for Linux 2.1.
Structures
Offsets are in bytes from the start of the structure named in each heading. Field names are descriptive and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.
Get Children
| Offset | Size | Type | Field | Notes |
|---|---|---|---|---|
| 0x0 | 4 | u32 BE | Next | |
| 0x0 | 4 | u32 BE | Type | |
| 0x4 | 4 | u32 BE | Spec | |
| 0x8 | 4 | u32 BE | Size |
Probe
| Offset | Size | Type | Field | Notes |
|---|---|---|---|---|
| 0x0 | 8 | bytes | – | |
| 0x8 | 4 | u32 BE | Volume Length |
Constants
Signatures and magic strings referenced
| Text | Where checked |
|---|---|
| -rom1fs- | Probe |