devtool-reference.rst 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690
  1. .. SPDX-License-Identifier: CC-BY-SA-2.0-UK
  2. ***************************
  3. ``devtool`` Quick Reference
  4. ***************************
  5. The ``devtool`` command-line tool provides a number of features that
  6. help you build, test, and package software. This command is available
  7. alongside the ``bitbake`` command. Additionally, the ``devtool`` command
  8. is a key part of the extensible SDK.
  9. This chapter provides a Quick Reference for the ``devtool`` command. For
  10. more information on how to apply the command when using the extensible
  11. SDK, see the ":doc:`/sdk-manual/extensible`" chapter in the Yocto
  12. Project Application Development and the Extensible Software Development
  13. Kit (eSDK) manual.
  14. .. _devtool-getting-help:
  15. Getting Help
  16. ============
  17. The ``devtool`` command line is organized similarly to Git in that it
  18. has a number of sub-commands for each function. You can run
  19. ``devtool --help`` to see all the commands::
  20. $ devtool --help
  21. NOTE: Starting bitbake server...
  22. usage: devtool [--basepath BASEPATH] [--bbpath BBPATH] [-d] [-q] [--color COLOR] [-h] <subcommand> ...
  23. OpenEmbedded development tool
  24. options:
  25. --basepath BASEPATH Base directory of SDK / build directory
  26. --bbpath BBPATH Explicitly specify the BBPATH, rather than getting it from the metadata
  27. -d, --debug Enable debug output
  28. -q, --quiet Print only errors
  29. --color COLOR Colorize output (where COLOR is auto, always, never)
  30. -h, --help show this help message and exit
  31. subcommands:
  32. Beginning work on a recipe:
  33. add Add a new recipe
  34. modify Modify the source for an existing recipe
  35. upgrade Upgrade an existing recipe
  36. Getting information:
  37. status Show workspace status
  38. latest-version Report the latest version of an existing recipe
  39. check-upgrade-status Report upgradability for multiple (or all) recipes
  40. search Search available recipes
  41. Working on a recipe in the workspace:
  42. build Build a recipe
  43. ide-sdk Setup the SDK and configure the IDE
  44. rename Rename a recipe file in the workspace
  45. edit-recipe Edit a recipe file
  46. find-recipe Find a recipe file
  47. configure-help Get help on configure script options
  48. update-recipe Apply changes from external source tree to recipe
  49. reset Remove a recipe from your workspace
  50. finish Finish working on a recipe in your workspace
  51. Testing changes on target:
  52. deploy-target Deploy recipe output files to live target machine
  53. undeploy-target Undeploy recipe output files in live target machine
  54. build-image Build image including workspace recipe packages
  55. Advanced:
  56. create-workspace Set up workspace in an alternative location
  57. import Import exported tar archive into workspace
  58. export Export workspace into a tar archive
  59. extract Extract the source for an existing recipe
  60. sync Synchronize the source tree for an existing recipe
  61. menuconfig Alter build-time configuration for a recipe
  62. Use devtool <subcommand> --help to get help on a specific command
  63. As directed in the general help output, you can
  64. get more syntax on a specific command by providing the command name and
  65. using ``--help``::
  66. $ devtool add --help
  67. NOTE: Starting bitbake server...
  68. usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI] [--npm-dev] [--no-pypi] [--version VERSION] [--no-git] [--srcrev SRCREV | --autorev]
  69. [--srcbranch SRCBRANCH] [--binary] [--also-native] [--src-subdir SUBDIR] [--mirrors] [--provides PROVIDES]
  70. [recipename] [srctree] [fetchuri]
  71. Adds a new recipe to the workspace to build a specified source tree. Can optionally fetch a remote URI and unpack it to create the source tree.
  72. arguments:
  73. recipename Name for new recipe to add (just name - no version, path or extension). If not specified, will attempt to auto-detect it.
  74. srctree Path to external source tree. If not specified, a subdirectory of /media/build1/poky/build/workspace/sources will be used.
  75. fetchuri Fetch the specified URI and extract it to create the source tree
  76. options:
  77. -h, --help show this help message and exit
  78. --same-dir, -s Build in same directory as source
  79. --no-same-dir Force build in a separate build directory
  80. --fetch URI, -f URI Fetch the specified URI and extract it to create the source tree (deprecated - pass as positional argument instead)
  81. --npm-dev For npm, also fetch devDependencies
  82. --no-pypi Do not inherit pypi class
  83. --version VERSION, -V VERSION
  84. Version to use within recipe (PV)
  85. --no-git, -g If fetching source, do not set up source tree as a git repository
  86. --srcrev SRCREV, -S SRCREV
  87. Source revision to fetch if fetching from an SCM such as git (default latest)
  88. --autorev, -a When fetching from a git repository, set SRCREV in the recipe to a floating revision instead of fixed
  89. --srcbranch SRCBRANCH, -B SRCBRANCH
  90. Branch in source repository if fetching from an SCM such as git (default master)
  91. --binary, -b Treat the source tree as something that should be installed verbatim (no compilation, same directory structure). Useful with binary packages e.g. RPMs.
  92. --also-native Also add native variant (i.e. support building recipe for the build host as well as the target machine)
  93. --src-subdir SUBDIR Specify subdirectory within source tree to use
  94. --mirrors Enable PREMIRRORS and MIRRORS for source tree fetching (disable by default).
  95. --provides PROVIDES, -p PROVIDES
  96. Specify an alias for the item provided by the recipe. E.g. virtual/libgl
  97. .. _devtool-the-workspace-layer-structure:
  98. The Workspace Layer Structure
  99. =============================
  100. ``devtool`` uses a "Workspace" layer in which to accomplish builds. This
  101. layer is not specific to any single ``devtool`` command but is rather a
  102. common working area used across the tool.
  103. The following figure shows the workspace structure:
  104. .. image:: figures/build-workspace-directory.png
  105. :scale: 100%
  106. .. code-block:: none
  107. attic - A directory created if devtool believes it must preserve
  108. anything when you run "devtool reset". For example, if you
  109. run "devtool add", make changes to the recipe, and then
  110. run "devtool reset", devtool takes notice that the file has
  111. been changed and moves it into the attic should you still
  112. want the recipe.
  113. README - Provides information on what is in workspace layer and how to
  114. manage it.
  115. .devtool_md5 - A checksum file used by devtool.
  116. appends - A directory that contains *.bbappend files, which point to
  117. external source.
  118. conf - A configuration directory that contains the layer.conf file.
  119. recipes - A directory containing recipes. This directory contains a
  120. folder for each directory added whose name matches that of the
  121. added recipe. devtool places the recipe.bb file
  122. within that sub-directory.
  123. sources - A directory containing a working copy of the source files used
  124. when building the recipe. This is the default directory used
  125. as the location of the source tree when you do not provide a
  126. source tree path. This directory contains a folder for each
  127. set of source files matched to a corresponding recipe.
  128. .. _devtool-adding-a-new-recipe-to-the-workspace:
  129. Adding a New Recipe to the Workspace Layer
  130. ==========================================
  131. Use the ``devtool add`` command to add a new recipe to the workspace
  132. layer. The recipe you add should not exist --- ``devtool`` creates it for
  133. you. The source files the recipe uses should exist in an external area.
  134. The following example creates and adds a new recipe named ``jackson`` to
  135. a workspace layer the tool creates. The source code built by the recipes
  136. resides in ``/home/user/sources/jackson``::
  137. $ devtool add jackson /home/user/sources/jackson
  138. If you add a recipe and the workspace layer does not exist, the command
  139. creates the layer and populates it as described in
  140. ":ref:`devtool-the-workspace-layer-structure`" section.
  141. Running ``devtool add`` when the workspace layer exists causes the tool
  142. to add the recipe, append files, and source files into the existing
  143. workspace layer. The ``.bbappend`` file is created to point to the
  144. external source tree.
  145. .. note::
  146. If your recipe has runtime dependencies defined, you must be sure
  147. that these packages exist on the target hardware before attempting to
  148. run your application. If dependent packages (e.g. libraries) do not
  149. exist on the target, your application, when run, will fail to find
  150. those functions. For more information, see the
  151. ":ref:`ref-manual/devtool-reference:deploying your software on the target machine`"
  152. section.
  153. By default, ``devtool add`` uses the latest revision (i.e. master) when
  154. unpacking files from a remote URI. In some cases, you might want to
  155. specify a source revision by branch, tag, or commit hash. You can
  156. specify these options when using the ``devtool add`` command:
  157. - To specify a source branch, use the ``--srcbranch`` option::
  158. $ devtool add --srcbranch &DISTRO_NAME_NO_CAP; jackson /home/user/sources/jackson
  159. In the previous example, you are checking out the &DISTRO_NAME_NO_CAP;
  160. branch.
  161. - To specify a specific tag or commit hash, use the ``--srcrev``
  162. option::
  163. $ devtool add --srcrev &DISTRO_REL_TAG; jackson /home/user/sources/jackson
  164. $ devtool add --srcrev some_commit_hash /home/user/sources/jackson
  165. The previous examples check out the
  166. &DISTRO_REL_TAG; tag and the commit associated with the
  167. some_commit_hash hash.
  168. .. note::
  169. If you prefer to use the latest revision every time the recipe is
  170. built, use the options ``--autorev`` or ``-a``.
  171. .. _devtool-extracting-the-source-for-an-existing-recipe:
  172. Extracting the Source for an Existing Recipe
  173. ============================================
  174. Use the ``devtool extract`` command to extract the source for an
  175. existing recipe. When you use this command, you must supply the root
  176. name of the recipe (i.e. no version, paths, or extensions), and you must
  177. supply the directory to which you want the source extracted.
  178. Additional command options let you control the name of a development
  179. branch into which you can checkout the source and whether or not to keep
  180. a temporary directory, which is useful for debugging.
  181. .. _devtool-synchronizing-a-recipes-extracted-source-tree:
  182. Synchronizing a Recipe's Extracted Source Tree
  183. ==============================================
  184. Use the ``devtool sync`` command to synchronize a previously extracted
  185. source tree for an existing recipe. When you use this command, you must
  186. supply the root name of the recipe (i.e. no version, paths, or
  187. extensions), and you must supply the directory to which you want the
  188. source extracted.
  189. Additional command options let you control the name of a development
  190. branch into which you can checkout the source and whether or not to keep
  191. a temporary directory, which is useful for debugging.
  192. .. _devtool-modifying-a-recipe:
  193. Modifying an Existing Recipe
  194. ============================
  195. Use the ``devtool modify`` command to begin modifying the source of an
  196. existing recipe. This command is very similar to the
  197. :ref:`add <devtool-adding-a-new-recipe-to-the-workspace>` command
  198. except that it does not physically create the recipe in the workspace
  199. layer because the recipe already exists in an another layer.
  200. The ``devtool modify`` command extracts the source for a recipe, sets it
  201. up as a Git repository if the source had not already been fetched from
  202. Git, checks out a branch for development, and applies any patches from
  203. the recipe as commits on top. You can use the following command to
  204. checkout the source files::
  205. $ devtool modify recipe
  206. Using the above command form, ``devtool`` uses the existing recipe's
  207. :term:`SRC_URI` statement to locate the upstream source,
  208. extracts the source into the default sources location in the workspace.
  209. The default development branch used is "devtool".
  210. .. _devtool-edit-an-existing-recipe:
  211. Edit an Existing Recipe
  212. =======================
  213. Use the ``devtool edit-recipe`` command to run the default editor, which
  214. is identified using the ``EDITOR`` variable, on the specified recipe.
  215. When you use the ``devtool edit-recipe`` command, you must supply the
  216. root name of the recipe (i.e. no version, paths, or extensions). Also,
  217. the recipe file itself must reside in the workspace as a result of the
  218. ``devtool add`` or ``devtool upgrade`` commands.
  219. .. _devtool-updating-a-recipe:
  220. Updating a Recipe
  221. =================
  222. Use the ``devtool update-recipe`` command to update your recipe with
  223. patches that reflect changes you make to the source files. For example,
  224. if you know you are going to work on some code, you could first use the
  225. :ref:`devtool modify <devtool-modifying-a-recipe>` command to extract
  226. the code and set up the workspace. After which, you could modify,
  227. compile, and test the code.
  228. When you are satisfied with the results and you have committed your
  229. changes to the Git repository, you can then run the
  230. ``devtool update-recipe`` to create the patches and update the recipe::
  231. $ devtool update-recipe recipe
  232. If you run the ``devtool update-recipe``
  233. without committing your changes, the command ignores the changes.
  234. Often, you might want to apply customizations made to your software in
  235. your own layer rather than apply them to the original recipe. If so, you
  236. can use the ``-a`` or ``--append`` option with the
  237. ``devtool update-recipe`` command. These options allow you to specify
  238. the layer into which to write an append file::
  239. $ devtool update-recipe recipe -a base-layer-directory
  240. The ``*.bbappend`` file is created at the
  241. appropriate path within the specified layer directory, which may or may
  242. not be in your ``bblayers.conf`` file. If an append file already exists,
  243. the command updates it appropriately.
  244. .. _devtool-checking-on-the-upgrade-status-of-a-recipe:
  245. Checking on the Upgrade Status of a Recipe
  246. ==========================================
  247. Upstream recipes change over time. Consequently, you might find that you
  248. need to determine if you can upgrade a recipe to a newer version.
  249. To check on the upgrade status of a recipe, you can use the
  250. ``devtool latest-version recipe`` command, which quickly shows the current
  251. version and the latest version available upstream. To get a more global
  252. picture, use the ``devtool check-upgrade-status`` command, which takes a
  253. list of recipes as input, or no arguments, in which case it checks all
  254. available recipes. This command will only print the recipes for which
  255. a new upstream version is available. Each such recipe will have its current
  256. version and latest upstream version, as well as the email of the maintainer
  257. and any additional information such as the commit hash or reason for not
  258. being able to upgrade it, displayed in a table.
  259. This upgrade checking mechanism relies on the optional :term:`UPSTREAM_CHECK_URI`,
  260. :term:`UPSTREAM_CHECK_REGEX`, :term:`UPSTREAM_CHECK_GITTAGREGEX`,
  261. :term:`UPSTREAM_CHECK_COMMITS` and :term:`UPSTREAM_VERSION_UNKNOWN`
  262. variables in package recipes.
  263. .. note::
  264. - Most of the time, the above variables are unnecessary. They are only
  265. required when upstream does something unusual, and default
  266. mechanisms cannot find the new upstream versions.
  267. - For the ``oe-core`` layer, recipe maintainers come from the
  268. :yocto_git:`maintainers.inc </poky/tree/meta/conf/distro/include/maintainers.inc>`
  269. file.
  270. - If the recipe is using the :ref:`bitbake-user-manual/bitbake-user-manual-fetching:git fetcher (\`\`git://\`\`)`
  271. rather than a tarball, the commit hash points to the commit that matches
  272. the recipe's latest version tag, or in the absence of suitable tags,
  273. to the latest commit (when :term:`UPSTREAM_CHECK_COMMITS` set to ``1``
  274. in the recipe).
  275. As with all ``devtool`` commands, you can get help on the individual
  276. command::
  277. $ devtool check-upgrade-status -h
  278. NOTE: Starting bitbake server...
  279. usage: devtool check-upgrade-status [-h] [--all] [recipe [recipe ...]]
  280. Prints a table of recipes together with versions currently provided by recipes, and latest upstream versions, when there is a later version available
  281. arguments:
  282. recipe Name of the recipe to report (omit to report upgrade info for all recipes)
  283. options:
  284. -h, --help show this help message and exit
  285. --all, -a Show all recipes, not just recipes needing upgrade
  286. Unless you provide a specific recipe name on the command line, the
  287. command checks all recipes in all configured layers.
  288. Here is a partial example table that reports on all the recipes::
  289. $ devtool check-upgrade-status
  290. ...
  291. INFO: bind 9.16.20 9.16.21 Armin Kuster <akuster808@gmail.com>
  292. INFO: inetutils 2.1 2.2 Tom Rini <trini@konsulko.com>
  293. INFO: iproute2 5.13.0 5.14.0 Changhyeok Bae <changhyeok.bae@gmail.com>
  294. INFO: openssl 1.1.1l 3.0.0 Alexander Kanavin <alex.kanavin@gmail.com>
  295. INFO: base-passwd 3.5.29 3.5.51 Anuj Mittal <anuj.mittal@intel.com> cannot be updated due to: Version 3.5.38 requires cdebconf for update-passwd utility
  296. ...
  297. Notice the reported reason for not upgrading the ``base-passwd`` recipe.
  298. In this example, while a new version is available upstream, you do not
  299. want to use it because the dependency on ``cdebconf`` is not easily
  300. satisfied. Maintainers can explicit the reason that is shown by adding
  301. the :term:`RECIPE_NO_UPDATE_REASON` variable to the corresponding recipe.
  302. See :yocto_git:`base-passwd.bb </poky/tree/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb?h=kirkstone>`
  303. for an example::
  304. RECIPE_NO_UPDATE_REASON = "Version 3.5.38 requires cdebconf for update-passwd utility"
  305. Last but not least, you may set :term:`UPSTREAM_VERSION_UNKNOWN` to ``1``
  306. in a recipe when there's currently no way to determine its latest upstream
  307. version.
  308. .. _devtool-upgrading-a-recipe:
  309. Upgrading a Recipe
  310. ==================
  311. As software matures, upstream recipes are upgraded to newer versions. As
  312. a developer, you need to keep your local recipes up-to-date with the
  313. upstream version releases. There are several ways of upgrading recipes.
  314. You can read about them in the ":ref:`dev-manual/upgrading-recipes:upgrading recipes`"
  315. section of the Yocto Project Development Tasks Manual. This section
  316. overviews the ``devtool upgrade`` command.
  317. Before you upgrade a recipe, you can check on its upgrade status. See
  318. the ":ref:`devtool-checking-on-the-upgrade-status-of-a-recipe`" section
  319. for more information.
  320. The ``devtool upgrade`` command upgrades an existing recipe to a more
  321. recent version of the recipe upstream. The command puts the upgraded
  322. recipe file along with any associated files into a "workspace" and, if
  323. necessary, extracts the source tree to a specified location. During the
  324. upgrade, patches associated with the recipe are rebased or added as
  325. needed.
  326. When you use the ``devtool upgrade`` command, you must supply the root
  327. name of the recipe (i.e. no version, paths, or extensions), and you must
  328. supply the directory to which you want the source extracted. Additional
  329. command options let you control things such as the version number to
  330. which you want to upgrade (i.e. the :term:`PV`), the source
  331. revision to which you want to upgrade (i.e. the
  332. :term:`SRCREV`), whether or not to apply patches, and so
  333. forth.
  334. You can read more on the ``devtool upgrade`` workflow in the
  335. ":ref:`dev-manual/devtool:use \`\`devtool upgrade\`\` to create a version of the recipe that supports a newer version of the software`"
  336. section in the Yocto Project Application Development and the Extensible
  337. Software Development Kit (eSDK) manual. You can also see an example of
  338. how to use ``devtool upgrade`` in the ":ref:`dev-manual/upgrading-recipes:using \`\`devtool upgrade\`\``"
  339. section in the Yocto Project Development Tasks Manual.
  340. .. _devtool-resetting-a-recipe:
  341. Resetting a Recipe
  342. ==================
  343. Use the ``devtool reset`` command to remove a recipe and its
  344. configuration (e.g. the corresponding ``.bbappend`` file) from the
  345. workspace layer. Realize that this command deletes the recipe and the
  346. append file. The command does not physically move them for you.
  347. Consequently, you must be sure to physically relocate your updated
  348. recipe and the append file outside of the workspace layer before running
  349. the ``devtool reset`` command.
  350. If the ``devtool reset`` command detects that the recipe or the append
  351. files have been modified, the command preserves the modified files in a
  352. separate "attic" subdirectory under the workspace layer.
  353. Here is an example that resets the workspace directory that contains the
  354. ``mtr`` recipe::
  355. $ devtool reset mtr
  356. NOTE: Cleaning sysroot for recipe mtr...
  357. NOTE: Leaving source tree /home/scottrif/poky/build/workspace/sources/mtr as-is; if you no longer need it then please delete it manually
  358. $
  359. .. _devtool-finish-working-on-a-recipe:
  360. Finish Working on a Recipe
  361. ==========================
  362. Use the ``devtool finish`` command to push any committed changes to the
  363. specified recipe in the specified layer and remove it from your workspace.
  364. This is roughly equivalent to the ``devtool update-recipe`` command followed by
  365. the ``devtool reset`` command. The changes must have been committed to the git
  366. repository created by ``devtool``. Here is an example::
  367. $ devtool finish recipe /path/to/custom/layer
  368. .. _devtool-building-your-recipe:
  369. Building Your Recipe
  370. ====================
  371. Use the ``devtool build`` command to build your recipe. The
  372. ``devtool build`` command is equivalent to the
  373. ``bitbake -c populate_sysroot`` command.
  374. When you use the ``devtool build`` command, you must supply the root
  375. name of the recipe (i.e. do not provide versions, paths, or extensions).
  376. You can use either the ``-s`` or the ``--disable-parallel-make`` options to
  377. disable parallel makes during the build. Here is an example::
  378. $ devtool build recipe
  379. .. _devtool-building-your-image:
  380. Building Your Image
  381. ===================
  382. Use the ``devtool build-image`` command to build an image, extending it
  383. to include packages from recipes in the workspace. Using this command is
  384. useful when you want an image that ready for immediate deployment onto a
  385. device for testing. For proper integration into a final image, you need
  386. to edit your custom image recipe appropriately.
  387. When you use the ``devtool build-image`` command, you must supply the
  388. name of the image. This command has no command line options::
  389. $ devtool build-image image
  390. .. _devtool-deploying-your-software-on-the-target-machine:
  391. Deploying Your Software on the Target Machine
  392. =============================================
  393. Use the ``devtool deploy-target`` command to deploy the recipe's build
  394. output to the live target machine::
  395. $ devtool deploy-target recipe target
  396. The target is the address of the target machine, which must be running
  397. an SSH server (i.e. ``user@hostname[:destdir]``).
  398. This command deploys all files installed during the
  399. :ref:`ref-tasks-install` task. Furthermore, you do not
  400. need to have package management enabled within the target machine. If
  401. you do, the package manager is bypassed.
  402. .. note::
  403. The ``deploy-target`` functionality is for development only. You
  404. should never use it to update an image that will be used in
  405. production.
  406. Some conditions could prevent a deployed application from
  407. behaving as expected. When both of the following conditions are met, your
  408. application has the potential to not behave correctly when run on the
  409. target:
  410. - You are deploying a new application to the target and the recipe you
  411. used to build the application had correctly defined runtime
  412. dependencies.
  413. - The target does not physically have the packages on which the
  414. application depends installed.
  415. If both of these conditions are met, your application will not behave as
  416. expected. The reason for this misbehavior is because the
  417. ``devtool deploy-target`` command does not deploy the packages (e.g.
  418. libraries) on which your new application depends. The assumption is that
  419. the packages are already on the target. Consequently, when a runtime
  420. call is made in the application for a dependent function (e.g. a library
  421. call), the function cannot be found.
  422. .. warning::
  423. Runtime dependencies can be explicitly listed in the :term:`RDEPENDS`
  424. variable, but may also be the result of a :term:`DEPENDS` assignment in your
  425. application's recipe. This is usually the case when your application depends
  426. on libraries for compilation: these libraries are listed as build-time
  427. dependencies in the :term:`DEPENDS` variable in your application's recipe.
  428. However these may also be runtime dependencies if they install shared objects
  429. on which your application will dynamically link to at runtime (e.g. shared
  430. libraries ending with ``.so``).
  431. These runtime dependencies are automatically resolved by the
  432. :term:`OpenEmbedded Build System` during the packaging phase. Since
  433. ``devtool`` ignores packaging dependencies, they will not be installed
  434. automatically with ``devtool deploy-target``.
  435. For more information on how the :term:`OpenEmbedded Build System` handles
  436. packaging, see the :ref:`overview-manual/concepts:Automatically Added Runtime
  437. Dependencies` section of the Yocto Project Overview and Concepts Manual.
  438. To be sure you have all the dependencies local to the target, you need
  439. to be sure that the packages are pre-deployed (installed) on the target
  440. before attempting to run your application.
  441. .. _devtool-removing-your-software-from-the-target-machine:
  442. Removing Your Software from the Target Machine
  443. ==============================================
  444. Use the ``devtool undeploy-target`` command to remove deployed build
  445. output from the target machine. For the ``devtool undeploy-target``
  446. command to work, you must have previously used the
  447. ":ref:`devtool deploy-target <ref-manual/devtool-reference:deploying your software on the target machine>`"
  448. command::
  449. $ devtool undeploy-target recipe target
  450. The target is the
  451. address of the target machine, which must be running an SSH server (i.e.
  452. ``user@hostname``).
  453. .. _devtool-creating-the-workspace:
  454. Creating the Workspace Layer in an Alternative Location
  455. =======================================================
  456. Use the ``devtool create-workspace`` command to create a new workspace
  457. layer in your :term:`Build Directory`. When you create a
  458. new workspace layer, it is populated with the ``README`` file and the
  459. ``conf`` directory only.
  460. The following example creates a new workspace layer in your current
  461. working and by default names the workspace layer "workspace"::
  462. $ devtool create-workspace
  463. You can create a workspace layer anywhere by supplying a pathname with
  464. the command. The following command creates a new workspace layer named
  465. "new-workspace"::
  466. $ devtool create-workspace /home/scottrif/new-workspace
  467. .. _devtool-get-the-status-of-the-recipes-in-your-workspace:
  468. Get the Status of the Recipes in Your Workspace
  469. ===============================================
  470. Use the ``devtool status`` command to list the recipes currently in your
  471. workspace. Information includes the paths to their respective external
  472. source trees.
  473. The ``devtool status`` command has no command-line options::
  474. $ devtool status
  475. Here is sample output after using
  476. :ref:`devtool add <ref-manual/devtool-reference:adding a new recipe to the workspace layer>`
  477. to create and add the ``mtr_0.86.bb`` recipe to the ``workspace`` directory::
  478. $ devtool status
  479. mtr:/home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb)
  480. $
  481. .. _devtool-search-for-available-target-recipes:
  482. Search for Available Target Recipes
  483. ===================================
  484. Use the ``devtool search`` command to search for available target
  485. recipes. The command matches the recipe name, package name, description,
  486. and installed files. The command displays the recipe name as a result of
  487. a match.
  488. When you use the ``devtool search`` command, you must supply a keyword.
  489. The command uses the keyword when searching for a match.
  490. Alternatively, the ``devtool find-recipe`` command can be used to search for
  491. recipe files instead of recipe names. Likewise, you must supply a keyword.
  492. .. _devtool-get-the-configure-script-help:
  493. Get Information on Recipe Configuration Scripts
  494. ===============================================
  495. Use the ``devtool configure-help`` command to get help on the configuration
  496. script options for a given recipe. You must supply the recipe name to the
  497. command. For example, it shows the output of ``./configure --help`` for
  498. :ref:`autotools <ref-classes-autotools>`-based recipes.
  499. The ``configure-help`` command will also display the configuration options
  500. currently in use, including the ones passed through the :term:`EXTRA_OECONF`
  501. variable.
  502. .. _devtool-generate-an-ide-configuration-for-a-recipe:
  503. Generate an IDE Configuration for a Recipe
  504. ==========================================
  505. The ``devtool ide-sdk`` automatically creates an IDE configuration and SDK to
  506. work on a given recipe. Depending on the ``--mode`` parameter, different types
  507. of SDKs are generated:
  508. - ``modified`` mode: this creates an SDK and generates an IDE configuration in
  509. the workspace directory.
  510. - ``shared`` mode: this creates a cross-compiling toolchain and the
  511. corresponding shared sysroot directories of the supplied recipe(s).
  512. The ``--target`` option can be used to specify a ``username@hostname`` string
  513. and create a remote debugging configuration for the recipe. Similarly to
  514. ``devtool deploy-target``, it requires an SSH server running on the target.
  515. For further details on the ``devtool ide-sdk`` command, see the
  516. ":doc:`/sdk-manual/extensible`" chapter in the Yocto Project Application
  517. Development and the Extensible Software Development Kit (eSDK) manual.