1MKFS.JFFS2(1)               General Commands Manual              MKFS.JFFS2(1)
2
3
4

NAME

6       mkfs.jffs2 - Create a JFFS2 file system image from directory
7

SYNOPSIS

9       mkfs.jffs2  [ -p,--pad[=SIZE] ] [ -r,-d,--root directory ] [ -s,--page‐
10       size=SIZE ]  [  -e,--eraseblock=SIZE  ]  [  -c,--cleanmarker=SIZE  ]  [
11       -n,--no-cleanmarkers ] [ -o,--output image.jffs2 ] [ -l,--little-endian
12       ] [ -b,--big-endian ]  [  -D,--devtable=FILE  ]  [  -f,--faketime  ]  [
13       -q,--squash ] [ -U,--squash-uids ] [ -P,--squash-perms ] [ --with-xattr
14       ] [ --with-selinux ] [ --with-posix-acl ] [  -m,--compression-mode=MODE
15       ]  [  -x,--disable-compressor=NAME  ] [ -X,--enable-compressor=NAME ] [
16       -y,--compressor-priority=PRIORITY:NAME ] [  -L,--list-compressors  ]  [
17       -t,--test-compression ] [ -h,--help ] [ -v,--verbose ] [ -V,--version ]
18       [ -i,--incremental image.jffs2 ]
19
20

DESCRIPTION

22       The program mkfs.jffs2 creates a JFFS2 (Second Journalling  Flash  File
23       System)  file  system  image and writes the resulting image to the file
24       specified by the -o option or by default to the standard output, unless
25       the  standard output is a terminal device in which case mkfs.jffs2 will
26       abort.
27
28       The file system image is created using the files and  directories  con‐
29       tained  in  the  directory  specified  by  the option -r or the present
30       directory, if the -r option is not specified.
31
32       Each block of the files to be placed into the  file  system  image  are
33       compressed  using  one  of  the  available compressors depending on the
34       selected compression mode.
35
36       File systems are created with the same endianness as the  host,  unless
37       the -b or -l options are specified.  JFFS2 driver in the 2.4 Linux ker‐
38       nel only supported images having the same endianness as the CPU. As  of
39       2.5.48,  the  kernel  can be changed with a #define to accept images of
40       the non-native endianness. Full bi-endian support in the kernel is  not
41       planned.
42
43       It  is  unlikely that JFFS2 images are useful except in conjuction with
44       the MTD (Memory Technology Device) drivers in the Linux  kernel,  since
45       the JFFS2 file system driver in the kernel requires MTD devices.
46

OPTIONS

48       Options  that  take  SIZE  arguments can be specified as either decimal
49       (e.g., 65536), octal (0200000), or hexidecimal (0x1000).
50
51       -p, --pad[=SIZE]
52              Pad output to SIZE bytes with 0xFF.  If SIZE is  not  specified,
53              the output is padded to the end of the final erase block.
54
55       -r, -d, --root=DIR
56              Build  file  system from directory DIR.  The default is the cur‐
57              rent directory.
58
59       -s, --pagesize=SIZE
60              Use page size SIZE.  The default is 4 KiB.   This  size  is  the
61              maximum  size  of a data node.  Set according to target system's
62              memory management page size (NOTE: this is NOT related  to  NAND
63              page size).
64
65       -e, --eraseblock=SIZE
66              Use erase block size SIZE.  The default is 64 KiB.  If you use a
67              erase block size different than the erase block size of the tar‐
68              get  MTD  device,  JFFS2  may not perform optimally. If the SIZE
69              specified is below 4096, the units are assumed to be KiB.
70
71       -c, --cleanmarker=SIZE
72              Write ´CLEANMARKER´ nodes with the size  specified.  It  is  not
73              normally appropriate to specify a size other than the default 12
74              bytes.
75
76       -n, --no-cleanmarkers
77              Do not write ´CLEANMARKER´ nodes to the beginning of each  erase
78              block.  This  option can be useful for creating JFFS2 images for
79              use on NAND flash, and for creating images which are to be  used
80              on a variety of hardware with differing eraseblock sizes.
81
82       -o, --output=FILE
83              Write JFFS2 image to file FILE.  Default is the standard output.
84
85       -l, --little-endian
86              Create a little-endian JFFS2 image.  Default is to make an image
87              with the same endianness as the host.
88
89       -b, --big-endian
90              Create a big-endian JFFS2 image.  Default is to  make  an  image
91              with the same endianness as the host.
92
93       -D, --devtable=FILE
94              Use the named FILE as a device table file, for including devices
95              and changing permissions in the created image when the user does
96              not have appropriate permissions to create them on the file sys‐
97              tem used as source.
98
99       -f, --faketime
100              Change all file timestamps to ´0´ for regression testing.
101
102       -q, --squash
103              Squash permissions and owners, making all files be owned by root
104              and removing write permission for ´group´ and ´other´.
105
106       -U, --squash-uids
107              Squash owners making all files be owned by root.
108
109       -P, --squash-perms
110              Squash  permissions,  removing  write permission for ´group´ and
111              ´other´.
112
113       --with-xattr
114              Enables xattr, stuff all xattr entries into jffs2 image file.
115
116       --with-selinux
117              Enables xattr, stuff only SELinux Labels into jffs2 image file.
118
119       --with-posix-acl
120              Enable xattr, stuff only POSIX  ACL  entries  into  jffs2  image
121              file.
122
123       -m, --compression-mode=MODE
124              Set  the  default compression mode. The default mode is priority
125              which tries the compressors in a predefinied order  and  chooses
126              the  first successful one. The alternatives are: none (mkfs will
127              not compress) and size (mkfs will try all compressor and chooses
128              the one which have the smallest result).
129
130       -x, --disable-compressor=NAME
131              Disable  a  compressor.  Use -L to see the list of the available
132              compressors and their default states.
133
134       -X, --enable-compressor=NAME
135              Enable a compressor. Use -L to see the  list  of  the  available
136              compressors and their default states.
137
138       -y, --compressor-priority=PRIORITY:NAME
139              Set  the priority of a compressor. Use -L to see the list of the
140              available compressors and their  default  priority.   Priorities
141              are used by priority compression mode.
142
143       -L, --list-compressors
144              Show the list of the available compressors and their states.
145
146       -t, --test-compression
147              Call  decompress  after  every compress - and compare the result
148              with the original data -, and some other check.
149
150       -h, --help
151              Display help text.
152
153       -v, --verbose
154              Verbose operation.
155
156       -V, --version
157              Display version information.
158
159       -i, --incremental=FILE
160              Generate an appendage image for FILE.  If  FILE  is  written  to
161              flash and flash is appended with the output, then it seems as if
162              it was one thing.
163
164

LIMITATIONS

166       The format and grammar of the device table file does not  allow  it  to
167       create  symbolic  links when the symbolic links are not already present
168       in the root working directory.
169
170       However, symbolic links may be specified in the device table file using
171       the l type for the purposes of setting their permissions and ownership.
172

BUGS

174       JFFS2  limits device major and minor numbers to 8 bits each.  Some con‐
175       sider this a bug.
176
177       mkfs.jffs2 does not properly handle hard links in the  input  directory
178       structure.   Currently,  hard linked files will be expanded to multiple
179       identical files in the output image.
180

AUTHORS

182       David Woodhouse
183       Manual page written by David Schleef <ds@schleef.org>
184

SEE ALSO

186       mkfs(8), mkfs.jffs(1), fakeroot(1)
187
188
189
190                                                                 MKFS.JFFS2(1)
Impressum