how to use “buildhistory” in yocto build system?

。_饼干妹妹 提交于 2020-07-09 12:07:53

问题


I wanted to keep track of the "builds" that gets created using the yocto-build-system. And after doing some search, came to know about "buildhistory" feature provided by yocto-project.

They say, for enabling the "buildhistory", we need to do following:

Edit .../build/conf/local.conf and add:

INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"

and then rerun the "bitbake" for initializing the buildhistory directory.

I did the same, but I am unable to locate the buildhistory directory as such.

Can anybody let me know, how to use this "buildhistory", and how to see the build-differences?


回答1:


It'll create the buildhistory directory in ${TOPDIR}, which points to your build directory. The build directory is normally build, unless you've specified something else.

You can go into the buildhistory directory yourself, and use git (gitk, tig), though it's usually a lot more convenient to stay in ${TOPDIR} and run e.g.

buildhistory-diff

Have you checked the documentation: http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#maintaining-build-output-quality?

When you enable buildhistory, you'll get a couple of directories "images" and "packages" along with a file metadata-revs in your buildhistory directory. (And there should also be .git directory). In these directories, buildhistory will keep all changes by committing them to it's repository after each bitbake command. Amongst other things, package version & revisions, packages installed in images, sizes, etc are all kept track of. This is all outlined in the doc link.

Try adding IMAGE_INSTALL_append="some-package" to your local.conf, and run buildhistory-diff after bitbakeing your image. This should tell you that a package was added to the image.

You could also go into the buildhistory directory and run git log, gitk, or tigthere to check out whats commited.

If you're still not getting any output, paste the tree structure of the buildhistory directory to pastebin.



来源:https://stackoverflow.com/questions/27531898/how-to-use-buildhistory-in-yocto-build-system

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!