aboutsummaryrefslogtreecommitdiff
path: root/ubifs-utils/mkfs.ubifs
AgeCommit message (Collapse)Author
2017-05-31mkfs.ubifs: Add support for symlinks in device tableDavid Engraf
It is not possible to change ownership for symlinks in the device table file. This patch adds support for symlinks equal to mkfs.jffs2 and updates the sample device table file. The permission entry for symlinks in the device table must be set to 0777. Signed-off-by: David Engraf <david.engraf@sysgo.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2017-03-02Fix alignment trap triggered by NEON instructionsYuanjie Huang
NEON instruction VLD1.64 was used to copy 64 bits data after type casting, and they will trigger alignment trap. This patch uses memcpy to avoid alignment problem. Signed-off-by: Yuanjie Huang <Yuanjie.Huang@windriver.com> Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
2016-11-17Remove duplicate copies of GPLv2 license textDavid Oberhollenzer
Some of the programs in the mtd-utils used to be seperate packages that were at some point merged into mtd-utils. As a result, some subdirectories contain their own README and COPYING files with copies of the GPLv2 license text. Since those programs are now part of mtd-utils that contains a copy of the GPLv2 in the file COPYING in the package root directory, those extra files can be removed, as there is no need for distributing an extra copy of the license text for each individual program in the bundle. Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at> Signed-off-by: Richard Weinberger <richard@nod.at>
2016-01-24mkfs.ubifs: <sys/xattr.h>, not <attr/xattr.h>Brian Norris
To be consistent with mkfs.jffs2, and to get this to build on my machine, it looks like we should use <sys/xattr.h>, not <attr/xattr.h>. Fixes this error, seen on an Ubuntu 14.04 build system: ubifs-utils/mkfs.ubifs/mkfs.ubifs.c:30:24: fatal error: attr/xattr.h: No such file or directory #include <attr/xattr.h> ^ Signed-off-by: Brian Norris <computersforpeace@gmail.com> Cc: Sascha Hauer <s.hauer@pengutronix.de> Cc: Marc Kleine-Budde <mkl@pengutronix.de> Reviewed-by: Richard Weinberger <richard@nod.at>
2015-12-09mkfs.ubifs: use gid from table instead 2x uidSebastian Andrzej Siewior
If the devtable is used then the tool uses uid twice and doesn't consider gid at all. This changes it to use gid & uid. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2015-11-12mkfs.ubifs: fix compiler warning for WITHOUT_LZODaniel Walter
Fix compiler warning about an unused variable. ubifs-utils/mkfs.ubifs/compr.c:41:27: warning: ā€˜cā€™ defined but not used [-Wunused-variable] static struct ubifs_info *c = &info_; Signed-off-by: Daniel Walter <dwalter@sigma-star.at> Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2015-11-12fix build when WITHOUT_LZO is setRolf Eike Beer
Make mkfs.ubifs honor the WITHOUT_LZO flag, too. Fixes this build error: mkfs.ubifs/compr.c:27:23: lzo/lzo1x.h: No such file or directory mkfs.ubifs/compr.c: In function `lzo_compress': mkfs.ubifs/compr.c:92: error: `lzo_uint' undeclared (first use in this function) mkfs.ubifs/compr.c:92: error: (Each undeclared identifier is reported only once mkfs.ubifs/compr.c:92: error: for each function it appears in.) mkfs.ubifs/compr.c:92: error: syntax error before "len" mkfs.ubifs/compr.c:95: error: `len' undeclared (first use in this function) mkfs.ubifs/compr.c:96: warning: implicit declaration of function `lzo1x_999_compress' mkfs.ubifs/compr.c:99: error: `LZO_E_OK' undeclared (first use in this function) mkfs.ubifs/compr.c: In function `init_compression': mkfs.ubifs/compr.c:201: error: `LZO1X_999_MEM_COMPRESS' undeclared (first use in this function) Signed-off-by: Rolf Eike Beer <eb@emlix.com> Signed-off-by: Richard Weinberger <richard@nod.at>
2015-11-12mkfs.ubifs: Optionally create extended attribute with inode numberSascha Hauer
This is done to allow creating images suitable for IMA directory appraisal. IMA creates a hash for directories and attaches this hash to the directory itself as an extended attribute. Among other things the inode numbers of the files are hashed. So, to create a valid hash in the UBIFS image the evmctl tool needs to know the inode numbers which the files in the UBIFS image will have. evmctl will read the inode numbers from the user.image-inode-number extended attribute. Since extended attributes are inodes themselves the inode numbers for the generated image will change when the extended attributes change, so to generate a correctly hashed UBIFS image, both evmctl and mkfs.ubifs must be run twice: 1) execute evmctl to iterate over the directory tree. This will create the security.ima and security.evm extended attributes. The existence of the attributes makes sure that subsequent calls to mkfs.ubifs will use the same inode numbers. evmctl will use the inode numbers from the host filesystem in this step which makes the resulting image unusable 2) execute mkfs.ubifs -a. This will create the user.image-inode-number extended attributes on files/directories added to the image. 3) execture evmctl again. This time evmctl will pick the inode numbers from the user.image-inode-number extended attribute instead of the ones from the host filesystem 4) execute mkfs.ubifs again. This will create the correct image. The now existing user.image-inode-number extended attributes are ignored and not added to the image. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at>
2015-11-12mkfs.ubifs: Add extended attribute supportSascha Hauer
This adds extended attribute support to mkfs.ubifs. When creating an image from a directory tree the existing extended attributes are added to the UBIFS image. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at>
2015-11-12mkfs.ubifs: simplify make_path with xasprintfSascha Hauer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Daniel Walter <dwalter@sigma-star.at> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at>
2015-11-12mkfs.ubifs: use xmalloc/xzalloc for allocating memorySascha Hauer
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Daniel Walter <dwalter@sigma-star.at> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at>
2015-11-12mkfs.ubifs: change add_directory argument to 'existing'Sascha Hauer
A 'non_existing' argument which is only used with !non_existing is just too confusing. Change this to positive logic. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Reviewed-by: Daniel Walter <dwalter@sigma-star.at> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Richard Weinberger <richard@nod.at>
2015-11-11mtd-utils: Restructure the mtd-utils source.Dongsheng Yang
* There is no code modification in this commit, only moving * the files to proper place. The user tools looks a little messy as we place almost the all tools in the root directory of mtd-utils. To make it more clear, I propose to introduce the following structure for our source code. mtd-utils/ |-- lib |-- include |-- misc-utils |-- jffsX-utils |-- nand-utils |-- nor-utils |-- ubi-utils |-- ubifs-utils `-- tests Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com> Signed-off-by: Brian Norris <computersforpeace@gmail.com>