[yocto] Can anything be done about do_rootfs speed?

Samuel Stirtzel s.stirtzel at googlemail.com
Wed Aug 28 04:30:36 PDT 2013


2013/8/28 Samuel Stirtzel <s.stirtzel at googlemail.com>:
> 2013/8/28 Paul D. DeRocco <pderocco at ix.netcom.com>:
>>> From: Martin Jansa
>>>
>>> Are you sure that you're not building some unnecessary IMAGE_FSTYPES?
>>
>> No, I'm not sure.
>>
>>> Last time someone asked my why it takes so long I've added some debug
>>> output to do_rootfs and found out that only half of the time was opkg
>>> installing packages and the rest was various IMAGE_FSTYPES.
>>>
>>> e.g. tar.bz2 takes very long without pbzip2 or lbzip2
>>
>> Is there a standard way to use those in a build? Do I replace bzip2 with a
>> link to one of those? Or does Yocto build its own bzip2?
>>
>
> Hi,
>
> look/grep for IMAGE_FSTYPE, if there is a += "tar.bz2" or multiple
> identical += lines then you can be sure that do_rootfs is wasting
> time.
>
>
> A virtual package manager which only composes the package database in
> a multi-threaded way could be seen as a silver bullet here.
> Also pigz [1] and pbzip2 [2] could save some minutes / seconds
> depending on the image size.
>
>
> [1] http://zlib.net/pigz/
> [2] http://compression.ca/pbzip2/
>

Forgot to mention something important...

If you change:

COMPRESS_CMD_gz = "gzip -f -9 -c ${IMAGE_NAME}.rootfs.${type} >
${IMAGE_NAME}.rootfs.${type}.gz"
COMPRESS_CMD_bz2 = "bzip2 -f -k ${IMAGE_NAME}.rootfs.${type}"

in [...]/meta/classes/image_types.bbclass, then can try pbzip2 / pigz.



-- 
Regards
Samuel



More information about the yocto mailing list