Age | Commit message (Collapse) | Author |
|
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>
|
|
Our ${SCRIPTS} (e.g., flash_eraseall) are not found in the build
directory; they should be found in their original location.
This fixes a typo in the Makefile refactoring, which caused 'make
install' to fail with messages like:
make: *** No rule to make target '[...my source-build directory...]/armv7a-cros-linux-gnueabi/misc-utils/flash_eraseall'. Stop.
because the install target is looking in the wrong place for
flash_eraseall.
Fixes: 7d81790ced34 ("mtd-utils: Restructure the mtd-utils source.")
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Reviewed-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
|
|
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>
|
|
* 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>
|
|
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
|
Add a simple utility to exercise BLKPG ioctl.
Signed-off-by: Nam T. Nguyen <namnguyen@chromium.org>
Acked-by: Mike Frysinger <vapier@chromium.org>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
|
|
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
With the addition of block device access to UBI volumes, we now
add a simple userspace tool to access the new ioctls.
Usage of this tool is as simple as it gets:
$ ubiblock --create /dev/ubi0_0
will create a new block device /dev/ubiblock0_0, and
$ ubiblock --remove /dev/ubi0_0
will remove the device.
Artem: slightly changed the header comment.
Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
The build rule for mkfs.ubifs was missing an LDFLAGS_* variable like
mkfs.jffs2 had. This prevented mkfs.ubifs from being built against
explicit external libraries which is needed when cross-compiling.
This also adds UUIDCPPFLAGS and UUIDLDFLAGS variables to support the
mkfs.ubifs build.
Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
|
|
A bunch of utils are relying on _GNU_SOURCE already. The new prompt code
uses getline() which is now part of POSIX, but in older versions of glibc,
it was behind _GNU_SOURCE as it was a GNU extension.
This change doesn't actually tie us to glibc. Only code that uses GNU
extensions does that. It just kills warning when using older versions of
glibc.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Apparently, Makefile comments need to be made without indentation. Otherwise,
they are printed out as shell commands. This fix prevents seeing this in your
shell during 'make clean':
$ make clean
...
# findutils v4.1.x (RHEL 4) do not have '+' syntax
...
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
findutils v4.1.x does not have the `-exec CMD {} +' syntax. We can just as
easily use the `-exec CMD {} \;' syntax. However, it will launch a lot more
`rm' processes, so we only use it if the first form fails with an error.
This isn't a perfect solution (`find -exec +' can fail for other reasons)
but it works well enough.
This problem manifests itself in RHEL 4, findutils 4.1.20:
$ make clean
rm -f /XXX/mtd-utils/*.o /XXX/mtd-utils/ftl_format ...
find: missing argument to `-exec'
make: *** [clean] Error 1
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
|
|
If the system doesn't have gzip installed, we should still be able
to install the man pages. So install the file in one step, and then
compress it in another (and ignore failures from that).
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@intel.com>
|
|
The install target always looks for the compiled binaries in the working
directory which breaks when doing something like `make CHOST=... install`.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@intel.com>
|
|
Unfortunately I forgot to update the version in Makefile and tagged v1.4.7.
To fix this, I could not invent anything better than cut a new release 1.4.8.
Sorry for this :-(
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@intel.com>
|
|
There is a linker errors:
undefined reference to `target_endian'
This patch fixes the issue and turns on the jffs2reader build in the Makefile.
Signed-off-by: Alexey Dokuchaev <danfe@nsu.ru>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
|
|
We released mtd-utils 1.4.6 as a bug-fix release. Bump the version number
in Makefile.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@intel.com>
|
|
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
|
|
When cross-compiling (make CROSS=mipsel-linux-), I get this error:
rm -rf /home/norris/git/mtd-utils/mipsel-linux
find /home/norris/git/mtd-utils/mipsel-linux/ -xdev \
'(' -name '*.[ao]' -o -name '.*.c.dep' ')' \
-exec rm -f {} +
find: `/home/norris/git/mtd-utils/mipsel-linux/': No such file or directory
make: *** [clean] Error 1
Now, for cross-compiling, we've already deleted the $(BUILDDIR), so we
should check this before cleaning individual objects with "find."
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
|
|
When using "make CROSS=mipsel-linux-", I get the following errors:
/bin/sh: /home/norris/git/mtd-utils/mipsel-linux/include/version.h.tmp: No such file or directory
make: *** [/home/norris/git/mtd-utils/mipsel-linux/include/version.h.tmp] Error 1
Fix (suggested by Mike Frysinger): create the directory if it doesn't
exist. Also, $(CC) needs to be able to find the generated header in
$(BUILDDIR)/include.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
|
|
According to "feature-removal-schedule," we kill flash_info in favor of
mtdinfo.
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <dedekind1@gmail.com>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
|
|
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>
|
|
This is only used to create symlinks to out of tree files. I doubt it
has any relevance anymore now that jffs2 has been merged into mainline.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
The external lzo dep can be a pain to deal with when cross-compiling,
so make it optional for jffs2. This is useful if people aren't even
using the functionality, or for quicker development.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Add a "cscope" target to make it easier to develop in the repository.
Indeed, many people like me are accustomed to "make cscope" in the
kernel, and it is very convenient to have this in mtd-utils as well.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
This patch appends Makefile to the tests subdirectory and introduces tests
target in the root Makefile.
Additionally the clean target removes temporary stuff under tests subdirectory
as well.
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
$(PWD) comes from the shell and may cause unexpected side effects when
using "make -C".
$(CURDIR) is defined internally by GNU make.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
These have overlapping functionality, and while flash_eraseall supports
newer 64bit ioctls, flash_erase does not. So rather than graft support
onto flash_erase, merge the functionality of two into flash_erase so we
only have to support one util from now on.
A simple wrapper is provided to ease old flash_eraseall users into the
new combined flash_erase util.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Source files for libmtd, crc32, and fec are scattered throughout the
tree. Move them to a central location so they can be built into a
common "libmtd.a" library used by all mtd-utils programs.
This patch only renames/deletes files and does not change the content.
Also modify the build system and source code so that libmtd.a can be built
from a "common" location (lib/). Statically link all utilities at the top
level with libmtd.a . Minor changes to mkfs.ubifs to allow using the common
crc32 implementation.
Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
libubi is now used to format directly UBI volume.
Typing mkfs.ubifs /dev/ubi0_0 is now possible.
dtypes should be ok as they are taken from UBIFS code.
Signed-off-by: Corentin Chary <corentincj@iksaif.net>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Rather than duplicating the same thing over and over in every Makefile,
move it all to common.mk.
Other things fixed here:
- doing subdirs in parallel
- fix src!=build compiling in subdirs
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Some 'install' versions (e.g. this of OpenEmbedded) require the mode
to be a separate argument and don't understand the '-m0755' syntax:
.../staging/x86_64-linux/usr/bin/install-sh: ./-m0755 does not exist.
Signed-off-by: Enrico Scholz <enrico.scholz@sigma-chemnitz.de>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
If you execute straight `make`, this prevents the active make env from
being passed on to sub children. This prevents parallel building as well
as build flag passing.
I also dropped the recursive make in ubi-utils/Makefile for the all target
as this causes problems when building in parallel. All of the targets
that we actually care about are handled by the $(NTARGETS) target anyways.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
-j 2 build was not possible without this patch.
Signed-off-by: Sebastian Siewior <bigeasy@linutronix.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
This adds support for allowing the specification of unique CPPFLAGS and
LDFLAGS for both LZO and ZLIB. In addition, it allows for independently
specifying both PREFIX and EXEC_PREFIX.
The former is useful in some cross-compilation environments where the
LZO and ZLIB versions being built against are not those installed in the
standard locations.
The latter is useful when installing mtd-utils in a multi-architecture
installation area.
Signed-off-by: Grant Erickson <gerickson@nuovations.com>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
|
|
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
|
|
LSB says manpages belong to /usr/share/man, adjust makefile
defaults accordingly.
Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
|
|
I just couldn't live with myself.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
|
|
Signed-off-by: Josh Boyer <jwboyer@gmail.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
|
|
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
|
|
Paper: http://info.iet.unipi.it/~luigi/mccr6.ps.gz
Code: http://info.iet.unipi.it/~luigi/rmdp980703.tgz
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
|
|
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
|