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

LIMITATIONS

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

BUGS

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

AUTHORS

180       David Woodhouse
181       Manual page written by David Schleef <ds@schleef.org>
182

SEE ALSO

184       mkfs(8), mkfs.jffs(1), fakeroot(1)
185
186
187
188                                                                 MKFS.JFFS2(1)
Impressum