i.MX Yocto Project: ltib versus bitbake
来源:互联网 发布:取消数据库紧急模式 编辑:程序博客网 时间:2024/05/20 23:02
NOTES:
- Empty cells do not mean there is nobitbake parameter for the corresponding ltib one. This is still work in progress.
- Both engines are completely different and doing a one-to-one comparison isnot actually fair.
- The following tables compare the two core build tools,ltib for LTIB and bitbake for the Yocto Project (YP, hereafter). For YP, there is another important tool calledHOB, when appropriate, we add comments on the Comment's column.
- There are two main tables,
- 'ltib modes versus bitbake'
- 'ltib options versus bitbake'.
We split in two based howltib splits its parameter, so the order is the same as the one shown when typing './ltib --help'.
- LTIB comes in every released BSP, follow the User Guide to install it. The command 'ltib' is a script located on the folder with the same name, so all ltib commands should be run with './' as prefix
- YP can be seen of a series of layers (folders). To download these, including the Freescale layers, follow thislink. The command 'bitbake' must be installed independently, you can either use the package manager of you OS (e.g.sudo apt-get install bitbake on Ubuntu) or download the source code and do the setup manually. Both ways should place thebitbake script into a executable path.
ltib modesversus bitbake
With bitbake when running the patch task, it executes two lower tasks:fetch and unpack. For example, if one wants a untouched (no yocto patches) kernel, one can try: 'bitbake linux-imx -c unpack'and code unpacked code is placed on tmp/work/imx6qsabresd-poky-linux-gnueabi/linux-imx/<version>/git/
rpmbuild -bc --short-circuitltib -m scbuild -p <package>bitbake <package> -c compileWith bitbake running compile also runs a lower task: configure.rpmbuild -bi --short-circuitltib -m scinstall -p <package>bitbake <package> -cWith ltib the install task executes the %Install section of the package's spec. Withbitbake the same task executes all related package's recipe install functions, e.g.do_install.
Note: with ltib running a higher task (like scinstall) will not execute lower tasks (likescbuild and prep); this is not the case for bitbake: it runs lower tasks automatically.
does an scinstall followed by an install to the rootfsltib -m scdeploy -p <package>bitbake <package> -c buildWith bitbake,build is the default task, so one can even omit the -c build parameter, e.g. 'bitbake <package>'generate and merge a patch (requires -p <pkg>)ltib -m patchmerge -p <package>NAThis is a pretty nice feature from LTIB, unfortunately with bitbake the command does not exit. For example, to patch the Kernel's recipe, take a look at thisprocedure. In case you follow all these steps to fix a bug, do not forget to send your patch to thecommunity.
lean/uninstall target packagesltib -m clean -p <package>NAWith bitbake the 'clean' counterpart does not exit. If one needs to remove a specific package from a build, you may remove it from the image configuration file (e.g. filemeta-fsl-demos/recipes-fsl/images/fsl-image-gui.bb, remove item on IMAGE_INSTALL variable); if package is inside a package group (e.g../meta-fsl-demos/recipes-fsl/packagegroup/packagegroup-fsl.bb) you may remove it there. After this change,bitbake again and the resulting image won't have the package.
With HOB, this is much simpler due to its Graphical User Interface. Just type hob on your build directory, select the machine and the base image, then click on the 'Edit Image'. On that window you can easily deselect packages. Once deselection is done, build the image.
full cleanup, removes nearly everythingltib -m distcleanNAWith bitbake the 'distclean' command does not exit. The way to remove all the built, remove thebuild/tmp folder. Be careful, next time you run bitbake, all tasks for all packages will be executed, in other words, you will start from scratch.list packages (alphanumeric)ltib -m listpkgsnon-GUI:
bitbake -g fsl-image-gui && cat pn-depends.dot
GUI:
bitbake -g -u depexp fsl-image-gui
A bit more complex non-GUI:
bitbake -g <image> && cat pn-depends.dot | grep -v -e '-native' | grep -v digraph | grep -v -e '-image' | awk '{print $1}' | sort | uniq
list package names and licensesltib -m listpkgseulaNAWith HOB, you can see every package name name and its licence. Just typehob, then select the machine and image, and click on the 'Edit Image' button. On the 'All recipes' tab, you get a list of packages with their licenses.list packages in twiki formatltib -m listpkgstwNA list packages in a format for import into spreadsheetltib -m listpkgscsvNA make a binary release iso imageltib -m releaseNA make a non-distributable test iso releaseltib -m treleaseNA configure selected platform (no build)ltib -m configNAThere is no way to open a configuration menu with bitbake. Instead, you can usehob. With hob, things are much easier. Just type hob under the build folder and you can select the machine and the image. If the image you want does not fit to the ones already available, you can add packages manually and even store your new tuned image.
NOTES:
1. On YP, an image is a similar concept as LTIB's package profile (usually called justprofile). There are many predefined images which can be used as starting point, so type 'bitbake <image name>'.
2. In case the kernel needs to be configure, run 'bitbake linux-imx -c menuconfig'.
sub-platform selection (no build)ltib -m selectypeNAThe selectype on LTIB opens two menus: 1. Platform and the Package Profile selection 2. Configuration menu (the same menu as the one shown with -m config). In case one needs to do execute just the first task, just run 'bitbake <image name>'. In case you need to execute both, runhob.enter ltib shell mode (sets up spoofing etc)ltib -m shellbitbake <package name> -c devshell import srpms into ltib (semi-automatic)ltib -m addsrpms
ltib optionsversus bitbake
profile file. This is used to select an alternate set of userspace packages, this is saved and used on later runs of ltib (e.g config/profiles/max.config)
ltib --profile use this resource fileltib --rcfile <f> | ltib - r <f> batch mode, assume yes to all questionsltib --batch | ltib -b force rebuilds even if they are up to dateltib --force | ltib -fbitbake --force | bitbake -fFor example, to force recompiling the kernel: bitbake linux-imx -c compile -f
re-install rpms (but don't force rebuild)ltib --reinstall | ltib -ebitbake <package name> -c install -f remove (erase) rpmltib --erase | ltib -E turn off install/uninstall dependency checksltib --nodeps | ltib -nbitbake -b <somepath/somefile.bb>
For example, to build just the kernel (no dependencies, just kernel): bitbake -b ../sources/meta-fsl-arm/recipes-kernel/linux/linux-imx_3.0.35.bb
NOTE: ALL dependencies should be already be installed, otherwise the command will fail
don't force install rpms that have file conflictsltib --conflicts | ltib -k keep the srpms after the build (deleted by default)ltib --keepsrpms | ltib -s more outputltib --verbose | ltib -vbitbake --verbose | bitbake -vOn YP, the log can be too verbose, so one way to handle the amount of log is to store it and then grep it:bitbake linux-imx | tee log; grep -i <your string to seach> < logmostly a dry run (calls to system are just echos)ltib --dry-run | ltib -dbitbake --dry-run | bitbake -n try to continue on package build errors (autobuilds)ltib --continue | ltib -Cbitbake --continue | bitbake -k print the application version and quitltib --version | ltib -Vbitbake --version do not redirect any outputltib --noredir | ltib -N run the deploy scripts even if build is up to dateltib --deploy | ltib -Dbitbake <image name> -f disabled deployment (even with -p <pkg>)ltib --no-deploy just download the packages onlyltib --dlonlybitbake -c fetchall <image name>E.g. bitbake -c fetchall core-image-minimaltest that the BSP's packages are availableltib --dltest check against external staging repositoriesltib --external leave the sources unpacked (only valid for pkg mode)ltib --leavesrc | ltib -lNAThis is the default mode in YP. All source code can be found on tmp/work. In case you want to remove source code after building (as in LTIB), addINHERIT += "rm_work" to your local.conf.
NOTE: If your adding changes to a particular package, these will be lost. In case you want to keep source code of a specific package, include this on theRM_WORK_EXCLUDE variable (e.g. RM_WORK_EXCLUDE += "busybox eglibc").
Make the selected root number sticky--sticky Remove root stickiness--no-sticky (re)configure/build/install the host support package set--hostcf use with package listings--enable use if you really want to ignore any locks (careful!)--ignorelock used with -m release to copy additional content--fullbsp used with -m release to copy specical packages into ISO--distmap don't check sudo, work around for broken sudo (fc9)--no-sudouse git for some package's build where use-git-mode is either:
- internal Use fsl internal git
- external Use fsl external git
- i.MX Yocto Project: ltib versus bitbake
- yocto project terms & 深入理解 BitBake
- i.MX Yocto Project: How do I add an existing package to an image?
- i.MX Yocto Project: How can I compile the kernel manually?
- bitbake yocto笔记
- yocto project
- YOCTO project
- YOCTO Project
- How can I patch the kernel in Yocto Project
- Linaro Project & Yocto Project
- yocto命令yocto-layer /yocto-bsp/ yocto-kernel/ bitbake-layer命令
- yocto project directory structure
- yocto project .bbclass files
- yocto project glossary
- Freescale Yocto Project搭建
- Yocto Project 初体验
- Yocto tips (7): Yocto Bitbake的clean与cleanall以及cleansstate的区别
- Bitbake
- INSTALL PIP FOR MAC OSX TERMINAL
- nginx 源码安装
- WIN7上实现一开机就自动连接宽带 && WIN7自带的系统备份和还原 && WIN7盘符混乱 && WIN7查看隐藏文件 && WIN7禁止提示更新 && WIN7备份和恢复
- 如何让table表的null列由不走索引变为可走索引
- hdu 题目1907 Johu (取火柴游戏,取最后一个胜)
- i.MX Yocto Project: ltib versus bitbake
- redis学习笔记三之排序
- hdu3613(扩展KMP)
- github简单使用
- redis学习笔记四之事务
- Java序列化Serializable和ObjectOutputStream
- 分布式数据库系列
- JS逻辑运算符
- ASP.NET MVC 2博客系列之模型验证