Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 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 | |
| 5 | <chapter id='ref-tasks'> |
| 6 | <title>Tasks</title> |
| 7 | |
| 8 | <para> |
| 9 | Tasks are units of execution for BitBake. |
| 10 | Recipes (<filename>.bb</filename> files) use tasks to complete |
| 11 | configuring, compiling, and packaging software. |
| 12 | This chapter provides a reference of the tasks defined in the |
| 13 | OpenEmbedded build system. |
| 14 | </para> |
| 15 | |
| 16 | <section id='normal-recipe-build-tasks'> |
| 17 | <title>Normal Recipe Build Tasks</title> |
| 18 | |
| 19 | <para> |
| 20 | The following sections describe normal tasks associated with building |
| 21 | a recipe. |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 22 | For more information on tasks and dependencies, see the |
| 23 | "<ulink url='&YOCTO_DOCS_BB_URL;#tasks'>Tasks</ulink>" and |
| 24 | "<ulink url='&YOCTO_DOCS_BB_URL;#dependencies'>Dependencies</ulink>" |
| 25 | sections in the BitBake User Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 26 | </para> |
| 27 | |
| 28 | <section id='ref-tasks-build'> |
| 29 | <title><filename>do_build</filename></title> |
| 30 | |
| 31 | <para> |
| 32 | The default task for all recipes. |
| 33 | This task depends on all other normal tasks |
| 34 | required to build a recipe. |
| 35 | </para> |
| 36 | </section> |
| 37 | |
| 38 | <section id='ref-tasks-compile'> |
| 39 | <title><filename>do_compile</filename></title> |
| 40 | |
| 41 | <para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 42 | Compiles the source code. |
| 43 | This task runs with the current working directory set |
| 44 | to |
| 45 | <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>. |
| 46 | </para> |
| 47 | |
| 48 | <para> |
| 49 | The default behavior of this task is to run the |
| 50 | <filename>oe_runmake</filename> function if a makefile |
| 51 | (<filename>Makefile</filename>, <filename>makefile</filename>, |
| 52 | or <filename>GNUmakefile</filename>) is found. |
| 53 | If no such file is found, the <filename>do_compile</filename> |
| 54 | task does nothing. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 55 | </para> |
| 56 | </section> |
| 57 | |
| 58 | <section id='ref-tasks-compile_ptest_base'> |
| 59 | <title><filename>do_compile_ptest_base</filename></title> |
| 60 | |
| 61 | <para> |
| 62 | Compiles the runtime test suite included in the software being |
| 63 | built. |
| 64 | </para> |
| 65 | </section> |
| 66 | |
| 67 | <section id='ref-tasks-configure'> |
| 68 | <title><filename>do_configure</filename></title> |
| 69 | |
| 70 | <para> |
| 71 | Configures the source by enabling and disabling any build-time and |
| 72 | configuration options for the software being built. |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 73 | The task runs with the current working directory set to |
| 74 | <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>. |
| 75 | </para> |
| 76 | |
| 77 | <para> |
| 78 | The default behavior of this task is to run |
| 79 | <filename>oe_runmake clean</filename> if a makefile |
| 80 | (<filename>Makefile</filename>, <filename>makefile</filename>, |
| 81 | or <filename>GNUmakefile</filename>) is found and |
| 82 | <link linkend='var-CLEANBROKEN'><filename>CLEANBROKEN</filename></link> |
| 83 | is not set to "1". |
| 84 | If no such file is found or the <filename>CLEANBROKEN</filename> |
| 85 | variable is set to "1", the <filename>do_configure</filename> |
| 86 | task does nothing. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 87 | </para> |
| 88 | </section> |
| 89 | |
| 90 | <section id='ref-tasks-configure_ptest_base'> |
| 91 | <title><filename>do_configure_ptest_base</filename></title> |
| 92 | |
| 93 | <para> |
| 94 | Configures the runtime test suite included in the software being |
| 95 | built. |
| 96 | </para> |
| 97 | </section> |
| 98 | |
| 99 | <section id='ref-tasks-deploy'> |
| 100 | <title><filename>do_deploy</filename></title> |
| 101 | |
| 102 | <para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 103 | Writes output files that are to be deployed to |
| 104 | <filename>${</filename><link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link><filename>}</filename>. |
| 105 | The task runs with the current working directory set to |
| 106 | <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 107 | </para> |
| 108 | |
| 109 | <para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 110 | Recipes implementing this task should inherit the |
| 111 | <link linkend='ref-classes-deploy'><filename>deploy</filename></link> |
| 112 | class and should write the output to |
| 113 | <filename>${</filename><link linkend='var-DEPLOYDIR'><filename>DEPLOYDIR</filename></link><filename>}</filename>, |
| 114 | which is not to be confused with |
| 115 | <filename>${</filename><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link><filename>}</filename>. |
| 116 | The <filename>deploy</filename> class sets up |
| 117 | <filename>do_deploy</filename> as a shared state (sstate) task that |
| 118 | can be accelerated through sstate use. |
| 119 | The sstate mechanism takes care of copying the output from |
| 120 | <filename>${DEPLOYDIR}</filename> to |
| 121 | <filename>${DEPLOY_DIR_IMAGE}</filename>. |
| 122 | <note> |
| 123 | <title>Caution</title> |
| 124 | Do not write the output directly to |
| 125 | <filename>${DEPLOY_DIR_IMAGE}</filename>, as this causes |
| 126 | the sstate mechanism to malfunction. |
| 127 | </note> |
| 128 | </para> |
| 129 | |
| 130 | <para> |
| 131 | The <filename>do_deploy</filename> task is not added as a task |
| 132 | by default and consequently needs to be added manually. |
| 133 | If you want the task to run after |
| 134 | <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>, |
| 135 | you can add it by doing the following: |
| 136 | <literallayout class='monospaced'> |
| 137 | addtask deploy after do_compile |
| 138 | </literallayout> |
| 139 | Adding <filename>do_deploy</filename> after other tasks works the |
| 140 | same way. |
| 141 | <note> |
| 142 | You do not need to add <filename>before do_build</filename> |
| 143 | to the <filename>addtask</filename> command (though it is |
| 144 | harmless), because the |
| 145 | <link linkend='ref-classes-base'><filename>base</filename></link> |
| 146 | class contains the following: |
| 147 | <literallayout class='monospaced'> |
| 148 | do_build[recrdeptask] += "do_deploy" |
| 149 | </literallayout> |
| 150 | See the |
| 151 | "<ulink url='&YOCTO_DOCS_BB_URL;#dependencies'>Dependencies</ulink>" |
| 152 | section in the BitBake User Manual for more information. |
| 153 | </note> |
| 154 | </para> |
| 155 | |
| 156 | <para> |
| 157 | If the <filename>do_deploy</filename> task re-executes, any |
| 158 | previous output is removed (i.e. "cleaned"). |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 159 | </para> |
| 160 | </section> |
| 161 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 162 | <section id='ref-tasks-distrodata'> |
| 163 | <title><filename>do_distrodata</filename></title> |
| 164 | |
| 165 | <para> |
| 166 | Provides information about the recipe. |
| 167 | </para> |
| 168 | |
| 169 | <para> |
| 170 | The <filename>distrodata</filename> task is included as part of the |
| 171 | <link linkend='ref-classes-distrodata'><filename>distrodata</filename></link> |
| 172 | class. |
| 173 | </para> |
| 174 | |
| 175 | <para> |
| 176 | To build the <filename>distrodata</filename> task, use the |
| 177 | <filename>bitbake</filename> command with the "-c" option and |
| 178 | task name: |
| 179 | <literallayout class='monospaced'> |
| 180 | $ bitbake core-image-minimal -c distrodata |
| 181 | </literallayout> |
| 182 | By default, the results are stored in |
| 183 | <link linkend='var-LOG_DIR'><filename>$LOG_DIR</filename></link> |
| 184 | (e.g. <filename>$BUILD_DIR/tmp/log</filename>). |
| 185 | </para> |
| 186 | </section> |
| 187 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 188 | <section id='ref-tasks-fetch'> |
| 189 | <title><filename>do_fetch</filename></title> |
| 190 | |
| 191 | <para> |
| 192 | Fetches the source code. |
| 193 | This task uses the |
| 194 | <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> |
| 195 | variable and the argument's prefix to determine the correct |
| 196 | fetcher module. |
| 197 | </para> |
| 198 | </section> |
| 199 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 200 | <section id='ref-tasks-image'> |
| 201 | <title><filename>do_image</filename></title> |
| 202 | |
| 203 | <para> |
| 204 | Starts the image generation process. |
| 205 | The <filename>do_image</filename> task runs after the |
| 206 | OpenEmbedded build system has run the |
| 207 | <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link> |
| 208 | task during which packages are identified for installation into |
| 209 | the image and the root filesystem is created, complete with |
| 210 | post-processing. |
| 211 | </para> |
| 212 | |
| 213 | <para> |
| 214 | The <filename>do_image</filename> task performs pre-processing |
| 215 | on the image through the |
| 216 | <link linkend='var-IMAGE_PREPROCESS_COMMAND'><filename>IMAGE_PREPROCESS_COMMAND</filename></link> |
| 217 | and dynamically generates supporting |
| 218 | <filename>do_image_*</filename> tasks as needed. |
| 219 | </para> |
| 220 | |
| 221 | <para> |
| 222 | For more information on image creation, see the |
| 223 | "<link linkend='image-generation-dev-environment'>Image Generation</link>" |
| 224 | section. |
| 225 | </para> |
| 226 | </section> |
| 227 | |
| 228 | <section id='ref-tasks-image-complete'> |
| 229 | <title><filename>do_image_complete</filename></title> |
| 230 | |
| 231 | <para> |
| 232 | Completes the image generation process. |
| 233 | The <filename>do_image_complete</filename> task runs after the |
| 234 | OpenEmbedded build system has run the |
| 235 | <link linkend='ref-tasks-rootfs'><filename>do_image</filename></link> |
| 236 | task during which image pre-processing occurs and through |
| 237 | dynamically generated <filename>do_image_*</filename> tasks the |
| 238 | image is constructed. |
| 239 | </para> |
| 240 | |
| 241 | <para> |
| 242 | The <filename>do_image_complete</filename> task performs |
| 243 | post-processing on the image through the |
| 244 | <link linkend='var-IMAGE_POSTPROCESS_COMMAND'><filename>IMAGE_POSTPROCESS_COMMAND</filename></link>. |
| 245 | </para> |
| 246 | |
| 247 | <para> |
| 248 | For more information on image creation, see the |
| 249 | "<link linkend='image-generation-dev-environment'>Image Generation</link>" |
| 250 | section. |
| 251 | </para> |
| 252 | </section> |
| 253 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 254 | <section id='ref-tasks-install'> |
| 255 | <title><filename>do_install</filename></title> |
| 256 | |
| 257 | <para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 258 | Copies files that are to be packaged into the holding area |
| 259 | <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>. |
| 260 | This task runs with the current working directory set to |
| 261 | <filename>${</filename><link linkend='var-B'><filename>B</filename></link><filename>}</filename>, |
| 262 | which is the compilation directory. |
| 263 | The <filename>do_install</filename> task, as well as other tasks |
| 264 | that either directly or indirectly depend on the installed files |
| 265 | (e.g. |
| 266 | <link linkend='ref-tasks-package'><filename>do_package</filename></link>, |
| 267 | <link linkend='ref-tasks-package_write_deb'><filename>do_package_write_*</filename></link>, |
| 268 | and |
| 269 | <link linkend='ref-tasks-rootfs'><filename>do_rootfs</filename></link>), |
| 270 | run under |
| 271 | <link linkend='fakeroot-and-pseudo'>fakeroot</link>. |
| 272 | <note> |
| 273 | <title>Caution</title> |
| 274 | |
| 275 | <para> |
| 276 | When installing files, be careful not to set the owner and |
| 277 | group IDs of the installed files to unintended values. |
| 278 | Some methods of copying files, notably when using the |
| 279 | recursive <filename>cp</filename> command, can preserve the |
| 280 | UID and/or GID of the original file, which is usually not |
| 281 | what you want. |
| 282 | The |
| 283 | <link linkend='ref-classes-insane'><filename>host-user-contaminated</filename></link> |
| 284 | QA check checks for files that probably have the wrong |
| 285 | ownership. |
| 286 | </para> |
| 287 | |
| 288 | <para> |
| 289 | Safe methods for installing files include the following: |
| 290 | <itemizedlist> |
| 291 | <listitem><para> |
| 292 | The <filename>install</filename> utility. |
| 293 | This utility is the preferred method. |
| 294 | </para></listitem> |
| 295 | <listitem><para> |
| 296 | The <filename>cp</filename> command with the |
| 297 | "--no-preserve=ownership" option. |
| 298 | </para></listitem> |
| 299 | <listitem><para> |
| 300 | The <filename>tar</filename> command with the |
| 301 | "--no-same-owner" option. |
| 302 | See the <filename>bin_package.bbclass</filename> |
| 303 | file in the <filename>meta/classes</filename> |
| 304 | directory of the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 305 | <link linkend='source-directory'>Source Directory</link> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 306 | for an example. |
| 307 | </para></listitem> |
| 308 | </itemizedlist> |
| 309 | </para> |
| 310 | </note> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 311 | </para> |
| 312 | </section> |
| 313 | |
| 314 | <section id='ref-tasks-install_ptest_base'> |
| 315 | <title><filename>do_install_ptest_base</filename></title> |
| 316 | |
| 317 | <para> |
| 318 | Copies the runtime test suite files from the compilation directory |
| 319 | to a holding area. |
| 320 | </para> |
| 321 | </section> |
| 322 | |
| 323 | <section id='ref-tasks-package'> |
| 324 | <title><filename>do_package</filename></title> |
| 325 | |
| 326 | <para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 327 | Analyzes the content of the holding area |
| 328 | <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename> |
| 329 | and splits the content into subsets based on available packages |
| 330 | and files. |
| 331 | This task makes use of the |
| 332 | <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link> |
| 333 | and |
| 334 | <link linkend='var-FILES'><filename>FILES</filename></link> |
| 335 | variables. |
| 336 | </para> |
| 337 | |
| 338 | <para> |
| 339 | The <filename>do_package</filename> task, in conjunction with the |
| 340 | <link linkend='ref-tasks-packagedata'><filename>do_packagedata</filename></link> |
| 341 | task, also saves some important package metadata. |
| 342 | For additional information, see the |
| 343 | <link linkend='var-PKGDESTWORK'><filename>PKGDESTWORK</filename></link> |
| 344 | variable and the |
| 345 | "<link linkend='automatically-added-runtime-dependencies'>Automatically Added Runtime Dependencies</link>" |
| 346 | section. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 347 | </para> |
| 348 | </section> |
| 349 | |
| 350 | <section id='ref-tasks-package_qa'> |
| 351 | <title><filename>do_package_qa</filename></title> |
| 352 | |
| 353 | <para> |
| 354 | Runs QA checks on packaged files. |
| 355 | For more information on these checks, see the |
| 356 | <link linkend='ref-classes-insane'><filename>insane</filename></link> |
| 357 | class. |
| 358 | </para> |
| 359 | </section> |
| 360 | |
| 361 | <section id='ref-tasks-package_write_deb'> |
| 362 | <title><filename>do_package_write_deb</filename></title> |
| 363 | |
| 364 | <para> |
| 365 | Creates Debian packages (i.e. <filename>*.deb</filename> files) and |
| 366 | places them in the |
| 367 | <filename>${</filename><link linkend='var-DEPLOY_DIR_DEB'><filename>DEPLOY_DIR_DEB</filename></link><filename>}</filename> |
| 368 | directory in the package feeds area. |
| 369 | For more information, see the |
| 370 | "<link linkend='package-feeds-dev-environment'>Package Feeds</link>" |
| 371 | section. |
| 372 | </para> |
| 373 | </section> |
| 374 | |
| 375 | <section id='ref-tasks-package_write_ipk'> |
| 376 | <title><filename>do_package_write_ipk</filename></title> |
| 377 | |
| 378 | <para> |
| 379 | Creates IPK packages (i.e. <filename>*.ipk</filename> files) and |
| 380 | places them in the |
| 381 | <filename>${</filename><link linkend='var-DEPLOY_DIR_IPK'><filename>DEPLOY_DIR_IPK</filename></link><filename>}</filename> |
| 382 | directory in the package feeds area. |
| 383 | For more information, see the |
| 384 | "<link linkend='package-feeds-dev-environment'>Package Feeds</link>" |
| 385 | section. |
| 386 | </para> |
| 387 | </section> |
| 388 | |
| 389 | <section id='ref-tasks-package_write_rpm'> |
| 390 | <title><filename>do_package_write_rpm</filename></title> |
| 391 | |
| 392 | <para> |
| 393 | Creates RPM packages (i.e. <filename>*.rpm</filename> files) and |
| 394 | places them in the |
| 395 | <filename>${</filename><link linkend='var-DEPLOY_DIR_RPM'><filename>DEPLOY_DIR_RPM</filename></link><filename>}</filename> |
| 396 | directory in the package feeds area. |
| 397 | For more information, see the |
| 398 | "<link linkend='package-feeds-dev-environment'>Package Feeds</link>" |
| 399 | section. |
| 400 | </para> |
| 401 | </section> |
| 402 | |
| 403 | <section id='ref-tasks-package_write_tar'> |
| 404 | <title><filename>do_package_write_tar</filename></title> |
| 405 | |
| 406 | <para> |
| 407 | Creates tarballs and places them in the |
| 408 | <filename>${</filename><link linkend='var-DEPLOY_DIR_TAR'><filename>DEPLOY_DIR_TAR</filename></link><filename>}</filename> |
| 409 | directory in the package feeds area. |
| 410 | For more information, see the |
| 411 | "<link linkend='package-feeds-dev-environment'>Package Feeds</link>" |
| 412 | section. |
| 413 | </para> |
| 414 | </section> |
| 415 | |
| 416 | <section id='ref-tasks-packagedata'> |
| 417 | <title><filename>do_packagedata</filename></title> |
| 418 | |
| 419 | <para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 420 | Saves package metadata generated by the |
| 421 | <link linkend='ref-tasks-package'><filename>do_package</filename></link> |
| 422 | task in |
| 423 | <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link> |
| 424 | to make it available globally. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 425 | </para> |
| 426 | </section> |
| 427 | |
| 428 | <section id='ref-tasks-patch'> |
| 429 | <title><filename>do_patch</filename></title> |
| 430 | |
| 431 | <para> |
| 432 | Locates patch files and applies them to the source code. |
| 433 | See the |
| 434 | "<link linkend='patching-dev-environment'>Patching</link>" |
| 435 | section for more information. |
| 436 | </para> |
| 437 | </section> |
| 438 | |
| 439 | <section id='ref-tasks-populate_lic'> |
| 440 | <title><filename>do_populate_lic</filename></title> |
| 441 | |
| 442 | <para> |
| 443 | Writes license information for the recipe that is collected later |
| 444 | when the image is constructed. |
| 445 | </para> |
| 446 | </section> |
| 447 | |
| 448 | <section id='ref-tasks-populate_sdk'> |
| 449 | <title><filename>do_populate_sdk</filename></title> |
| 450 | |
| 451 | <para> |
| 452 | Creates the file and directory structure for an installable SDK. |
| 453 | See the |
| 454 | "<link linkend='sdk-generation-dev-environment'>SDK Generation</link>" |
| 455 | section for more information. |
| 456 | </para> |
| 457 | </section> |
| 458 | |
| 459 | <section id='ref-tasks-populate_sysroot'> |
| 460 | <title><filename>do_populate_sysroot</filename></title> |
| 461 | |
| 462 | <para> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 463 | Stages (copies) a subset of the files installed by the |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 464 | <link linkend='ref-tasks-install'><filename>do_install</filename></link> |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 465 | task into the appropriate sysroot. |
| 466 | For information on how to access these files from other recipes, |
| 467 | see the |
| 468 | <link linkend='var-STAGING_DIR_HOST'><filename>STAGING_DIR*</filename></link> |
| 469 | variables. |
| 470 | Directories that would typically not be needed by other recipes at |
| 471 | build time (e.g. <filename>/etc</filename>) are not copied by |
| 472 | default. |
| 473 | </para> |
| 474 | |
| 475 | <para> |
| 476 | For information on what directories are copied by default, see the |
| 477 | <link linkend='var-SYSROOT_DIRS'><filename>SYSROOT_DIRS*</filename></link> |
| 478 | variables. |
| 479 | You can change these variables inside your recipe if you need |
| 480 | to make additional (or fewer) directories available to other |
| 481 | recipes at build time. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 482 | </para> |
| 483 | |
| 484 | <para> |
| 485 | The <filename>do_populate_sysroot</filename> task is a |
| 486 | shared state (sstate) task, which means that the task can |
| 487 | be accelerated through sstate use. |
| 488 | Realize also that if the task is re-executed, any previous output |
| 489 | is removed (i.e. "cleaned"). |
| 490 | </para> |
| 491 | </section> |
| 492 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 493 | <section id='ref-tasks-prepare_recipe_sysroot'> |
| 494 | <title><filename>do_prepare_recipe_sysroot</filename></title> |
| 495 | |
| 496 | <para> |
| 497 | Installs the files into the individual recipe specific sysroots |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 498 | (i.e. <filename>recipe-sysroot</filename> and |
| 499 | <filename>recipe-sysroot-native</filename> under |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 500 | <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}</filename> |
| 501 | based upon the dependencies specified by |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 502 | <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>). |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 503 | See the |
| 504 | "<link linkend='ref-classes-staging'><filename>staging</filename></link>" |
| 505 | class for more information. |
| 506 | </para> |
| 507 | </section> |
| 508 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 509 | <section id='ref-tasks-rm_work'> |
| 510 | <title><filename>do_rm_work</filename></title> |
| 511 | |
| 512 | <para> |
| 513 | Removes work files after the OpenEmbedded build system has |
| 514 | finished with them. |
| 515 | You can learn more by looking at the |
| 516 | "<link linkend='ref-classes-rm-work'><filename>rm_work.bbclass</filename></link>" |
| 517 | section. |
| 518 | </para> |
| 519 | </section> |
| 520 | |
| 521 | <section id='ref-tasks-rm_work_all'> |
| 522 | <title><filename>do_rm_work_all</filename></title> |
| 523 | |
| 524 | <para> |
| 525 | Top-level task for removing work files after the build system has |
| 526 | finished with them. |
| 527 | </para> |
| 528 | </section> |
| 529 | |
| 530 | <section id='ref-tasks-unpack'> |
| 531 | <title><filename>do_unpack</filename></title> |
| 532 | |
| 533 | <para> |
| 534 | Unpacks the source code into a working directory pointed to |
| 535 | by |
| 536 | <filename>${</filename><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link><filename>}</filename>. |
| 537 | The |
| 538 | <link linkend='var-S'><filename>S</filename></link> variable also |
| 539 | plays a role in where unpacked source files ultimately reside. |
| 540 | For more information on how source files are unpacked, see the |
| 541 | "<link linkend='source-fetching-dev-environment'>Source Fetching</link>" |
| 542 | section and the <filename>WORKDIR</filename> and |
| 543 | <filename>S</filename> variable descriptions. |
| 544 | </para> |
| 545 | </section> |
| 546 | </section> |
| 547 | |
| 548 | <section id='manually-called-tasks'> |
| 549 | <title>Manually Called Tasks</title> |
| 550 | |
| 551 | <para> |
| 552 | These tasks are typically manually triggered (e.g. by using the |
| 553 | <filename>bitbake -c</filename> command-line option): |
| 554 | </para> |
| 555 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 556 | <section id='ref-tasks-checkpkg'> |
| 557 | <title><filename>do_checkpkg</filename></title> |
| 558 | |
| 559 | <para> |
| 560 | Provides information about the recipe including its upstream |
| 561 | version and status. |
| 562 | The upstream version and status reveals whether or not a version |
| 563 | of the recipe exists upstream and a status of not updated, updated, |
| 564 | or unknown. |
| 565 | </para> |
| 566 | |
| 567 | <para> |
| 568 | The <filename>checkpkg</filename> task is included as part of the |
| 569 | <link linkend='ref-classes-distrodata'><filename>distrodata</filename></link> |
| 570 | class. |
| 571 | </para> |
| 572 | |
| 573 | <para> |
| 574 | To build the <filename>checkpkg</filename> task, use the |
| 575 | <filename>bitbake</filename> command with the "-c" option and |
| 576 | task name: |
| 577 | <literallayout class='monospaced'> |
| 578 | $ bitbake core-image-minimal -c checkpkg |
| 579 | </literallayout> |
| 580 | By default, the results are stored in |
| 581 | <link linkend='var-LOG_DIR'><filename>$LOG_DIR</filename></link> |
| 582 | (e.g. <filename>$BUILD_DIR/tmp/log</filename>). |
| 583 | </para> |
| 584 | </section> |
| 585 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 586 | <section id='ref-tasks-checkuri'> |
| 587 | <title><filename>do_checkuri</filename></title> |
| 588 | |
| 589 | <para> |
| 590 | Validates the |
| 591 | <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> |
| 592 | value. |
| 593 | </para> |
| 594 | </section> |
| 595 | |
| 596 | <section id='ref-tasks-checkuriall'> |
| 597 | <title><filename>do_checkuriall</filename></title> |
| 598 | |
| 599 | <para> |
| 600 | Validates the |
| 601 | <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> |
| 602 | value for all recipes required to build a target. |
| 603 | </para> |
| 604 | </section> |
| 605 | |
| 606 | <section id='ref-tasks-clean'> |
| 607 | <title><filename>do_clean</filename></title> |
| 608 | |
| 609 | <para> |
| 610 | Removes all output files for a target from the |
| 611 | <link linkend='ref-tasks-unpack'><filename>do_unpack</filename></link> |
| 612 | task forward (i.e. |
| 613 | <link linkend='ref-tasks-patch'><filename>do_unpack</filename></link>, |
| 614 | <link linkend='ref-tasks-configure'><filename>do_configure</filename></link>, |
| 615 | <link linkend='ref-tasks-compile'><filename>do_compile</filename></link>, |
| 616 | <link linkend='ref-tasks-install'><filename>do_install</filename></link>, |
| 617 | and |
| 618 | <link linkend='ref-tasks-package'><filename>do_package</filename></link>). |
| 619 | </para> |
| 620 | |
| 621 | <para> |
| 622 | You can run this task using BitBake as follows: |
| 623 | <literallayout class='monospaced'> |
| 624 | $ bitbake -c clean <replaceable>recipe</replaceable> |
| 625 | </literallayout> |
| 626 | </para> |
| 627 | |
| 628 | <para> |
| 629 | Running this task does not remove the |
| 630 | <link linkend='shared-state-cache'>sstate</link>) cache |
| 631 | files. |
| 632 | Consequently, if no changes have been made and the recipe is |
| 633 | rebuilt after cleaning, output files are simply restored from the |
| 634 | sstate cache. |
| 635 | If you want to remove the sstate cache files for the recipe, |
| 636 | you need to use the |
| 637 | <link linkend='ref-tasks-cleansstate'><filename>do_cleansstate</filename></link> |
| 638 | task instead (i.e. <filename>bitbake -c cleansstate</filename> <replaceable>recipe</replaceable>). |
| 639 | </para> |
| 640 | </section> |
| 641 | |
| 642 | <section id='ref-tasks-cleanall'> |
| 643 | <title><filename>do_cleanall</filename></title> |
| 644 | |
| 645 | <para> |
| 646 | Removes all output files, shared state |
| 647 | (<link linkend='shared-state-cache'>sstate</link>) cache, and |
| 648 | downloaded source files for a target (i.e. the contents of |
| 649 | <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>). |
| 650 | Essentially, the <filename>do_cleanall</filename> task is |
| 651 | identical to the |
| 652 | <link linkend='ref-tasks-cleansstate'><filename>do_cleansstate</filename></link> |
| 653 | task with the added removal of downloaded source files. |
| 654 | </para> |
| 655 | |
| 656 | <para> |
| 657 | You can run this task using BitBake as follows: |
| 658 | <literallayout class='monospaced'> |
| 659 | $ bitbake -c cleanall <replaceable>recipe</replaceable> |
| 660 | </literallayout> |
| 661 | </para> |
| 662 | |
| 663 | <para> |
| 664 | Typically, you would not normally use the |
| 665 | <filename>cleanall</filename> task. |
| 666 | Do so only if you want to start fresh with the |
| 667 | <link linkend='ref-tasks-fetch'><filename>do_fetch</filename></link> |
| 668 | task. |
| 669 | </para> |
| 670 | </section> |
| 671 | |
| 672 | <section id='ref-tasks-cleansstate'> |
| 673 | <title><filename>do_cleansstate</filename></title> |
| 674 | |
| 675 | <para> |
| 676 | Removes all output files and shared state |
| 677 | (<link linkend='shared-state-cache'>sstate</link>) |
| 678 | cache for a target. |
| 679 | Essentially, the <filename>do_cleansstate</filename> task is |
| 680 | identical to the |
| 681 | <link linkend='ref-tasks-clean'><filename>do_clean</filename></link> |
| 682 | task with the added removal of shared state |
| 683 | (<link linkend='shared-state-cache'>sstate</link>) cache. |
| 684 | </para> |
| 685 | |
| 686 | <para> |
| 687 | You can run this task using BitBake as follows: |
| 688 | <literallayout class='monospaced'> |
| 689 | $ bitbake -c cleansstate <replaceable>recipe</replaceable> |
| 690 | </literallayout> |
| 691 | </para> |
| 692 | |
| 693 | <para> |
| 694 | When you run the <filename>do_cleansstate</filename> task, |
| 695 | the OpenEmbedded build system no longer uses any |
| 696 | sstate. |
| 697 | Consequently, building the recipe from scratch is guaranteed. |
| 698 | <note> |
| 699 | The <filename>do_cleansstate</filename> task cannot remove |
| 700 | sstate from a remote sstate mirror. |
| 701 | If you need to build a target from scratch using remote |
| 702 | mirrors, use the "-f" option as follows: |
| 703 | <literallayout class='monospaced'> |
| 704 | $ bitbake -f -c do_cleansstate <replaceable>target</replaceable> |
| 705 | </literallayout> |
| 706 | </note> |
| 707 | </para> |
| 708 | </section> |
| 709 | |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 710 | <section id='ref-tasks-devpyshell'> |
| 711 | <title><filename>do_devpyshell</filename></title> |
| 712 | |
| 713 | <para> |
| 714 | Starts a shell in which an interactive Python interpreter allows |
| 715 | you to interact with the BitBake build environment. |
| 716 | From within this shell, you can directly examine and set |
| 717 | bits from the data store and execute functions as if within |
| 718 | the BitBake environment. |
| 719 | See the |
| 720 | "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devpyshell'>Using a Development Python Shell</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 721 | section in the Yocto Project Development Tasks Manual for more |
Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 722 | information about using <filename>devpyshell</filename>. |
| 723 | </para> |
| 724 | </section> |
| 725 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 726 | <section id='ref-tasks-devshell'> |
| 727 | <title><filename>do_devshell</filename></title> |
| 728 | |
| 729 | <para> |
| 730 | Starts a shell whose environment is set up for |
| 731 | development, debugging, or both. |
| 732 | See the |
| 733 | "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 734 | section in the Yocto Project Development Tasks Manual for more |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 735 | information about using <filename>devshell</filename>. |
| 736 | </para> |
| 737 | </section> |
| 738 | |
| 739 | <section id='ref-tasks-fetchall'> |
| 740 | <title><filename>do_fetchall</filename></title> |
| 741 | |
| 742 | <para> |
| 743 | Fetches all remote sources required to build a target. |
| 744 | </para> |
| 745 | </section> |
| 746 | |
| 747 | <section id='ref-tasks-listtasks'> |
| 748 | <title><filename>do_listtasks</filename></title> |
| 749 | |
| 750 | <para> |
| 751 | Lists all defined tasks for a target. |
| 752 | </para> |
| 753 | </section> |
| 754 | |
| 755 | <section id='ref-tasks-package_index'> |
| 756 | <title><filename>do_package_index</filename></title> |
| 757 | |
| 758 | <para> |
| 759 | Creates or updates the index in the |
| 760 | <link linkend='package-feeds-dev-environment'>Package Feeds</link> |
| 761 | area. |
| 762 | <note> |
| 763 | This task is not triggered with the |
| 764 | <filename>bitbake -c</filename> command-line option as |
| 765 | are the other tasks in this section. |
| 766 | Because this task is specifically for the |
| 767 | <filename>package-index</filename> recipe, |
| 768 | you run it using |
| 769 | <filename>bitbake package-index</filename>. |
| 770 | </note> |
| 771 | </para> |
| 772 | </section> |
| 773 | </section> |
| 774 | |
| 775 | <section id='image-related-tasks'> |
| 776 | <title>Image-Related Tasks</title> |
| 777 | |
| 778 | <para> |
| 779 | The following tasks are applicable to image recipes. |
| 780 | </para> |
| 781 | |
| 782 | <section id='ref-tasks-bootimg'> |
| 783 | <title><filename>do_bootimg</filename></title> |
| 784 | |
| 785 | <para> |
| 786 | Creates a bootable live image. |
| 787 | See the |
| 788 | <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link> |
| 789 | variable for additional information on live image types. |
| 790 | </para> |
| 791 | </section> |
| 792 | |
| 793 | <section id='ref-tasks-bundle_initramfs'> |
| 794 | <title><filename>do_bundle_initramfs</filename></title> |
| 795 | |
| 796 | <para> |
| 797 | Combines an initial RAM disk (initramfs) image and kernel |
| 798 | together to form a single image. |
| 799 | The |
| 800 | <link linkend='var-CONFIG_INITRAMFS_SOURCE'><filename>CONFIG_INITRAMFS_SOURCE</filename></link> |
| 801 | variable has some more information about these types of images. |
| 802 | </para> |
| 803 | </section> |
| 804 | |
| 805 | <section id='ref-tasks-rootfs'> |
| 806 | <title><filename>do_rootfs</filename></title> |
| 807 | |
| 808 | <para> |
| 809 | Creates the root filesystem (file and directory structure) for an |
| 810 | image. |
| 811 | See the |
| 812 | "<link linkend='image-generation-dev-environment'>Image Generation</link>" |
| 813 | section for more information on how the root filesystem is created. |
| 814 | </para> |
| 815 | </section> |
| 816 | |
| 817 | <section id='ref-tasks-testimage'> |
| 818 | <title><filename>do_testimage</filename></title> |
| 819 | |
| 820 | <para> |
| 821 | Boots an image and performs runtime tests within the image. |
| 822 | For information on automatically testing images, see the |
| 823 | "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 824 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 825 | </para> |
| 826 | </section> |
| 827 | |
| 828 | <section id='ref-tasks-testimage_auto'> |
| 829 | <title><filename>do_testimage_auto</filename></title> |
| 830 | |
| 831 | <para> |
| 832 | Boots an image and performs runtime tests within the image |
| 833 | immediately after it has been built. |
| 834 | This task is enabled when you set |
| 835 | <link linkend='var-TEST_IMAGE'><filename>TEST_IMAGE</filename></link> |
| 836 | equal to "1". |
| 837 | </para> |
| 838 | |
| 839 | <para> |
| 840 | For information on automatically testing images, see the |
| 841 | "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 842 | section in the Yocto Project Development Tasks Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 843 | </para> |
| 844 | </section> |
| 845 | </section> |
| 846 | |
| 847 | <section id='kernel-related-tasks'> |
| 848 | <title>Kernel-Related Tasks</title> |
| 849 | |
| 850 | <para> |
| 851 | The following tasks are applicable to kernel recipes. |
| 852 | Some of these tasks (e.g. the |
| 853 | <link linkend='ref-tasks-menuconfig'><filename>do_menuconfig</filename></link> |
| 854 | task) are also applicable to recipes that use |
| 855 | Linux kernel style configuration such as the BusyBox recipe. |
| 856 | </para> |
| 857 | |
| 858 | <section id='ref-tasks-compile_kernelmodules'> |
| 859 | <title><filename>do_compile_kernelmodules</filename></title> |
| 860 | |
| 861 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 862 | Runs the step that builds the kernel modules (if needed). |
| 863 | Building a kernel consists of two steps: 1) the kernel |
| 864 | (<filename>vmlinux</filename>) is built, and 2) the modules |
| 865 | are built (i.e. <filename>make modules</filename>). |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 866 | </para> |
| 867 | </section> |
| 868 | |
| 869 | <section id='ref-tasks-diffconfig'> |
| 870 | <title><filename>do_diffconfig</filename></title> |
| 871 | |
| 872 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 873 | When invoked by the user, this task creates a file containing the |
| 874 | differences between the original config as produced by |
| 875 | <link linkend='ref-tasks-kernel_configme'><filename>do_kernel_configme</filename></link> |
| 876 | task and the changes made by the user with other methods |
| 877 | (i.e. using |
| 878 | (<link linkend='ref-tasks-kernel_menuconfig'><filename>do_kernel_menuconfig</filename></link>). |
| 879 | Once the file of differences is created, it can be used to create |
| 880 | a config fragment that only contains the differences. |
| 881 | You can invoke this task from the command line as follows: |
| 882 | <literallayout class='monospaced'> |
| 883 | $ bitbake linux-yocto -c diffconfig |
| 884 | </literallayout> |
| 885 | For more information, see the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 886 | "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 887 | section in the Yocto Project Linux Kernel Development Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 888 | </para> |
| 889 | </section> |
| 890 | |
| 891 | <section id='ref-tasks-kernel_checkout'> |
| 892 | <title><filename>do_kernel_checkout</filename></title> |
| 893 | |
| 894 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 895 | Converts the newly unpacked kernel source into a form with which |
| 896 | the OpenEmbedded build system can work. |
| 897 | Because the kernel source can be fetched in several different ways, |
| 898 | the <filename>do_kernel_checkout</filename> task makes sure that |
| 899 | subsequent tasks are given a clean working tree copy of the kernel |
| 900 | with the correct branches checked out. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 901 | </para> |
| 902 | </section> |
| 903 | |
| 904 | <section id='ref-tasks-kernel_configcheck'> |
| 905 | <title><filename>do_kernel_configcheck</filename></title> |
| 906 | |
| 907 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 908 | Validates the configuration produced by the |
| 909 | <link linkend='ref-tasks-kernel_menuconfig'><filename>do_kernel_menuconfig</filename></link> |
| 910 | task. |
| 911 | The <filename>do_kernel_configcheck</filename> task produces |
| 912 | warnings when a requested configuration does not appear in the |
| 913 | final <filename>.config</filename> file or when you override a |
| 914 | policy configuration in a hardware configuration fragment. |
| 915 | You can run this task explicitly and view the output by using |
| 916 | the following command: |
| 917 | <literallayout class='monospaced'> |
| 918 | $ bitbake linux-yocto -c kernel_configcheck -f |
| 919 | </literallayout> |
| 920 | For more information, see the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 921 | "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#validating-configuration'>Validating Configuration</ulink>" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 922 | section in the Yocto Project Linux Kernel Development Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 923 | </para> |
| 924 | </section> |
| 925 | |
| 926 | <section id='ref-tasks-kernel_configme'> |
| 927 | <title><filename>do_kernel_configme</filename></title> |
| 928 | |
| 929 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 930 | After the kernel is patched by the |
| 931 | <link linkend='ref-tasks-patch'><filename>do_patch</filename></link> |
| 932 | task, the <filename>do_kernel_configme</filename> task assembles |
| 933 | and merges all the kernel config fragments into a merged |
| 934 | configuration that can then be passed to the kernel configuration |
| 935 | phase proper. |
| 936 | This is also the time during which user-specified defconfigs |
| 937 | are applied if present, and where configuration modes such as |
| 938 | <filename>--allnoconfig</filename> are applied. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 939 | </para> |
| 940 | </section> |
| 941 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 942 | <section id='ref-tasks-kernel_menuconfig'> |
| 943 | <title><filename>do_kernel_menuconfig</filename></title> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 944 | |
| 945 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 946 | Invoked by the user to manipulate the |
| 947 | <filename>.config</filename> file used to build a linux-yocto |
| 948 | recipe. |
| 949 | This task starts the Linux kernel configuration tool, which you |
| 950 | then use to modify the kernel configuration. |
| 951 | <note> |
| 952 | You can also invoke this tool from the command line as |
| 953 | follows: |
| 954 | <literallayout class='monospaced'> |
| 955 | $ bitbake linux-yocto -c menuconfig |
| 956 | </literallayout> |
| 957 | </note> |
| 958 | See the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 959 | "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig'>Using <filename>menuconfig</filename></ulink>" |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 960 | section in the Yocto Project Linux Kernel Development Manual |
| 961 | for more information on this configuration tool. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 962 | </para> |
| 963 | </section> |
| 964 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 965 | <section id='ref-tasks-kernel_metadata'> |
| 966 | <title><filename>do_kernel_metadata</filename></title> |
| 967 | |
| 968 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 969 | Collects all the features required for a given kernel build, |
| 970 | whether the features come from |
| 971 | <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link> |
| 972 | or from Git repositories. |
| 973 | After collection, the <filename>do_kernel_metadata</filename> task |
| 974 | processes the features into a series of config fragments and |
| 975 | patches, which can then be applied by subsequent tasks such as |
| 976 | <link linkend='ref-tasks-patch'><filename>do_patch</filename></link> |
| 977 | and |
| 978 | <link linkend='ref-tasks-kernel_configme'><filename>do_kernel_configme</filename></link>. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 979 | </para> |
| 980 | </section> |
| 981 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 982 | <section id='ref-tasks-menuconfig'> |
| 983 | <title><filename>do_menuconfig</filename></title> |
| 984 | |
| 985 | <para> |
| 986 | Runs <filename>make menuconfig</filename> for the kernel. |
| 987 | For information on <filename>menuconfig</filename>, see the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 988 | "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#using-menuconfig'>Using <filename>menuconfig</filename></ulink>" |
| 989 | section in the Yocto Project Linux Kernel Development Manual. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 990 | </para> |
| 991 | </section> |
| 992 | |
| 993 | <section id='ref-tasks-savedefconfig'> |
| 994 | <title><filename>do_savedefconfig</filename></title> |
| 995 | |
| 996 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 997 | When invoked by the user, creates a defconfig file that can be |
| 998 | used instead of the default defconfig. |
| 999 | The saved defconfig contains the differences between the default |
| 1000 | defconfig and the changes made by the user using other methods |
| 1001 | (i.e. the |
| 1002 | <link linkend='ref-tasks-kernel_menuconfig'><filename>do_kernel_menuconfig</filename></link> |
| 1003 | task. |
| 1004 | You can invoke the task using the following command: |
| 1005 | <literallayout class='monospaced'> |
| 1006 | $ bitbake linux-yocto -c savedefconfig |
| 1007 | </literallayout> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1008 | </para> |
| 1009 | </section> |
| 1010 | |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 1011 | <section id='ref-tasks-shared_workdir'> |
| 1012 | <title><filename>do_shared_workdir</filename></title> |
| 1013 | |
| 1014 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1015 | After the kernel has been compiled but before the kernel modules |
| 1016 | have been compiled, this task copies files required for module |
| 1017 | builds and which are generated from the kernel build into the |
| 1018 | shared work directory. |
| 1019 | With these copies successfully copied, the |
| 1020 | <link linkend='ref-tasks-compile_kernelmodules'><filename>do_compile_kernelmodules</filename></link> |
| 1021 | task can successfully build the kernel modules in the next step |
| 1022 | of the build. |
Patrick Williams | f1e5d69 | 2016-03-30 15:21:19 -0500 | [diff] [blame] | 1023 | </para> |
| 1024 | </section> |
| 1025 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1026 | <section id='ref-tasks-sizecheck'> |
| 1027 | <title><filename>do_sizecheck</filename></title> |
| 1028 | |
| 1029 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1030 | After the kernel has been built, this task checks the size of the |
| 1031 | stripped kernel image against |
| 1032 | <link linkend='var-KERNEL_IMAGE_MAXSIZE'><filename>KERNEL_IMAGE_MAXSIZE</filename></link>. |
| 1033 | If that variable was set and the size of the stripped kernel |
| 1034 | exceeds that size, the kernel build produces a warning to that |
| 1035 | effect. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1036 | </para> |
| 1037 | </section> |
| 1038 | |
| 1039 | <section id='ref-tasks-strip'> |
| 1040 | <title><filename>do_strip</filename></title> |
| 1041 | |
| 1042 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1043 | If |
| 1044 | <filename>KERNEL_IMAGE_STRIP_EXTRA_SECTIONS</filename> is defined, |
| 1045 | this task strips the sections named in that variable from |
| 1046 | <filename>vmlinux</filename>. |
| 1047 | This stripping is typically used to remove nonessential sections |
| 1048 | such as <filename>.comment</filename> sections from a |
| 1049 | size-sensitive configuration. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1050 | </para> |
| 1051 | </section> |
| 1052 | |
| 1053 | <section id='ref-tasks-validate_branches'> |
| 1054 | <title><filename>do_validate_branches</filename></title> |
| 1055 | |
| 1056 | <para> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 1057 | After the kernel is unpacked but before it is patched, this task |
| 1058 | makes sure that the machine and metadata branches as specified |
| 1059 | by the <link linkend='var-SRCREV'><filename>SRCREV</filename></link> |
| 1060 | variables actually exist on the specified branches. |
| 1061 | If these branches do not exist and |
| 1062 | <link linkend='var-AUTOREV'><filename>AUTOREV</filename></link> |
| 1063 | is not being used, the <filename>do_validate_branches</filename> |
| 1064 | task fails during the build. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1065 | </para> |
| 1066 | </section> |
| 1067 | </section> |
| 1068 | |
| 1069 | <section id='miscellaneous-tasks'> |
| 1070 | <title>Miscellaneous Tasks</title> |
| 1071 | |
| 1072 | <para> |
| 1073 | The following sections describe miscellaneous tasks. |
| 1074 | </para> |
| 1075 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1076 | <section id='ref-tasks-spdx'> |
| 1077 | <title><filename>do_spdx</filename></title> |
| 1078 | |
| 1079 | <para> |
| 1080 | A build stage that takes the source code and scans it on a remote |
| 1081 | FOSSOLOGY server in order to produce an SPDX document. |
| 1082 | This task applies only to the |
| 1083 | <link linkend='ref-classes-spdx'><filename>spdx</filename></link> |
| 1084 | class. |
| 1085 | </para> |
| 1086 | </section> |
| 1087 | </section> |
| 1088 | |
| 1089 | </chapter> |
| 1090 | <!-- |
| 1091 | vim: expandtab tw=80 ts=4 |
| 1092 | --> |