Commit Graph

144 Commits

Author SHA1 Message Date
Gustavo Zacarias
7ffd8642da fs/iso9660: fix iso9660 support
Similar to the "fs/initramfs: fix initramfs support" commit the same
problem applies to iso9660 in a different way. By adding iso9660 to
TARGETS it gets called before target-finalize with obvious consequences.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-03-06 23:01:53 +01:00
Gustavo Zacarias
cfd1f70a10 fs/initramfs: fix initramfs support
On commit a24877586a TARGETS_ROOTFS was
introduced, however fs/initramfs/initramfs.mk was never updated, hence a
show-targets would be rootfs-initramfs with rootfs-cpio afterwards hence
never rebuilding the kernel with a proper cpio archive since TARGETS is
always before rootfs-* as stated in the commit description.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2014-03-06 23:01:33 +01:00
Fabio Porcedda
a24877586a Makefile: add support for top-level parallel make
To be able to use top-level parallel make we must not depend in a rule
on the order of evaluation of the prerequisites, so instead of relyng on
the left to right ordering of evaluation of the prerequisites add an
explicit rule to describe the dependencies.

Add explicit rules to describe the following dependency chain:
$(TARGETS) -> target-finalize -> rootfs-* -> target-post-image

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-14 21:09:04 +01:00
Danomi Manchego
74a0f963ed fs/ubi: add option to use custom ubinize config file
By default, the UBI FS target creates a ubinize configuration
file on-the-fly, for a single volume.  Add an option to specify
a custom config file.

E.g., one might want to deploy a system with a volume for the
built ubifs image, a volume for a future upgrade image, and a
volume for user data.

Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-08 22:57:31 +01:00
Yann E. MORIN
984524fda1 fs: ensure $(TARGET_DIR_WARNING_FILE) is writable
If the Buildroot tree is read-only, then $(TARGET_DIR_WARNING_FILE) is
copied read-only into target/ but we may want to remove it during the
build process.

This poses no real problem, since target/ itself is guaranteed to be
writable, but for good measure, force $(TARGET_DIR_WARNING_FILE) to be
writable itself.

Reported-by: Danomi Manchego <danomimanchego123@gmail.com>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-28 22:57:52 +01:00
Samuel Martin
22cdb652f5 fs/common.mk: add host-mkpasswd if PACKAGES_USERS is not empty
When using a custom rootfs skeleton, the host-mkpasswd target is not
automatically built, even if some packages add users (i.e. when
PACKAGES_USERS is not empty).

In this case, the rootfs generation may fail because the mkpasswd
provided by some distribution does not support all options used in the
mkusers script.

This patch avoids such trouble by automatically adding the host-mkpasswd
package to the dependency list of the rootfs targets if users needs
to be created.

[Peter: minor rewording of commit message]
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-22 22:08:28 +01:00
Jerzy Grzegorek
0e26991f79 package: fix white spaces
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-16 13:31:09 +01:00
Thomas De Schampheleire
2f7a53ee8a squashfs3: remove deprecated package/rootfs
[Peter: remove now unused BR2_DEPRECATED_SINCE_2010_05 symbol]
Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-10 15:14:35 +01:00
Thomas De Schampheleire
ba4ad9d27c deprecated handling: introduce BR2_DEPRECATED_SINCE_xxxx_xx
In order to keep better track of when a feature got deprecated, and hence
when it can be removed, a new set of symbols BR2_DEPRECATED_SINCE_xxxx_xx is
introduced. These symbols are automatically selected when BR2_DEPRECATED is
selected, and thus are transparent to the user.
A deprecated feature will no longer depend on BR2_DEPRECATED directly, but
rather on the appropriate BR2_DEPRECATED_SINCE_xxxx_xx. If that symbol does
not yet exist, it has to be created in Config.in.
When removing a deprecated feature, one should also check whether this was
the last feature using the BR2_DEPRECATED_SINCE_xxxx_xx symbol, in which
case the latter can be removed from Config.in.

A followup patch will make sure the overview is added to the list of
deprecated features in the manual, so that a buildroot core developer can
easily determine which features to remove in a given development cycle.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-10 15:03:53 +01:00
Yann E. MORIN
9e680d0ada fs/ext2: fix generation of ext4 filesystems
cset 7a58a4e (e2fsprogs: bump to version 1.42.9) broke the generation
of ext4 filesystems.

This is because, in ext4, some metadata are dependent on the UUID.
If changing the UUID of an ext4 filesystem, tune2fs now exits with
exit-code 1, and prints a message to run fsck, to avoid trashing the
filesystem.

This condition is of utmost importance on a mounted filesysten (which
is not our case) to avoid corruption (yes, it is possible to change
the UUID of a mounted filesystem).

But the error is not valid for us, since we are working on an unmonted
filesystem image in the first place.

Since we change the UUID after we convert the filesystem (to ext4),
tune2fs just bails out.

We can not just ignore the exit code of tune2fs, since we still want
to catch any other failure.

It turns out that, changing the UUID before converting the filesystem
is just the way to go.

Fixes #6752.

Reported-by: Daniel Mentz <daniel@exxm.de>
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Daniel Mentz <daniel@exxm.de>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-06 00:07:25 +01:00
Jerzy Grzegorek
3033bc0c6e package: remove the empty trailing line(s)
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-01-04 10:39:29 +01:00
Thomas Petazzoni
13d7c78394 fs/iso9660: add Grub splashscreen support
When Grub is built with splashscreen support, copy the splashscreen
image to the ISO9660 filesystem. Otherwise, disable the splashscreen
in the grub menu.lst file.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-12-31 00:05:17 +01:00
Thierry Bultel
cf63744d23 fs/iso9660: do not use an initrd in iso image when using initramfs
When using initramfs built into the kernel, it is useless to put an
initrd in the iso image.  This patch makes the image to only contain
the kernel image, and also removes the initrd line from menu.lst

Signed-off-by: Thierry Bultel <thierry.bultel@wanadoo.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-12-29 18:26:54 +01:00
Thomas Petazzoni
418c3a2f90 fs/iso9660: select ISO9660 support in Grub
The fs/iso9660 logic assumes that the Grub bootloader is
used. Therefore, it should make sure that Grub is configured with the
support for the ISO9660 filesystem.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-12-29 12:17:58 +01:00
Thomas Petazzoni
b49c231cab fs/iso9660: put the Buildroot boot entry first in Grub menu.lst
The ISO9660-specific Grub menu.lst contains two entries: one entry to
chainload the bootloader available in the first hard drive, and
another entry to boot the Buildroot system.

However, it defaults to booting the first entry, i.e chainloading
what's on the first hard drive. For a Buildroot generated system, this
is quite odd: we're not even booting the system built by Buildroot.

So, switch the two entries, and put the Buildroot boot entry first.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2013-12-29 12:17:27 +01:00
Thomas De Schampheleire
c4c55206fb Config.in files: fix incorrect indentation
Tab instead of spaces

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2013-12-25 12:29:52 +01:00
Thomas De Schampheleire
8da745f04a Config.in files: unification of comments about dependency on Linux kernel
This patch lines up the comments of packages that need a Linux kernel to be
built by buildroot, to the format:
    foo needs a Linux kernel to be built

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-12-15 16:24:36 +01:00
Thomas De Schampheleire
bed4e27868 Config.in files: whitespace cleanup
This patch fixes the following whitespace problems in Config.in files:
- trailing whitespace
- spaces instead of tabs for indentation
- help text not indented with tab + 2 spaces

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 22:19:30 +01:00
Arnout Vandecappelle
13ae0075a9 uboot-tools: factor out common mkimage infrastructure
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 00:37:03 +01:00
Arnout Vandecappelle
3970ebf837 rootfs-cpio: add U-Boot image support
Adds U-Boot image support for cpio root filesystems. This allows you to
use the bootm command in U-Boot to load the rootfs. It makes it possible to
verify the CRC of the initramfs before booting the kernel.

[Spenser: wrote first version of the patch.]
Signed-off-by: Spenser Gilliland <spenser@gillilanding.com>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 00:34:31 +01:00
Arnout Vandecappelle
4df9ecb30a rootfs-ext2: symlink with the compressed rootfs
Previously, a symlink was created to the uncompressed filesystem,
which made it a bit useless in case compression was chosen.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 00:34:14 +01:00
Arnout Vandecappelle
bd8ef7a01c rootfs-common: refactor the common compression commands
This makes the compression extension available in a variable, so it
can be used by the fs-specific commands. In this patch, it is used
by iso9660. Following patches show more use cases.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 00:32:46 +01:00
Arnout Vandecappelle
fb7ad1c44e rootfs-cpio: whitespace cleanup in Config.in
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 00:30:44 +01:00
Arnout Vandecappelle
053d678a6c rootfs-common: remove the now unused ROOTFS_<PKG>_POST_GEN_HOOKS
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 00:30:21 +01:00
Arnout Vandecappelle
75b6303a9a rootfs-ext2: make the symlink as a _POST_TARGET
This will allow us to remove the unused ROOTFS_$(FSTYPE)_POST_GEN_HOOKS.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-11 00:29:44 +01:00
Thomas De Schampheleire
be084204eb Config.in files: add missing dependencies to toolchain option comments
When a package A depends on config option B and toolchain option C, then
the comment that is given when C is not fulfilled should also depend on B.
For example:

config BR2_PACKAGE_A
	depends on BR2_B
	depends on BR2_LARGEFILE
	depends on BR2_WCHAR

comment "A needs a toolchain w/ largefile, wchar"
	depends on !BR2_LARGEFILE || !BR2_WCHAR

This comment should actually be:

comment "A needs a toolchain w/ largefile, wchar"
	depends on BR2_B
	depends on !BR2_LARGEFILE || !BR2_WCHAR

or if possible (typically when B is a package config option declared in that
same Config.in file):

if BR2_B

comment "A needs a toolchain w/ largefile, wchar"
	depends on !BR2_LARGEFILE || !BR2_WCHAR

[other config options depending on B]

endif

Otherwise, the comment would be visible even though the other dependencies
are not met.

This patch adds such missing dependencies, and changes existing such
dependencies from
  depends on BR2_BASE_DEP && !BR2_TOOLCHAIN_USES_GLIBC
to
  depends on BR2_BASE_DEP
  depends on !BR2_TOOLCHAIN_USES_GLIBC
so that (positive) base dependencies are separate from the (negative)
toolchain dependencies. This strategy makes it easier to write such comments
(because one can simply copy the base dependency from the actual package
config option), but also avoids complex and long boolean expressions.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
 (untested)
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-11-10 23:59:57 +01:00
Thomas De Schampheleire
fbc2494a41 Remove redundant dollar signs in Config.in files
Some Config.in(.host) files have constructs like:

config FOO_VERSION
	string
	default "1.0" if FOO_1_0
	default "2.0" if FOO_2_0
	default $FOO_CUSTOM_VERSION if FOO_CUSTOM

The dollar sign here is not needed and confusing, so can be removed.

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2013-10-26 19:58:30 +02:00
Jerzy Grzegorek
cd2ff4f637 package: remove the empty trailing lines
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-13 11:10:23 +02:00
Thomas De Schampheleire
88768fccfc ubifs filesystem image: line up and improve Config.in options
Triggered by the 'some comment required here', this patch updates the Config.in
comments for the ubifs filesystem image options. This includes:
- 'erase block' --> 'eraseblock' (following mtd online documentation)
- remove 'UBI' prefix to make options uniform. Sometimes the option is not a
  property of UBI but rather of the flash. Also, line up the name of the option
  with the help of mkfs.ubifs.
- add help text on all options, referring to the mkfs.ubifs/ubinize options

Signed-off-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-12 22:01:17 +02:00
Jérôme Pouiller
741cbccb74 Fix build reproducibility in Make 3.82
Make 3.82 no longer sort the result of wildcards (see
http://comments.gmane.org/gmane.comp.gnu.make.bugs/4260). This may break
build reproducibility.

This patch sort results of wildcards to ensure reproducibility.

Signed-off-by: Jérôme Pouiller <jezz@sysmic.org>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-09-06 23:27:42 +02:00
Jerzy Grzegorek
e0d9d33cc2 fix white spaces
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-20 21:13:57 +02:00
Valentine Barshak
391c82efa1 linux: Do not force GZIP initramfs compression
Initramfs compression does not make much sense for the architectures
that support compressed kernel images because in this case the data
would be compressed twice. This will eventually result in a bigger
kernel image and time overhead when uncompressing it.
The only reason to use compressed initramfs is to reduce memory
usage when the kernel prepares rootfs, and both the unpacked
filesystem and initramfs.cpio are present in the memory.

Buildroot attempts to force GZIP compression for initramfs,
however it doesn't always work because initramfs compression mode
depends on RAM disk compression supported by the kernel.
Thus, CONFIG_INITRAMFS_COMPRESSION_GZIP depends on CONFIG_RD_GZIP.
If CONFIG_RD_GZIP is not set, setting GZIP initramfs compression
will have no effect.

Besides, the kernel also supports other compression methods,
like BZIP2, LZMA, XZ and LZO. Forcing the good old GZIP does not
really make much sense any more.

This removes initramfs compression settings from Buildroot,
so that the default value preset in the kernel config is used,
which is CONFIG_INITRAMFS_COMPRESSION_NONE.

If initramfs compression is still needed, it can be set
in the kernel config (using make linux-menuconfig)

Signed-off-by: Valentine Barshak <gvaxon@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-07-08 14:50:31 +02:00
Alexandre Belloni
95442bb324 Normalize separator size to 80 in remaining makefiles
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-20 17:32:07 +02:00
Jerzy Grzegorek
086f333f39 Normalize separator size to 80
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-07 10:54:54 +02:00
Jerzy Grzegorek
834de0ac13 Fix package headers to comply with coding style
Signed-off-by: Jerzy Grzegorek <jerzy.grzegorek@trzebnica.net>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-07 10:54:00 +02:00
Yann E. MORIN
d8286a993a package/genext2fs: add host variant
genext2fs is built only if the user selected an ext2 root filesystem.

However, some use-cases can't live with the full target/ dir on the
root filesystem, and requires separate partitions (eg. for /usr).
In this case, the user would not select an ext2 root fs in the
Buildrooot menu, and would only generate a tarball of the rootfs.
This tarball would then be used from a post-image script to build
the actual required FSes.

But then, genext2fs is not built, since the ext2 root FS was not
selected.

As for the other filesystem generators, provide a host variant of
genext2fs (genext2fs is already host-package aware, so only needs
adding a Kconfig entry).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-06-03 23:06:30 +02:00
Yann E. MORIN
60474dcec6 fs/ext2: further fix to the UUID
Turned out that setting a nil-UUID is no better than clearing it.

What currently happens is as follows:
  - first, genext2fs does not generate a UUID
  - then we tune2fs to upgrade the filesystem
  - then we run fsck, which generates a random UUID
  - then we re-run tune2fs to set a nil-UUID

So, on the target, if the file system is improperly unmounted (eg.
with a power failure), on next boot, fsck may be run, and a new
random UUID will be generated.

*However*, fsck improperly updates the filesystem when it adds the
UUID, and there are a few group descriptor checksum errors.

Those errors will go undetected until the next fsck, which will then
block for user input (bad on embedded systems, bad).

Fix that by systematically generating a random UUID _before_ we call
to fsck.

A random UUID is not so bad, after all, since there are already so
many sources of unpredictability in the filesystem: files date and
ordering, files content (date, paths...) which renders a fixed UUID
unneeded.

And it is still possible to set the UUID in a post-image script if
needed, anyway.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-05-29 00:18:37 +02:00
Yann E. MORIN
a9825c06b8 fs/ext2: explicitly set a NULL UUID
"tune2fs -U clear" creates an invalid filesystem, that fsck.ext2
whines about later:

    $ make rootfs-ext2
    [--SNIP--]

    $ ./host/usr/sbin/fsck.ext4 images/rootfs.ext2
    e2fsck 1.42.7 (21-Jan-2013)
    Filesystem did not have a UUID; generating one.
    images/rootfs.ext2: clean, 4616/5120 files, 53171/131072 blocks

    $ ./host/usr/sbin/fsck.ext4 -f images/rootfs.ext2
    e2fsck 1.42.7 (21-Jan-2013)
    One or more block group descriptor checksums are invalid.  Fix<y>? yes
    Group descriptor 0 checksum is 0x4131, should be 0x8bdb.  FIXED.
    [--SNIP--]

So we set an explicitly NULL UUID instead.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-05-28 12:38:30 +02:00
Yann E. MORIN
1f3af04db7 packages: add ability for packages to create users
Packages that install daemons may need those daemons to run as a non-root,
or an otherwise non-system (eg. 'daemon'), user.

Add infrastructure for packages to create users, by declaring the FOO_USERS
variable that contain a makedev-syntax-like description of the user(s) to
add.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Samuel Martin <s.martin49@gmail.com>
Cc: Cam Hutchison <camh@xdna.net>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-25 22:56:42 +02:00
Mark Jackson
a3e3909bce fs/ubifs: factorize all the "depends on" into "if...endif" blocks
Factorize all the "depends on" into "if...endif" blocks

All the UBIFS options use "depends on BR2_TARGET_ROOTFS_UBIFS" but
we can simplify the config file by enclosing them in an "if..endif"
block.

Signed-off-by: Mark Jackson <mpfj@newflow.co.uk>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-25 22:45:46 +02:00
Mark Jackson
a0f3cb1cbe fs/ubifs: allow extra options to be passed to ubifs creation tools
Allow extra options to be passed to ubifs creation tools.

Signed-off-by: Mark Jackson <mpfj@newflow.co.uk>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-25 22:43:13 +02:00
Gustavo Zacarias
5419651bfa fs/common: add support for LZO and XZ compression methods
Add support for LZO and XZ compression methods to cpio, ext2, tar and
ubifs filesystem targets.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-24 22:18:13 +02:00
Peter Korsgaard
0fab0a4afd fs/ext2: bump journal overhead to 1300 blocks
A quick test with a ~3.5MB ext4 filesystem shows that 1081 blocks isn't
enough:

tune2fs 1.42.7 (21-Jan-2013)

Please run e2fsck on the filesystem.

Creating journal inode:
Journal size too big for filesystem.

So bump it a bit. Overestimating the journal size is probably not really
a big deal for the kind of systems using ext3/4 anyway.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-12 14:57:36 +02:00
Yann E. MORIN
a2a266e0cf fs/ext2: remove count- and time-based fsck
Set the count- and time-based checks intervals to 0, thus effectively
disabling automatic checks at boot (after a suggestion by Arnout).

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-12 14:45:47 +02:00
Yann E. MORIN
5fd27fc849 fs/ext2: add support for ext2 rev0 and rev1
Some bootloaders have a buggy ext2 support, and require ext2 rev1
instead of the traditional ext2 rev0 that genext2fs produces.

tune2fs accepts only one '-O list' at a time, so we need to construct
a list of -O options.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-12 14:43:22 +02:00
Yann E. MORIN
aaefab09c7 fs/ext2: add a symlink 'rootfs.ext#' -> 'rootfs.ext2'
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-12 14:42:31 +02:00
Yann E. MORIN
69036c20f1 fs/ext2: add ability to build ext3/4 too
Use the host-e2fsprogs to tune2fs the generated rootfs.ext2 image,
and upgrade it to either one of ext2, ext3 or ext4.

Since calling tune2fs may require running e2fsck (tune2fs will warn
to do so when certain FS options are changed), we systematically call
e2fsck. This makes the code path simpler, and as a side-effect checks
that genext2fs did not generate garbage.

In turn, e2fsck will unconditionally add a UUID to the filesystem,
which is bad for reproducibility, so we call tune2fs again to remove
the UUID. This does not require checking the filesystem.

To ensure compatibility of Buildroot's .config, leave ext2 as the
default. Boards' .config can override this at will.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Peter Korsgaard <jacmet@uclibc.org>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-12 14:39:24 +02:00
Yann E. MORIN
5fbef61480 fs/ext2: enclose the ext2 options in if...endif
Use a 'if...endif' construct instead of repeating the
'depends on' for each symbols.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Acked-by: Arnout Vandecappelle <arnout@mind.be>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-12 14:39:04 +02:00
Thomas Petazzoni
0f1bce64bd fs/jffs2: refactor endianess selection to use BR2_ENDIAN
Instead of explicitly listing the sub-architectures or architectures
that are big-endian, use BR2_ENDIAN directly.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-04-11 15:57:37 +02:00
Ezequiel Garcia
402d1476f7 fs/common.mk: Strip extra whitespace when device table is empty
Since ROOTFS_DEVICE_TABLES is a concatenation of two strings separated by
spaces, there will always be a space in it, which means it's never empty.
Therefore, when testing for empty, the condition never evaluate to false.

The following change fixes this problem; it runs qstrip on the overall
combination of the variables, causing the space to be removed if it's the
only thing left.

Tested-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com>
Acked-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
2013-03-13 23:09:40 +01:00