当在本地回购中进行更改时,我可以使用bitbake重建我们的系统吗?
我疯狂地搜索了答案,但还找不到答案。
我想为包含Linux系统的设备以及最终用户应用程序构建图像。最终用户应用程序位于我们的git 存储库中:我们的applications-repo
。这可以正常工作,即调用:bitbake< ourapps>
,根据需要构建该图像。到目前为止,一切都很好。
但是,它只能工作一次。当我编辑了恰好是C ++文件的应用程序文件时,我当然像bitbake< ourapps>
命令重新编译并链接受影响的C ++文件,库和可执行文件一样,运行Make Will,并将受影响的文件纳入可以下载到我们设备的新的新鲜图像中。不幸的是,这没有发生。
是否有一个简单的修复程序,也许将某些内容添加到src_uri
或设置另一个 bb_variable 以确保检查ourapplications-repo
中的文件是否已检查变化?还是解决我的需求的完全错误的方法,也许我真的必须创建一个SDK并使用我的香草构建工具(例如autotools
and cmake)与它一起使用,当我对我的本地更改感到满意时,我会提交并将我的更改推向git repo,允许bitbake< ourapps>
拾取这些更改(如果仅BitBake仅将已推向Git存储库的拾取更改)?
还是最好的做法是什么,我应该如何使用这样的常见(?)设置?
This is how our simple and standard project structure looks like:
- project
-- build
-- poky
-- meta-freescale
-- meta-openembedded
-- meta-ourapplications
-- ourapplications-repo
--- build/conf/bblayers.conf:
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
${TOPDIR}/../poky/meta \
${TOPDIR}/../poky/meta-poky \
${TOPDIR}/../poky/meta-yocto-bsp \
${TOPDIR}/../meta-freescale \
${TOPDIR}/../meta-openembedded/meta-oe \
${TOPDIR}/../meta-openembedded/meta-python \
${TOPDIR}/../meta-ourapplications \
"
-- meta-ourapplications/recipes-ourapplications/images/ourapps.bb:
SUMMARY = "A small image capable of allowing our linux system to boot with our applications."
IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL} ... foo"
inherit core-image
--- meta-ourapplications/recipes-ourapplications/foo/foo_1.0.bb:
DESCRIPTION = "Foo App"
LICENSE = "CLOSED"
SRCREV = "${AUTOREV}"
PVBASE := "${PV}"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PVBASE}:${THISDIR}/${PN}:"
PV = "${PVBASE}+${SRCPV}"
SRC_URI = "git://${TOPDIR}/../ourapplications-repo;protocol=file;subpath=${BPN}"
S = "${WORKDIR}/${BPN}"
inherit autotools
--- ourapplications-repo/foo/
---- foo.cpp
---- Makefile.am
---- and so on...
I have googled frenetically for answers but have not been able to find an answer yet.
I had like to build an image for our device containing our Linux system together with our end-user applications. The end-user applications reside in our git repository: ourapplications-repo
. This works fine, i.e. invoking: bitbake <ourapps>
, builds that image as desired. So far, so good.
However, it only works once. When I have edited our application files, which happens to be C++ files, I had of course like the bitbake <ourapps>
command to re-compile and link affected C++ files, libraries and executables, just like running make would, and incorporating the affected files into a new fresh image that can be downloaded to our devices. Unfortunately, that does not happen.
Is there an easy fix for this, maybe adding something to SRC_URI
or setting another BB_VARIABLE to ensure that files in ourapplications-repo
are checked for any changes? Or is this totally wrong way to handle my need, maybe I really have to create an SDK and work with it using my vanilla build tools like autotools
and CMake and when I am satisfied with my local changes I commit and push my changes to the git repo allowing bitbake <ourapps>
to pickup those changes (if bitbake only pickup changes that have been pushed to the git repository)?
Or what is the best practice, how should I work with a common(?) setup like this?
This is how our simple and standard project structure looks like:
- project
-- build
-- poky
-- meta-freescale
-- meta-openembedded
-- meta-ourapplications
-- ourapplications-repo
--- build/conf/bblayers.conf:
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
${TOPDIR}/../poky/meta \
${TOPDIR}/../poky/meta-poky \
${TOPDIR}/../poky/meta-yocto-bsp \
${TOPDIR}/../meta-freescale \
${TOPDIR}/../meta-openembedded/meta-oe \
${TOPDIR}/../meta-openembedded/meta-python \
${TOPDIR}/../meta-ourapplications \
"
-- meta-ourapplications/recipes-ourapplications/images/ourapps.bb:
SUMMARY = "A small image capable of allowing our linux system to boot with our applications."
IMAGE_INSTALL = "packagegroup-core-boot ${CORE_IMAGE_EXTRA_INSTALL} ... foo"
inherit core-image
--- meta-ourapplications/recipes-ourapplications/foo/foo_1.0.bb:
DESCRIPTION = "Foo App"
LICENSE = "CLOSED"
SRCREV = "${AUTOREV}"
PVBASE := "${PV}"
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PVBASE}:${THISDIR}/${PN}:"
PV = "${PVBASE}+${SRCPV}"
SRC_URI = "git://${TOPDIR}/../ourapplications-repo;protocol=file;subpath=${BPN}"
S = "${WORKDIR}/${BPN}"
inherit autotools
--- ourapplications-repo/foo/
---- foo.cpp
---- Makefile.am
---- and so on...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论