| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
| |
It enables the 'Batch mode'. It is optimized for huge recursive copies. This is not
really needed here and fsck.vfat complains about the resulting filesystem.
So drop the option and expand the existing test. Fail if fsck.vfat modifies the
filesystem.
Fixes #142
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the following warnings when compiling with CC=cgcc:
config.c:197:46: warning: Using plain integer as NULL pointer
image-ext2.c:208:9: warning: Using plain integer as NULL pointer
image-ext2.c:212:9: warning: Using plain integer as NULL pointer
image-ext2.c:213:9: warning: Using plain integer as NULL pointer
image-hd.c:663:11: warning: symbol 'hdimage_opts' was not declared. Should it be static?
image-iso.c:52:9: warning: Using plain integer as NULL pointer
image-rauc.c:191:9: warning: Using plain integer as NULL pointer
image-vfat.c:130:9: warning: Using plain integer as NULL pointer
|
|
|
|
| |
Signed-off-by: Florent Viard <fviard@cxignited.com>
|
|
|
|
|
|
|
|
| |
This is useful when creating multiple images with on config and some of
them should be empty. Also, vfat filesystems cannot be empty right now, so
this makes it possible.
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Mtools by default refuses to work with filesystems not fitting the legacy
C-H-S adressing, E.G. bigger than 511MB or with "odd" sizes.
mkdosfs writes a BIOS parameter block containing (among others) the number
of sectors per track and heads. This parameter block is what mtools reads
and validates that total sectors is a multiple of sectors/track times heads.
For small(<512MB) filesystems, mkdosfs uses sectors/track = 32 and heads =
64, allowing filesystems of multiples of 1MB to validate. For bigger
filesystems it instead uses sectors/track = 63 and heads = 255 to signify
LBA addressing. 63 * 255 * 512 bytes is not a multiple of 1MB, so the
validation in mtools fails for filesystems of multiples of 1MB, E.G:
image test.fat {
vfat {
files = { "test.txt" }
}
size = 512M
}
Errors out with:
Total number of sectors (10444800) not a multiple of sectors per track (63)!
Add mtools_skip_check=1 to your .mtoolsrc file to skip this test
This legacy check can be disabled by the MTOOLS_SKIP_CHECK environment
variable (or editing the .mtoolsrc as described by the error message), so
pass MTOOLS_SKIP_CHECK=1 to each mcopy/mmd invocation.
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
|
|
|
|
|
|
|
|
|
|
| |
The different image handlers do not work with pathes containing whitespaces
whenever an external command is invoked. Escape all pathes with quotation
marks to make that work.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[mol: fix more image types]
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The output of invoked commands can be very useful for debugging, but
also annoying or confusing. Print stderr of invoked commands on
debug loglevel and and stdout of invoked commands on verbose debug
loglevel, but redirect to /dev/null on lower loglevels. This
makes the manual > /dev/null redirection in some commands unnecessary
which is removed with this patch.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[mol: fix error handling, change output loglevel, log stdout in the tests]
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We have image_error, image_log, error and logmsg which all do the
actual printing themselves. Create a set of error(), info() and
debug() functions which all do the actual printing in the same
function. Also add the same set of functions with a image_ prefix
to do image specific logging. All messages now get a [type] prefix
to make it easier to distinguish them from the stdout/stderr from
invoked commands (see next patch).
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
[mol: don't change the loglevel numbers]
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The `size' property is mandatory and cannot be 0 for vfat and ext file
systems.
Print a message that is more helpful than:
genext2fs: too few blocks. Note: options have changed, see --help or the man page.
ext2(test.ext2): failed to generate test.ext2
and
mkdosfs: unable to discover size of images/test.vfat
vfat(test.vfat): failed to generate test.vfat
Signed-off-by: Gaël PORTAY <gael.portay@savoirfairelinux.com>
|
|
|
|
| |
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With a config like this:
image foo {
vfat {
file "foo/bar/A" {
image = "a"
}
files = {
"b", "c", "d"
}
}
size = 1M
}
genimage actually prints the following output:
vfat(foo): adding file 'a' as 'foo/bar/A' ...
vfat(foo): adding file 'b' as '' ...
vfat(foo): adding file 'c' as '' ...
vfat(foo): adding file 'd' as '' ...
If the target is empty (which ends up copying in the image output file
root directory anyway), use the source filename instead.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
|
|
| |
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
|