fs/ext2: use mkfs to generate rootfs image
authorSébastien Szymanski <sebastien.szymanski@armadeus.com>
Tue, 4 Jul 2017 14:47:26 +0000 (16:47 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 4 Jul 2017 22:39:38 +0000 (00:39 +0200)
commit67aaa90d3bbe6ad5b5ffa9e66cdb0a1928448eb9
treedf5e40e680b6b598baa36feb3c9b46a7ec48dac5
parent235b6f17a0e38d854245d451bfc55bf82c3bbfc1
fs/ext2: use mkfs to generate rootfs image

mkfs is now capable of generating rootfs images. Use mkfs instead of
genext2fs.

If not set, we now let mkfs calculate the block size and the number of
inodes needed.

This change also adjusts the options to meet those of mkfs.

Notes:
* Passing a null inode number to mkfs triggers its automatic calculation.
* Passing a fs-size with no unit suffix to mkfs is interpreted as using
  1K block size.

Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Cc: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas: don't pass PATH when calling mkfs.ext, just call it directly
from $(HOST_DIR)/usr/sbin, as suggested by Arnout.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
fs/ext2/Config.in
fs/ext2/ext2.mk