[Buildroot] [PATCH 1/1] package/mke2img: use mkfs to generate rootfs image

Sébastien Szymanski sebastien.szymanski at armadeus.com
Thu Mar 2 12:45:06 UTC 2017


On 03/02/2017 11:34 AM, Thomas Petazzoni wrote:
> Hello,
> 
> On Thu,  2 Mar 2017 10:06:16 +0100, Sébastien Szymanski wrote:
>> mkfs is now capable of generating rootfs images. Use mkfs intead of
>> genext2fs.
>>
>> Signed-off-by: Sébastien Szymanski <sebastien.szymanski at armadeus.com>
>> ---
>>  package/mke2img/Config.in.host |  1 -
>>  package/mke2img/mke2img        | 58 +++++++++++++++++-------------------------
>>  package/mke2img/mke2img.mk     |  2 +-
>>  3 files changed, 25 insertions(+), 36 deletions(-)
> 
> Thanks for working on this, definitely very useful.
> 
> Do we still need the mke2img wrapper script? The only reason why this
> wrapper script was created is because genext2fs was too stupid, and
> many things had to be done "by hand" (like calling tune2fs, etc.) and
> it became too nasty to do in fs/ext2/ext2.mk.
> 
> Now that we use mkfs, is it possible to get rid of mke2img entirely?

We still have to calculate the number of blocks needed. I guess we can
do that in the .mk file, can't we?

> 
>> +    # Disable some defaults features
>> +    mkfs_O_opts+=",^ext_attr,^64bit,^flex_bg,^large_file,^huge_file,^dir_nlink,^extra_isize"
> 
> Why would we disable these default features

I disable these default features, to generate a rootfs as similar as
possible the one generated by genext2fs.
U-boot had some issues with rootfs with the 64bit flags, but this has
been fixed

http://git.denx.de/?p=u-boot.git;a=commit;h=b4976b49a01ac68f7dbb33657a44dcffe584fa4a

> 
>> +    # Running e2fsck will ensure coherency of the filesystem,
>> +    # although it is not required.
> 
> If we use mkfs, I don't think calling e2fsck. It was really needed
> between genext2fs and tune2fs, but I don't think it's needed anymore
> now.

I agree. e2fsck isn't needed anymore now.

Regards,

> 
> Thanks,
> 
> Thomas
> 


-- 
Sébastien Szymanski
Software Engineer, Armadeus Systems
sebastien.szymanski at armadeus.com
Tel: +33 (0)9 72 29 41 44
Fax: +33 (0)9 72 28 79 26



More information about the buildroot mailing list