Age | Commit message (Collapse) | Author |
|
Add automake files for the test binaries. If configured to do so,
install the test binaries to libexec/mtd-utils and use autoconf to
fix the paths in the test scripts.
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
This patch is largely based on Richards original RFC.
The major differences to the RFC patch are:
- Add missing sumtools & mtdpart targets
- Fix name of mkfs.jffs2 target
- Add missing subdir-objects option for non-recursive make
- Move all automake options to configure.ac
- Add manpages to install target
- Make XATTR & LZO support configurable
- Install binaries to sbin directory like in the old build system
- Install flash_erase wrapper script
- Add files missing from distribution target
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
Signed-off-by: Richard Weinberger <richard@nod.at>
|
|
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
|
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
|
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Reviewed-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
|
Technically, '-l' linker options should be included only after the
objects which must link to the library. So when we include '-lpthread'
in the LDFLAGS variable, it gets placed too early (i.e., before the
io_paral.o object), and so the pthread linkage never occurs. The
following error probably only shows up with linkers that don't link
pthreads by default.
$ make tests V=1
...
gcc -I../../ubi-utils//include -I ../../include -lpthread -Wall -Wextra -Wwrite-strings -Wno-sign-compare -ffunction-sections -fdata-sections -Wl,--gc-sections -g -o /home/norris/git/mtd-utils/tests/ubi-tests/io_paral /home/norris/git/mtd-utils/tests/ubi-tests/io_paral.o /home/norris/git/mtd-utils/tests/ubi-tests/helpers.o libubi.a
/home/norris/git/mtd-utils/tests/ubi-tests/io_paral.o: In function `main':
/home/norris/git/mtd-utils/tests/ubi-tests/io_paral.c:287: undefined reference to `pthread_create'
/home/norris/git/mtd-utils/tests/ubi-tests/io_paral.c:295: undefined reference to `pthread_create'
/home/norris/git/mtd-utils/tests/ubi-tests/io_paral.c:303: undefined reference to `pthread_join'
collect2: ld returned 1 exit status
make[2]: *** [/home/norris/git/mtd-utils/tests/ubi-tests/io_paral] Error 1
...
$ ld --version
GNU ld (GNU Binutils for Ubuntu) 2.22
...
$ gcc --version
gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
...
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Sorry, the commit is huge, I just did not have time to split it.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
... to avoid confusion when the local common.h shadows the top-level common.h.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
This will not compile for me (due to bit rot?). Maybe the program is
never used?
Signed-off-by: Bill Pringlemeir <bpringlemeir@nbsps.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
We should use the off_t type instead of off64_t or u_int32_t as its
length is controlled by the WITHOUT_LARGEFILE flag.
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
There's a typo in lseek parameters order.
But, due to the value of SEEK_SET, this commit doesn't introduce a
change.
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Also remove the eraseblock type support, because kernel commit
a65a0eb6d198e058687a9214683bd1c418f20d39 set the dtype
parameter as obsolete.
Also adjust to some renames:
* 'UBI_PROP_DIRECT_WRITE' -> 'UBI_VOL_PROP_DIRECT_WRITE'
* 'struct ubi_set_prop_req' -> 'struct ubi_set_vol_prop_req'.
* 'UBI_IOCSETPROP' -> 'UBI_IOCSETVOLPROP'
Signed-off-by: Richard Genoud <richard.genoud@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
If /proc/mtd does not exist, we have this warning:
grep: /proc/mtd: No such file or directory
Get rid of this.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Run the tests with VID header at the second page as well for better coverage.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Add a lot of test passes on nandsim with different geometry.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
On success we print "SUCCESS", lets print "FAILURE" on failure.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Use 'grep patt file' instead of cat file | grep patt.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
It is not finished yet, but it will run all tests on nandsim and mtdram
of different geometry.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
__func__ is more portable
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
|
|
Some compilers will complain about use of strlen() within a static array
size declaration. For this type of string, "sizeof() - 1" is equivalent
and prevents the build error.
Error:
io_paral.c:48:13: error: variably modified 'vol_nodes' at file scope
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
|
|
The ubi-utils/src/ subdir is tossed as it just complicates things for no
real gain. The dictionary.h header is relocated to the ubi-utils/include/
since other headers in there need it.
The top level clean is replaced with a `find -delete` on objects, so it
might prune more than necessary, but many projects now do this sort of
thing and no one complained there.
A "mkdep" helper generates the actual rule, and the variables are used
with "foreach" to expand these automatically.
The tests subdir is updated only to reflect the ubi-utils source move.
Otherwise, it is left untouched as making that non-recursive isn't really
worth the effort.
While we're gutting things, also through in kbuild style output while
building to make things more legible.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
|
|
The common.mk contains clean target that removes *.o and $(TARGETS). Thus, make
custom clean target only for libubi.a
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Add a common seed_random_generator() and make tests use it
for seeding the random generator.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Just like we have in ubi-utils.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Just like we do in ubi-utils.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
For consistency with ubi-utils.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Mostly improvments in io_paral.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
libubi_open interface was changed, but the tests were not
amended. Fix this.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Restore ubi tools to their "original" state, which means to
the state they were before I stareted cleaning them up.
Instead, create a "new-utils" subdirectory and move my work
there.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
And add testing for this feature.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Add 2 new utilities to attach and detach UBI devices.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
... to tests/ubi-tests/
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Clean-up ubi-utils a little by moving tests to a proper place.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|