mkfs.jffs2.1 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. .TH MKFS.JFFS2 1
  2. .SH NAME
  3. mkfs.jffs2 \- Create a JFFS2 file system image from directory
  4. .SH SYNOPSIS
  5. .B mkfs.jffs2
  6. [
  7. .B -p,--pad[=SIZE]
  8. ]
  9. [
  10. .B -r,-d,--root
  11. .I directory
  12. ]
  13. [
  14. .B -s,--pagesize=SIZE
  15. ]
  16. [
  17. .B -e,--eraseblock=SIZE
  18. ]
  19. [
  20. .B -c,--cleanmarker=SIZE
  21. ]
  22. [
  23. .B -n,--no-cleanmarkers
  24. ]
  25. [
  26. .B -o,--output
  27. .I image.jffs2
  28. ]
  29. [
  30. .B -l,--little-endian
  31. ]
  32. [
  33. .B -b,--big-endian
  34. ]
  35. [
  36. .B -D,--devtable=FILE
  37. ]
  38. [
  39. .B -f,--faketime
  40. ]
  41. [
  42. .B -q,--squash
  43. ]
  44. [
  45. .B -U,--squash-uids
  46. ]
  47. [
  48. .B -P,--squash-perms
  49. ]
  50. [
  51. .B --with-xattr
  52. ]
  53. [
  54. .B --with-selinux
  55. ]
  56. [
  57. .B --with-posix-acl
  58. ]
  59. [
  60. .B -m,--compression-mode=MODE
  61. ]
  62. [
  63. .B -x,--disable-compressor=NAME
  64. ]
  65. [
  66. .B -X,--enable-compressor=NAME
  67. ]
  68. [
  69. .B -y,--compressor-priority=PRIORITY:NAME
  70. ]
  71. [
  72. .B -L,--list-compressors
  73. ]
  74. [
  75. .B -t,--test-compression
  76. ]
  77. [
  78. .B -h,--help
  79. ]
  80. [
  81. .B -v,--verbose
  82. ]
  83. [
  84. .B -V,--version
  85. ]
  86. [
  87. .B -i,--incremental
  88. .I image.jffs2
  89. ]
  90. .SH DESCRIPTION
  91. The program
  92. .B mkfs.jffs2
  93. creates a JFFS2 (Second Journalling Flash File System) file system
  94. image and writes the resulting image to the file specified by the
  95. .B -o
  96. option or by default to the standard output, unless the standard
  97. output is a terminal device in which case mkfs.jffs2 will abort.
  98. The file system image is created using the files and directories
  99. contained in the directory specified by the option
  100. .B -r
  101. or the present directory, if the
  102. .B -r
  103. option is not specified.
  104. Each block of the files to be placed into the file system image
  105. are compressed using one of the available compressors depending
  106. on the selected compression mode.
  107. File systems are created with the same endianness as the host,
  108. unless the
  109. .B -b
  110. or
  111. .B -l
  112. options are specified. JFFS2 driver in the 2.4 Linux kernel only
  113. supported images having the same endianness as the CPU. As of 2.5.48,
  114. the kernel can be changed with a #define to accept images of the
  115. non-native endianness. Full bi-endian support in the kernel is not
  116. planned.
  117. It is unlikely that JFFS2 images are useful except in conjuction
  118. with the MTD (Memory Technology Device) drivers in the Linux
  119. kernel, since the JFFS2 file system driver in the kernel requires
  120. MTD devices.
  121. .SH OPTIONS
  122. Options that take SIZE arguments can be specified as either
  123. decimal (e.g., 65536), octal (0200000), or hexidecimal (0x1000).
  124. .TP
  125. .B -p, --pad[=SIZE]
  126. Pad output to SIZE bytes with 0xFF. If SIZE is not specified,
  127. the output is padded to the end of the final erase block.
  128. .TP
  129. .B -r, -d, --root=DIR
  130. Build file system from directory DIR. The default is the current
  131. directory.
  132. .TP
  133. .B -s, --pagesize=SIZE
  134. Use page size SIZE. The default is 4 KiB. This size is the
  135. maximum size of a data node. Set according to target system's memory
  136. management page size (NOTE: this is NOT related to NAND page size).
  137. .TP
  138. .B -e, --eraseblock=SIZE
  139. Use erase block size SIZE. The default is 64 KiB. If you use a erase
  140. block size different than the erase block size of the target MTD
  141. device, JFFS2 may not perform optimally. If the SIZE specified is
  142. below 4096, the units are assumed to be KiB.
  143. .TP
  144. .B -c, --cleanmarker=SIZE
  145. Write \'CLEANMARKER\' nodes with the size specified. It is not
  146. normally appropriate to specify a size other than the default 12
  147. bytes.
  148. .TP
  149. .B -n, --no-cleanmarkers
  150. Do not write \'CLEANMARKER\' nodes to the beginning of each erase
  151. block. This option can be useful for creating JFFS2 images for
  152. use on NAND flash, and for creating images which are to be used
  153. on a variety of hardware with differing eraseblock sizes.
  154. .TP
  155. .B -o, --output=FILE
  156. Write JFFS2 image to file FILE. Default is the standard output.
  157. .TP
  158. .B -l, --little-endian
  159. Create a little-endian JFFS2 image. Default is to make an image
  160. with the same endianness as the host.
  161. .TP
  162. .B -b, --big-endian
  163. Create a big-endian JFFS2 image. Default is to make an image
  164. with the same endianness as the host.
  165. .TP
  166. .B -D, --devtable=FILE
  167. Use the named FILE as a device table file, for including devices and
  168. changing permissions in the created image when the user does not have
  169. appropriate permissions to create them on the file system used as
  170. source.
  171. .TP
  172. .B -f, --faketime
  173. Change all file timestamps to \'0\' for regression testing.
  174. .TP
  175. .B -q, --squash
  176. Squash permissions and owners, making all files be owned by root and
  177. removing write permission for \'group\' and \'other\'.
  178. .TP
  179. .B -U, --squash-uids
  180. Squash owners making all files be owned by root.
  181. .TP
  182. .B -P, --squash-perms
  183. Squash permissions, removing write permission for \'group\' and \'other\'.
  184. .TP
  185. .B --with-xattr
  186. Enables xattr, stuff all xattr entries into jffs2 image file.
  187. .TP
  188. .B --with-selinux
  189. Enables xattr, stuff only SELinux Labels into jffs2 image file.
  190. .TP
  191. .B --with-posix-acl
  192. Enable xattr, stuff only POSIX ACL entries into jffs2 image file.
  193. .TP
  194. .B -m, --compression-mode=MODE
  195. Set the default compression mode. The default mode is
  196. .B priority
  197. which tries the compressors in a predefinied order and chooses the first
  198. successful one. The alternatives are:
  199. .B none
  200. (mkfs will not compress) and
  201. .B size
  202. (mkfs will try all compressor and chooses the one which have the smallest result).
  203. .TP
  204. .B -x, --disable-compressor=NAME
  205. Disable a compressor. Use
  206. .B -L
  207. to see the list of the available compressors and their default states.
  208. .TP
  209. .B -X, --enable-compressor=NAME
  210. Enable a compressor. Use
  211. .B -L
  212. to see the list of the available compressors and their default states.
  213. .TP
  214. .B -y, --compressor-priority=PRIORITY:NAME
  215. Set the priority of a compressor. Use
  216. .B -L
  217. to see the list of the available compressors and their default priority.
  218. Priorities are used by priority compression mode.
  219. .TP
  220. .B -L, --list-compressors
  221. Show the list of the available compressors and their states.
  222. .TP
  223. .B -t, --test-compression
  224. Call decompress after every compress - and compare the result with the original data -, and
  225. some other check.
  226. .TP
  227. .B -h, --help
  228. Display help text.
  229. .TP
  230. .B -v, --verbose
  231. Verbose operation.
  232. .TP
  233. .B -V, --version
  234. Display version information.
  235. .TP
  236. .B -i, --incremental=FILE
  237. Generate an appendage image for FILE. If FILE is written to flash and flash
  238. is appended with the output, then it seems as if it was one thing.
  239. .SH LIMITATIONS
  240. The format and grammar of the device table file does not allow it to
  241. create symbolic links when the symbolic links are not already present
  242. in the root working directory.
  243. However, symbolic links may be specified in the device table file
  244. using the \fIl\fR type for the purposes of setting their permissions
  245. and ownership.
  246. .SH BUGS
  247. JFFS2 limits device major and minor numbers to 8 bits each. Some
  248. consider this a bug.
  249. .B mkfs.jffs2
  250. does not properly handle hard links in the input directory structure.
  251. Currently, hard linked files will be expanded to multiple identical
  252. files in the output image.
  253. .SH AUTHORS
  254. David Woodhouse
  255. .br
  256. Manual page written by David Schleef <ds@schleef.org>
  257. .SH SEE ALSO
  258. .BR mkfs (8),
  259. .BR mkfs.jffs (1),
  260. .BR fakeroot (1)