[yocto] Yocto Methods of Loading DB Schema

Paul Eggleton paul.eggleton at linux.intel.com
Thu Aug 22 03:32:56 PDT 2013


On Thursday 22 August 2013 11:16:48 Paul Eggleton wrote:
> 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.

Hmm, I missed that you said you were using 1.3. You won't find the above in 
that version since IIRC that code was introduced in 1.4; however you could use 
a similar technique (using QEMU in application emulation rather than system 
emulation mode to run the appropriate tools for the target architecture).

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list