The MTD-utils include mkfs. ubifs, and ubi utilities.
Compile MTD-utils In ubuntu (I believe it can also be used in other releases ):
Method 1:
Obtain the source code from git repository, which is compiled as the latest update.
1. Get the source code of MTD-utils
Git clone git: // git.infradead.org/mtd-utils.git
2. cd mtd-utils
3. Make
4. sudo make install (the root permission is required)
Method 2:
Obtain the source code package from the FTP website
1. wget ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.4.5.tar.bz2
2. Tar-jxvf mtd-utils-1.4.5.tar.bz2
3. CD mtd-utils-1.4.5
4. Make
5. sudo make install (root permission is required)
Note: during compilation, you may encounter the following problems: (IN compile process, you will meet the following problem .)
1. sys/ACL. h: no such file or directory --> sudo apt-Get install libacl1-dev
2. compr_lzo.c: 29: 23: Error: lzo/lzo1x. h: no such file or directory --> sudo apt-Get install liblzo-Dev (maybe use liblzo2-dev replace it)
3. UUID/UUID. h: no such file or directory --> sudo apt-Get install UUID-Dev