Re: Yocto Methods of Loading DB Schema

Paul Eggleton

Hi Barry,

On Wednesday 21 August 2013 16:21:22 Barry G wrote:
The last big hurdle is how to load the database. We are using
Yocto 1.3 and I have ported in the postgresql recipies from
gumstix-yocto. Since I can't load the postgresql database schema
without the cross-compiled postgresql database running, I assume
this needs deferred to first device boot. I can use pkg_postinstall
to create/populate the postgresql databases, but this seems a little
dirty since the text version of the sql would need to be on the
device image to load.

Is anyone else doing anything like this? Is there a best known
method for performing these kind of operations?
I've not done anything like this myself, but if the process of loading the
database is specific to the target device/arch and can't be run directly on the
build host, I do know we have some support for running processes like these
under qemu on the host to avoid the need to run anything on first boot - see
meta/classes/pixbufcache.bbclass and meta/classes/gtk-icon-cache.bbclass, as
well as the intercept scripts in scripts/postinst-intercepts/ that get used
when these are run on the build host during root filesystem construction.



Paul Eggleton
Intel Open Source Technology Centre

Join to automatically receive all group messages.