image_types.bbclass: use mke2fs -d to create the ext2/3/4 image
authorRobert Yang <liezhi.yang@windriver.com>
Fri, 7 Mar 2014 06:59:34 +0000 (01:59 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 7 Mar 2014 14:45:23 +0000 (14:45 +0000)
commit9b602985aca8d016243ede651886067b670a15d2
tree663f267306479fabbeaf5f246e44f0105fe408b0
parentd6b3e2ed8b55eafacc080defd91565843cb0a4a5
image_types.bbclass: use mke2fs -d to create the ext2/3/4 image

We used populate-extfs.sh which invoked the debugfs to create the image,
now the mke2fs' option "-d root-directory" can do the same thing, and
which is more faster, for example, the core-imag-sato:

* In the past:
$ time mke2fs -t ext4 rootfs.ext4
real    0m0.249s
user    0m0.036s
sys     0m0.132s
$ time populate-extfs.sh /path/to/rootfs/ rootfs.ext4
real    0m29.355s
user    0m10.637s
sys     0m5.544s

* Now:
$ time mkfs.ext4 -F -d /path/to/rootfs/ rootfs.ext4
real    0m6.338s
user    0m3.824s
sys     0m1.356s

More than 25 seconds are saved.

[YOCTO #4083]

(From OE-Core rev: 6338fe9ba338615317a4e7ccc99287b236ac77ae)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/image_types.bbclass