1. 程式人生 > >jffs2檔案系統製作(適用於spi nor flash)

jffs2檔案系統製作(適用於spi nor flash)

mkfs.jffs2: Usage: mkfs.jffs2 [OPTIONS]
Make a JFFS2 file system image from an existing directory tree
Options:
-p, --pad[=SIZE]       用16進位制來表示所要輸出檔案的大小,也就是root.jffs2的size。
                                       很重要的是, 為了不浪費flash空間, 這個值最好符合flash driver所規劃的區塊大小。
                                       如果不足則使用0xff來填充補滿。 
-r, -d, --root=DIR      指定要做成image的源資料夾.(預設:當前資料夾)
-s, --pagesize=SIZE     節點頁大小(預設: 4KiB)
-e, --eraseblock=SIZE   設定擦除塊的大小為(預設: 64KiB)
-c, --cleanmarker=SIZE Size of cleanmarker (default 12)
-m, --compr-mode=MODE   Select compression mode (default: priortiry)
-x, --disable-compressor=COMPRESSOR_NAME
                          Disable a compressor
-X, --enable-compressor=COMPRESSOR_NAME
                          Enable a compressor
-y, --compressor-priority=PRIORITY:COMPRESSOR_NAME
                          Set the priority of a compressor
-L, --list-compressors Show the list of the avaiable compressors
-t, --test-compression Call decompress and compare with the original (for test)
-n, --no-cleanmarkers   指明不新增清楚標記(nand flash 有自己的校檢塊,存放相關的資訊。)
                          如果掛載後會出現類似:
                          CLEANMARKER node found at 0x0042c000 has totlen 0xc != normal 0x0
                          的警告,則加上-n 就會消失。
-o, --output=FILE       指定輸出image檔案的檔名.(default: stdout)
-l, --little-endian     指定使用小端格式
-b, --big-endian        指定使用大端格式
-D, --devtable=FILE     Use the named FILE as a device table file
-f, --faketime          Change all file times to '0' for regression testing
-q, --squash            Squash permissions and owners making all files be owned by root
-U, --squash-uids       將所有檔案的擁有者設為root使用者
-P, --squash-perms      Squash permissions on all files
      --with-xattr        stuff all xattr entries into image
      --with-selinux      stuff only SELinux Labels into jffs2 image
      --with-posix-acl    stuff only POSIX ACL entries into jffs2 image
-h, --help              顯示這些文字
-v, --verbose           Verbose operation
-V, --version           顯示版本
-i, --incremental=FILE Parse FILE and generate appendage output for it