ref-devtool-reference.xml 33 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734
  1. <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
  2. "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd"
  3. [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] >
  4. <chapter id='ref-devtool-reference'>
  5. <title><filename>devtool</filename> Quick Reference</title>
  6. <para>
  7. The <filename>devtool</filename> command-line tool provides a number
  8. of features that help you build, test, and package software.
  9. This command is available alongside the <filename>bitbake</filename>
  10. command.
  11. Additionally, the <filename>devtool</filename> command is a key
  12. part of the extensible SDK.
  13. </para>
  14. <para>
  15. This chapter provides a Quick Reference for the
  16. <filename>devtool</filename> command.
  17. For more information on how to apply the command when using the
  18. extensible SDK, see the
  19. "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>Using the Extensible SDK</ulink>"
  20. chapter in the Yocto Project Application Development and the
  21. Extensible Software Development Kit (eSDK) manual.
  22. </para>
  23. <section id='devtool-getting-help'>
  24. <title>Getting Help</title>
  25. <para>
  26. The <filename>devtool</filename> command line is organized
  27. similarly to Git in that it has a number of sub-commands for
  28. each function.
  29. You can run <filename>devtool --help</filename> to see all
  30. the commands:
  31. <literallayout class='monospaced'>
  32. $ devtool --help
  33. NOTE: Starting bitbake server...
  34. usage: devtool [--basepath BASEPATH] [--bbpath BBPATH] [-d] [-q]
  35. [--color COLOR] [-h]
  36. &lt;subcommand&gt; ...
  37. OpenEmbedded development tool
  38. options:
  39. --basepath BASEPATH Base directory of SDK / build directory
  40. --bbpath BBPATH Explicitly specify the BBPATH, rather than getting it
  41. from the metadata
  42. -d, --debug Enable debug output
  43. -q, --quiet Print only errors
  44. --color COLOR Colorize output (where COLOR is auto, always, never)
  45. -h, --help show this help message and exit
  46. subcommands:
  47. Beginning work on a recipe:
  48. add Add a new recipe
  49. modify Modify the source for an existing recipe
  50. upgrade Upgrade an existing recipe
  51. Getting information:
  52. status Show workspace status
  53. search Search available recipes
  54. latest-version Report the latest version of an existing recipe
  55. Working on a recipe in the workspace:
  56. build Build a recipe
  57. rename Rename a recipe file in the workspace
  58. edit-recipe Edit a recipe file
  59. find-recipe Find a recipe file
  60. configure-help Get help on configure script options
  61. update-recipe Apply changes from external source tree to recipe
  62. reset Remove a recipe from your workspace
  63. finish Finish working on a recipe in your workspace
  64. Testing changes on target:
  65. deploy-target Deploy recipe output files to live target machine
  66. undeploy-target Undeploy recipe output files in live target machine
  67. build-image Build image including workspace recipe packages
  68. Advanced:
  69. create-workspace Set up workspace in an alternative location
  70. export Export workspace into a tar archive
  71. import Import exported tar archive into workspace
  72. extract Extract the source for an existing recipe
  73. sync Synchronize the source tree for an existing recipe
  74. Use devtool &lt;subcommand&gt; --help to get help on a specific command
  75. </literallayout>
  76. </para>
  77. <para>
  78. As directed in the general help output, you can get more
  79. syntax on a specific command by providing the command
  80. name and using <filename>--help</filename>:
  81. <literallayout class='monospaced'>
  82. $ devtool add --help
  83. NOTE: Starting bitbake server...
  84. usage: devtool add [-h] [--same-dir | --no-same-dir] [--fetch URI]
  85. [--fetch-dev] [--version VERSION] [--no-git]
  86. [--srcrev SRCREV | --autorev] [--srcbranch SRCBRANCH]
  87. [--binary] [--also-native] [--src-subdir SUBDIR]
  88. [--mirrors] [--provides PROVIDES]
  89. [recipename] [srctree] [fetchuri]
  90. Adds a new recipe to the workspace to build a specified source tree. Can
  91. optionally fetch a remote URI and unpack it to create the source tree.
  92. arguments:
  93. recipename Name for new recipe to add (just name - no version,
  94. path or extension). If not specified, will attempt to
  95. auto-detect it.
  96. srctree Path to external source tree. If not specified, a
  97. subdirectory of
  98. /home/scottrif/poky/build/workspace/sources will be
  99. used.
  100. fetchuri Fetch the specified URI and extract it to create the
  101. source tree
  102. options:
  103. -h, --help show this help message and exit
  104. --same-dir, -s Build in same directory as source
  105. --no-same-dir Force build in a separate build directory
  106. --fetch URI, -f URI Fetch the specified URI and extract it to create the
  107. source tree (deprecated - pass as positional argument
  108. instead)
  109. --fetch-dev For npm, also fetch devDependencies
  110. --version VERSION, -V VERSION
  111. Version to use within recipe (PV)
  112. --no-git, -g If fetching source, do not set up source tree as a git
  113. repository
  114. --srcrev SRCREV, -S SRCREV
  115. Source revision to fetch if fetching from an SCM such
  116. as git (default latest)
  117. --autorev, -a When fetching from a git repository, set SRCREV in the
  118. recipe to a floating revision instead of fixed
  119. --srcbranch SRCBRANCH, -B SRCBRANCH
  120. Branch in source repository if fetching from an SCM
  121. such as git (default master)
  122. --binary, -b Treat the source tree as something that should be
  123. installed verbatim (no compilation, same directory
  124. structure). Useful with binary packages e.g. RPMs.
  125. --also-native Also add native variant (i.e. support building recipe
  126. for the build host as well as the target machine)
  127. --src-subdir SUBDIR Specify subdirectory within source tree to use
  128. --mirrors Enable PREMIRRORS and MIRRORS for source tree fetching
  129. (disable by default).
  130. --provides PROVIDES, -p PROVIDES
  131. Specify an alias for the item provided by the recipe.
  132. E.g. virtual/libgl
  133. </literallayout>
  134. </para>
  135. </section>
  136. <section id='devtool-the-workspace-layer-structure'>
  137. <title>The Workspace Layer Structure</title>
  138. <para>
  139. <filename>devtool</filename> uses a "Workspace" layer
  140. in which to accomplish builds.
  141. This layer is not specific to any single
  142. <filename>devtool</filename> command but is rather a common
  143. working area used across the tool.
  144. </para>
  145. <para>
  146. The following figure shows the workspace structure:
  147. </para>
  148. <para>
  149. <imagedata fileref="figures/build-workspace-directory.png"
  150. width="6in" depth="5in" align="left" scale="70" />
  151. </para>
  152. <para>
  153. <literallayout class='monospaced'>
  154. attic - A directory created if devtool believes it must preserve
  155. anything when you run "devtool reset". For example, if you
  156. run "devtool add", make changes to the recipe, and then
  157. run "devtool reset", devtool takes notice that the file has
  158. been changed and moves it into the attic should you still
  159. want the recipe.
  160. README - Provides information on what is in workspace layer and how to
  161. manage it.
  162. .devtool_md5 - A checksum file used by devtool.
  163. appends - A directory that contains *.bbappend files, which point to
  164. external source.
  165. conf - A configuration directory that contains the layer.conf file.
  166. recipes - A directory containing recipes. This directory contains a
  167. folder for each directory added whose name matches that of the
  168. added recipe. devtool places the <replaceable>recipe</replaceable>.bb file
  169. within that sub-directory.
  170. sources - A directory containing a working copy of the source files used
  171. when building the recipe. This is the default directory used
  172. as the location of the source tree when you do not provide a
  173. source tree path. This directory contains a folder for each
  174. set of source files matched to a corresponding recipe.
  175. </literallayout>
  176. </para>
  177. </section>
  178. <section id='devtool-adding-a-new-recipe-to-the-workspace'>
  179. <title>Adding a New Recipe to the Workspace Layer</title>
  180. <para>
  181. Use the <filename>devtool add</filename> command to add a new recipe
  182. to the workspace layer.
  183. The recipe you add should not exist -
  184. <filename>devtool</filename> creates it for you.
  185. The source files the recipe uses should exist in an external
  186. area.
  187. </para>
  188. <para>
  189. The following example creates and adds a new recipe named
  190. <filename>jackson</filename> to a workspace layer the tool creates.
  191. The source code built by the recipes resides in
  192. <filename>/home/<replaceable>user</replaceable>/sources/jackson</filename>:
  193. <literallayout class='monospaced'>
  194. $ devtool add jackson /home/<replaceable>user</replaceable>/sources/jackson
  195. </literallayout>
  196. </para>
  197. <para>
  198. If you add a recipe and the workspace layer does not exist,
  199. the command creates the layer and populates it as
  200. described in
  201. "<link linkend='devtool-the-workspace-layer-structure'>The Workspace Layer Structure</link>"
  202. section.
  203. </para>
  204. <para>
  205. Running <filename>devtool add</filename> when the
  206. workspace layer exists causes the tool to add the recipe,
  207. append files, and source files into the existing workspace layer.
  208. The <filename>.bbappend</filename> file is created to point
  209. to the external source tree.
  210. <note>
  211. If your recipe has runtime dependencies defined, you must be sure
  212. that these packages exist on the target hardware before attempting
  213. to run your application.
  214. If dependent packages (e.g. libraries) do not exist on the target,
  215. your application, when run, will fail to find those functions.
  216. For more information, see the
  217. "<link linkend='devtool-deploying-your-software-on-the-target-machine'>Deploying Your Software on the Target Machine</link>"
  218. section.
  219. </note>
  220. </para>
  221. <para>
  222. By default, <filename>devtool add</filename> uses the latest
  223. revision (i.e. master) when unpacking files from a remote URI.
  224. In some cases, you might want to specify a source revision by
  225. branch, tag, or commit hash. You can specify these options when
  226. using the <filename>devtool add</filename> command:
  227. <itemizedlist>
  228. <listitem><para>
  229. To specify a source branch, use the
  230. <filename>--srcbranch</filename> option:
  231. <literallayout class='monospaced'>
  232. $ devtool add --srcbranch &DISTRO_NAME_NO_CAP; jackson /home/<replaceable>user</replaceable>/sources/jackson
  233. </literallayout>
  234. In the previous example, you are checking out the
  235. &DISTRO_NAME_NO_CAP; branch.
  236. </para></listitem>
  237. <listitem><para>
  238. To specify a specific tag or commit hash, use the
  239. <filename>--srcrev</filename> option:
  240. <literallayout class='monospaced'>
  241. $ devtool add --srcrev &DISTRO_REL_TAG; jackson /home/<replaceable>user</replaceable>/sources/jackson
  242. $ devtool add --srcrev <replaceable>some_commit_hash</replaceable> /home/<replaceable>user</replaceable>/sources/jackson
  243. </literallayout>
  244. The previous examples check out the &DISTRO_REL_TAG; tag
  245. and the commit associated with the
  246. <replaceable>some_commit_hash</replaceable> hash.
  247. </para></listitem>
  248. </itemizedlist>
  249. <note>
  250. If you prefer to use the latest revision every time the recipe is
  251. built, use the options <filename>--autorev</filename>
  252. or <filename>-a</filename>.
  253. </note>
  254. </para>
  255. </section>
  256. <section id='devtool-extracting-the-source-for-an-existing-recipe'>
  257. <title>Extracting the Source for an Existing Recipe</title>
  258. <para>
  259. Use the <filename>devtool extract</filename> command to
  260. extract the source for an existing recipe.
  261. When you use this command, you must supply the root name
  262. of the recipe (i.e. no version, paths, or extensions), and
  263. you must supply the directory to which you want the source
  264. extracted.
  265. </para>
  266. <para>
  267. Additional command options let you control the name of a
  268. development branch into which you can checkout the source
  269. and whether or not to keep a temporary directory, which is
  270. useful for debugging.
  271. </para>
  272. </section>
  273. <section id='devtool-synchronizing-a-recipes-extracted-source-tree'>
  274. <title>Synchronizing a Recipe's Extracted Source Tree</title>
  275. <para>
  276. Use the <filename>devtool sync</filename> command to
  277. synchronize a previously extracted source tree for an
  278. existing recipe.
  279. When you use this command, you must supply the root name
  280. of the recipe (i.e. no version, paths, or extensions), and
  281. you must supply the directory to which you want the source
  282. extracted.
  283. </para>
  284. <para>
  285. Additional command options let you control the name of a
  286. development branch into which you can checkout the source
  287. and whether or not to keep a temporary directory, which is
  288. useful for debugging.
  289. </para>
  290. </section>
  291. <section id='devtool-modifying-a-recipe'>
  292. <title>Modifying an Existing Recipe</title>
  293. <para>
  294. Use the <filename>devtool modify</filename> command to begin
  295. modifying the source of an existing recipe.
  296. This command is very similar to the
  297. <link linkend='devtool-adding-a-new-recipe-to-the-workspace'><filename>add</filename></link>
  298. command except that it does not physically create the
  299. recipe in the workspace layer because the recipe already
  300. exists in an another layer.
  301. </para>
  302. <para>
  303. The <filename>devtool modify</filename> command extracts the
  304. source for a recipe, sets it up as a Git repository if the
  305. source had not already been fetched from Git, checks out a
  306. branch for development, and applies any patches from the recipe
  307. as commits on top.
  308. You can use the following command to checkout the source
  309. files:
  310. <literallayout class='monospaced'>
  311. $ devtool modify <replaceable>recipe</replaceable>
  312. </literallayout>
  313. Using the above command form, <filename>devtool</filename> uses
  314. the existing recipe's
  315. <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
  316. statement to locate the upstream source, extracts the source
  317. into the default sources location in the workspace.
  318. The default development branch used is "devtool".
  319. </para>
  320. </section>
  321. <section id='devtool-edit-an-existing-recipe'>
  322. <title>Edit an Existing Recipe</title>
  323. <para>
  324. Use the <filename>devtool edit-recipe</filename> command
  325. to run the default editor, which is identified using the
  326. <filename>EDITOR</filename> variable, on the specified recipe.
  327. </para>
  328. <para>
  329. When you use the <filename>devtool edit-recipe</filename>
  330. command, you must supply the root name of the recipe
  331. (i.e. no version, paths, or extensions).
  332. Also, the recipe file itself must reside in the workspace
  333. as a result of the <filename>devtool add</filename> or
  334. <filename>devtool upgrade</filename> commands.
  335. However, you can override that requirement by using the
  336. "-a" or "--any-recipe" option.
  337. Using either of these options allows you to edit any recipe
  338. regardless of its location.
  339. </para>
  340. </section>
  341. <section id='devtool-updating-a-recipe'>
  342. <title>Updating a Recipe</title>
  343. <para>
  344. Use the <filename>devtool update-recipe</filename> command to
  345. update your recipe with patches that reflect changes you make
  346. to the source files.
  347. For example, if you know you are going to work on some
  348. code, you could first use the
  349. <link linkend='devtool-modifying-a-recipe'><filename>devtool modify</filename></link>
  350. command to extract the code and set up the workspace.
  351. After which, you could modify, compile, and test the code.
  352. </para>
  353. <para>
  354. When you are satisfied with the results and you have committed
  355. your changes to the Git repository, you can then
  356. run the <filename>devtool update-recipe</filename> to create the
  357. patches and update the recipe:
  358. <literallayout class='monospaced'>
  359. $ devtool update-recipe <replaceable>recipe</replaceable>
  360. </literallayout>
  361. If you run the <filename>devtool update-recipe</filename>
  362. without committing your changes, the command ignores the
  363. changes.
  364. </para>
  365. <para>
  366. Often, you might want to apply customizations made to your
  367. software in your own layer rather than apply them to the
  368. original recipe.
  369. If so, you can use the
  370. <filename>-a</filename> or <filename>--append</filename>
  371. option with the <filename>devtool update-recipe</filename>
  372. command.
  373. These options allow you to specify the layer into which to
  374. write an append file:
  375. <literallayout class='monospaced'>
  376. $ devtool update-recipe <replaceable>recipe</replaceable> -a <replaceable>base-layer-directory</replaceable>
  377. </literallayout>
  378. The <filename>*.bbappend</filename> file is created at the
  379. appropriate path within the specified layer directory, which
  380. may or may not be in your <filename>bblayers.conf</filename>
  381. file.
  382. If an append file already exists, the command updates it
  383. appropriately.
  384. </para>
  385. </section>
  386. <section id='devtool-upgrading-a-recipe'>
  387. <title>Upgrading a Recipe</title>
  388. <para>
  389. As software matures, upstream recipes are upgraded to newer
  390. versions.
  391. As a developer, you need to keep your local recipes up-to-date
  392. with the upstream version releases.
  393. Several methods exist by which you can upgrade recipes.
  394. You can read about them in the
  395. "<ulink url='&YOCTO_DOCS_DEV_URL;#gs-upgrading-recipes'>Upgrading Recipes</ulink>"
  396. section of the Yocto Project Development Tasks Manual.
  397. This section overviews the <filename>devtool upgrade</filename>
  398. command.
  399. </para>
  400. <para>
  401. The <filename>devtool upgrade</filename> command
  402. upgrades an existing recipe to a more recent version of the
  403. recipe upstream.
  404. The command puts the upgraded recipe file along with any associated
  405. files into a "workspace" and, if necessary, extracts the source
  406. tree to a specified location.
  407. During the upgrade, patches associated with the recipe are
  408. rebased or added as needed.
  409. </para>
  410. <para>
  411. When you use the <filename>devtool upgrade</filename> command,
  412. you must supply the root name of the recipe (i.e. no version,
  413. paths, or extensions), and you must supply the directory
  414. to which you want the source extracted.
  415. Additional command options let you control things such as
  416. the version number to which you want to upgrade (i.e. the
  417. <link linkend='var-PV'><filename>PV</filename></link>),
  418. the source revision to which you want to upgrade (i.e. the
  419. <link linkend='var-SRCREV'><filename>SRCREV</filename></link>),
  420. whether or not to apply patches, and so forth.
  421. </para>
  422. <para>
  423. You can read more on the <filename>devtool upgrade</filename>
  424. workflow in the
  425. "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-devtool-use-devtool-upgrade-to-create-a-version-of-the-recipe-that-supports-a-newer-version-of-the-software'>Use <filename>devtool upgrade</filename> to Create a Version of the Recipe that Supports a Newer Version of the Software</ulink>"
  426. section in the Yocto Project Application Development and the
  427. Extensible Software Development Kit (eSDK) manual.
  428. You can also see an example of how to use
  429. <filename>devtool upgrade</filename> in the
  430. "<ulink url='&YOCTO_DOCS_DEV_URL;#gs-using-devtool-upgrade'>Using <filename>devtool upgrade</filename></ulink>"
  431. section in the Yocto Project Development Tasks Manual.
  432. </para>
  433. </section>
  434. <section id='devtool-resetting-a-recipe'>
  435. <title>Resetting a Recipe</title>
  436. <para>
  437. Use the <filename>devtool reset</filename> command to remove a
  438. recipe and its configuration (e.g. the corresponding
  439. <filename>.bbappend</filename> file) from the workspace layer.
  440. Realize that this command deletes the recipe and the
  441. append file.
  442. The command does not physically move them for you.
  443. Consequently, you must be sure to physically relocate your
  444. updated recipe and the append file outside of the workspace
  445. layer before running the <filename>devtool reset</filename>
  446. command.
  447. </para>
  448. <para>
  449. If the <filename>devtool reset</filename> command detects that
  450. the recipe or the append files have been modified, the
  451. command preserves the modified files in a separate "attic"
  452. subdirectory under the workspace layer.
  453. </para>
  454. <para>
  455. Here is an example that resets the workspace directory that
  456. contains the <filename>mtr</filename> recipe:
  457. <literallayout class='monospaced'>
  458. $ devtool reset mtr
  459. NOTE: Cleaning sysroot for recipe mtr...
  460. NOTE: Leaving source tree /home/scottrif/poky/build/workspace/sources/mtr as-is; if you no
  461. longer need it then please delete it manually
  462. $
  463. </literallayout>
  464. </para>
  465. </section>
  466. <section id='devtool-building-your-recipe'>
  467. <title>Building Your Recipe</title>
  468. <para>
  469. Use the <filename>devtool build</filename> command to cause the
  470. OpenEmbedded build system to build your recipe.
  471. The <filename>devtool build</filename> command is equivalent to
  472. <filename>bitbake -c populate_sysroot</filename>.
  473. </para>
  474. <para>
  475. When you use the <filename>devtool build</filename> command,
  476. you must supply the root name of the recipe (i.e. no version,
  477. paths, or extensions).
  478. You can use either the "-s" or the "--disable-parallel-make"
  479. option to disable parallel makes during the build.
  480. Here is an example:
  481. <literallayout class='monospaced'>
  482. $ devtool build <replaceable>recipe</replaceable>
  483. </literallayout>
  484. </para>
  485. </section>
  486. <section id='devtool-building-your-image'>
  487. <title>Building Your Image</title>
  488. <para>
  489. Use the <filename>devtool build-image</filename> command
  490. to build an image, extending it to include packages from
  491. recipes in the workspace.
  492. Using this command is useful when you want an image that
  493. ready for immediate deployment onto a device for testing.
  494. For proper integration into a final image, you need to
  495. edit your custom image recipe appropriately.
  496. </para>
  497. <para>
  498. When you use the <filename>devtool build-image</filename>
  499. command, you must supply the name of the image.
  500. This command has no command line options:
  501. <literallayout class='monospaced'>
  502. $ devtool build-image <replaceable>image</replaceable>
  503. </literallayout>
  504. </para>
  505. </section>
  506. <section id='devtool-deploying-your-software-on-the-target-machine'>
  507. <title>Deploying Your Software on the Target Machine</title>
  508. <para>
  509. Use the <filename>devtool deploy-target</filename> command to
  510. deploy the recipe's build output to the live target machine:
  511. <literallayout class='monospaced'>
  512. $ devtool deploy-target <replaceable>recipe</replaceable>&nbsp;<replaceable>target</replaceable>
  513. </literallayout>
  514. The <replaceable>target</replaceable> is the address of the
  515. target machine, which must be running an SSH server (i.e.
  516. <filename>user@hostname[:destdir]</filename>).
  517. </para>
  518. <para>
  519. This command deploys all files installed during the
  520. <link linkend='ref-tasks-install'><filename>do_install</filename></link>
  521. task.
  522. Furthermore, you do not need to have package management enabled
  523. within the target machine.
  524. If you do, the package manager is bypassed.
  525. <note><title>Notes</title>
  526. <para>
  527. The <filename>deploy-target</filename>
  528. functionality is for development only.
  529. You should never use it to update an image that will be
  530. used in production.
  531. </para>
  532. </note>
  533. </para>
  534. <para>
  535. Some conditions exist that could prevent a deployed application
  536. from behaving as expected.
  537. When both of the following conditions exist, your application has
  538. the potential to not behave correctly when run on the target:
  539. <itemizedlist>
  540. <listitem><para>
  541. You are deploying a new application to the target and
  542. the recipe you used to build the application had
  543. correctly defined runtime dependencies.
  544. </para></listitem>
  545. <listitem><para>
  546. The target does not physically have the packages on which
  547. the application depends installed.
  548. </para></listitem>
  549. </itemizedlist>
  550. If both of these conditions exist, your application will not
  551. behave as expected.
  552. The reason for this misbehavior is because the
  553. <filename>devtool deploy-target</filename> command does not deploy
  554. the packages (e.g. libraries) on which your new application
  555. depends.
  556. The assumption is that the packages are already on the target.
  557. Consequently, when a runtime call is made in the application
  558. for a dependent function (e.g. a library call), the function
  559. cannot be found.
  560. </para>
  561. <para>
  562. To be sure you have all the dependencies local to the target, you
  563. need to be sure that the packages are pre-deployed (installed)
  564. on the target before attempting to run your application.
  565. </para>
  566. </section>
  567. <section id='devtool-removing-your-software-from-the-target-machine'>
  568. <title>Removing Your Software from the Target Machine</title>
  569. <para>
  570. Use the <filename>devtool undeploy-target</filename> command to
  571. remove deployed build output from the target machine.
  572. For the <filename>devtool undeploy-target</filename> command to
  573. work, you must have previously used the
  574. <link linkend='devtool-deploying-your-software-on-the-target-machine'><filename>devtool deploy-target</filename></link>
  575. command.
  576. <literallayout class='monospaced'>
  577. $ devtool undeploy-target <replaceable>recipe</replaceable>&nbsp;<replaceable>target</replaceable>
  578. </literallayout>
  579. The <replaceable>target</replaceable> is the address of the
  580. target machine, which must be running an SSH server (i.e.
  581. <filename>user@hostname</filename>).
  582. </para>
  583. </section>
  584. <section id='devtool-creating-the-workspace'>
  585. <title>Creating the Workspace Layer in an Alternative Location</title>
  586. <para>
  587. Use the <filename>devtool create-workspace</filename> command to
  588. create a new workspace layer in your
  589. <link linkend='build-directory'>Build Directory</link>.
  590. When you create a new workspace layer, it is populated with the
  591. <filename>README</filename> file and the
  592. <filename>conf</filename> directory only.
  593. </para>
  594. <para>
  595. The following example creates a new workspace layer in your
  596. current working and by default names the workspace layer
  597. "workspace":
  598. <literallayout class='monospaced'>
  599. $ devtool create-workspace
  600. </literallayout>
  601. </para>
  602. <para>
  603. You can create a workspace layer anywhere by supplying
  604. a pathname with the command.
  605. The following command creates a new workspace layer named
  606. "new-workspace":
  607. <literallayout class='monospaced'>
  608. $ devtool create-workspace /home/scottrif/new-workspace
  609. </literallayout>
  610. </para>
  611. </section>
  612. <section id='devtool-get-the-status-of-the-recipes-in-your-workspace'>
  613. <title>Get the Status of the Recipes in Your Workspace</title>
  614. <para>
  615. Use the <filename>devtool status</filename> command to
  616. list the recipes currently in your workspace.
  617. Information includes the paths to their respective
  618. external source trees.
  619. </para>
  620. <para>
  621. The <filename>devtool status</filename> command has no
  622. command-line options:
  623. <literallayout class='monospaced'>
  624. $ devtool status
  625. </literallayout>
  626. Following is sample output after using
  627. <link linkend='devtool-adding-a-new-recipe-to-the-workspace'><filename>devtool add</filename></link>
  628. to create and add the <filename>mtr_0.86.bb</filename> recipe
  629. to the <filename>workspace</filename> directory:
  630. <literallayout class='monospaced'>
  631. $ devtool status
  632. mtr: /home/scottrif/poky/build/workspace/sources/mtr (/home/scottrif/poky/build/workspace/recipes/mtr/mtr_0.86.bb)
  633. $
  634. </literallayout>
  635. </para>
  636. </section>
  637. <section id='devtool-search-for-available-target-recipes'>
  638. <title>Search for Available Target Recipes</title>
  639. <para>
  640. Use the <filename>devtool search</filename> command to
  641. search for available target recipes.
  642. The command matches the recipe name, package name,
  643. description, and installed files.
  644. The command displays the recipe name as a result of a
  645. match.
  646. </para>
  647. <para>
  648. When you use the <filename>devtool search</filename> command,
  649. you must supply a <replaceable>keyword</replaceable>.
  650. The command uses the <replaceable>keyword</replaceable> when
  651. searching for a match.
  652. </para>
  653. </section>
  654. </chapter>
  655. <!--
  656. vim: expandtab tw=80 ts=4
  657. -->