File: genromfs.8

package info (click to toggle)
genromfs 0.5.1-3.1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 108 kB
  • ctags: 84
  • sloc: ansic: 636; makefile: 66; sh: 18
file content (136 lines) | stat: -rw-r--r-- 3,412 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
.TH GENROMFS 8 "Jan 2002" "Version 0.5.1"
.SH NAME
genromfs \- create a romfs image
.SH SYNOPSIS
.B genromfs
.B \-f device
[
.B \-d source
]
[
.B \-V label
]
[
.B \-a alignment
]
[
.B \-A alignment,pattern
]
[
.B \-x pattern
]
[
.B \-v
]
.SH DESCRIPTION
.B genromfs
is used to create a romfs file system image, usually directly on
a block device, or for test purposes, in a plain file.
It is the
.I mkfs
equivalent of other filesystems.
.PP
.B genromfs
will scan the current directory and its subdirectories, build a romfs
image from the files found, and output it to the file or device you
specified.
.PP
During scanning, it recognizes a special notation.  If a file begins
with the @ sign
(and is empty otherwise),
it refers to a device special node in the format:
.B @name,type,major,minor.
type can be
.I b
for block devices,
.I c
for character devices,
and
.I p
for fifos.
The linux virtual console 1 can thus be included as a
file with the name:
.B @tty1,c,4,1

.SH OPTIONS
.TP
.BI -f \ output
Specifies the file to output the image to.
This option is required.
.TP
.BI -d \ source
Use the specified directory as the source, not the current directory.
.TP
.BI -V \ label
Build the image with the specified volume label.  Currently it is
not used by the kernel, but it will be recorded in the image.
.TP
.BI -a \ alignment
Align regular files to a larger boundary.
.B genromfs
will align data of each regular file in the resulting image to the specified
alignment, while keeping the image compatible with the original romfs
definition (by adding pad bytes between last node before the file and file's
header).  By default,
.B genromfs
will guarantee only an alignment of 16 bytes.
.TP
.BI -A \ alignment,pattern
Align objects matching shell wildcard pattern to alignment bytes.
If one object matches more patterns, then the highest alignment is chosen.
Alignment has to be a power of two. Patterns either don't contain any
slashes, in which case files matching those patterns are matched in all
directories, or start with a leading slash, in which case they are matched
against absolute paths inside of the romfs filesystem (that is, as if you
chrooted into the rom filesystem).
.TP
.BI -x \ pattern
Allow to exclude files that match a pattern.
It's useful to exclude CVS directories and backup files (ending in a '~').
.TP
.BI -v
Verbose operation,
.B genromfs
will print each file which is included in the image, along with
its offset.
.SH EXAMPLES

.EX
.B
   genromfs -d root -f /dev/fd0 -V 'Secret labs install disk'
.EE

All files in the 
.I root
directory will be written to 
.B /dev/fd0
as a new romfs filesystem image.

.EX
.B
   genromfs -d root -f /dev/fd0 -A 2048,/.. -A '4096,*.boot' -a 512 -V 'Bootable floppy'
.EE

Generate the image and place file data of all regular files on 512 bytes
boundaries or on 4K boundaries, if they have the .boot extension.
Additionally,
align the romfs header of the '..' entry in the root directory
on a 2K boundary.  Effectively, this makes sure that the
romfs image uses the least
possible space in the first 2048 bytes.
.PP
You can use the generated image (if you have the
romfs module loaded, or compiled into the kernel) via:

.EX
.B
   mount -t romfs /dev/fd0 /mnt
.EE

.SH AUTHOR
This manual page was initially written by Christoph Lameter <clameter@debian.org>,
for the Debian GNU/Linux system.
.SH SEE ALSO
.BR mkfs (8),
.BR mount (8),
.BR mkisofs (8)