Commit Graph

3 Commits (3d8212c4b29d00caf20a3036ced885a3260678ec)

Author SHA1 Message Date
Yann E. MORIN 9bdc27d8a7 fs: don't use := when not needed
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2019-10-27 10:35:06 +01:00
Yann E. MORIN f023810f04 fs/btrfs: remove destination file before generation
btrfs will happily use an existing destination file if it
already exists, increasing its size if needed. Hoever, it
will never decrease the size, even if the requested size
is smaller than the existing file.

So, remove any previously existing destination file before
generating the new filesystem.

Note: the original submission by Robert did that, but as
this case was not obvious, the removal was dropped by a
refactoring when the patch was initially applied.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Robert J. Heywood <robert.heywood@codethink.co.uk>
Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
[Thomas: use $@ instead of $(@), use $(RM) instead of rm.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-25 23:59:23 +02:00
Robert J. Heywood 0aade4df1f fs/btrfs: add support for generating a btrfs image
This patch makes it possible to format the rootfs using btrfs. It
introduces the option; BR2_TARGET_ROOTFS_BTRFS.

When selected, the user is able to specify the filesystem size, label,
options, and node and sector sizes. The new files are based on
fs/ext2/{Config.in,ext2.mk}

Signed-off-by: Robert J. Heywood <robert.heywood@codethink.co.uk>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Thomas:
 - fix issues pointed by Yann (duplicated empty line, missing quotes
   around default values for string options)
 - use -f option so that we don't have to remove the image file before
   creating it again
 - use the --byte-count option to set the filesystem size, which
   avoids the need for doing a "truncate -s"
 - remove the possible explanation of a mkfs.btrfs error. Indeed,
   mkfs.btrfs automatically extends the size of the image as needed,
   so the size passed can never be "too small".
 - fix check-package warnings in Config.in file.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-08-25 14:30:51 +02:00