[yocto] Can anything be done about do_rootfs speed?

Martin Jansa martin.jansa at gmail.com
Wed Aug 28 00:20:25 PDT 2013


On Tue, Aug 27, 2013 at 05:10:42PM -0700, Paul D. DeRocco wrote:
> > From: Gary Thomas
> > 
> > As far as I understand, the 'do_rootfs' step in building an 
> > image is basically
> > equivalent to running "${PKG_MGR} install 
> > <all_required_packages>", where PKG_MGR
> > is your package management method of choice - ipk or rpm.  
> > This seems to me to
> > be a very single-threaded process.
> 
> If there's a way to command the package manager to install a package
> without enforcing dependencies (Is that what opkg --nodeps does?), then
> couldn't the package manager be invoked on one package at a time in n
> threads, just like the other tasks are now run? I don't really have any
> sense of how long it takes to install the packages, as opposed to building
> the final tarball or hddimage and applying the permissions from the pseudo
> database, which would certainly be single-threaded.
> 
> > Perhaps you should think more about how you are using this.  
> > If you don't need
> > to rebuild the whole image every time, maybe you can use the 
> > package management
> > tools instead?  For example, I routinely build images as well 
> > but I also try to
> > use 'opkg' as much as possible to manage package updates, 
> > etc.   This is a huge
> > time saver, especially when making small or incremental 
> > changes.  I only rely
> > on the full image builds when I want to "checkpoint" the 
> > state of the system.
> 
> I'd like to try that, but I'm not sure how. If I've tweaked one recipe,
> how do I get it to build it and package it, and then stop? Do I use
> "bitbake -c package"? And then do I use "opkg -d" to manually install it
> directly onto my SD card? If my rootfs is a loop mounted hddimage in a
> FAT16 file (as it is on my Atom project), do I loop mount it on my build
> system and install into that?
> 
> Installing directly to the card would be nice because copying the whole
> damn rootfs to the card takes an annoying amount of time, too.

Are you sure that you're not building some unnecessary IMAGE_FSTYPES?
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

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20130828/63227ac9/attachment.pgp>


More information about the yocto mailing list