{"id":357,"date":"2010-03-02T09:55:44","date_gmt":"2010-03-02T15:55:44","guid":{"rendered":"http:\/\/dmartenson.dc.multitech.prv\/developer\/?page_id=357"},"modified":"2011-11-23T14:41:48","modified_gmt":"2011-11-23T20:41:48","slug":"working-with-a-single-recipe","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/corecdp\/development\/working-with-a-single-recipe\/","title":{"rendered":"Using BitBake"},"content":{"rendered":"<h3>BitBake usage examples<\/h3>\n<p>Most BitBake commands used when developing are either intended to build (or rebuild) a particular package, or to build a new rootfs image for flashing the device.  Here are some examples of the most common commands.<\/p>\n<p><code>bitbake package-name<\/code><br \/>\nBuild the &#8220;package-name&#8221; package.<\/p>\n<p><code>bitbake -s<\/code><br \/>\nList available packages after parsing all recipes.  This will generate a lot of output due to sheer number of packages in the system!  Best to redirect output to a file <code>bitbake -s > packages.txt<\/code><\/p>\n<p><code>bitbake --help<\/code><br \/>\nPrint usage help.<\/p>\n<h3>Running specific tasks<\/h3>\n<p>BitBake supports running individual tasks on a package using the <code>-c<\/code> flag.  See below for examples of running specific tasks using the lighttpd package.  If no task is specified, the &#8220;build&#8221; task is run.  This is a generic task that depends on all the other necessary tasks to build a package (fetch, configure, compile, install, etc).<\/p>\n<p><code>bitbake lighttpd -c listtasks<\/code><br \/>\nView a list of possible tasks to run on the lighttpd package. <\/p>\n<p><code>bitbake lighttpd -c clean<br \/>\nbitbake lighttpd<\/code><br \/>\nClean a package, removing all source code, binaries, etc and rebuild it.<\/p>\n<p>Copy resulting package to target device and install it:<\/p>\n<pre class=\"brush:shell\">cd ${OETREE}\/build\/tmp\/deploy\/eglibc\/ipk\/armv5te\r\nscp lighttpd_1.4.28-r0.10_armv5te.ipk root@192.168.2.1:\/var\/tmp\/\r\nssh root@192.168.2.1\r\nopkg install \/var\/tmp\/lighttpd_1.4.28-r0.10_armv5te.ipk\r\n<\/pre>\n<p><code>bitbake lighttpd -c compile -f<\/code><br \/>\nForce bitbake to run the compile task (perhaps you changed the source after compiling).<\/p>\n<p><code>bitbake lighttpd -c devshell<\/code><br \/>\nOpen a new shell with the environment configured for development on the package.  This can be very useful for debugging issues with compiling a package.<\/p>\n<p><code>bitbake -b openembedded\/recipes\/lighttpd\/lighttpd_1.4.28.bb<\/code><br \/>\nRuns BitBake on a single recipe file.  This bypasses parsing all other recipes and operates only on the specified recipe.  This can be useful to speed up development on a particular package when the package is being rebuilt frequently.  Note that this skips building any dependencies and therefore they must already be built.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BitBake usage examples Most BitBake commands used when developing are either intended to build (or rebuild) a particular package, or to build a new rootfs image for flashing the device. Here are some examples of the most common commands. bitbake package-name Build the &#8220;package-name&#8221; package. bitbake -s List available packages after parsing all recipes. This [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"parent":314,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-357","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=357"}],"version-history":[{"count":16,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/357\/revisions"}],"predecessor-version":[{"id":2204,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/357\/revisions\/2204"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/314"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}