[yocto] Yocto Methods of Loading DB Schema
Barry G
mr.scada at gmail.com
Wed Aug 21 16:21:22 PDT 2013
Hello all,
I am working on porting some products from a proprietary
build system (native build) to Yocto (cross-compile).
In our old proprietary system the last step was running
a large script which customized the image for the flash and did
any "little tweaks" needed to make everything ready for product.
I am trying to port this to Yocto and "Yoctoize" everything. Most
of our customization I have been able to port as a patch in the
recipe file.
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?
The other negative side effect is that each unit as it boots
in manufacturing has to run a lot of complex stuff. If it
gets unplugged too soon, etc it might be in a bad state.
It might be preferable to boot the image under emulation so
that the first load is all done by the time the "first-booted"
image is loaded on actual devices in the factory.
Any thoughts would be appreciated,
Thanks,
Barry
More information about the yocto
mailing list