summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:46:05 +0100
committerAdrian Dudau <adrian.dudau@enea.com>2013-12-12 13:47:32 +0100
commit14b00ff23a912494edc7f146e668c40ca82b8508 (patch)
treef7f4e592ccb935bc312cfa0cfc3c0cbbe444970d
downloadyocto-docs-14b00ff23a912494edc7f146e668c40ca82b8508.tar.gz
initial commit of Enea Linux 3.1HEADmaster
Migrated from the internal git server on the dora-enea branch Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
-rw-r--r--.gitignore58
-rw-r--r--diagrams/poky-buildprocess/Pokyarch_diag.jpgbin0 -> 285707 bytes
-rw-r--r--diagrams/poky-buildprocess/Pokyarch_diag.svg205
-rw-r--r--diagrams/poky-buildprocess/Pokyarch_diag2.svg1544
-rw-r--r--diagrams/poky-buildprocess/pokyarch4.diabin0 -> 3495 bytes
-rw-r--r--diagrams/poky-buildprocess/pokyarch4.pngbin0 -> 52531 bytes
-rw-r--r--documentation/Makefile395
-rw-r--r--documentation/README91
-rw-r--r--documentation/adt-manual/adt-command.xml224
-rw-r--r--documentation/adt-manual/adt-intro.xml195
-rw-r--r--documentation/adt-manual/adt-manual-customization.xsl11
-rw-r--r--documentation/adt-manual/adt-manual-eclipse-customization.xsl27
-rw-r--r--documentation/adt-manual/adt-manual.xml113
-rw-r--r--documentation/adt-manual/adt-package.xml101
-rw-r--r--documentation/adt-manual/adt-prepare.xml646
-rw-r--r--documentation/adt-manual/adt-style.css979
-rw-r--r--documentation/adt-manual/figures/adt-title.pngbin0 -> 13498 bytes
-rw-r--r--documentation/bsp-guide/bsp-guide-customization.xsl10
-rw-r--r--documentation/bsp-guide/bsp-guide-eclipse-customization.xsl27
-rw-r--r--documentation/bsp-guide/bsp-guide.xml118
-rw-r--r--documentation/bsp-guide/bsp-style.css980
-rw-r--r--documentation/bsp-guide/bsp.xml1480
-rw-r--r--documentation/bsp-guide/figures/bsp-title.pngbin0 -> 17388 bytes
-rw-r--r--documentation/dev-manual/dev-manual-common-tasks.xml6603
-rw-r--r--documentation/dev-manual/dev-manual-customization.xsl10
-rw-r--r--documentation/dev-manual/dev-manual-eclipse-customization.xsl27
-rw-r--r--documentation/dev-manual/dev-manual-intro.xml210
-rw-r--r--documentation/dev-manual/dev-manual-model.xml2060
-rw-r--r--documentation/dev-manual/dev-manual-newbie.xml1590
-rw-r--r--documentation/dev-manual/dev-manual-start.xml445
-rw-r--r--documentation/dev-manual/dev-manual.xml102
-rw-r--r--documentation/dev-manual/dev-style.css979
-rw-r--r--documentation/dev-manual/figures/app-dev-flow.pngbin0 -> 53301 bytes
-rw-r--r--documentation/dev-manual/figures/bsp-dev-flow.pngbin0 -> 56047 bytes
-rw-r--r--documentation/dev-manual/figures/dev-title.pngbin0 -> 11813 bytes
-rw-r--r--documentation/dev-manual/figures/git-workflow.pngbin0 -> 26610 bytes
-rw-r--r--documentation/dev-manual/figures/index-downloads.pngbin0 -> 100374 bytes
-rw-r--r--documentation/dev-manual/figures/kernel-dev-flow.pngbin0 -> 45225 bytes
-rw-r--r--documentation/dev-manual/figures/kernel-overview-1.pngbin0 -> 35839 bytes
-rw-r--r--documentation/dev-manual/figures/kernel-overview-2-generic.pngbin0 -> 39931 bytes
-rw-r--r--documentation/dev-manual/figures/source-repos.pngbin0 -> 188986 bytes
-rw-r--r--documentation/dev-manual/figures/yp-download.pngbin0 -> 193275 bytes
-rwxr-xr-xdocumentation/kernel-dev/figures/kernel-architecture-overview.pngbin0 -> 40748 bytes
-rw-r--r--documentation/kernel-dev/figures/kernel-dev-title.pngbin0 -> 13453 bytes
-rw-r--r--documentation/kernel-dev/kernel-dev-advanced.xml1071
-rw-r--r--documentation/kernel-dev/kernel-dev-common.xml863
-rw-r--r--documentation/kernel-dev/kernel-dev-concepts-appx.xml253
-rw-r--r--documentation/kernel-dev/kernel-dev-customization.xsl11
-rw-r--r--documentation/kernel-dev/kernel-dev-eclipse-customization.xsl27
-rw-r--r--documentation/kernel-dev/kernel-dev-examples.xml918
-rw-r--r--documentation/kernel-dev/kernel-dev-faq.xml131
-rw-r--r--documentation/kernel-dev/kernel-dev-intro.xml147
-rw-r--r--documentation/kernel-dev/kernel-dev-maint-appx.xml220
-rw-r--r--documentation/kernel-dev/kernel-dev-style.css978
-rw-r--r--documentation/kernel-dev/kernel-dev.xml95
-rw-r--r--documentation/mega-manual/figures/adt-title.pngbin0 -> 13498 bytes
-rw-r--r--documentation/mega-manual/figures/analysis-for-package-splitting.pngbin0 -> 63291 bytes
-rw-r--r--documentation/mega-manual/figures/app-dev-flow.pngbin0 -> 52670 bytes
-rw-r--r--documentation/mega-manual/figures/bsp-dev-flow.pngbin0 -> 57479 bytes
-rw-r--r--documentation/mega-manual/figures/bsp-title.pngbin0 -> 17388 bytes
-rw-r--r--documentation/mega-manual/figures/buildhistory-web.pngbin0 -> 49966 bytes
-rw-r--r--documentation/mega-manual/figures/buildhistory.pngbin0 -> 42532 bytes
-rwxr-xr-xdocumentation/mega-manual/figures/building-an-image.pngbin0 -> 14891 bytes
-rw-r--r--documentation/mega-manual/figures/configuration-compile-autoreconf.pngbin0 -> 46080 bytes
-rw-r--r--documentation/mega-manual/figures/cross-development-toolchains.pngbin0 -> 59275 bytes
-rw-r--r--documentation/mega-manual/figures/dev-title.pngbin0 -> 11813 bytes
-rw-r--r--documentation/mega-manual/figures/git-workflow.pngbin0 -> 26610 bytes
-rw-r--r--documentation/mega-manual/figures/image-generation.pngbin0 -> 47713 bytes
-rw-r--r--documentation/mega-manual/figures/images.pngbin0 -> 22926 bytes
-rw-r--r--documentation/mega-manual/figures/index-downloads.pngbin0 -> 58263 bytes
-rwxr-xr-xdocumentation/mega-manual/figures/kernel-architecture-overview.pngbin0 -> 40748 bytes
-rw-r--r--documentation/mega-manual/figures/kernel-dev-flow.pngbin0 -> 45225 bytes
-rw-r--r--documentation/mega-manual/figures/kernel-dev-title.pngbin0 -> 13453 bytes
-rw-r--r--documentation/mega-manual/figures/kernel-overview-1.pngbin0 -> 35839 bytes
-rw-r--r--documentation/mega-manual/figures/kernel-overview-2-generic.pngbin0 -> 39931 bytes
-rw-r--r--documentation/mega-manual/figures/kernel-title.pngbin0 -> 13970 bytes
-rw-r--r--documentation/mega-manual/figures/kernelshark-all.pngbin0 -> 89316 bytes
-rw-r--r--documentation/mega-manual/figures/kernelshark-choose-events.pngbin0 -> 57372 bytes
-rw-r--r--documentation/mega-manual/figures/kernelshark-i915-display.pngbin0 -> 98765 bytes
-rw-r--r--documentation/mega-manual/figures/kernelshark-output-display.pngbin0 -> 204454 bytes
-rw-r--r--documentation/mega-manual/figures/layer-input.pngbin0 -> 45856 bytes
-rw-r--r--documentation/mega-manual/figures/lttngmain0.pngbin0 -> 120581 bytes
-rw-r--r--documentation/mega-manual/figures/oprofileui-busybox.pngbin0 -> 98334 bytes
-rw-r--r--documentation/mega-manual/figures/oprofileui-copy-to-user.pngbin0 -> 105661 bytes
-rw-r--r--documentation/mega-manual/figures/oprofileui-downloading.pngbin0 -> 37301 bytes
-rw-r--r--documentation/mega-manual/figures/oprofileui-processes.pngbin0 -> 95741 bytes
-rw-r--r--documentation/mega-manual/figures/package-feeds.pngbin0 -> 27711 bytes
-rw-r--r--documentation/mega-manual/figures/patching.pngbin0 -> 42523 bytes
-rw-r--r--documentation/mega-manual/figures/perf-probe-do_fork-profile.pngbin0 -> 59078 bytes
-rw-r--r--documentation/mega-manual/figures/perf-report-cycles-u.pngbin0 -> 171368 bytes
-rw-r--r--documentation/mega-manual/figures/perf-systemwide-libc.pngbin0 -> 136826 bytes
-rw-r--r--documentation/mega-manual/figures/perf-systemwide.pngbin0 -> 140616 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-annotate-menu.pngbin0 -> 22364 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-annotate-udhcpc.pngbin0 -> 171529 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-debuginfo.pngbin0 -> 174971 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-dso-zoom-menu.pngbin0 -> 23735 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-dso-zoom.pngbin0 -> 101685 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-busybox-expanded-stripped.pngbin0 -> 95140 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-flat-stripped.pngbin0 -> 178919 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.pngbin0 -> 138550 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.pngbin0 -> 102790 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.pngbin0 -> 110101 bytes
-rw-r--r--documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.pngbin0 -> 102812 bytes
-rw-r--r--documentation/mega-manual/figures/poky-title.pngbin0 -> 11592 bytes
-rw-r--r--documentation/mega-manual/figures/profile-title.pngbin0 -> 12799 bytes
-rw-r--r--documentation/mega-manual/figures/pybootchartgui-linux-yocto.pngbin0 -> 36366 bytes
-rw-r--r--documentation/mega-manual/figures/pychart-linux-yocto-rpm-nostrip.pngbin0 -> 98053 bytes
-rw-r--r--documentation/mega-manual/figures/pychart-linux-yocto-rpm.pngbin0 -> 81053 bytes
-rw-r--r--documentation/mega-manual/figures/sched-wakeup-profile.pngbin0 -> 123810 bytes
-rw-r--r--documentation/mega-manual/figures/sdk-generation.pngbin0 -> 45456 bytes
-rw-r--r--documentation/mega-manual/figures/sdk.pngbin0 -> 20074 bytes
-rw-r--r--documentation/mega-manual/figures/source-fetching.pngbin0 -> 38860 bytes
-rw-r--r--documentation/mega-manual/figures/source-input.pngbin0 -> 39872 bytes
-rw-r--r--documentation/mega-manual/figures/source-repos.pngbin0 -> 188986 bytes
-rw-r--r--documentation/mega-manual/figures/sysprof-callers.pngbin0 -> 145043 bytes
-rw-r--r--documentation/mega-manual/figures/sysprof-copy-from-user.pngbin0 -> 132976 bytes
-rw-r--r--documentation/mega-manual/figures/sysprof-copy-to-user.pngbin0 -> 132074 bytes
-rw-r--r--documentation/mega-manual/figures/user-configuration.pngbin0 -> 23687 bytes
-rw-r--r--documentation/mega-manual/figures/using-a-pre-built-image.pngbin0 -> 12733 bytes
-rw-r--r--documentation/mega-manual/figures/yocto-environment-ref.pngbin0 -> 83206 bytes
-rw-r--r--documentation/mega-manual/figures/yocto-environment.pngbin0 -> 73095 bytes
-rwxr-xr-xdocumentation/mega-manual/figures/yocto-project-transp.pngbin0 -> 8626 bytes
-rw-r--r--documentation/mega-manual/figures/yp-download.pngbin0 -> 193275 bytes
-rw-r--r--documentation/mega-manual/mega-manual-customization.xsl8
-rw-r--r--documentation/mega-manual/mega-manual.xml53
-rw-r--r--documentation/mega-manual/mega-style.css979
-rw-r--r--documentation/poky.ent65
-rw-r--r--documentation/profile-manual/figures/kernelshark-all.pngbin0 -> 89316 bytes
-rw-r--r--documentation/profile-manual/figures/kernelshark-choose-events.pngbin0 -> 57372 bytes
-rw-r--r--documentation/profile-manual/figures/kernelshark-i915-display.pngbin0 -> 98765 bytes
-rw-r--r--documentation/profile-manual/figures/kernelshark-output-display.pngbin0 -> 204454 bytes
-rw-r--r--documentation/profile-manual/figures/lttngmain0.pngbin0 -> 120581 bytes
-rw-r--r--documentation/profile-manual/figures/oprofileui-busybox.pngbin0 -> 98334 bytes
-rw-r--r--documentation/profile-manual/figures/oprofileui-copy-to-user.pngbin0 -> 105661 bytes
-rw-r--r--documentation/profile-manual/figures/oprofileui-downloading.pngbin0 -> 37301 bytes
-rw-r--r--documentation/profile-manual/figures/oprofileui-processes.pngbin0 -> 95741 bytes
-rw-r--r--documentation/profile-manual/figures/perf-probe-do_fork-profile.pngbin0 -> 59078 bytes
-rw-r--r--documentation/profile-manual/figures/perf-report-cycles-u.pngbin0 -> 171368 bytes
-rw-r--r--documentation/profile-manual/figures/perf-systemwide-libc.pngbin0 -> 136826 bytes
-rw-r--r--documentation/profile-manual/figures/perf-systemwide.pngbin0 -> 140616 bytes
-rw-r--r--documentation/profile-manual/figures/perf-wget-busybox-annotate-menu.pngbin0 -> 22364 bytes
-rw-r--r--documentation/profile-manual/figures/perf-wget-busybox-annotate-udhcpc.pngbin0 -> 171529 bytes
-rw-r--r--documentation/profile-manual/figures/perf-wget-busybox-debuginfo.pngbin0 -> 174971 bytes
-rw-r--r--documentation/profile-manual/figures/perf-wget-busybox-dso-zoom-menu.pngbin0 -> 23735 bytes
-rw-r--r--documentation/profile-manual/figures/perf-wget-busybox-dso-zoom.pngbin0 -> 101685 bytes
-rw-r--r--documentation/profile-manual/figures/perf-wget-busybox-expanded-stripped.pngbin0 -> 95140 bytes
-rw-r--r--documentation/profile-manual/figures/perf-wget-flat-stripped.pngbin0 -> 178919 bytes
-rw-r--r--documentation/profile-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.pngbin0 -> 138550 bytes
-rw-r--r--documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.pngbin0 -> 102790 bytes
-rw-r--r--documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.pngbin0 -> 110101 bytes
-rw-r--r--documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.pngbin0 -> 102812 bytes
-rw-r--r--documentation/profile-manual/figures/profile-title.pngbin0 -> 12799 bytes
-rw-r--r--documentation/profile-manual/figures/pybootchartgui-linux-yocto.pngbin0 -> 36366 bytes
-rw-r--r--documentation/profile-manual/figures/pychart-linux-yocto-rpm-nostrip.pngbin0 -> 98053 bytes
-rw-r--r--documentation/profile-manual/figures/pychart-linux-yocto-rpm.pngbin0 -> 81053 bytes
-rw-r--r--documentation/profile-manual/figures/sched-wakeup-profile.pngbin0 -> 123810 bytes
-rw-r--r--documentation/profile-manual/figures/sysprof-callers.pngbin0 -> 145043 bytes
-rw-r--r--documentation/profile-manual/figures/sysprof-copy-from-user.pngbin0 -> 132976 bytes
-rw-r--r--documentation/profile-manual/figures/sysprof-copy-to-user.pngbin0 -> 132074 bytes
-rw-r--r--documentation/profile-manual/profile-manual-arch.xml45
-rw-r--r--documentation/profile-manual/profile-manual-customization.xsl11
-rw-r--r--documentation/profile-manual/profile-manual-eclipse-customization.xsl27
-rw-r--r--documentation/profile-manual/profile-manual-examples.xml39
-rw-r--r--documentation/profile-manual/profile-manual-intro.xml102
-rw-r--r--documentation/profile-manual/profile-manual-style.css978
-rw-r--r--documentation/profile-manual/profile-manual-usage.xml3684
-rw-r--r--documentation/profile-manual/profile-manual.xml85
-rw-r--r--documentation/ref-manual/TODO11
-rw-r--r--documentation/ref-manual/closer-look.xml1224
-rw-r--r--documentation/ref-manual/examples/hello-autotools/hello_2.3.bb8
-rw-r--r--documentation/ref-manual/examples/hello-single/files/helloworld.c8
-rw-r--r--documentation/ref-manual/examples/hello-single/hello.bb17
-rw-r--r--documentation/ref-manual/examples/libxpm/libxpm_3.5.6.bb14
-rw-r--r--documentation/ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb15
-rw-r--r--documentation/ref-manual/faq.xml698
-rw-r--r--documentation/ref-manual/figures/analysis-for-package-splitting.pngbin0 -> 63291 bytes
-rw-r--r--documentation/ref-manual/figures/buildhistory-web.pngbin0 -> 49966 bytes
-rw-r--r--documentation/ref-manual/figures/buildhistory.pngbin0 -> 42532 bytes
-rw-r--r--documentation/ref-manual/figures/configuration-compile-autoreconf.pngbin0 -> 46080 bytes
-rw-r--r--documentation/ref-manual/figures/cross-development-toolchains.pngbin0 -> 59275 bytes
-rw-r--r--documentation/ref-manual/figures/image-generation.pngbin0 -> 47713 bytes
-rw-r--r--documentation/ref-manual/figures/images.pngbin0 -> 22926 bytes
-rw-r--r--documentation/ref-manual/figures/layer-input.pngbin0 -> 45856 bytes
-rw-r--r--documentation/ref-manual/figures/package-feeds.pngbin0 -> 27711 bytes
-rw-r--r--documentation/ref-manual/figures/patching.pngbin0 -> 42523 bytes
-rw-r--r--documentation/ref-manual/figures/poky-title.pngbin0 -> 11592 bytes
-rw-r--r--documentation/ref-manual/figures/sdk-generation.pngbin0 -> 45456 bytes
-rw-r--r--documentation/ref-manual/figures/sdk.pngbin0 -> 20074 bytes
-rw-r--r--documentation/ref-manual/figures/source-fetching.pngbin0 -> 38860 bytes
-rw-r--r--documentation/ref-manual/figures/source-input.pngbin0 -> 39872 bytes
-rw-r--r--documentation/ref-manual/figures/user-configuration.pngbin0 -> 23687 bytes
-rw-r--r--documentation/ref-manual/figures/yocto-environment-ref.pngbin0 -> 83206 bytes
-rw-r--r--documentation/ref-manual/introduction.xml439
-rw-r--r--documentation/ref-manual/migration.xml1089
-rw-r--r--documentation/ref-manual/ref-bitbake.xml432
-rw-r--r--documentation/ref-manual/ref-classes.xml1104
-rw-r--r--documentation/ref-manual/ref-features.xml334
-rw-r--r--documentation/ref-manual/ref-images.xml150
-rw-r--r--documentation/ref-manual/ref-manual-customization.xsl11
-rw-r--r--documentation/ref-manual/ref-manual-eclipse-customization.xsl27
-rw-r--r--documentation/ref-manual/ref-manual.xml138
-rw-r--r--documentation/ref-manual/ref-structure.xml942
-rw-r--r--documentation/ref-manual/ref-style.css979
-rw-r--r--documentation/ref-manual/ref-variables.xml5929
-rw-r--r--documentation/ref-manual/ref-varlocality.xml196
-rw-r--r--documentation/ref-manual/resources.xml128
-rw-r--r--documentation/ref-manual/technical-details.xml1358
-rw-r--r--documentation/ref-manual/usingpoky.xml859
-rw-r--r--documentation/template/Vera.ttfbin0 -> 65932 bytes
-rw-r--r--documentation/template/Vera.xml1
-rw-r--r--documentation/template/VeraMoBd.ttfbin0 -> 49052 bytes
-rw-r--r--documentation/template/VeraMoBd.xml1
-rw-r--r--documentation/template/VeraMono.ttfbin0 -> 49224 bytes
-rw-r--r--documentation/template/VeraMono.xml1
-rw-r--r--documentation/template/draft.pngbin0 -> 24847 bytes
-rw-r--r--documentation/template/fop-config.xml58
-rw-r--r--documentation/template/ohand-color.svg150
-rw-r--r--documentation/template/poky-db-pdf.xsl64
-rw-r--r--documentation/template/poky-ref-manual.pngbin0 -> 32145 bytes
-rw-r--r--documentation/template/poky.svg163
-rw-r--r--documentation/template/titlepage.templates.xml1227
-rw-r--r--documentation/template/yocto-project-qs.pngbin0 -> 17829 bytes
-rw-r--r--documentation/tools/eclipse-help.sed18
-rw-r--r--documentation/tools/mega-manual.sed13
-rwxr-xr-xdocumentation/tools/poky-docbook-to-pdf51
-rwxr-xr-xdocumentation/yocto-project-qs/figures/building-an-image.pngbin0 -> 14891 bytes
-rw-r--r--documentation/yocto-project-qs/figures/using-a-pre-built-image.pngbin0 -> 12733 bytes
-rw-r--r--documentation/yocto-project-qs/figures/yocto-environment.pngbin0 -> 73095 bytes
-rwxr-xr-xdocumentation/yocto-project-qs/figures/yocto-project-transp.pngbin0 -> 8626 bytes
-rw-r--r--documentation/yocto-project-qs/qs-style.css979
-rw-r--r--documentation/yocto-project-qs/yocto-project-qs-customization.xsl9
-rw-r--r--documentation/yocto-project-qs/yocto-project-qs-eclipse-customization.xsl25
-rw-r--r--documentation/yocto-project-qs/yocto-project-qs-titlepage.xsl3820
-rw-r--r--documentation/yocto-project-qs/yocto-project-qs.xml958
-rw-r--r--presentations/automotive-linux-summit-2012/automotive.pin369
-rw-r--r--presentations/automotive-linux-summit-2012/blueprint.jpgbin0 -> 693096 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/cables.jpgbin0 -> 293433 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/cake.jpgbin0 -> 445144 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/cars2.jpgbin0 -> 396234 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/cat.jpgbin0 -> 374719 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/chip.jpgbin0 -> 96668 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/corridor.jpgbin0 -> 294956 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/cpus.jpgbin0 -> 475614 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/dash.jpgbin0 -> 131336 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/dolls.jpgbin0 -> 237901 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/engineer.jpgbin0 -> 310702 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/group.jpgbin0 -> 392570 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/hob.jpgbin0 -> 561538 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/minifigs.jpgbin0 -> 497571 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/none.json50
-rw-r--r--presentations/automotive-linux-summit-2012/owl.jpgbin0 -> 339288 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/people.jpgbin0 -> 268848 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/qa.jpgbin0 -> 167108 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/question.jpgbin0 -> 505072 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/road.jpgbin0 -> 188611 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/tins.jpgbin0 -> 501518 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/tools.jpgbin0 -> 547380 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/tumble.jpgbin0 -> 438564 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/umbrella.jpgbin0 -> 311845 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/xwing.jpgbin0 -> 421747 bytes
-rw-r--r--presentations/automotive-linux-summit-2012/yocto.jpgbin0 -> 40098 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/advert.jpgbin0 -> 649120 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/apple.jpgbin0 -> 565059 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/bike.jpgbin0 -> 611684 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/bomb.jpgbin0 -> 82008 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/cables.jpgbin0 -> 293433 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/clay.jpgbin0 -> 66128 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/data.jpgbin0 -> 432108 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/engineer.jpgbin0 -> 310702 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/labquest.jpgbin0 -> 35381 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/license.jpgbin0 -> 236192 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/minifigs.jpgbin0 -> 497571 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/qa.jpgbin0 -> 167108 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/road.jpgbin0 -> 188611 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/train.jpgbin0 -> 399452 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/tv.jpgbin0 -> 392568 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/xeon-phi.jpgbin0 -> 158595 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/yocto.jpgbin0 -> 40098 bytes
-rw-r--r--presentations/osts-2013-why-use-yocto/yocto.pin254
279 files changed, 54341 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..cacc75b
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,58 @@
1*.pyc
2*.pyo
3build/conf/local.conf
4build/conf/bblayers.conf
5build/downloads
6build/tmp/
7build/sstate-cache
8build/pyshtables.py
9pstage/
10scripts/poky-git-proxy-socks
11sources/
12meta-darwin
13meta-maemo
14meta-extras
15meta-m2
16meta-prvt*
17poky-autobuilder*
18*.swp
19*.orig
20*.rej
21*~
22documentation/kernel-dev/kernel-dev.html
23documentation/kernel-dev/kernel-dev.pdf
24documentation/kernel-dev/kernel-dev.tgz
25documentation/profile-manual/profile-manual.html
26documentation/profile-manual/profile-manual.pdf
27documentation/profile-manual/profile-manual.tgz
28documentation/adt-manual/adt-manual.html
29documentation/adt-manual/adt-manual.pdf
30documentation/adt-manual/adt-manual.tgz
31documentation/dev-manual/dev-manual.html
32documentation/dev-manual/dev-manual.pdf
33documentation/dev-manual/dev-manual.tgz
34documentation/ref-manual/ref-manual.html
35documentation/ref-manual/ref-manual.pdf
36documentation/ref-manual/ref-manual.tgz
37documentation/poky-ref-manual/poky-ref-manual.html
38documentation/poky-ref-manual/poky-ref-manual.pdf
39documentation/poky-ref-manual/poky-ref-manual.tgz
40documentation/poky-ref-manual/bsp-guide.html
41documentation/poky-ref-manual/bsp-guide.pdf
42documentation/bsp-guide/bsp-guide.html
43documentation/bsp-guide/bsp-guide.pdf
44documentation/bsp-guide/bsp-guide.tgz
45documentation/yocto-project-qs/yocto-project-qs.html
46documentation/yocto-project-qs/yocto-project-qs.tgz
47documentation/kernel-manual/kernel-manual.html
48documentation/kernel-manual/kernel-manual.tgz
49documentation/kernel-manual/kernel-manual.pdf
50documentation/mega-manual/mega-manual.html
51documentation/mega-manual/mega-manual.tgz
52documentation/adt-manual/eclipse/
53documentation/bsp-guide/eclipse/
54documentation/dev-manual/eclipse/
55documentation/yocto-project-qs/eclipse/
56documentation/ref-manual/eclipse/
57documentation/kernel-dev/eclipse/
58documentation/profile-manual/eclipse/
diff --git a/diagrams/poky-buildprocess/Pokyarch_diag.jpg b/diagrams/poky-buildprocess/Pokyarch_diag.jpg
new file mode 100644
index 0000000..3112d27
--- /dev/null
+++ b/diagrams/poky-buildprocess/Pokyarch_diag.jpg
Binary files differ
diff --git a/diagrams/poky-buildprocess/Pokyarch_diag.svg b/diagrams/poky-buildprocess/Pokyarch_diag.svg
new file mode 100644
index 0000000..3f1bb12
--- /dev/null
+++ b/diagrams/poky-buildprocess/Pokyarch_diag.svg
@@ -0,0 +1,205 @@
1<?xml version="1.0" encoding="utf-8"?>
2<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
3<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
4<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
5 width="758.189px" height="424.276px" viewBox="0 0 758.189 424.276" enable-background="new 0 0 758.189 424.276"
6 xml:space="preserve">
7<g>
8 <g>
9 <polygon fill="#00B6DE" points="723.582,256.861 713.171,267.274 702.758,256.861 628.582,256.861 618.171,267.274
10 607.758,256.861 561.523,256.861 561.523,340.194 609.104,340.194 618.186,349.277 627.268,340.194 703.77,340.194
11 712.852,349.277 721.934,340.194 758.189,340.194 758.189,256.861 "/>
12 </g>
13</g>
14<g>
15 <g>
16 <polygon fill="#E6E6E6" points="718.452,272.658 712.837,278.274 707.221,272.658 676.557,272.658 676.557,333.657
17 706.983,333.657 713.055,339.729 719.128,333.657 751.557,333.657 751.557,272.658 "/>
18 </g>
19</g>
20<g>
21 <g>
22 <polygon fill="#E6E6E6" points="624.786,271.658 618.171,278.274 611.555,271.658 581.558,271.658 581.558,332.657
23 611.983,332.657 618.056,338.729 624.128,332.657 656.558,332.657 656.558,271.658 "/>
24 </g>
25</g>
26<g>
27 <g>
28 <polygon fill="#ED1849" points="722.166,349.277 712.504,358.941 702.84,349.277 670.523,349.277 670.523,424.276
29 757.523,424.276 757.523,349.277 "/>
30 </g>
31</g>
32<g>
33 <g>
34 <polygon fill="#ED1849" points="628.371,348.611 618.043,358.941 607.713,348.611 575.523,348.611 575.523,423.61 662.523,423.61
35 662.523,348.611 "/>
36 </g>
37</g>
38<g>
39 <g>
40 <polygon fill="#00B6DE" points="566.041,198.445 566.041,172.944 194.706,172.944 184.376,183.274 174.047,172.944
41 86.708,172.944 86.708,242.444 97.791,253.526 86.708,264.609 86.708,328.111 97.791,339.192 86.708,350.275 86.708,423.61
42 566.041,423.61 566.041,218.609 576.124,208.526 "/>
43 </g>
44</g>
45<g>
46 <g>
47 <polygon fill="#C1D82F" points="757.427,173.527 575.428,173.527 575.428,199.703 584.252,208.525 575.428,217.35
48 575.428,250.526 610.09,250.526 618.171,258.607 626.251,250.526 705.09,250.526 713.171,258.607 721.251,250.526
49 757.427,250.526 "/>
50 </g>
51</g>
52<g>
53 <g>
54 <polygon fill="#E6E6E6" points="324.759,244.442 318.688,238.37 318.688,211.015 324.759,204.942 318.688,198.87 318.688,190.444
55 237.688,190.444 237.688,369.226 238.043,368.871 245.113,375.942 238.043,383.014 237.688,382.659 237.688,407.444
56 318.688,407.444 318.688,398.015 324.759,391.942 318.688,385.87 318.688,352.015 324.759,345.942 318.688,339.87
57 318.688,289.015 324.759,282.942 318.688,276.87 318.688,250.515 "/>
58 </g>
59</g>
60<g>
61 <g>
62 <polygon fill="#E6E6E6" points="509.854,338.87 509.854,328.444 427.855,328.444 427.855,339.059 428.045,338.869 435.115,345.94
63 428.045,353.012 427.855,352.822 427.855,362.444 509.854,362.444 509.854,351.015 515.926,344.942 "/>
64 </g>
65</g>
66<g>
67 <g>
68 <polygon fill="#E6E6E6" points="509.854,383.87 509.854,373.444 427.855,373.444 427.855,383.059 428.045,382.869 435.115,389.94
69 428.045,397.012 427.855,396.822 427.855,407.444 509.854,407.444 509.854,396.015 515.926,389.942 "/>
70 </g>
71</g>
72<g>
73 <g>
74 <polygon fill="#E6E6E6" points="417.688,383.87 417.688,373.444 329.688,373.444 329.688,385.181 336.447,391.94 329.688,398.7
75 329.688,407.444 417.688,407.444 417.688,396.015 423.759,389.942 "/>
76 </g>
77</g>
78<g>
79 <g>
80 <polygon fill="#E6E6E6" points="417.688,339.202 417.688,328.444 329.688,328.444 329.688,338.515 336.447,345.274
81 329.688,352.034 329.688,362.444 417.688,362.444 417.688,351.347 423.759,345.274 "/>
82 </g>
83</g>
84<g>
85 <g>
86 <polygon fill="#4A4A30" points="258.611,133.944 251.543,141.013 244.474,133.944 192.111,133.944 185.043,141.013
87 177.974,133.944 125.111,133.944 118.043,141.013 110.974,133.944 86.834,133.944 86.834,166.944 178.263,166.944
88 184.834,173.514 191.403,166.944 281.833,166.944 281.833,133.944 "/>
89 </g>
90</g>
91<g>
92 <g>
93 <polygon fill="#E6E6E6" points="511.188,276.87 511.188,268.444 330.188,268.444 330.188,277.683 336.447,283.942
94 330.188,290.202 330.188,296.444 511.188,296.444 511.188,289.015 517.259,282.942 "/>
95 </g>
96</g>
97<g>
98 <g>
99 <polygon fill="#E6E6E6" points="511.188,238.37 511.188,229.944 330.188,229.944 330.188,239.016 336.447,245.276
100 330.188,251.536 330.188,257.944 511.188,257.944 511.188,250.515 517.259,244.442 "/>
101 </g>
102</g>
103<g>
104 <g>
105 <polygon fill="#E6E6E6" points="511.188,198.87 511.188,190.444 330.188,190.444 330.188,199.372 336.092,205.276 330.188,211.18
106 330.188,218.444 511.188,218.444 511.188,211.015 517.259,204.942 "/>
107 </g>
108</g>
109<g>
110 <g>
111 <polygon fill="#E6E6E6" points="225.188,369.37 225.188,342.944 190.445,342.944 184.043,349.348 177.639,342.944
112 144.188,342.944 144.188,406.944 225.188,406.944 225.188,381.515 231.259,375.442 "/>
113 </g>
114</g>
115<g>
116 <g>
117 <polygon fill="#E6E6E6" points="190.778,266.944 183.71,274.014 176.64,266.944 144.188,266.944 144.188,330.944 177.618,330.944
118 184.188,337.514 190.757,330.944 225.188,330.944 225.188,266.944 "/>
119 </g>
120</g>
121<g>
122 <g>
123 <polygon fill="#E6E6E6" points="191.445,190.944 184.376,198.014 177.306,190.944 143.688,190.944 143.688,254.944
124 177.118,254.944 183.688,261.514 190.257,254.944 224.688,254.944 224.688,190.944 "/>
125 </g>
126</g>
127<g>
128 <g>
129 <polygon fill="#4A4A30" points="87.259,254.109 81.188,248.037 81.188,221.611 0.188,221.611 0.188,285.61 81.188,285.61
130 81.188,260.181 "/>
131 </g>
132</g>
133<g>
134 <g>
135 <polygon fill="#7E8082" points="215.188,71.944 154.188,71.944 154.188,123.944 178.618,123.944 185.188,130.514 191.757,123.944
136 215.188,123.944 "/>
137 </g>
138</g>
139<rect x="126" y="147.278" fill="none" width="116.666" height="21.333"/>
140<text transform="matrix(1 0 0 1 131.4863 155.7983)" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">Moblin Source Mirror</text>
141<rect x="155.355" y="82.778" fill="none" width="58.666" height="40.667"/>
142<text transform="matrix(1 0 0 1 167.0068 91.2974)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">Moblin </tspan><tspan x="-2.28" y="14.4" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">Projects</tspan></text>
143<g>
144 <g>
145 <polygon fill="#7E8082" points="281.688,71.944 220.688,71.944 220.688,123.944 245.118,123.944 251.688,130.514 258.257,123.944
146 281.688,123.944 "/>
147 </g>
148</g>
149<rect x="221.855" y="79.778" fill="none" width="58.666" height="40.667"/>
150<text transform="matrix(1 0 0 1 226.667 88.2974)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">Upstream </tspan><tspan x="10.884" y="14.4" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">SCMs </tspan><tspan x="0.084" y="28.8" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">(optional)</tspan></text>
151<g>
152 <g>
153 <polygon fill="#7E8082" points="148.188,71.944 87.188,71.944 87.188,123.944 111.618,123.944 118.188,130.514 124.757,123.944
154 148.188,123.944 "/>
155 </g>
156</g>
157<rect x="88.355" y="82.778" fill="none" width="58.666" height="40.667"/>
158<text transform="matrix(1 0 0 1 93.167 91.2974)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">Upstream </tspan><tspan x="3.216" y="14.4" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">Releases</tspan></text>
159<rect x="155.355" y="208.778" fill="none" width="58.666" height="40.667"/>
160<text transform="matrix(1 0 0 1 167.4746 217.2974)"><tspan x="0" y="0" font-family="'MyriadPro-Regular'" font-size="12">Source </tspan><tspan x="-4.806" y="14.4" font-family="'MyriadPro-Regular'" font-size="12">Fetching</tspan></text>
161<rect x="155.355" y="286.778" fill="none" width="58.666" height="40.666"/>
162<text transform="matrix(1 0 0 1 170.6006 295.2979)"><tspan x="0" y="0" font-family="'MyriadPro-Regular'" font-size="12">Patch </tspan><tspan x="-14.826" y="14.399" font-family="'MyriadPro-Regular'" font-size="12">Application</tspan></text>
163<rect x="147.355" y="350.778" fill="none" width="74.166" height="69.237"/>
164<text transform="matrix(1 0 0 1 149.6689 359.2979)"><tspan x="0" y="0" font-family="'MyriadPro-Regular'" font-size="12">Configuration </tspan><tspan x="7.092" y="14.4" font-family="'MyriadPro-Regular'" font-size="12">/ Compile / </tspan><tspan x="-0.06" y="28.801" font-family="'MyriadPro-Regular'" font-size="12">Autoreconf as </tspan><tspan x="15.654" y="43.2" font-family="'MyriadPro-Regular'" font-size="12">needed</tspan></text>
165<rect x="241.355" y="255.778" fill="none" width="74.166" height="89.237"/>
166<text transform="matrix(1 0 0 1 260.3066 264.2983)"><tspan x="0" y="0" font-family="'MyriadPro-Regular'" font-size="12">Output </tspan><tspan x="-10.44" y="14.4" font-family="'MyriadPro-Regular'" font-size="12">Analysis for </tspan><tspan x="-2.928" y="28.8" font-family="'MyriadPro-Regular'" font-size="12">package </tspan><tspan x="-14.321" y="43.2" font-family="'MyriadPro-Regular'" font-size="12">splitting plus </tspan><tspan x="-2.928" y="57.6" font-family="'MyriadPro-Regular'" font-size="12">package </tspan><tspan x="-14.058" y="72" font-family="'MyriadPro-Regular'" font-size="12">relationships</tspan></text>
167<rect x="359.334" y="198.778" fill="none" width="116.666" height="21.333"/>
168<text transform="matrix(1 0 0 1 364.8804 207.2983)" font-family="'MyriadPro-Regular'" font-size="12">Raw .rpm Generation</text>
169<rect x="359.334" y="238.278" fill="none" width="116.666" height="21.333"/>
170<text transform="matrix(1 0 0 1 365.4565 246.7983)" font-family="'MyriadPro-Regular'" font-size="12">Raw .deb Generation</text>
171<rect x="359.334" y="276.778" fill="none" width="116.666" height="21.333"/>
172<text transform="matrix(1 0 0 1 367.6284 285.2979)" font-family="'MyriadPro-Regular'" font-size="12">Raw .ipk Generation</text>
173<rect x="336.355" y="378.778" fill="none" width="77.166" height="30.237"/>
174<text transform="matrix(1 0 0 1 338.4111 387.2979)"><tspan x="0" y="0" font-family="'MyriadPro-Regular'" font-size="12">Debian Source </tspan><tspan x="8.442" y="14.4" font-family="'MyriadPro-Regular'" font-size="12">Generation</tspan></text>
175<rect x="339.855" y="332.778" fill="none" width="71.854" height="33.664"/>
176<text transform="matrix(1 0 0 1 363.7163 341.2979)"><tspan x="0" y="0" font-family="'MyriadPro-Regular'" font-size="12">Spec </tspan><tspan x="-16.02" y="14.4" font-family="'MyriadPro-Regular'" font-size="12">Generation</tspan></text>
177<rect x="436.168" y="332.778" fill="none" width="71.854" height="33.664"/>
178<text transform="matrix(1 0 0 1 447.5664 341.2979)"><tspan x="0" y="0" font-family="'MyriadPro-Regular'" font-size="12">RPM from </tspan><tspan x="12.463" y="14.4" font-family="'MyriadPro-Regular'" font-size="12">Spec</tspan></text>
179<rect x="430.855" y="378.778" fill="none" width="77.166" height="30.237"/>
180<text transform="matrix(1 0 0 1 445.9551 387.2979)"><tspan x="0" y="0" font-family="'MyriadPro-Regular'" font-size="12">DEB from </tspan><tspan x="6.27" y="14.4" font-family="'MyriadPro-Regular'" font-size="12">Source</tspan></text>
181<rect y="240.944" fill="none" width="81.666" height="39.334"/>
182<text transform="matrix(1 0 0 1 29.6074 249.4639)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">User</tspan><tspan x="-23.543" y="14.4" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">Configuration</tspan></text>
183<g>
184 <g>
185 <polygon fill="#4A4A30" points="87.259,338.776 81.188,332.704 81.188,306.278 0.188,306.278 0.188,370.278 81.188,370.278
186 81.188,344.849 "/>
187 </g>
188</g>
189<rect y="319.112" fill="none" width="81.666" height="39.333"/>
190<text transform="matrix(1 0 0 1 23.1514 327.6318)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">Moblin </tspan><tspan x="-6.18" y="14.4" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">Metadata </tspan><tspan x="-19.607" y="28.8" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">(.bb + patches)</tspan></text>
191<rect x="610.523" y="203.112" fill="none" width="112.186" height="20.163"/>
192<text transform="matrix(1 0 0 1 629.8125 211.6318)" font-family="'MyriadPro-Regular'" font-size="12">Package Feeds</text>
193<rect x="577.669" y="377.945" fill="none" width="81.666" height="39.332"/>
194<text transform="matrix(1 0 0 1 600.4365 386.4639)" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">Images</text>
195<rect x="581.835" y="287.779" fill="none" width="71.854" height="33.664"/>
196<text transform="matrix(1 0 0 1 602.0723 296.2998)"><tspan x="0" y="0" font-family="'MyriadPro-Regular'" font-size="12">Image </tspan><tspan x="-12.396" y="14.399" font-family="'MyriadPro-Regular'" font-size="12">Generation</tspan></text>
197<rect x="676.521" y="286.779" fill="none" width="77.166" height="30.237"/>
198<text transform="matrix(1 0 0 1 704.8984 295.2998)"><tspan x="0" y="0" font-family="'MyriadPro-Regular'" font-size="12">SDK </tspan><tspan x="-17.879" y="14.399" font-family="'MyriadPro-Regular'" font-size="12">Generation</tspan></text>
199<rect x="379.001" y="158.778" fill="none" width="199.04" height="21.164"/>
200<text transform="matrix(1 0 0 1 392.8062 167.2983)" fill="#333333" font-family="'MyriadPro-Regular'" font-size="12">Poky Build and Integration System</text>
201<rect x="8.001" y="1.779" fill="none" width="512.708" height="45.164"/>
202<text transform="matrix(1 0 0 1 8.001 11.7183)" fill="#333333" font-family="'MyriadPro-Regular'" font-size="14">Generation of Moblin in a non-Moblin Environment</text>
203<rect x="673.336" y="376.611" fill="none" width="81.666" height="39.332"/>
204<text transform="matrix(1 0 0 1 685.6816 385.1299)"><tspan x="0" y="0" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">Standalone</tspan><tspan x="18.281" y="14.4" fill="#FFFFFF" font-family="'MyriadPro-Regular'" font-size="12">SDK</tspan></text>
205</svg>
diff --git a/diagrams/poky-buildprocess/Pokyarch_diag2.svg b/diagrams/poky-buildprocess/Pokyarch_diag2.svg
new file mode 100644
index 0000000..6fb5dab
--- /dev/null
+++ b/diagrams/poky-buildprocess/Pokyarch_diag2.svg
@@ -0,0 +1,1544 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Generator: Adobe Illustrator 13.0.2, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
3<svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://creativecommons.org/ns#"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
10 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11 version="1.1"
12 id="Layer_1"
13 x="0px"
14 y="0px"
15 width="758.189px"
16 height="424.276px"
17 viewBox="0 0 758.189 424.276"
18 enable-background="new 0 0 758.189 424.276"
19 xml:space="preserve"
20 sodipodi:version="0.32"
21 inkscape:version="0.46"
22 inkscape:output_extension="org.inkscape.output.svg.inkscape"
23 sodipodi:docname="Pokyarch_diag2.svg"><metadata
24 id="metadata3075"><rdf:RDF><cc:Work
25 rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
26 rdf:resource="http://purl.org/dc/dcmitype/StillImage" /></cc:Work></rdf:RDF></metadata><defs
27 id="defs3073"><inkscape:perspective
28 sodipodi:type="inkscape:persp3d"
29 inkscape:vp_x="0 : 212.138 : 1"
30 inkscape:vp_y="0 : 1000 : 0"
31 inkscape:vp_z="758.18903 : 212.138 : 1"
32 inkscape:persp3d-origin="379.09451 : 141.42533 : 1"
33 id="perspective3077" /></defs><sodipodi:namedview
34 inkscape:window-height="932"
35 inkscape:window-width="1630"
36 inkscape:pageshadow="2"
37 inkscape:pageopacity="0.0"
38 guidetolerance="10.0"
39 gridtolerance="10.0"
40 objecttolerance="10.0"
41 borderopacity="1.0"
42 bordercolor="#666666"
43 pagecolor="#ffffff"
44 id="base"
45 showgrid="false"
46 inkscape:zoom="2.0293941"
47 inkscape:cx="363.02354"
48 inkscape:cy="113.58642"
49 inkscape:window-x="0"
50 inkscape:window-y="27"
51 inkscape:current-layer="Layer_1" />
52<g
53 id="g2752"
54 transform="translate(18.7248,0.9855158)">
55 <g
56 id="g2754">
57 <polygon
58 points="723.582,256.861 713.171,267.274 702.758,256.861 628.582,256.861 618.171,267.274 607.758,256.861 561.523,256.861 561.523,340.194 609.104,340.194 618.186,349.277 627.268,340.194 703.77,340.194 712.852,349.277 721.934,340.194 758.189,340.194 758.189,256.861 723.582,256.861 "
59 id="polygon2756"
60 style="fill:#00b6de" />
61 </g>
62</g>
63<g
64 id="g2758"
65 transform="translate(18.7248,0.9855158)">
66 <g
67 id="g2760">
68 <polygon
69 points="718.452,272.658 712.837,278.274 707.221,272.658 676.557,272.658 676.557,333.657 706.983,333.657 713.055,339.729 719.128,333.657 751.557,333.657 751.557,272.658 718.452,272.658 "
70 id="polygon2762"
71 style="fill:#e6e6e6" />
72 </g>
73</g>
74<g
75 id="g2764"
76 transform="translate(18.7248,0.9855158)">
77 <g
78 id="g2766">
79 <polygon
80 points="624.786,271.658 618.171,278.274 611.555,271.658 581.558,271.658 581.558,332.657 611.983,332.657 618.056,338.729 624.128,332.657 656.558,332.657 656.558,271.658 624.786,271.658 "
81 id="polygon2768"
82 style="fill:#e6e6e6" />
83 </g>
84</g>
85<g
86 id="g2770"
87 transform="translate(18.7248,0.9855158)">
88 <g
89 id="g2772">
90 <polygon
91 points="722.166,349.277 712.504,358.941 702.84,349.277 670.523,349.277 670.523,424.276 757.523,424.276 757.523,349.277 722.166,349.277 "
92 id="polygon2774"
93 style="fill:#ed1849" />
94 </g>
95</g>
96<g
97 id="g2776"
98 transform="translate(18.7248,0.9855158)">
99 <g
100 id="g2778">
101 <polygon
102 points="628.371,348.611 618.043,358.941 607.713,348.611 575.523,348.611 575.523,423.61 662.523,423.61 662.523,348.611 628.371,348.611 "
103 id="polygon2780"
104 style="fill:#ed1849" />
105 </g>
106</g>
107<g
108 id="g2782"
109 transform="translate(18.7248,0.9855158)">
110 <g
111 id="g2784">
112 <polygon
113 points="566.041,198.445 566.041,172.944 194.706,172.944 184.376,183.274 174.047,172.944 86.708,172.944 86.708,242.444 97.791,253.526 86.708,264.609 86.708,328.111 97.791,339.192 86.708,350.275 86.708,423.61 566.041,423.61 566.041,218.609 576.124,208.526 566.041,198.445 "
114 id="polygon2786"
115 style="fill:#00b6de" />
116 </g>
117</g>
118<g
119 id="g2788"
120 transform="translate(18.7248,0.9855158)">
121 <g
122 id="g2790">
123 <polygon
124 points="757.427,173.527 575.428,173.527 575.428,199.703 584.252,208.525 575.428,217.35 575.428,250.526 610.09,250.526 618.171,258.607 626.251,250.526 705.09,250.526 713.171,258.607 721.251,250.526 757.427,250.526 757.427,173.527 "
125 id="polygon2792"
126 style="fill:#c1d82f" />
127 </g>
128</g>
129<g
130 id="g2794"
131 transform="translate(18.7248,0.9855158)">
132 <g
133 id="g2796">
134 <polygon
135 points="324.759,244.442 318.688,238.37 318.688,211.015 324.759,204.942 318.688,198.87 318.688,190.444 237.688,190.444 237.688,369.226 238.043,368.871 245.113,375.942 238.043,383.014 237.688,382.659 237.688,407.444 318.688,407.444 318.688,398.015 324.759,391.942 318.688,385.87 318.688,352.015 324.759,345.942 318.688,339.87 318.688,289.015 324.759,282.942 318.688,276.87 318.688,250.515 324.759,244.442 "
136 id="polygon2798"
137 style="fill:#e6e6e6" />
138 </g>
139</g>
140<g
141 id="g2800"
142 transform="translate(18.7248,0.9855158)">
143 <g
144 id="g2802">
145 <polygon
146 points="509.854,338.87 509.854,328.444 427.855,328.444 427.855,339.059 428.045,338.869 435.115,345.94 428.045,353.012 427.855,352.822 427.855,362.444 509.854,362.444 509.854,351.015 515.926,344.942 509.854,338.87 "
147 id="polygon2804"
148 style="fill:#e6e6e6" />
149 </g>
150</g>
151<g
152 id="g2806"
153 transform="translate(18.7248,0.9855158)">
154 <g
155 id="g2808">
156 <polygon
157 points="509.854,383.87 509.854,373.444 427.855,373.444 427.855,383.059 428.045,382.869 435.115,389.94 428.045,397.012 427.855,396.822 427.855,407.444 509.854,407.444 509.854,396.015 515.926,389.942 509.854,383.87 "
158 id="polygon2810"
159 style="fill:#e6e6e6" />
160 </g>
161</g>
162<g
163 id="g2812"
164 transform="translate(18.7248,0.9855158)">
165 <g
166 id="g2814">
167 <polygon
168 points="417.688,383.87 417.688,373.444 329.688,373.444 329.688,385.181 336.447,391.94 329.688,398.7 329.688,407.444 417.688,407.444 417.688,396.015 423.759,389.942 417.688,383.87 "
169 id="polygon2816"
170 style="fill:#e6e6e6" />
171 </g>
172</g>
173<g
174 id="g2818"
175 transform="translate(18.7248,0.9855158)">
176 <g
177 id="g2820">
178 <polygon
179 points="417.688,339.202 417.688,328.444 329.688,328.444 329.688,338.515 336.447,345.274 329.688,352.034 329.688,362.444 417.688,362.444 417.688,351.347 423.759,345.274 417.688,339.202 "
180 id="polygon2822"
181 style="fill:#e6e6e6" />
182 </g>
183</g>
184<g
185 id="g2824"
186 transform="translate(18.7248,0.9855158)">
187 <g
188 id="g2826">
189 <polygon
190 points="258.611,133.944 251.543,141.013 244.474,133.944 192.111,133.944 185.043,141.013 177.974,133.944 125.111,133.944 118.043,141.013 110.974,133.944 86.834,133.944 86.834,166.944 178.263,166.944 184.834,173.514 191.403,166.944 281.833,166.944 281.833,133.944 258.611,133.944 "
191 id="polygon2828"
192 style="fill:#4a4a30" />
193 </g>
194</g>
195<g
196 id="g2830"
197 transform="translate(18.7248,0.9855158)">
198 <g
199 id="g2832">
200 <polygon
201 points="511.188,276.87 511.188,268.444 330.188,268.444 330.188,277.683 336.447,283.942 330.188,290.202 330.188,296.444 511.188,296.444 511.188,289.015 517.259,282.942 511.188,276.87 "
202 id="polygon2834"
203 style="fill:#e6e6e6" />
204 </g>
205</g>
206<g
207 id="g2836"
208 transform="translate(18.7248,0.9855158)">
209 <g
210 id="g2838">
211 <polygon
212 points="511.188,238.37 511.188,229.944 330.188,229.944 330.188,239.016 336.447,245.276 330.188,251.536 330.188,257.944 511.188,257.944 511.188,250.515 517.259,244.442 511.188,238.37 "
213 id="polygon2840"
214 style="fill:#e6e6e6" />
215 </g>
216</g>
217<g
218 id="g2842"
219 transform="translate(18.7248,0.9855158)">
220 <g
221 id="g2844">
222 <polygon
223 points="511.188,198.87 511.188,190.444 330.188,190.444 330.188,199.372 336.092,205.276 330.188,211.18 330.188,218.444 511.188,218.444 511.188,211.015 517.259,204.942 511.188,198.87 "
224 id="polygon2846"
225 style="fill:#e6e6e6" />
226 </g>
227</g>
228<g
229 id="g2848"
230 transform="translate(18.7248,0.9855158)">
231 <g
232 id="g2850">
233 <polygon
234 points="225.188,369.37 225.188,342.944 190.445,342.944 184.043,349.348 177.639,342.944 144.188,342.944 144.188,406.944 225.188,406.944 225.188,381.515 231.259,375.442 225.188,369.37 "
235 id="polygon2852"
236 style="fill:#e6e6e6" />
237 </g>
238</g>
239<g
240 id="g2854"
241 transform="translate(18.7248,0.9855158)">
242 <g
243 id="g2856">
244 <polygon
245 points="190.778,266.944 183.71,274.014 176.64,266.944 144.188,266.944 144.188,330.944 177.618,330.944 184.188,337.514 190.757,330.944 225.188,330.944 225.188,266.944 190.778,266.944 "
246 id="polygon2858"
247 style="fill:#e6e6e6" />
248 </g>
249</g>
250<g
251 id="g2860"
252 transform="translate(18.7248,0.9855158)">
253 <g
254 id="g2862">
255 <polygon
256 points="191.445,190.944 184.376,198.014 177.306,190.944 143.688,190.944 143.688,254.944 177.118,254.944 183.688,261.514 190.257,254.944 224.688,254.944 224.688,190.944 191.445,190.944 "
257 id="polygon2864"
258 style="fill:#e6e6e6" />
259 </g>
260</g>
261<g
262 id="g2866"
263 transform="translate(18.7248,0.9855158)">
264 <g
265 id="g2868">
266 <polygon
267 points="87.259,254.109 81.188,248.037 81.188,221.611 0.188,221.611 0.188,285.61 81.188,285.61 81.188,260.181 87.259,254.109 "
268 id="polygon2870"
269 style="fill:#4a4a30" />
270 </g>
271</g>
272<g
273 id="g2872"
274 transform="translate(18.7248,0.9855158)">
275 <g
276 id="g2874">
277 <polygon
278 points="215.188,71.944 154.188,71.944 154.188,123.944 178.618,123.944 185.188,130.514 191.757,123.944 215.188,123.944 215.188,71.944 "
279 id="polygon2876"
280 style="fill:#7e8082" />
281 </g>
282</g>
283<rect
284 x="144.72481"
285 y="148.26352"
286 width="116.666"
287 height="21.333"
288 id="rect2878"
289 style="fill:none" />
290<text
291 font-size="12"
292 id="text2880"
293 x="139.37044"
294 y="156.78381"
295 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">Moblin Source Mirror</text>
296
297
298<rect
299 x="174.0798"
300 y="83.763519"
301 width="58.666"
302 height="40.667"
303 id="rect2882"
304 style="fill:none" />
305<text
306 id="text2884"
307 x="181.80087"
308 y="95.464226"><tspan
309 x="181.80087"
310 y="95.464226"
311 font-size="12"
312 id="tspan2886"
313 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">Moblin </tspan><tspan
314 x="179.52087"
315 y="109.86423"
316 font-size="12"
317 id="tspan2888"
318 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">Projects</tspan></text>
319
320
321<g
322 id="g2890"
323 transform="translate(18.7248,0.9855158)">
324 <g
325 id="g2892">
326 <polygon
327 points="281.688,71.944 220.688,71.944 220.688,123.944 245.118,123.944 251.688,130.514 258.257,123.944 281.688,123.944 281.688,71.944 "
328 id="polygon2894"
329 style="fill:#7e8082" />
330 </g>
331</g>
332<rect
333 x="240.5798"
334 y="80.763519"
335 width="58.666"
336 height="40.667"
337 id="rect2896"
338 style="fill:none" />
339<text
340 id="text2898"
341 x="240.46423"
342 y="89.775673"><tspan
343 x="240.46423"
344 y="89.775673"
345 font-size="12"
346 id="tspan2900"
347 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">Upstream </tspan><tspan
348 x="251.34822"
349 y="104.17568"
350 font-size="12"
351 id="tspan2902"
352 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">SCMs </tspan><tspan
353 x="240.54823"
354 y="118.57568"
355 font-size="12"
356 id="tspan2904"
357 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">(optional)</tspan></text>
358
359
360<g
361 id="g2906"
362 transform="translate(18.7248,0.9855158)">
363 <g
364 id="g2908">
365 <polygon
366 points="148.188,71.944 87.188,71.944 87.188,123.944 111.618,123.944 118.188,130.514 124.757,123.944 148.188,123.944 148.188,71.944 "
367 id="polygon2910"
368 style="fill:#7e8082" />
369 </g>
370</g>
371<rect
372 x="107.0798"
373 y="83.763519"
374 width="58.666"
375 height="40.667"
376 id="rect2912"
377 style="fill:none" />
378<text
379 id="text2914"
380 x="107.45698"
381 y="94.746704"><tspan
382 x="107.45698"
383 y="94.746704"
384 font-size="12"
385 id="tspan2916"
386 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">Upstream </tspan><tspan
387 x="110.67298"
388 y="109.14671"
389 font-size="12"
390 id="tspan2918"
391 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">Releases</tspan></text>
392
393
394<rect
395 x="174.0798"
396 y="209.76352"
397 width="58.666"
398 height="40.667"
399 id="rect2920"
400 style="fill:none" />
401<text
402 id="text2922"
403 x="183.73561"
404 y="220.7467"><tspan
405 x="183.73561"
406 y="220.7467"
407 font-size="12"
408 id="tspan2924"
409 style="font-size:12px;font-family:MyriadPro-Regular">Source </tspan><tspan
410 x="178.92961"
411 y="235.14671"
412 font-size="12"
413 id="tspan2926"
414 style="font-size:12px;font-family:MyriadPro-Regular">Fetching</tspan></text>
415
416
417<rect
418 x="174.0798"
419 y="287.76352"
420 width="58.666"
421 height="40.666"
422 id="rect2928"
423 style="fill:none" />
424<text
425 id="text2930"
426 x="189.32541"
427 y="296.28342"><tspan
428 x="189.32541"
429 y="296.28342"
430 font-size="12"
431 id="tspan2932"
432 style="font-size:12px;font-family:MyriadPro-Regular">Patch </tspan><tspan
433 x="174.4994"
434 y="310.6824"
435 font-size="12"
436 id="tspan2934"
437 style="font-size:12px;font-family:MyriadPro-Regular">Application</tspan></text>
438
439
440<rect
441 x="166.0798"
442 y="351.76352"
443 width="74.166"
444 height="69.237"
445 id="rect2936"
446 style="fill:none" />
447<text
448 id="text2938"
449 x="168.39371"
450 y="360.28342"><tspan
451 x="168.39371"
452 y="360.28342"
453 font-size="12"
454 id="tspan2940"
455 style="font-size:12px;font-family:MyriadPro-Regular">Configuration </tspan><tspan
456 x="175.4857"
457 y="374.68341"
458 font-size="12"
459 id="tspan2942"
460 style="font-size:12px;font-family:MyriadPro-Regular">/ Compile / </tspan><tspan
461 x="168.33371"
462 y="389.08441"
463 font-size="12"
464 id="tspan2944"
465 style="font-size:12px;font-family:MyriadPro-Regular">Autoreconf as </tspan><tspan
466 x="184.04771"
467 y="403.48343"
468 font-size="12"
469 id="tspan2946"
470 style="font-size:12px;font-family:MyriadPro-Regular">needed</tspan></text>
471
472
473<rect
474 x="260.0798"
475 y="256.76352"
476 width="74.166"
477 height="89.237"
478 id="rect2948"
479 style="fill:none" />
480<text
481 id="text2950"
482 x="279.0314"
483 y="265.28381"><tspan
484 x="279.0314"
485 y="265.28381"
486 font-size="12"
487 id="tspan2952"
488 style="font-size:12px;font-family:MyriadPro-Regular">Output </tspan><tspan
489 x="268.5914"
490 y="279.68381"
491 font-size="12"
492 id="tspan2954"
493 style="font-size:12px;font-family:MyriadPro-Regular">Analysis for </tspan><tspan
494 x="276.10339"
495 y="294.0838"
496 font-size="12"
497 id="tspan2956"
498 style="font-size:12px;font-family:MyriadPro-Regular">package </tspan><tspan
499 x="264.71039"
500 y="308.48383"
501 font-size="12"
502 id="tspan2958"
503 style="font-size:12px;font-family:MyriadPro-Regular">splitting plus </tspan><tspan
504 x="276.10339"
505 y="322.88382"
506 font-size="12"
507 id="tspan2960"
508 style="font-size:12px;font-family:MyriadPro-Regular">package </tspan><tspan
509 x="264.97339"
510 y="337.28381"
511 font-size="12"
512 id="tspan2962"
513 style="font-size:12px;font-family:MyriadPro-Regular">relationships</tspan></text>
514
515
516<rect
517 x="378.05881"
518 y="199.76352"
519 width="116.666"
520 height="21.333"
521 id="rect2964"
522 style="fill:none" />
523<text
524 font-size="12"
525 id="text2966"
526 x="383.60519"
527 y="208.28381"
528 style="font-size:12px;font-family:MyriadPro-Regular">Raw .rpm Generation</text>
529
530
531<rect
532 x="378.05881"
533 y="239.26352"
534 width="116.666"
535 height="21.333"
536 id="rect2968"
537 style="fill:none" />
538<text
539 font-size="12"
540 id="text2970"
541 x="384.1813"
542 y="247.78381"
543 style="font-size:12px;font-family:MyriadPro-Regular">Raw .deb Generation</text>
544
545
546<rect
547 x="378.05881"
548 y="277.76352"
549 width="116.666"
550 height="21.333"
551 id="rect2972"
552 style="fill:none" />
553<text
554 font-size="12"
555 id="text2974"
556 x="386.35318"
557 y="286.28342"
558 style="font-size:12px;font-family:MyriadPro-Regular">Raw .ipk Generation</text>
559
560
561<rect
562 x="355.0798"
563 y="379.76352"
564 width="77.166"
565 height="30.237"
566 id="rect2976"
567 style="fill:none" />
568<text
569 id="text2978"
570 x="357.13589"
571 y="388.28342"><tspan
572 x="357.13589"
573 y="388.28342"
574 font-size="12"
575 id="tspan2980"
576 style="font-size:12px;font-family:MyriadPro-Regular">Debian Source </tspan><tspan
577 x="365.57788"
578 y="402.68341"
579 font-size="12"
580 id="tspan2982"
581 style="font-size:12px;font-family:MyriadPro-Regular">Generation</tspan></text>
582
583
584<rect
585 x="358.5798"
586 y="333.76352"
587 width="71.853996"
588 height="33.664001"
589 id="rect2984"
590 style="fill:none" />
591<text
592 id="text2986"
593 x="382.4411"
594 y="342.28342"><tspan
595 x="382.4411"
596 y="342.28342"
597 font-size="12"
598 id="tspan2988"
599 style="font-size:12px;font-family:MyriadPro-Regular">Spec </tspan><tspan
600 x="366.42108"
601 y="356.68341"
602 font-size="12"
603 id="tspan2990"
604 style="font-size:12px;font-family:MyriadPro-Regular">Generation</tspan></text>
605
606
607<rect
608 x="454.89279"
609 y="333.76352"
610 width="71.853996"
611 height="33.664001"
612 id="rect2992"
613 style="fill:none" />
614<text
615 id="text2994"
616 x="466.2912"
617 y="342.28342"><tspan
618 x="466.2912"
619 y="342.28342"
620 font-size="12"
621 id="tspan2996"
622 style="font-size:12px;font-family:MyriadPro-Regular">RPM from </tspan><tspan
623 x="478.75418"
624 y="356.68341"
625 font-size="12"
626 id="tspan2998"
627 style="font-size:12px;font-family:MyriadPro-Regular">Spec</tspan></text>
628
629
630<rect
631 x="449.5798"
632 y="379.76352"
633 width="77.166"
634 height="30.237"
635 id="rect3000"
636 style="fill:none" />
637<text
638 id="text3002"
639 x="464.6799"
640 y="388.28342"><tspan
641 x="464.6799"
642 y="388.28342"
643 font-size="12"
644 id="tspan3004"
645 style="font-size:12px;font-family:MyriadPro-Regular">DEB from </tspan><tspan
646 x="470.94989"
647 y="402.68341"
648 font-size="12"
649 id="tspan3006"
650 style="font-size:12px;font-family:MyriadPro-Regular">Source</tspan></text>
651
652
653<rect
654 y="241.92952"
655 width="81.666"
656 height="39.334"
657 id="rect3008"
658 x="18.7248"
659 style="fill:none" />
660<text
661 id="text3010"
662 x="41.92635"
663 y="249.95667"><tspan
664 x="41.92635"
665 y="249.95667"
666 font-size="12"
667 id="tspan3012"
668 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">User</tspan><tspan
669 x="18.383348"
670 y="264.35666"
671 font-size="12"
672 id="tspan3014"
673 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">Configuration</tspan></text>
674
675
676<g
677 id="g3016"
678 transform="translate(18.7248,0.9855158)">
679 <g
680 id="g3018">
681 <polygon
682 points="87.259,338.776 81.188,332.704 81.188,306.278 0.188,306.278 0.188,370.278 81.188,370.278 81.188,344.849 87.259,338.776 "
683 id="polygon3020"
684 style="fill:#4a4a30" />
685 </g>
686</g>
687<rect
688 y="320.0975"
689 width="81.666"
690 height="39.333"
691 id="rect3022"
692 x="18.7248"
693 style="fill:none" />
694
695
696<rect
697 x="629.2478"
698 y="204.09752"
699 width="112.186"
700 height="20.163"
701 id="rect3032"
702 style="fill:none" />
703<text
704 font-size="12"
705 id="text3034"
706 x="648.53729"
707 y="212.61731"
708 style="font-size:12px;font-family:MyriadPro-Regular">Package Feeds</text>
709
710
711<rect
712 x="596.3938"
713 y="378.93051"
714 width="81.666"
715 height="39.332001"
716 id="rect3036"
717 style="fill:none" />
718<text
719 font-size="12"
720 id="text3038"
721 x="619.16132"
722 y="387.4494"
723 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">Images</text>
724
725
726<rect
727 x="600.55981"
728 y="288.7645"
729 width="71.853996"
730 height="33.664001"
731 id="rect3040"
732 style="fill:none" />
733<text
734 id="text3042"
735 x="620.79712"
736 y="297.28531"><tspan
737 x="620.79712"
738 y="297.28531"
739 font-size="12"
740 id="tspan3044"
741 style="font-size:12px;font-family:MyriadPro-Regular">Image </tspan><tspan
742 x="608.40112"
743 y="311.68433"
744 font-size="12"
745 id="tspan3046"
746 style="font-size:12px;font-family:MyriadPro-Regular">Generation</tspan></text>
747
748
749<rect
750 x="695.24579"
751 y="287.7645"
752 width="77.166"
753 height="30.237"
754 id="rect3048"
755 style="fill:none" />
756<text
757 id="text3050"
758 x="723.62323"
759 y="296.28531"><tspan
760 x="723.62323"
761 y="296.28531"
762 font-size="12"
763 id="tspan3052"
764 style="font-size:12px;font-family:MyriadPro-Regular">SDK </tspan><tspan
765 x="705.7442"
766 y="310.68433"
767 font-size="12"
768 id="tspan3054"
769 style="font-size:12px;font-family:MyriadPro-Regular">Generation</tspan></text>
770
771
772<rect
773 x="397.7258"
774 y="159.76352"
775 width="199.03999"
776 height="21.164"
777 id="rect3056"
778 style="fill:none" />
779<text
780 font-size="12"
781 id="text3058"
782 x="411.53101"
783 y="168.28381"
784 style="font-size:12px;fill:#333333;font-family:MyriadPro-Regular">Poky Build and Integration System</text>
785
786
787<rect
788 x="26.7258"
789 y="2.7645159"
790 width="512.70801"
791 height="45.164001"
792 id="rect3060"
793 style="fill:none" />
794<text
795 font-size="14"
796 id="text3062"
797 x="26.7258"
798 y="12.703815"
799 style="font-size:14px;fill:#333333;font-family:MyriadPro-Regular">Generation of Moblin in a non-Moblin Environment</text>
800
801
802<rect
803 x="692.06079"
804 y="377.5965"
805 width="81.666"
806 height="39.332001"
807 id="rect3064"
808 style="fill:none" />
809<text
810 id="text3066"
811 x="704.40643"
812 y="386.11542"><tspan
813 x="704.40643"
814 y="386.11542"
815 font-size="12"
816 id="tspan3068"
817 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">Standalone</tspan><tspan
818 x="722.68744"
819 y="400.51541"
820 font-size="12"
821 id="tspan3070"
822 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular">SDK</tspan></text>
823
824
825<g
826 transform="translate(18.7248,0.9855158)"
827 id="g3087">
828 <g
829 id="g3089">
830 <polygon
831 style="fill:#00b6de"
832 id="polygon3091"
833 points="723.582,256.861 713.171,267.274 702.758,256.861 628.582,256.861 618.171,267.274 607.758,256.861 561.523,256.861 561.523,340.194 609.104,340.194 618.186,349.277 627.268,340.194 703.77,340.194 712.852,349.277 721.934,340.194 758.189,340.194 758.189,256.861 723.582,256.861 " />
834 </g>
835</g><g
836 transform="translate(18.7248,0.9855158)"
837 id="g3093">
838 <g
839 id="g3095">
840 <polygon
841 style="fill:#e6e6e6"
842 id="polygon3097"
843 points="718.452,272.658 712.837,278.274 707.221,272.658 676.557,272.658 676.557,333.657 706.983,333.657 713.055,339.729 719.128,333.657 751.557,333.657 751.557,272.658 718.452,272.658 " />
844 </g>
845</g><g
846 transform="translate(18.7248,0.9855158)"
847 id="g3099">
848 <g
849 id="g3101">
850 <polygon
851 style="fill:#e6e6e6"
852 id="polygon3103"
853 points="624.786,271.658 618.171,278.274 611.555,271.658 581.558,271.658 581.558,332.657 611.983,332.657 618.056,338.729 624.128,332.657 656.558,332.657 656.558,271.658 624.786,271.658 " />
854 </g>
855</g><g
856 transform="translate(18.7248,0.9855158)"
857 id="g3105">
858 <g
859 id="g3107">
860 <polygon
861 style="fill:#ed1849"
862 id="polygon3109"
863 points="722.166,349.277 712.504,358.941 702.84,349.277 670.523,349.277 670.523,424.276 757.523,424.276 757.523,349.277 722.166,349.277 " />
864 </g>
865</g><g
866 transform="translate(18.7248,0.9855158)"
867 id="g3111">
868 <g
869 id="g3113">
870 <polygon
871 style="fill:#ed1849"
872 id="polygon3115"
873 points="628.371,348.611 618.043,358.941 607.713,348.611 575.523,348.611 575.523,423.61 662.523,423.61 662.523,348.611 628.371,348.611 " />
874 </g>
875</g><g
876 transform="translate(18.7248,0.9855158)"
877 id="g3117">
878 <g
879 id="g3119">
880 <polygon
881 style="fill:#00b6de"
882 id="polygon3121"
883 points="566.041,198.445 566.041,172.944 194.706,172.944 184.376,183.274 174.047,172.944 86.708,172.944 86.708,242.444 97.791,253.526 86.708,264.609 86.708,328.111 97.791,339.192 86.708,350.275 86.708,423.61 566.041,423.61 566.041,218.609 576.124,208.526 566.041,198.445 " />
884 </g>
885</g><g
886 transform="translate(18.7248,0.9855158)"
887 id="g3123">
888 <g
889 id="g3125">
890 <polygon
891 style="fill:#c1d82f"
892 id="polygon3127"
893 points="757.427,173.527 575.428,173.527 575.428,199.703 584.252,208.525 575.428,217.35 575.428,250.526 610.09,250.526 618.171,258.607 626.251,250.526 705.09,250.526 713.171,258.607 721.251,250.526 757.427,250.526 757.427,173.527 " />
894 </g>
895</g><g
896 transform="translate(18.7248,0.9855158)"
897 id="g3129">
898 <g
899 id="g3131">
900 <polygon
901 style="fill:#e6e6e6"
902 id="polygon3133"
903 points="324.759,244.442 318.688,238.37 318.688,211.015 324.759,204.942 318.688,198.87 318.688,190.444 237.688,190.444 237.688,369.226 238.043,368.871 245.113,375.942 238.043,383.014 237.688,382.659 237.688,407.444 318.688,407.444 318.688,398.015 324.759,391.942 318.688,385.87 318.688,352.015 324.759,345.942 318.688,339.87 318.688,289.015 324.759,282.942 318.688,276.87 318.688,250.515 324.759,244.442 " />
904 </g>
905</g><g
906 transform="translate(18.7248,0.9855158)"
907 id="g3135">
908 <g
909 id="g3137">
910 <polygon
911 style="fill:#e6e6e6"
912 id="polygon3139"
913 points="509.854,338.87 509.854,328.444 427.855,328.444 427.855,339.059 428.045,338.869 435.115,345.94 428.045,353.012 427.855,352.822 427.855,362.444 509.854,362.444 509.854,351.015 515.926,344.942 509.854,338.87 " />
914 </g>
915</g><g
916 transform="translate(18.7248,0.9855158)"
917 id="g3141">
918 <g
919 id="g3143">
920 <polygon
921 style="fill:#e6e6e6"
922 id="polygon3145"
923 points="509.854,383.87 509.854,373.444 427.855,373.444 427.855,383.059 428.045,382.869 435.115,389.94 428.045,397.012 427.855,396.822 427.855,407.444 509.854,407.444 509.854,396.015 515.926,389.942 509.854,383.87 " />
924 </g>
925</g><g
926 transform="translate(18.7248,0.9855158)"
927 id="g3147">
928 <g
929 id="g3149">
930 <polygon
931 style="fill:#e6e6e6"
932 id="polygon3151"
933 points="417.688,383.87 417.688,373.444 329.688,373.444 329.688,385.181 336.447,391.94 329.688,398.7 329.688,407.444 417.688,407.444 417.688,396.015 423.759,389.942 417.688,383.87 " />
934 </g>
935</g><g
936 transform="translate(18.7248,0.9855158)"
937 id="g3153">
938 <g
939 id="g3155">
940 <polygon
941 style="fill:#e6e6e6"
942 id="polygon3157"
943 points="417.688,339.202 417.688,328.444 329.688,328.444 329.688,338.515 336.447,345.274 329.688,352.034 329.688,362.444 417.688,362.444 417.688,351.347 423.759,345.274 417.688,339.202 " />
944 </g>
945</g><g
946 transform="translate(18.7248,0.9855158)"
947 id="g3159">
948 <g
949 id="g3161">
950 <polygon
951 style="fill:#4a4a30"
952 id="polygon3163"
953 points="258.611,133.944 251.543,141.013 244.474,133.944 192.111,133.944 185.043,141.013 177.974,133.944 125.111,133.944 118.043,141.013 110.974,133.944 86.834,133.944 86.834,166.944 178.263,166.944 184.834,173.514 191.403,166.944 281.833,166.944 281.833,133.944 258.611,133.944 " />
954 </g>
955</g><g
956 transform="translate(18.7248,0.9855158)"
957 id="g3165">
958 <g
959 id="g3167">
960 <polygon
961 style="fill:#e6e6e6"
962 id="polygon3169"
963 points="511.188,276.87 511.188,268.444 330.188,268.444 330.188,277.683 336.447,283.942 330.188,290.202 330.188,296.444 511.188,296.444 511.188,289.015 517.259,282.942 511.188,276.87 " />
964 </g>
965</g><g
966 transform="translate(18.7248,0.9855158)"
967 id="g3171">
968 <g
969 id="g3173">
970 <polygon
971 style="fill:#e6e6e6"
972 id="polygon3175"
973 points="511.188,238.37 511.188,229.944 330.188,229.944 330.188,239.016 336.447,245.276 330.188,251.536 330.188,257.944 511.188,257.944 511.188,250.515 517.259,244.442 511.188,238.37 " />
974 </g>
975</g><g
976 transform="translate(18.7248,0.9855158)"
977 id="g3177">
978 <g
979 id="g3179">
980 <polygon
981 style="fill:#e6e6e6"
982 id="polygon3181"
983 points="511.188,198.87 511.188,190.444 330.188,190.444 330.188,199.372 336.092,205.276 330.188,211.18 330.188,218.444 511.188,218.444 511.188,211.015 517.259,204.942 511.188,198.87 " />
984 </g>
985</g><g
986 transform="translate(18.7248,0.9855158)"
987 id="g3183">
988 <g
989 id="g3185">
990 <polygon
991 style="fill:#e6e6e6"
992 id="polygon3187"
993 points="225.188,369.37 225.188,342.944 190.445,342.944 184.043,349.348 177.639,342.944 144.188,342.944 144.188,406.944 225.188,406.944 225.188,381.515 231.259,375.442 225.188,369.37 " />
994 </g>
995</g><g
996 transform="translate(18.7248,0.9855158)"
997 id="g3189">
998 <g
999 id="g3191">
1000 <polygon
1001 style="fill:#e6e6e6"
1002 id="polygon3193"
1003 points="190.778,266.944 183.71,274.014 176.64,266.944 144.188,266.944 144.188,330.944 177.618,330.944 184.188,337.514 190.757,330.944 225.188,330.944 225.188,266.944 190.778,266.944 " />
1004 </g>
1005</g><g
1006 transform="translate(18.7248,0.9855158)"
1007 id="g3195">
1008 <g
1009 id="g3197">
1010 <polygon
1011 style="fill:#e6e6e6"
1012 id="polygon3199"
1013 points="191.445,190.944 184.376,198.014 177.306,190.944 143.688,190.944 143.688,254.944 177.118,254.944 183.688,261.514 190.257,254.944 224.688,254.944 224.688,190.944 191.445,190.944 " />
1014 </g>
1015</g><g
1016 transform="matrix(1.1980743,0,0,1,1.4410357,0.9855158)"
1017 id="g3201">
1018 <g
1019 id="g3203">
1020 <polygon
1021 style="fill:#4a4a30"
1022 id="polygon3205"
1023 points="87.259,254.109 81.188,248.037 81.188,221.611 0.188,221.611 0.188,285.61 81.188,285.61 81.188,260.181 87.259,254.109 " />
1024 </g>
1025</g><g
1026 transform="translate(18.7248,0.9855158)"
1027 id="g3207">
1028 <g
1029 id="g3209">
1030 <polygon
1031 style="fill:#7e8082"
1032 id="polygon3211"
1033 points="215.188,71.944 154.188,71.944 154.188,123.944 178.618,123.944 185.188,130.514 191.757,123.944 215.188,123.944 215.188,71.944 " />
1034 </g>
1035</g><rect
1036 style="fill:none"
1037 id="rect3213"
1038 height="21.333"
1039 width="116.666"
1040 y="148.26352"
1041 x="144.72481" /><text
1042 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1043 y="156.78381"
1044 x="139.37044"
1045 id="text3215"
1046 font-size="12">Moblin Source Mirror</text>
1047
1048<rect
1049 style="fill:none"
1050 id="rect3217"
1051 height="40.667"
1052 width="58.666"
1053 y="83.763519"
1054 x="174.0798" /><text
1055 y="95.464226"
1056 x="181.80087"
1057 id="text3219"><tspan
1058 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1059 id="tspan3221"
1060 font-size="12"
1061 y="95.464226"
1062 x="181.80087">Moblin </tspan><tspan
1063 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1064 id="tspan3223"
1065 font-size="12"
1066 y="109.86423"
1067 x="179.52087">Projects</tspan></text>
1068
1069<g
1070 transform="translate(18.7248,0.9855158)"
1071 id="g3225">
1072 <g
1073 id="g3227">
1074 <polygon
1075 style="fill:#7e8082"
1076 id="polygon3229"
1077 points="281.688,71.944 220.688,71.944 220.688,123.944 245.118,123.944 251.688,130.514 258.257,123.944 281.688,123.944 281.688,71.944 " />
1078 </g>
1079</g><rect
1080 style="fill:none"
1081 id="rect3231"
1082 height="40.667"
1083 width="58.666"
1084 y="80.763519"
1085 x="240.5798" /><text
1086 y="89.775673"
1087 x="240.46423"
1088 id="text3233"><tspan
1089 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1090 id="tspan3235"
1091 font-size="12"
1092 y="89.775673"
1093 x="240.46423">Upstream </tspan><tspan
1094 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1095 id="tspan3237"
1096 font-size="12"
1097 y="104.17568"
1098 x="251.34822">SCMs </tspan><tspan
1099 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1100 id="tspan3239"
1101 font-size="12"
1102 y="118.57568"
1103 x="240.54823">(optional)</tspan></text>
1104
1105<g
1106 transform="translate(18.7248,0.9855158)"
1107 id="g3241">
1108 <g
1109 id="g3243">
1110 <polygon
1111 style="fill:#7e8082"
1112 id="polygon3245"
1113 points="148.188,71.944 87.188,71.944 87.188,123.944 111.618,123.944 118.188,130.514 124.757,123.944 148.188,123.944 148.188,71.944 " />
1114 </g>
1115</g><rect
1116 style="fill:none"
1117 id="rect3247"
1118 height="40.667"
1119 width="58.666"
1120 y="83.763519"
1121 x="107.0798" /><text
1122 y="94.746704"
1123 x="107.45698"
1124 id="text3249"><tspan
1125 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1126 id="tspan3251"
1127 font-size="12"
1128 y="94.746704"
1129 x="107.45698">Upstream </tspan><tspan
1130 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1131 id="tspan3253"
1132 font-size="12"
1133 y="109.14671"
1134 x="110.67298">Releases</tspan></text>
1135
1136<rect
1137 style="fill:none"
1138 id="rect3255"
1139 height="40.667"
1140 width="58.666"
1141 y="209.76352"
1142 x="174.0798" /><text
1143 y="220.7467"
1144 x="183.73561"
1145 id="text3257"><tspan
1146 style="font-size:12px;font-family:MyriadPro-Regular"
1147 id="tspan3259"
1148 font-size="12"
1149 y="220.7467"
1150 x="183.73561">Source </tspan><tspan
1151 style="font-size:12px;font-family:MyriadPro-Regular"
1152 id="tspan3261"
1153 font-size="12"
1154 y="235.14671"
1155 x="178.92961">Fetching</tspan></text>
1156
1157<rect
1158 style="fill:none"
1159 id="rect3263"
1160 height="40.666"
1161 width="58.666"
1162 y="287.76352"
1163 x="174.0798" /><text
1164 y="296.28342"
1165 x="189.32541"
1166 id="text3265"><tspan
1167 style="font-size:12px;font-family:MyriadPro-Regular"
1168 id="tspan3267"
1169 font-size="12"
1170 y="296.28342"
1171 x="189.32541">Patch </tspan><tspan
1172 style="font-size:12px;font-family:MyriadPro-Regular"
1173 id="tspan3269"
1174 font-size="12"
1175 y="310.6824"
1176 x="174.4994">Application</tspan></text>
1177
1178<rect
1179 style="fill:none"
1180 id="rect3271"
1181 height="69.237"
1182 width="74.166"
1183 y="351.76352"
1184 x="166.0798" /><text
1185 y="360.28342"
1186 x="168.39371"
1187 id="text3273"><tspan
1188 style="font-size:12px;font-family:MyriadPro-Regular"
1189 id="tspan3275"
1190 font-size="12"
1191 y="360.28342"
1192 x="168.39371">Configuration </tspan><tspan
1193 style="font-size:12px;font-family:MyriadPro-Regular"
1194 id="tspan3277"
1195 font-size="12"
1196 y="374.68341"
1197 x="175.4857">/ Compile / </tspan><tspan
1198 style="font-size:12px;font-family:MyriadPro-Regular"
1199 id="tspan3279"
1200 font-size="12"
1201 y="389.08441"
1202 x="168.33371">Autoreconf as </tspan><tspan
1203 style="font-size:12px;font-family:MyriadPro-Regular"
1204 id="tspan3281"
1205 font-size="12"
1206 y="403.48343"
1207 x="184.04771">needed</tspan></text>
1208
1209<rect
1210 style="fill:none"
1211 id="rect3283"
1212 height="89.237"
1213 width="74.166"
1214 y="256.76352"
1215 x="260.0798" /><text
1216 y="265.28381"
1217 x="279.0314"
1218 id="text3285"><tspan
1219 style="font-size:12px;font-family:MyriadPro-Regular"
1220 id="tspan3287"
1221 font-size="12"
1222 y="265.28381"
1223 x="279.0314">Output </tspan><tspan
1224 style="font-size:12px;font-family:MyriadPro-Regular"
1225 id="tspan3289"
1226 font-size="12"
1227 y="279.68381"
1228 x="268.5914">Analysis for </tspan><tspan
1229 style="font-size:12px;font-family:MyriadPro-Regular"
1230 id="tspan3291"
1231 font-size="12"
1232 y="294.0838"
1233 x="276.10339">package </tspan><tspan
1234 style="font-size:12px;font-family:MyriadPro-Regular"
1235 id="tspan3293"
1236 font-size="12"
1237 y="308.48383"
1238 x="264.71039">splitting plus </tspan><tspan
1239 style="font-size:12px;font-family:MyriadPro-Regular"
1240 id="tspan3295"
1241 font-size="12"
1242 y="322.88382"
1243 x="276.10339">package </tspan><tspan
1244 style="font-size:12px;font-family:MyriadPro-Regular"
1245 id="tspan3297"
1246 font-size="12"
1247 y="337.28381"
1248 x="264.97339">relationships</tspan></text>
1249
1250<rect
1251 style="fill:none"
1252 id="rect3299"
1253 height="21.333"
1254 width="116.666"
1255 y="199.76352"
1256 x="378.05881" /><text
1257 style="font-size:12px;font-family:MyriadPro-Regular"
1258 y="208.28381"
1259 x="383.60519"
1260 id="text3301"
1261 font-size="12">Raw .rpm Generation</text>
1262
1263<rect
1264 style="fill:none"
1265 id="rect3303"
1266 height="21.333"
1267 width="116.666"
1268 y="239.26352"
1269 x="378.05881" /><text
1270 style="font-size:12px;font-family:MyriadPro-Regular"
1271 y="247.78381"
1272 x="384.1813"
1273 id="text3305"
1274 font-size="12">Raw .deb Generation</text>
1275
1276<rect
1277 style="fill:none"
1278 id="rect3307"
1279 height="21.333"
1280 width="116.666"
1281 y="277.76352"
1282 x="378.05881" /><text
1283 style="font-size:12px;font-family:MyriadPro-Regular"
1284 y="286.28342"
1285 x="386.35318"
1286 id="text3309"
1287 font-size="12">Raw .ipk Generation</text>
1288
1289<rect
1290 style="fill:none"
1291 id="rect3311"
1292 height="30.237"
1293 width="77.166"
1294 y="379.76352"
1295 x="355.0798" /><text
1296 y="388.28342"
1297 x="357.13589"
1298 id="text3313"><tspan
1299 style="font-size:12px;font-family:MyriadPro-Regular"
1300 id="tspan3315"
1301 font-size="12"
1302 y="388.28342"
1303 x="357.13589">Debian Source </tspan><tspan
1304 style="font-size:12px;font-family:MyriadPro-Regular"
1305 id="tspan3317"
1306 font-size="12"
1307 y="402.68341"
1308 x="365.57788">Generation</tspan></text>
1309
1310<rect
1311 style="fill:none"
1312 id="rect3319"
1313 height="33.664001"
1314 width="71.853996"
1315 y="333.76352"
1316 x="358.5798" /><text
1317 y="342.28342"
1318 x="382.4411"
1319 id="text3321"><tspan
1320 style="font-size:12px;font-family:MyriadPro-Regular"
1321 id="tspan3323"
1322 font-size="12"
1323 y="342.28342"
1324 x="382.4411">Spec </tspan><tspan
1325 style="font-size:12px;font-family:MyriadPro-Regular"
1326 id="tspan3325"
1327 font-size="12"
1328 y="356.68341"
1329 x="366.42108">Generation</tspan></text>
1330
1331<rect
1332 style="fill:none"
1333 id="rect3327"
1334 height="33.664001"
1335 width="71.853996"
1336 y="333.76352"
1337 x="454.89279" /><text
1338 y="342.28342"
1339 x="466.2912"
1340 id="text3329"><tspan
1341 style="font-size:12px;font-family:MyriadPro-Regular"
1342 id="tspan3331"
1343 font-size="12"
1344 y="342.28342"
1345 x="466.2912">RPM from </tspan><tspan
1346 style="font-size:12px;font-family:MyriadPro-Regular"
1347 id="tspan3333"
1348 font-size="12"
1349 y="356.68341"
1350 x="478.75418">Spec</tspan></text>
1351
1352<rect
1353 style="fill:none"
1354 id="rect3335"
1355 height="30.237"
1356 width="77.166"
1357 y="379.76352"
1358 x="449.5798" /><text
1359 y="388.28342"
1360 x="464.6799"
1361 id="text3337"><tspan
1362 style="font-size:12px;font-family:MyriadPro-Regular"
1363 id="tspan3339"
1364 font-size="12"
1365 y="388.28342"
1366 x="464.6799">DEB from </tspan><tspan
1367 style="font-size:12px;font-family:MyriadPro-Regular"
1368 id="tspan3341"
1369 font-size="12"
1370 y="402.68341"
1371 x="470.94989">Source</tspan></text>
1372
1373<rect
1374 style="fill:none"
1375 x="18.7248"
1376 id="rect3343"
1377 height="39.334"
1378 width="81.666"
1379 y="241.92952" /><text
1380 y="250.44942"
1381 x="38.477043"
1382 id="text3345"><tspan
1383 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1384 id="tspan3347"
1385 font-size="12"
1386 y="250.44942"
1387 x="38.477043">User</tspan><tspan
1388 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1389 id="tspan3349"
1390 font-size="12"
1391 y="264.84943"
1392 x="14.934043">Configuration</tspan></text>
1393
1394<g
1395 transform="matrix(1.1980743,0,0,1,1.4410357,0.9855158)"
1396 id="g3351">
1397 <g
1398 id="g3353">
1399 <polygon
1400 style="fill:#4a4a30"
1401 id="polygon3355"
1402 points="87.259,338.776 81.188,332.704 81.188,306.278 0.188,306.278 0.188,370.278 81.188,370.278 81.188,344.849 87.259,338.776 " />
1403 </g>
1404</g><rect
1405 style="fill:none"
1406 x="18.7248"
1407 id="rect3357"
1408 height="39.333"
1409 width="81.666"
1410 y="320.0975" /><text
1411 y="327.38544"
1412 x="49.513947"
1413 id="text3359"
1414 style="font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:center;line-height:125%;writing-mode:lr-tb;text-anchor:middle;fill:#ffffff;font-family:Bitstream Vera Sans;-inkscape-font-specification:Bitstream Vera Sans"
1415 sodipodi:linespacing="125%"><tspan
1416 sodipodi:role="line"
1417 id="tspan4790"
1418 x="49.513947"
1419 y="327.38544">Moblin</tspan><tspan
1420 sodipodi:role="line"
1421 id="tspan4792"
1422 x="49.513947"
1423 y="342.38544">Metadata</tspan><tspan
1424 sodipodi:role="line"
1425 id="tspan4794"
1426 x="49.513947"
1427 y="357.38544">(.bb + patches)</tspan></text>
1428
1429<rect
1430 style="fill:none"
1431 id="rect3367"
1432 height="20.163"
1433 width="112.186"
1434 y="204.09752"
1435 x="629.2478" /><text
1436 style="font-size:12px;font-family:MyriadPro-Regular"
1437 y="212.61731"
1438 x="648.53729"
1439 id="text3369"
1440 font-size="12">Package Feeds</text>
1441
1442<rect
1443 style="fill:none"
1444 id="rect3371"
1445 height="39.332001"
1446 width="81.666"
1447 y="378.93051"
1448 x="596.3938" /><text
1449 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1450 y="387.4494"
1451 x="619.16132"
1452 id="text3373"
1453 font-size="12">Images</text>
1454
1455<rect
1456 style="fill:none"
1457 id="rect3375"
1458 height="33.664001"
1459 width="71.853996"
1460 y="288.7645"
1461 x="600.55981" /><text
1462 y="297.28531"
1463 x="620.79712"
1464 id="text3377"><tspan
1465 style="font-size:12px;font-family:MyriadPro-Regular"
1466 id="tspan3379"
1467 font-size="12"
1468 y="297.28531"
1469 x="620.79712">Image </tspan><tspan
1470 style="font-size:12px;font-family:MyriadPro-Regular"
1471 id="tspan3381"
1472 font-size="12"
1473 y="311.68433"
1474 x="608.40112">Generation</tspan></text>
1475
1476<rect
1477 style="fill:none"
1478 id="rect3383"
1479 height="30.237"
1480 width="77.166"
1481 y="287.7645"
1482 x="695.24579" /><text
1483 y="296.28531"
1484 x="723.62323"
1485 id="text3385"><tspan
1486 style="font-size:12px;font-family:MyriadPro-Regular"
1487 id="tspan3387"
1488 font-size="12"
1489 y="296.28531"
1490 x="723.62323">SDK </tspan><tspan
1491 style="font-size:12px;font-family:MyriadPro-Regular"
1492 id="tspan3389"
1493 font-size="12"
1494 y="310.68433"
1495 x="705.7442">Generation</tspan></text>
1496
1497<rect
1498 style="fill:none"
1499 id="rect3391"
1500 height="21.164"
1501 width="199.03999"
1502 y="159.76352"
1503 x="397.7258" /><text
1504 style="font-size:12px;fill:#333333;font-family:MyriadPro-Regular"
1505 y="168.28381"
1506 x="411.53101"
1507 id="text3393"
1508 font-size="12">Poky Build and Integration System</text>
1509
1510<rect
1511 style="fill:none"
1512 id="rect3395"
1513 height="45.164001"
1514 width="512.70801"
1515 y="2.7645159"
1516 x="26.7258" /><text
1517 style="font-size:14px;fill:#333333;font-family:MyriadPro-Regular"
1518 y="12.703815"
1519 x="26.7258"
1520 id="text3397"
1521 font-size="14">Generation of Moblin in a non-Moblin Environment</text>
1522
1523<rect
1524 style="fill:none"
1525 id="rect3399"
1526 height="39.332001"
1527 width="81.666"
1528 y="377.5965"
1529 x="692.06079" /><text
1530 y="386.11542"
1531 x="704.40643"
1532 id="text3401"><tspan
1533 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1534 id="tspan3403"
1535 font-size="12"
1536 y="386.11542"
1537 x="704.40643">Standalone</tspan><tspan
1538 style="font-size:12px;fill:#ffffff;font-family:MyriadPro-Regular"
1539 id="tspan3405"
1540 font-size="12"
1541 y="400.51541"
1542 x="722.68744">SDK</tspan></text>
1543
1544</svg> \ No newline at end of file
diff --git a/diagrams/poky-buildprocess/pokyarch4.dia b/diagrams/poky-buildprocess/pokyarch4.dia
new file mode 100644
index 0000000..f2bb0a3
--- /dev/null
+++ b/diagrams/poky-buildprocess/pokyarch4.dia
Binary files differ
diff --git a/diagrams/poky-buildprocess/pokyarch4.png b/diagrams/poky-buildprocess/pokyarch4.png
new file mode 100644
index 0000000..10f34ac
--- /dev/null
+++ b/diagrams/poky-buildprocess/pokyarch4.png
Binary files differ
diff --git a/documentation/Makefile b/documentation/Makefile
new file mode 100644
index 0000000..5f2f865
--- /dev/null
+++ b/documentation/Makefile
@@ -0,0 +1,395 @@
1# This is a single Makefile to handle all generated Yocto Project documents.
2# The Makefile needs to live in the documents directory and all figures used
3# in any manuals must be .PNG files and live in the individual book's figures
4# directory as well as in the figures directory for the mega-manual.
5# Note that the figures for the Yocto Project Development Manual
6# differ depending on the BRANCH being built.
7#
8# The Makefile has these targets:
9#
10# pdf: generates a PDF version of a manual. Not valid for the Quick Start
11# or the mega-manual (single, large HTML file comprised of all
12# Yocto Project manuals).
13# html: generates an HTML version of a manual.
14# eclipse: generates an HTML version of a manual that can be used as
15# eclipse help (including necessary metadata files).
16# tarball: creates a tarball for the doc files.
17# validate: validates
18# publish: pushes generated files to the Yocto Project website
19# clean: removes files
20#
21# The Makefile generates an HTML and PDF version of every document except the
22# Yocto Project Quick Start and the single, HTML mega-manual, which is comprised
23# of all the individual Yocto Project manuals. These two manuals are in HTML
24# form only. The variable DOC indicates the folder name for a given manual. The
25# variable VER represents the distro version of the Yocto Release for which the
26# manuals are being generated. The variable BRANCH is used to indicate the
27# branch (edison or denzil) and is used only when DOC=dev-manual or
28# DOC=mega-manual. If you do not specify a BRANCH, the default branch used
29# will be for the latest Yocto Project release. If you build for either
30# edison or denzil, you must use BRANCH. You do not need to use BRANCH for
31# any release beyond denzil.
32#
33# To build a manual, you must invoke Makefile with the DOC argument. If you
34# are going to publish the manual, then you must invoke Makefile with both the
35# DOC and the VER argument. Furthermore, if you are building or publishing
36# the edison or denzil versions of the Yocto Poject Development Manual or
37# the mega-manual, you must also use the BRANCH argument.
38#
39# Examples:
40#
41# make DOC=bsp-guide
42# make DOC=yocto-project-qs
43# make pdf DOC=ref-manual
44# make DOC=dev-manual BRANCH=edison
45# make DOC=mega-manual BRANCH=denzil
46#
47# The first example generates the HTML and PDF versions of the BSP Guide.
48# The second example generates the HTML version only of the Quick Start. Note that
49# the Quick Start only has an HTML version available. The third example generates
50# both the PDF and HTML versions of the Yocto Project Reference Manual. The
51# fourth example generates both the PDF and HTML 'edison' versions of the YP
52# Development Manual. The last exmample generates the HTML version of the
53# mega-manual and uses the 'denzil' branch when choosing figures for the
54# tarball of figures. Any example that does not use the BRANCH argument
55# builds the current version of the manual set.
56#
57# Use the publish target to push the generated manuals to the Yocto Project
58# website. All files needed for the manual's HTML form are pushed as well as the
59# PDF version (if applicable).
60# Examples:
61#
62# make publish DOC=bsp-guide VER=1.3
63# make publish DOC=adt-manual VER=1.3
64# make publish DOC=dev-manual VER=1.1.1 BRANCH=edison
65# make publish DOC=dev-manual VER=1.2 BRANCH=denzil
66#
67# The first example publishes the 1.3 version of both the PDF and HTML versions of
68# the BSP Guide. The second example publishes the 1.3 version of both the PDF and
69# HTML versions of the ADT Manual. The third example publishes the PDF and HTML
70# 'edison' versions of the YP Development Manual. The fourth example publishes
71# the PDF and HTML 'denzil' versions of the YP Development Manual.
72#
73
74ifeq ($(DOC),bsp-guide)
75XSLTOPTS = --xinclude
76ALLPREQ = html pdf eclipse tarball
77TARFILES = bsp-style.css bsp-guide.html bsp-guide.pdf figures/bsp-title.png \
78 eclipse
79MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf $(DOC)/eclipse
80FIGURES = figures
81STYLESHEET = $(DOC)/*.css
82
83endif
84
85ifeq ($(DOC),dev-manual)
86XSLTOPTS = --xinclude
87ALLPREQ = html pdf eclipse tarball
88#
89# Note that the tarfile might produce the "Cannot stat: No such file or directory" error
90# message for .PNG files that are not present when building a particular branch. The
91# list of files is all-inclusive for all branches. Note, if you don't provide a BRANCH
92# option, it defaults to the latest stuff. This would be appropriate for "master" branch.
93#
94
95 ifeq ($(BRANCH),edison)
96TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
97 figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
98 figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
99 figures/kernel-example-repos-edison.png \
100 figures/kernel-overview-1.png figures/kernel-overview-2.png \
101 figures/kernel-overview-3-edison.png \
102 figures/source-repos.png figures/yp-download.png \
103 figures/wip.png
104 else ifeq ($(BRANCH),denzil)
105TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
106 figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
107 figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
108 figures/kernel-example-repos-denzil.png \
109 figures/kernel-overview-1.png figures/kernel-overview-2.png \
110 figures/kernel-overview-3-denzil.png \
111 figures/source-repos.png figures/yp-download.png \
112 figures/wip.png
113 else
114TARFILES = dev-style.css dev-manual.html dev-manual.pdf \
115 figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
116 figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
117 figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
118 figures/source-repos.png figures/yp-download.png \
119 eclipse
120 endif
121
122MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf $(DOC)/eclipse
123FIGURES = figures
124STYLESHEET = $(DOC)/*.css
125
126endif
127
128ifeq ($(DOC),yocto-project-qs)
129XSLTOPTS = --xinclude
130ALLPREQ = html eclipse tarball
131TARFILES = yocto-project-qs.html qs-style.css figures/yocto-environment.png \
132 figures/building-an-image.png figures/using-a-pre-built-image.png \
133 figures/yocto-project-transp.png \
134 eclipse
135MANUALS = $(DOC)/$(DOC).html $(DOC)/eclipse
136FIGURES = figures
137STYLESHEET = $(DOC)/*.css
138endif
139
140ifeq ($(DOC),mega-manual)
141XSLTOPTS = --stringparam html.stylesheet mega-style.css \
142 --stringparam chapter.autolabel 1 \
143 --stringparam section.autolabel 1 \
144 --stringparam section.label.includes.component.label 1 \
145 --xinclude
146ALLPREQ = html tarball
147
148 ifeq ($(BRANCH),edison)
149TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png figures/building-an-image.png \
150 figures/using-a-pre-built-image.png \
151 figures/poky-title.png \
152 figures/adt-title.png figures/bsp-title.png \
153 figures/kernel-title.png figures/kernel-architecture-overview.png \
154 figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
155 figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
156 figures/kernel-example-repos-edison.png \
157 figures/kernel-overview-1.png figures/kernel-overview-2.png \
158 figures/kernel-overview-3-edison.png \
159 figures/source-repos.png figures/yp-download.png \
160 figures/wip.png
161 else ifeq ($(BRANCH),denzil)
162TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png figures/building-an-image.png \
163 figures/using-a-pre-built-image.png \
164 figures/poky-title.png \
165 figures/adt-title.png figures/bsp-title.png \
166 figures/kernel-title.png figures/kernel-architecture-overview.png \
167 figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
168 figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
169 figures/kernel-example-repos-denzil.png \
170 figures/kernel-overview-1.png figures/kernel-overview-2.png \
171 figures/kernel-overview-3-denzil.png \
172 figures/source-repos.png figures/yp-download.png \
173 figures/wip.png
174 else
175TARFILES = mega-manual.html mega-style.css figures/yocto-environment.png figures/building-an-image.png \
176 figures/using-a-pre-built-image.png \
177 figures/poky-title.png figures/buildhistory.png figures/buildhistory-web.png \
178 figures/adt-title.png figures/bsp-title.png \
179 figures/kernel-dev-title.png figures/kernel-architecture-overview.png \
180 figures/app-dev-flow.png figures/bsp-dev-flow.png figures/dev-title.png \
181 figures/git-workflow.png figures/index-downloads.png figures/kernel-dev-flow.png \
182 figures/kernel-overview-1.png figures/kernel-overview-2-generic.png \
183 figures/source-repos.png figures/yp-download.png \
184 figures/profile-title.png figures/kernelshark-all.png \
185 figures/kernelshark-choose-events.png figures/kernelshark-i915-display.png \
186 figures/kernelshark-output-display.png figures/lttngmain0.png \
187 figures/oprofileui-busybox.png figures/oprofileui-copy-to-user.png \
188 figures/oprofileui-downloading.png figures/oprofileui-processes.png \
189 figures/perf-probe-do_fork-profile.png figures/perf-report-cycles-u.png \
190 figures/perf-systemwide.png figures/perf-systemwide-libc.png \
191 figures/perf-wget-busybox-annotate-menu.png figures/perf-wget-busybox-annotate-udhcpc.png \
192 figures/perf-wget-busybox-debuginfo.png figures/perf-wget-busybox-dso-zoom.png \
193 figures/perf-wget-busybox-dso-zoom-menu.png figures/perf-wget-busybox-expanded-stripped.png \
194 figures/perf-wget-flat-stripped.png figures/perf-wget-g-copy-from-user-expanded-stripped.png \
195 figures/perf-wget-g-copy-to-user-expanded-debuginfo.png figures/perf-wget-g-copy-to-user-expanded-stripped.png \
196 figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png figures/pybootchartgui-linux-yocto.png \
197 figures/pychart-linux-yocto-rpm.png figures/pychart-linux-yocto-rpm-nostrip.png \
198 figures/sched-wakeup-profile.png figures/sysprof-callers.png \
199 figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png figures/cross-development-toolchains.png \
200 figures/yocto-environment-ref.png figures/user-configuration.png figures/source-input.png \
201 figures/package-feeds.png figures/layer-input.png figures/images.png figures/sdk.png \
202 figures/source-fetching.png figures/patching.png figures/configuration-compile-autoreconf.png \
203 figures/analysis-for-package-splitting.png figures/image-generation.png \
204 figures/sdk-generation.png
205 endif
206
207MANUALS = $(DOC)/$(DOC).html
208FIGURES = figures
209STYLESHEET = $(DOC)/*.css
210
211endif
212
213ifeq ($(DOC),ref-manual)
214XSLTOPTS = --xinclude
215ALLPREQ = html pdf eclipse tarball
216TARFILES = ref-manual.html ref-style.css figures/poky-title.png \
217 figures/buildhistory.png figures/buildhistory-web.png eclipse \
218 figures/cross-development-toolchains.png figures/layer-input.png \
219 figures/package-feeds.png figures/source-input.png \
220 figures/user-configuration.png figures/yocto-environment-ref.png \
221 figures/images.png figures/sdk.png figures/source-fetching.png \
222 figures/patching.png figures/configuration-compile-autoreconf.png \
223 figures/analysis-for-package-splitting.png figures/image-generation.png \
224 figures/sdk-generation.png
225MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf $(DOC)/eclipse
226FIGURES = figures
227STYLESHEET = $(DOC)/*.css
228endif
229
230
231ifeq ($(DOC),adt-manual)
232XSLTOPTS = --xinclude
233ALLPREQ = html pdf eclipse tarball
234TARFILES = adt-manual.html adt-manual.pdf adt-style.css figures/adt-title.png \
235 eclipse
236MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf $(DOC)/eclipse
237FIGURES = figures
238STYLESHEET = $(DOC)/*.css
239endif
240
241ifeq ($(DOC),profile-manual)
242XSLTOPTS = --xinclude
243ALLPREQ = html pdf eclipse tarball
244TARFILES = profile-manual.html profile-manual.pdf profile-manual-style.css \
245 figures/profile-title.png figures/kernelshark-all.png \
246 figures/kernelshark-choose-events.png figures/kernelshark-i915-display.png \
247 figures/kernelshark-output-display.png figures/lttngmain0.png \
248 figures/oprofileui-busybox.png figures/oprofileui-copy-to-user.png \
249 figures/oprofileui-downloading.png figures/oprofileui-processes.png \
250 figures/perf-probe-do_fork-profile.png figures/perf-report-cycles-u.png \
251 figures/perf-systemwide.png figures/perf-systemwide-libc.png \
252 figures/perf-wget-busybox-annotate-menu.png figures/perf-wget-busybox-annotate-udhcpc.png \
253 figures/perf-wget-busybox-debuginfo.png figures/perf-wget-busybox-dso-zoom.png \
254 figures/perf-wget-busybox-dso-zoom-menu.png figures/perf-wget-busybox-expanded-stripped.png \
255 figures/perf-wget-flat-stripped.png figures/perf-wget-g-copy-from-user-expanded-stripped.png \
256 figures/perf-wget-g-copy-to-user-expanded-debuginfo.png figures/perf-wget-g-copy-to-user-expanded-stripped.png \
257 figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png figures/pybootchartgui-linux-yocto.png \
258 figures/pychart-linux-yocto-rpm.png figures/pychart-linux-yocto-rpm-nostrip.png \
259 figures/sched-wakeup-profile.png figures/sysprof-callers.png \
260 figures/sysprof-copy-from-user.png figures/sysprof-copy-to-user.png \
261 eclipse
262MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf $(DOC)/eclipse
263FIGURES = figures
264STYLESHEET = $(DOC)/*.css
265endif
266
267ifeq ($(DOC),kernel-dev)
268XSLTOPTS = --xinclude
269ALLPREQ = html pdf eclipse tarball
270TARFILES = kernel-dev.html kernel-dev.pdf kernel-dev-style.css figures/kernel-dev-title.png \
271 figures/kernel-architecture-overview.png \
272 eclipse
273MANUALS = $(DOC)/$(DOC).html $(DOC)/$(DOC).pdf $(DOC)/eclipse
274FIGURES = figures
275STYLESHEET = $(DOC)/*.css
276endif
277
278
279##
280# These URI should be rewritten by your distribution's xml catalog to
281# match your localy installed XSL stylesheets.
282XSL_BASE_URI = http://docbook.sourceforge.net/release/xsl/current
283XSL_XHTML_URI = $(XSL_BASE_URI)/xhtml/docbook.xsl
284
285all: $(ALLPREQ)
286
287pdf:
288ifeq ($(DOC),yocto-project-qs)
289 @echo " "
290 @echo "ERROR: You cannot generate a yocto-project-qs PDF file."
291 @echo " "
292
293else ifeq ($(DOC),mega-manual)
294 @echo " "
295 @echo "ERROR: You cannot generate a mega-manual PDF file."
296 @echo " "
297
298else
299
300 cd $(DOC); ../tools/poky-docbook-to-pdf $(DOC).xml ../template; cd ..
301endif
302
303html:
304ifeq ($(DOC),mega-manual)
305# See http://www.sagehill.net/docbookxsl/HtmlOutput.html
306 @echo " "
307 @echo "******** Building "$(DOC)
308 @echo " "
309 cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd ..
310 @echo " "
311 @echo "******** Using mega-manual.sed to process external links"
312 @echo " "
313 cd $(DOC); sed -f ../tools/mega-manual.sed < mega-manual.html > mega-output.html; cd ..
314 @echo " "
315 @echo "******** Cleaning up transient file mega-output.html"
316 @echo " "
317 cd $(DOC); rm mega-manual.html; mv mega-output.html mega-manual.html; cd ..
318else
319# See http://www.sagehill.net/docbookxsl/HtmlOutput.html
320 @echo " "
321 @echo "******** Building "$(DOC)
322 @echo " "
323 cd $(DOC); xsltproc $(XSLTOPTS) -o $(DOC).html $(DOC)-customization.xsl $(DOC).xml; cd ..
324endif
325
326
327eclipse: BASE_DIR = html/$(DOC)/
328
329eclipse: eclipse-generate eclipse-resolve-links
330
331.PHONY : eclipse-generate eclipse-resolve-links
332
333eclipse-generate:
334ifeq ($(filter $(DOC), adt-manual bsp-guide dev-manual kernel-dev profile-manual ref-manual yocto-project-qs),)
335 @echo " "
336 @echo "ERROR: You can only create eclipse documentation"
337 @echo " of the following documentation parts:"
338 @echo " - adt-manual"
339 @echo " - bsp-guide"
340 @echo " - dev-manual"
341 @echo " - kernel-dev"
342 @echo " - profile-manual"
343 @echo " - ref-manual"
344 @echo " - yocto-project-qs"
345 @echo " "
346else
347 @echo " "
348 @echo "******** Building eclipse help of "$(DOC)
349 @echo " "
350 cd $(DOC) && \
351 xsltproc $(XSLTOPTS) \
352 --stringparam base.dir '$(BASE_DIR)' \
353 -o eclipse/$(DOC).html \
354 $(DOC)-eclipse-customization.xsl $(DOC).xml && \
355 mv eclipse/toc.xml eclipse/$(DOC)-toc.xml && \
356 cp -rf $(FIGURES) eclipse/$(BASE_DIR) && \
357 cd ..;
358
359 $(call modify-eclipse)
360endif
361
362eclipse-resolve-links:
363 @echo " "
364 @echo "******** Using eclipse-help.sed to process external links"
365 @echo " "
366 $(foreach FILE, \
367 $(wildcard $(DOC)/eclipse/html/$(DOC)/*.html), \
368 $(shell sed -i -f tools/eclipse-help.sed $(FILE)))
369
370tarball: html
371 @echo " "
372 @echo "******** Creating Tarball of document files"
373 @echo " "
374 cd $(DOC); tar -cvzf $(DOC).tgz $(TARFILES); cd ..
375
376validate:
377 cd $(DOC); xmllint --postvalid --xinclude --noout $(DOC).xml; cd ..
378
379
380publish:
381 @if test -f $(DOC)/$(DOC).html; \
382 then \
383 echo " "; \
384 echo "******** Publishing "$(DOC)".html"; \
385 echo " "; \
386 scp -r $(MANUALS) $(STYLESHEET) docs.yp:/var/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \
387 cd $(DOC); scp -r $(FIGURES) docs.yp:/var/www/www.yoctoproject.org-docs/$(VER)/$(DOC); \
388 else \
389 echo " "; \
390 echo $(DOC)".html missing. Generate the file first then try again."; \
391 echo " "; \
392 fi
393
394clean:
395 rm -rf $(MANUALS); rm $(DOC)/$(DOC).tgz;
diff --git a/documentation/README b/documentation/README
new file mode 100644
index 0000000..d01678d
--- /dev/null
+++ b/documentation/README
@@ -0,0 +1,91 @@
1documentation
2=============
3
4This is the directory that contains the Yocto Project documentation. The Yocto
5Project source repositories at http://git.yoctoproject.org/cgit.cgi have two
6instances of the "documentation" directory. You should understand each of
7these instances.
8
9 poky/documentation - The directory within the poky Git repository containing
10 the set of Yocto Project manuals. When you clone the
11 poky Git repository, the documentation directory
12 contains the manuals. The state of the manuals in this
13 directory is guaranteed to reflect the latest Yocto
14 Project release. The manuals at the tip of this
15 directory will also likely contain most manual
16 development changes.
17
18 yocto-docs/documentation - The Git repository for the Yocto Project manuals.
19 This repository is where manual development
20 occurs. If you plan on contributing back to the
21 Yocto Project documentation, you should set up
22 a local Git repository based on this upstream
23 repository as follows:
24
25 git clone git://git.yoctoproject.org/yocto-docs
26
27 Changes and patches are first pushed to the
28 yocto-docs Git repository. Later, they make it
29 into the poky Git repository found at
30 git://git.yoctoproject.org/poky.
31
32Manual Organization
33===================
34
35Folders exist for individual manuals as follows:
36
37* adt-manual - The Yocto Project Application Developer's Guide.
38* bsp-guide - The Yocto Project Board Support Package (BSP) Developer's Guide
39* dev-manual - The Yocto Project Development Manual
40* kernel-dev - The Yocto Project Linux Kernel Development Manual
41* ref-manual - The Yocto Project Reference Manual
42* yocto-project-qs - The Yocto Project Quick Start
43* mega-manual - An aggregated manual comprised of all YP manuals and guides
44* profile-manual - The Yocto Project Profile and Tracing Manual
45
46Each folder is self-contained regarding content and figures. Note that there
47is a sed file needed to process the links of the mega-manual. The sed file
48is located in the tools directory. Also note that the figures folder in the
49mega-manual directory contains duplicates of all the figures in the YP folders
50directories for all YP manuals and guides.
51
52If you want to find HTML versions of the Yocto Project manuals on the web,
53go to http://www.yoctoproject.org and click on the "Documentation" tab. From
54there you have access to archived documentation from previous releases, current
55documentation for the latest release, and "Docs in Progress" for the release
56currently being developed.
57
58In general, the Yocto Project site (http://www.yoctoproject.org) is a great
59reference for both information and downloads.
60
61Makefile
62========
63
64The Makefile processes manual directories to create HTML, PDF,
65tarballs, etc. Details on how the Makefile work are documented
66inside the Makefile. See that file for more information.
67
68To build a manual, you run the make command and pass it the name
69of the folder containing the manual's contents.
70For example, the following command run from the documentation directory
71creates an HTML and a PDF version of the ADT manual.
72The DOC variable specifies the manual you are making:
73
74 $ make DOC=adt-manual
75
76poky.ent
77========
78
79This file defines variables used for documentation production. The variables
80are used to define release pathnames, URLs for the published manuals, etc.
81
82template
83========
84Contains various templates, fonts, and some old PNG files.
85
86tools
87=====
88Contains a tool to convert the DocBook files to PDF format. This folder also
89contains the mega-manual.sed file, which is used by Makefile to process
90cross-references from within the manual that normally go to an external
91manual.
diff --git a/documentation/adt-manual/adt-command.xml b/documentation/adt-manual/adt-command.xml
new file mode 100644
index 0000000..0ed3396
--- /dev/null
+++ b/documentation/adt-manual/adt-command.xml
@@ -0,0 +1,224 @@
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='using-the-command-line'>
6<title>Using the Command Line</title>
7
8 <para>
9 Recall that earlier the manual discussed how to use an existing toolchain
10 tarball that had been installed into the default installation
11 directory, <filename>/opt/poky/&DISTRO;</filename>, which is outside of the
12 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
13 (see the section "<link linkend='using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball)</link>".
14 And, that sourcing your architecture-specific environment setup script
15 initializes a suitable cross-toolchain development environment.
16 </para>
17
18 <para>
19 During this setup, locations for the compiler, QEMU scripts, QEMU binary,
20 a special version of <filename>pkgconfig</filename> and other useful
21 utilities are added to the <filename>PATH</filename> variable.
22 Also, variables to assist
23 <filename>pkgconfig</filename> and <filename>autotools</filename>
24 are also defined so that, for example, <filename>configure.sh</filename>
25 can find pre-generated test results for tests that need target hardware
26 on which to run.
27 </para>
28
29 <para>
30 Collectively, these conditions allow you to easily use the toolchain
31 outside of the OpenEmbedded build environment on both autotools-based
32 projects and Makefile-based projects.
33 This chapter provides information for both these types of projects.
34 </para>
35
36
37<section id='autotools-based-projects'>
38<title>Autotools-Based Projects</title>
39
40 <para>
41 Once you have a suitable cross-toolchain installed, it is very easy to
42 develop a project outside of the OpenEmbedded build system.
43 This section presents a simple "Helloworld" example that shows how
44 to set up, compile, and run the project.
45 </para>
46
47 <section id='creating-and-running-a-project-based-on-gnu-autotools'>
48 <title>Creating and Running a Project Based on GNU Autotools</title>
49
50 <para>
51 Follow these steps to create a simple autotools-based project:
52 <orderedlist>
53 <listitem><para><emphasis>Create your directory:</emphasis>
54 Create a clean directory for your project and then make
55 that directory your working location:
56 <literallayout class='monospaced'>
57 $ mkdir $HOME/helloworld
58 $ cd $HOME/helloworld
59 </literallayout></para></listitem>
60 <listitem><para><emphasis>Populate the directory:</emphasis>
61 Create <filename>hello.c</filename>, <filename>Makefile.am</filename>,
62 and <filename>configure.in</filename> files as follows:
63 <itemizedlist>
64 <listitem><para>For <filename>hello.c</filename>, include
65 these lines:
66 <literallayout class='monospaced'>
67 #include &lt;stdio.h&gt;
68
69 main()
70 {
71 printf("Hello World!\n");
72 }
73 </literallayout></para></listitem>
74 <listitem><para>For <filename>Makefile.am</filename>,
75 include these lines:
76 <literallayout class='monospaced'>
77 bin_PROGRAMS = hello
78 hello_SOURCES = hello.c
79 </literallayout></para></listitem>
80 <listitem><para>For <filename>configure.in</filename>,
81 include these lines:
82 <literallayout class='monospaced'>
83 AC_INIT(hello.c)
84 AM_INIT_AUTOMAKE(hello,0.1)
85 AC_PROG_CC
86 AC_PROG_INSTALL
87 AC_OUTPUT(Makefile)
88 </literallayout></para></listitem>
89 </itemizedlist></para></listitem>
90 <listitem><para><emphasis>Source the cross-toolchain
91 environment setup file:</emphasis>
92 Installation of the cross-toolchain creates a cross-toolchain
93 environment setup script in the directory that the ADT
94 was installed.
95 Before you can use the tools to develop your project, you must
96 source this setup script.
97 The script begins with the string "environment-setup" and contains
98 the machine architecture, which is followed by the string
99 "poky-linux".
100 Here is an example that sources a script from the
101 default ADT installation directory that uses the
102 32-bit Intel x86 Architecture and using the
103 &DISTRO_NAME; Yocto Project release:
104 <literallayout class='monospaced'>
105 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
106 </literallayout></para></listitem>
107 <listitem><para><emphasis>Generate the local aclocal.m4
108 files and create the configure script:</emphasis>
109 The following GNU Autotools generate the local
110 <filename>aclocal.m4</filename> files and create the
111 configure script:
112 <literallayout class='monospaced'>
113 $ aclocal
114 $ autoconf
115 </literallayout></para></listitem>
116 <listitem><para><emphasis>Generate files needed by GNU
117 coding standards:</emphasis>
118 GNU coding standards require certain files in order for the
119 project to be compliant.
120 This command creates those files:
121 <literallayout class='monospaced'>
122 $ touch NEWS README AUTHORS ChangeLog
123 </literallayout></para></listitem>
124 <listitem><para><emphasis>Generate the configure
125 file:</emphasis>
126 This command generates the <filename>configure</filename>:
127 <literallayout class='monospaced'>
128 $ automake -a
129 </literallayout></para></listitem>
130 <listitem><para><emphasis>Cross-compile the project:</emphasis>
131 This command compiles the project using the cross-compiler:
132 <literallayout class='monospaced'>
133 $ ./configure ${CONFIGURE_FLAGS}
134 </literallayout></para></listitem>
135 <listitem><para><emphasis>Make and install the project:</emphasis>
136 These two commands generate and install the project into the
137 destination directory:
138 <literallayout class='monospaced'>
139 $ make
140 $ make install DESTDIR=./tmp
141 </literallayout></para></listitem>
142 <listitem><para><emphasis>Verify the installation:</emphasis>
143 This command is a simple way to verify the installation
144 of your project.
145 Running the command prints the architecture on which
146 the binary file can run.
147 This architecture should be the same architecture that
148 the installed cross-toolchain supports.
149 <literallayout class='monospaced'>
150 $ file ./tmp/usr/local/bin/hello
151 </literallayout></para></listitem>
152 <listitem><para><emphasis>Execute your project:</emphasis>
153 To execute the project in the shell, simply enter the name.
154 You could also copy the binary to the actual target hardware
155 and run the project there as well:
156 <literallayout class='monospaced'>
157 $ ./hello
158 </literallayout>
159 As expected, the project displays the "Hello World!" message.
160 </para></listitem>
161 </orderedlist>
162 </para>
163 </section>
164
165 <section id='passing-host-options'>
166 <title>Passing Host Options</title>
167
168 <para>
169 For an Autotools-based project, you can use the cross-toolchain by just
170 passing the appropriate host option to <filename>configure.sh</filename>.
171 The host option you use is derived from the name of the environment setup
172 script found in the directory in which you installed the cross-toolchain.
173 For example, the host option for an ARM-based target that uses the GNU EABI
174 is <filename>armv5te-poky-linux-gnueabi</filename>.
175 You will notice that the name of the script is
176 <filename>environment-setup-armv5te-poky-linux-gnueabi</filename>.
177 Thus, the following command works:
178 <literallayout class='monospaced'>
179 $ ./configure --host=armv5te-poky-linux-gnueabi \
180 --with-libtool-sysroot=&lt;sysroot-dir&gt;
181 </literallayout>
182 </para>
183
184 <para>
185 This single command updates your project and rebuilds it using the appropriate
186 cross-toolchain tools.
187 <note>
188 If <filename>configure</filename> script results in problems recognizing the
189 <filename>--with-libtool-sysroot=&lt;sysroot-dir&gt;</filename> option,
190 regenerate the script to enable the support by doing the following and then
191 run the script again:
192 <literallayout class='monospaced'>
193 $ libtoolize --automake
194 $ aclocal -I ${OECORE_NATIVE_SYSROOT}/usr/share/aclocal \
195 [-I &lt;dir_containing_your_project-specific_m4_macros&gt;]
196 $ autoconf
197 $ autoheader
198 $ automake -a
199 </literallayout>
200 </note>
201 </para>
202 </section>
203</section>
204
205<section id='makefile-based-projects'>
206<title>Makefile-Based Projects</title>
207
208 <para>
209 For a Makefile-based project, you use the cross-toolchain by making sure
210 the tools are used.
211 You can do this as follows:
212 <literallayout class='monospaced'>
213 CC=arm-poky-linux-gnueabi-gcc
214 LD=arm-poky-linux-gnueabi-ld
215 CFLAGS=”${CFLAGS} --sysroot=&lt;sysroot-dir&gt;”
216 CXXFLAGS=”${CXXFLAGS} --sysroot=&lt;sysroot-dir&gt;”
217 </literallayout>
218 </para>
219</section>
220
221</chapter>
222<!--
223vim: expandtab tw=80 ts=4
224-->
diff --git a/documentation/adt-manual/adt-intro.xml b/documentation/adt-manual/adt-intro.xml
new file mode 100644
index 0000000..a928285
--- /dev/null
+++ b/documentation/adt-manual/adt-intro.xml
@@ -0,0 +1,195 @@
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='adt-intro'>
6<title>Introduction</title>
7
8<para>
9 Welcome to the Yocto Project Application Developer's Guide.
10 This manual provides information that lets you begin developing applications
11 using the Yocto Project.
12</para>
13
14<para>
15 The Yocto Project provides an application development environment based on
16 an Application Development Toolkit (ADT) and the availability of stand-alone
17 cross-development toolchains and other tools.
18 This manual describes the ADT and how you can configure and install it,
19 how to access and use the cross-development toolchains, how to
20 customize the development packages installation,
21 how to use command line development for both Autotools-based and Makefile-based projects,
22 and an introduction to the <trademark class='trade'>Eclipse</trademark> IDE
23 Yocto Plug-in.
24 <note>
25 The ADT is distribution-neutral and does not require the Yocto
26 Project reference distribution, which is called Poky.
27 This manual, however, uses examples that use the Poky distribution.
28 </note>
29</para>
30
31<section id='adt-intro-section'>
32 <title>The Application Development Toolkit (ADT)</title>
33
34 <para>
35 Part of the Yocto Project development solution is an Application Development
36 Toolkit (ADT).
37 The ADT provides you with a custom-built, cross-development
38 platform suited for developing a user-targeted product application.
39 </para>
40
41 <para>
42 Fundamentally, the ADT consists of the following:
43 <itemizedlist>
44 <listitem><para>An architecture-specific cross-toolchain and matching
45 sysroot both built by the OpenEmbedded build system.
46 The toolchain and sysroot are based on a
47 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
48 configuration and extensions,
49 which allows you to cross-develop on the host machine for the target hardware.
50 </para></listitem>
51 <listitem><para>The Eclipse IDE Yocto Plug-in.</para></listitem>
52 <listitem><para>The Quick EMUlator (QEMU), which lets you simulate target hardware.
53 </para></listitem>
54 <listitem><para>Various user-space tools that greatly enhance your application
55 development experience.</para></listitem>
56 </itemizedlist>
57 </para>
58
59 <section id='the-cross-development-toolchain'>
60 <title>The Cross-Development Toolchain</title>
61
62 <para>
63 The
64 <ulink url='&YOCTO_DOCS_DEV_URL;#cross-development-toolchain'>Cross-Development Toolchain</ulink>
65 consists of a cross-compiler, cross-linker, and cross-debugger
66 that are used to develop user-space applications for targeted
67 hardware.
68 This toolchain is created either by running the ADT Installer
69 script, a toolchain installer script, or through a
70 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
71 that is based on your Metadata configuration or extension for
72 your targeted device.
73 The cross-toolchain works with a matching target sysroot.
74 </para>
75 </section>
76
77 <section id='sysroot'>
78 <title>Sysroot</title>
79
80 <para>
81 The matching target sysroot contains needed headers and libraries for generating
82 binaries that run on the target architecture.
83 The sysroot is based on the target root filesystem image that is built by
84 the OpenEmbedded build system and uses the same Metadata configuration
85 used to build the cross-toolchain.
86 </para>
87 </section>
88
89 <section id='eclipse-overview'>
90 <title>Eclipse Yocto Plug-in</title>
91
92 <para>
93 The Eclipse IDE is a popular development environment and it fully supports
94 development using the Yocto Project.
95 When you install and configure the Eclipse Yocto Project Plug-in into
96 the Eclipse IDE, you maximize your Yocto Project experience.
97 Installing and configuring the Plug-in results in an environment that
98 has extensions specifically designed to let you more easily develop software.
99 These extensions allow for cross-compilation, deployment, and execution of
100 your output into a QEMU emulation session.
101 You can also perform cross-debugging and profiling.
102 The environment also supports a suite of tools that allows you to perform
103 remote profiling, tracing, collection of power data, collection of
104 latency data, and collection of performance data.
105 </para>
106
107 <para>
108 For information about the application development workflow that uses the Eclipse
109 IDE and for a detailed example of how to install and configure the Eclipse
110 Yocto Project Plug-in, see the
111 "<ulink url='&YOCTO_DOCS_DEV_URL;#adt-eclipse'>Working Within Eclipse</ulink>" section
112 of the Yocto Project Development Manual.
113 </para>
114 </section>
115
116 <section id='the-qemu-emulator'>
117 <title>The QEMU Emulator</title>
118
119 <para>
120 The QEMU emulator allows you to simulate your hardware while running your
121 application or image.
122 QEMU is made available a number of ways:
123 <itemizedlist>
124 <listitem><para>If you use the ADT Installer script to install ADT, you can
125 specify whether or not to install QEMU.</para></listitem>
126 <listitem><para>If you have downloaded a Yocto Project release and unpacked
127 it to create a
128 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> and
129 you have sourced
130 the environment setup script, QEMU is installed and automatically
131 available.</para></listitem>
132 <listitem><para>If you have installed the cross-toolchain
133 tarball and you have sourced the toolchain's setup environment script, QEMU
134 is also installed and automatically available.</para></listitem>
135 </itemizedlist>
136 </para>
137 </section>
138
139 <section id='user-space-tools'>
140 <title>User-Space Tools</title>
141
142 <para>
143 User-space tools are included as part of the distribution.
144 You will find these tools helpful during development.
145 The tools include LatencyTOP, PowerTOP, OProfile, Perf, SystemTap, and Lttng-ust.
146 These tools are common development tools for the Linux platform.
147 <itemizedlist>
148 <listitem><para><emphasis>LatencyTOP:</emphasis> LatencyTOP focuses on latency
149 that causes skips in audio,
150 stutters in your desktop experience, or situations that overload your server
151 even when you have plenty of CPU power left.
152 </para></listitem>
153 <listitem><para><emphasis>PowerTOP:</emphasis> Helps you determine what
154 software is using the most power.
155 You can find out more about PowerTOP at
156 <ulink url='https://01.org/powertop/'></ulink>.</para></listitem>
157 <listitem><para><emphasis>OProfile:</emphasis> A system-wide profiler for Linux
158 systems that is capable of profiling all running code at low overhead.
159 You can find out more about OProfile at
160 <ulink url='http://oprofile.sourceforge.net/about/'></ulink>.
161 For examples on how to setup and use this tool, see the
162 "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-oprofile'>OProfile</ulink>"
163 section in the Yocto Project Profiling and Tracing Manual.
164 </para></listitem>
165 <listitem><para><emphasis>Perf:</emphasis> Performance counters for Linux used
166 to keep track of certain types of hardware and software events.
167 For more information on these types of counters see
168 <ulink url='https://perf.wiki.kernel.org/'></ulink> and click
169 on “Perf tools.”
170 For examples on how to setup and use this tool, see the
171 "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-perf'>perf</ulink>"
172 section in the Yocto Project Profiling and Tracing Manual.
173 </para></listitem>
174 <listitem><para><emphasis>SystemTap:</emphasis> A free software infrastructure
175 that simplifies information gathering about a running Linux system.
176 This information helps you diagnose performance or functional problems.
177 SystemTap is not available as a user-space tool through the Eclipse IDE Yocto Plug-in.
178 See <ulink url='http://sourceware.org/systemtap'></ulink> for more information
179 on SystemTap.
180 For examples on how to setup and use this tool, see the
181 "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-systemtap'>SystemTap</ulink>"
182 section in the Yocto Project Profiling and Tracing Manual.</para></listitem>
183 <listitem><para><emphasis>Lttng-ust:</emphasis> A User-space Tracer designed to
184 provide detailed information on user-space activity.
185 See <ulink url='http://lttng.org/ust'></ulink> for more information on Lttng-ust.
186 </para></listitem>
187 </itemizedlist>
188 </para>
189 </section>
190</section>
191
192</chapter>
193<!--
194vim: expandtab tw=80 ts=4
195-->
diff --git a/documentation/adt-manual/adt-manual-customization.xsl b/documentation/adt-manual/adt-manual-customization.xsl
new file mode 100644
index 0000000..373bdb7
--- /dev/null
+++ b/documentation/adt-manual/adt-manual-customization.xsl
@@ -0,0 +1,11 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
5
6 <xsl:param name="html.stylesheet" select="'adt-style.css'" />
7 <xsl:param name="chapter.autolabel" select="1" />
8 <xsl:param name="appendix.autolabel" select="1" />
9 <xsl:param name="section.autolabel" select="1" />
10 <xsl:param name="section.label.includes.component.label" select="1" />
11</xsl:stylesheet>
diff --git a/documentation/adt-manual/adt-manual-eclipse-customization.xsl b/documentation/adt-manual/adt-manual-eclipse-customization.xsl
new file mode 100644
index 0000000..d16ffbb
--- /dev/null
+++ b/documentation/adt-manual/adt-manual-eclipse-customization.xsl
@@ -0,0 +1,27 @@
1<?xml version='1.0'?>
2<xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 version="1.0">
7
8 <xsl:import
9 href="http://docbook.sourceforge.net/release/xsl/current/eclipse/eclipse3.xsl" />
10
11 <xsl:param name="chunker.output.indent" select="'yes'"/>
12 <xsl:param name="chunk.quietly" select="1"/>
13 <xsl:param name="chunk.first.sections" select="1"/>
14 <xsl:param name="chunk.section.depth" select="10"/>
15 <xsl:param name="use.id.as.filename" select="1"/>
16 <xsl:param name="ulink.target" select="'_self'" />
17 <xsl:param name="base.dir" select="'html/adt-manual/'"/>
18 <xsl:param name="html.stylesheet" select="'../book.css'"/>
19 <xsl:param name="eclipse.manifest" select="0"/>
20 <xsl:param name="create.plugin.xml" select="0"/>
21 <xsl:param name="suppress.navigation" select="1"/>
22 <xsl:param name="generate.index" select="0"/>
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel" select="1" />
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27</xsl:stylesheet>
diff --git a/documentation/adt-manual/adt-manual.xml b/documentation/adt-manual/adt-manual.xml
new file mode 100644
index 0000000..9ac54d3
--- /dev/null
+++ b/documentation/adt-manual/adt-manual.xml
@@ -0,0 +1,113 @@
1<!DOCTYPE book 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<book id='adt-manual' lang='en'
6 xmlns:xi="http://www.w3.org/2003/XInclude"
7 xmlns="http://docbook.org/ns/docbook"
8 >
9 <bookinfo>
10
11 <mediaobject>
12 <imageobject>
13 <imagedata fileref='figures/adt-title.png'
14 format='SVG'
15 align='left' scalefit='1' width='100%'/>
16 </imageobject>
17 </mediaobject>
18
19 <title>
20 Yocto Project Application Developer's Guide
21 </title>
22
23 <authorgroup>
24 <author>
25 <firstname>Jessica</firstname> <surname>Zhang</surname>
26 <affiliation>
27 <orgname>Intel Corporation</orgname>
28 </affiliation>
29 <email>jessica.zhang@intel.com</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>1.0</revnumber>
36 <date>6 April 2011</date>
37 <revremark>Released with the Yocto Project 1.0 Release.</revremark>
38 </revision>
39 <revision>
40 <revnumber>1.0.1</revnumber>
41 <date>23 May 2011</date>
42 <revremark>Released with the Yocto Project 1.0.1 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>1.1</revnumber>
46 <date>6 October 2011</date>
47 <revremark>Released with the Yocto Project 1.1 Release.</revremark>
48 </revision>
49 <revision>
50 <revnumber>1.2</revnumber>
51 <date>April 2012</date>
52 <revremark>Released with the Yocto Project 1.2 Release.</revremark>
53 </revision>
54 <revision>
55 <revnumber>1.3</revnumber>
56 <date>October 2012</date>
57 <revremark>Released with the Yocto Project 1.3 Release.</revremark>
58 </revision>
59 <revision>
60 <revnumber>1.4</revnumber>
61 <date>April 2013</date>
62 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
63 </revision>
64 <revision>
65 <revnumber>1.5</revnumber>
66 <date>October 2013</date>
67 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
68 </revision>
69 <revision>
70 <revnumber>1.5.1</revnumber>
71 <date>Sometime in 2013</date>
72 <revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
73 </revision>
74 </revhistory>
75
76 <copyright>
77 <year>&COPYRIGHT_YEAR;</year>
78 <holder>Linux Foundation</holder>
79 </copyright>
80
81 <legalnotice>
82 <para>
83 Permission is granted to copy, distribute and/or modify this document under
84 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
85 </para>
86 <note>
87 For the latest version of this manual associated with this
88 Yocto Project release, see the
89 <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>
90 from the Yocto Project website.
91 </note>
92
93 </legalnotice>
94
95 </bookinfo>
96
97 <xi:include href="adt-intro.xml"/>
98
99 <xi:include href="adt-prepare.xml"/>
100
101 <xi:include href="adt-package.xml"/>
102
103 <xi:include href="adt-command.xml"/>
104
105<!-- <index id='index'>
106 <title>Index</title>
107 </index>
108-->
109
110</book>
111<!--
112vim: expandtab tw=80 ts=4
113-->
diff --git a/documentation/adt-manual/adt-package.xml b/documentation/adt-manual/adt-package.xml
new file mode 100644
index 0000000..48edf0a
--- /dev/null
+++ b/documentation/adt-manual/adt-package.xml
@@ -0,0 +1,101 @@
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='adt-package'>
6<title>Optionally Customizing the Development Packages Installation</title>
7
8 <para>
9 Because the Yocto Project is suited for embedded Linux development, it is
10 likely that you will need to customize your development packages installation.
11 For example, if you are developing a minimal image, then you might not need
12 certain packages (e.g. graphics support packages).
13 Thus, you would like to be able to remove those packages from your target sysroot.
14 </para>
15
16<section id='package-management-systems'>
17 <title>Package Management Systems</title>
18
19 <para>
20 The OpenEmbedded build system supports the generation of sysroot files using
21 three different Package Management Systems (PMS):
22 <itemizedlist>
23 <listitem><para><emphasis>OPKG:</emphasis> A less well known PMS whose use
24 originated in the OpenEmbedded and OpenWrt embedded Linux projects.
25 This PMS works with files packaged in an <filename>.ipk</filename> format.
26 See <ulink url='http://en.wikipedia.org/wiki/Opkg'></ulink> for more
27 information about OPKG.</para></listitem>
28 <listitem><para><emphasis>RPM:</emphasis> A more widely known PMS intended for GNU/Linux
29 distributions.
30 This PMS works with files packaged in an <filename>.rms</filename> format.
31 The build system currently installs through this PMS by default.
32 See <ulink url='http://en.wikipedia.org/wiki/RPM_Package_Manager'></ulink>
33 for more information about RPM.</para></listitem>
34 <listitem><para><emphasis>Debian:</emphasis> The PMS for Debian-based systems
35 is built on many PMS tools.
36 The lower-level PMS tool <filename>dpkg</filename> forms the base of the Debian PMS.
37 For information on dpkg see
38 <ulink url='http://en.wikipedia.org/wiki/Dpkg'></ulink>.</para></listitem>
39 </itemizedlist>
40 </para>
41</section>
42
43<section id='configuring-the-pms'>
44 <title>Configuring the PMS</title>
45
46 <para>
47 Whichever PMS you are using, you need to be sure that the
48 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
49 variable in the <filename>conf/local.conf</filename>
50 file is set to reflect that system.
51 The first value you choose for the variable specifies the package file format for the root
52 filesystem at sysroot.
53 Additional values specify additional formats for convenience or testing.
54 See the configuration file for details.
55 </para>
56
57 <note>
58 For build performance information related to the PMS, see the
59 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>"
60 section in the Yocto Project Reference Manual.
61 </note>
62
63 <para>
64 As an example, consider a scenario where you are using OPKG and you want to add
65 the <filename>libglade</filename> package to the target sysroot.
66 </para>
67
68 <para>
69 First, you should generate the <filename>ipk</filename> file for the
70 <filename>libglade</filename> package and add it
71 into a working <filename>opkg</filename> repository.
72 Use these commands:
73 <literallayout class='monospaced'>
74 $ bitbake libglade
75 $ bitbake package-index
76 </literallayout>
77 </para>
78
79 <para>
80 Next, source the environment setup script found in the
81 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
82 Follow that by setting up the installation destination to point to your
83 sysroot as <filename>&lt;sysroot_dir&gt;</filename>.
84 Finally, have an OPKG configuration file <filename>&lt;conf_file&gt;</filename>
85 that corresponds to the <filename>opkg</filename> repository you have just created.
86 The following command forms should now work:
87 <literallayout class='monospaced'>
88 $ opkg-cl –f &lt;conf_file&gt; -o &lt;sysroot_dir&gt; update
89 $ opkg-cl –f &lt;cconf_file&gt; -o &lt;sysroot_dir&gt; \
90 --force-overwrite install libglade
91 $ opkg-cl –f &lt;cconf_file&gt; -o &lt;sysroot_dir&gt; \
92 --force-overwrite install libglade-dbg
93 $ opkg-cl –f &lt;conf_file&gt; -o &lt;sysroot_dir&gt; \
94 --force-overwrite install libglade-dev
95 </literallayout>
96 </para>
97</section>
98</chapter>
99<!--
100vim: expandtab tw=80 ts=4
101-->
diff --git a/documentation/adt-manual/adt-prepare.xml b/documentation/adt-manual/adt-prepare.xml
new file mode 100644
index 0000000..df9d5b0
--- /dev/null
+++ b/documentation/adt-manual/adt-prepare.xml
@@ -0,0 +1,646 @@
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='adt-prepare'>
6
7<title>Preparing for Application Development</title>
8
9<para>
10 In order to develop applications, you need set up your host development system.
11 Several ways exist that allow you to install cross-development tools, QEMU, the
12 Eclipse Yocto Plug-in, and other tools.
13 This chapter describes how to prepare for application development.
14</para>
15
16<section id='installing-the-adt'>
17 <title>Installing the ADT and Toolchains</title>
18
19 <para>
20 The following list describes installation methods that set up varying degrees of tool
21 availability on your system.
22 Regardless of the installation method you choose,
23 you must <filename>source</filename> the cross-toolchain
24 environment setup script before you use a toolchain.
25 See the "<link linkend='setting-up-the-cross-development-environment'>Setting Up the
26 Cross-Development Environment</link>" section for more information.
27 </para>
28
29 <note>
30 <para>Avoid mixing installation methods when installing toolchains for different architectures.
31 For example, avoid using the ADT Installer to install some toolchains and then hand-installing
32 cross-development toolchains by running the toolchain installer for different architectures.
33 Mixing installation methods can result in situations where the ADT Installer becomes
34 unreliable and might not install the toolchain.</para>
35 <para>If you must mix installation methods, you might avoid problems by deleting
36 <filename>/var/lib/opkg</filename>, thus purging the <filename>opkg</filename> package
37 metadata</para>
38 </note>
39
40 <para>
41 <itemizedlist>
42 <listitem><para><emphasis>Use the ADT installer script:</emphasis>
43 This method is the recommended way to install the ADT because it
44 automates much of the process for you.
45 For example, you can configure the installation to install the QEMU emulator
46 and the user-space NFS, specify which root filesystem profiles to download,
47 and define the target sysroot location.</para></listitem>
48 <listitem><para><emphasis>Use an existing toolchain:</emphasis>
49 Using this method, you select and download an architecture-specific
50 toolchain installer and then run the script to hand-install the toolchain.
51 If you use this method, you just get the cross-toolchain and QEMU - you do not
52 get any of the other mentioned benefits had you run the ADT Installer script.</para></listitem>
53 <listitem><para><emphasis>Use the toolchain from within the Build Directory:</emphasis>
54 If you already have a
55 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
56 you can build the cross-toolchain within the directory.
57 However, like the previous method mentioned, you only get the cross-toolchain and QEMU - you
58 do not get any of the other benefits without taking separate steps.</para></listitem>
59 </itemizedlist>
60 </para>
61
62 <section id='using-the-adt-installer'>
63 <title>Using the ADT Installer</title>
64
65 <para>
66 To run the ADT Installer, you need to get the ADT Installer tarball, be sure
67 you have the necessary host development packages that support the ADT Installer,
68 and then run the ADT Installer Script.
69 </para>
70
71 <para>
72 For a list of the host packages needed to support ADT installation and use, see the
73 "ADT Installer Extras" lists in the
74 "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>" section
75 of the Yocto Project Reference Manual.
76 </para>
77
78 <section id='getting-the-adt-installer-tarball'>
79 <title>Getting the ADT Installer Tarball</title>
80
81 <para>
82 The ADT Installer is contained in the ADT Installer tarball.
83 You can get the tarball using either of these methods:
84 <itemizedlist>
85 <listitem><para><emphasis>Download the Tarball:</emphasis>
86 You can download the tarball from
87 <ulink url='&YOCTO_ADTINSTALLER_DL_URL;'></ulink> into
88 any directory.</para></listitem>
89 <listitem><para><emphasis>Build the Tarball:</emphasis>
90 You can use BitBake to generate the tarball inside an
91 existing
92 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
93 </para>
94 <para>If you use BitBake to generate the ADT Installer
95 tarball, you must <filename>source</filename> the
96 environment setup script
97 (<ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
98 or
99 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
100 located in the Source Directory before running the
101 BitBake command that creates the tarball.</para>
102 <para>The following example commands establish
103 the
104 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
105 check out the current release branch, set up the
106 build environment while also creating the default
107 Build Directory, and run the BitBake command that
108 results in the tarball
109 <filename>poky/build/tmp/deploy/sdk/adt_installer.tar.bz2</filename>:
110 <note>
111 Before using BitBake to build the ADT tarball, be
112 sure to make sure your
113 <filename>local.conf</filename> file is properly
114 configured.
115 </note>
116 <literallayout class='monospaced'>
117 $ cd ~
118 $ git clone git://git.yoctoproject.org/poky
119 $ cd poky
120 $ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
121 $ source &OE_INIT_FILE;
122 $ bitbake adt-installer
123 </literallayout></para></listitem>
124 </itemizedlist>
125 </para>
126 </section>
127
128 <section id='configuring-and-running-the-adt-installer-script'>
129 <title>Configuring and Running the ADT Installer Script</title>
130
131 <para>
132 Before running the ADT Installer script, you need to unpack the tarball.
133 You can unpack the tarball in any directory you wish.
134 For example, this command copies the ADT Installer tarball from where
135 it was built into the home directory and then unpacks the tarball into
136 a top-level directory named <filename>adt-installer</filename>:
137 <literallayout class='monospaced'>
138 $ cd ~
139 $ cp poky/build/tmp/deploy/sdk/adt_installer.tar.bz2 $HOME
140 $ tar -xjf adt_installer.tar.bz2
141 </literallayout>
142 Unpacking it creates the directory <filename>adt-installer</filename>,
143 which contains the ADT Installer script (<filename>adt_installer</filename>)
144 and its configuration file (<filename>adt_installer.conf</filename>).
145 </para>
146
147 <para>
148 Before you run the script, however, you should examine the ADT Installer configuration
149 file and be sure you are going to get what you want.
150 Your configurations determine which kernel and filesystem image are downloaded.
151 </para>
152
153 <para>
154 The following list describes the configurations you can define for the ADT Installer.
155 For configuration values and restrictions, see the comments in
156 the <filename>adt-installer.conf</filename> file:
157
158 <itemizedlist>
159 <listitem><para><filename>YOCTOADT_REPO</filename>: This area
160 includes the IPKG-based packages and the root filesystem upon which
161 the installation is based.
162 If you want to set up your own IPKG repository pointed to by
163 <filename>YOCTOADT_REPO</filename>, you need to be sure that the
164 directory structure follows the same layout as the reference directory
165 set up at <ulink url='http://adtrepo.yoctoproject.org'></ulink>.
166 Also, your repository needs to be accessible through HTTP.</para></listitem>
167 <listitem><para><filename>YOCTOADT_TARGETS</filename>: The machine
168 target architectures for which you want to set up cross-development
169 environments.</para></listitem>
170 <listitem><para><filename>YOCTOADT_QEMU</filename>: Indicates whether
171 or not to install the emulator QEMU.</para></listitem>
172 <listitem><para><filename>YOCTOADT_NFS_UTIL</filename>: Indicates whether
173 or not to install user-mode NFS.
174 If you plan to use the Eclipse IDE Yocto plug-in against QEMU,
175 you should install NFS.
176 <note>To boot QEMU images using our userspace NFS server, you need
177 to be running <filename>portmap</filename> or <filename>rpcbind</filename>.
178 If you are running <filename>rpcbind</filename>, you will also need to add the
179 <filename>-i</filename> option when <filename>rpcbind</filename> starts up.
180 Please make sure you understand the security implications of doing this.
181 You might also have to modify your firewall settings to allow
182 NFS booting to work.</note></para></listitem>
183 <listitem><para><filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>: The root
184 filesystem images you want to download from the
185 <filename>YOCTOADT_IPKG_REPO</filename> repository.</para></listitem>
186 <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_IMAGE_&lt;arch&gt;</filename>: The
187 particular root filesystem used to extract and create the target sysroot.
188 The value of this variable must have been specified with
189 <filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>.
190 For example, if you downloaded both <filename>minimal</filename> and
191 <filename>sato-sdk</filename> images by setting
192 <filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>
193 to "minimal sato-sdk", then <filename>YOCTOADT_ROOTFS_&lt;arch&gt;</filename>
194 must be set to either <filename>minimal</filename> or
195 <filename>sato-sdk</filename>.</para></listitem>
196 <listitem><para><filename>YOCTOADT_TARGET_SYSROOT_LOC_&lt;arch&gt;</filename>: The
197 location on the development host where the target sysroot is created.
198 </para></listitem>
199 </itemizedlist>
200 </para>
201
202 <para>
203 After you have configured the <filename>adt_installer.conf</filename> file,
204 run the installer using the following command.
205 Be sure that you are not trying to use cross-compilation tools.
206 When you run the installer, the environment must use a
207 host <filename>gcc</filename>:
208 <literallayout class='monospaced'>
209 $ cd adt-installer
210 $ ./adt_installer
211 </literallayout>
212 Once the installer begins to run, you are asked to enter the
213 location for cross-toolchain installation.
214 The default location is
215 <filename>/opt/poky/&lt;release&gt;</filename>.
216 After either accepting the default location or selecting your
217 own location, you are prompted to run the installation script
218 interactively or in silent mode.
219 If you want to closely monitor the installation,
220 choose “I” for interactive mode rather than “S” for silent mode.
221 Follow the prompts from the script to complete the installation.
222 </para>
223
224 <para>
225 Once the installation completes, the ADT, which includes the
226 cross-toolchain, is installed in the selected installation
227 directory.
228 You will notice environment setup files for the cross-toolchain
229 in the installation directory, and image tarballs in the
230 <filename>adt-installer</filename> directory according to your
231 installer configurations, and the target sysroot located
232 according to the
233 <filename>YOCTOADT_TARGET_SYSROOT_LOC_&lt;arch&gt;</filename>
234 variable also in your configuration file.
235 </para>
236 </section>
237 </section>
238
239 <section id='using-an-existing-toolchain-tarball'>
240 <title>Using a Cross-Toolchain Tarball</title>
241
242 <para>
243 If you want to simply install a cross-toolchain by hand, you can
244 do so by running the toolchain installer.
245 The installer includes the pre-built cross-toolchain, the
246 <filename>runqemu</filename> script, and support files.
247 If you use this method to install the cross-toolchain, you
248 might still need to install the target sysroot by installing and
249 extracting it separately.
250 For information on how to install the sysroot, see the
251 "<link linkend='extracting-the-root-filesystem'>Extracting the Root Filesystem</link>" section.
252 </para>
253
254 <para>
255 Follow these steps:
256 <orderedlist>
257 <listitem><para>Get your toolchain installer using one of the
258 following methods:
259 <itemizedlist>
260 <listitem><para>Go to
261 <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>
262 and find the folder that matches your host
263 development system (i.e. <filename>i686</filename>
264 for 32-bit machines or <filename>x86_64</filename>
265 for 64-bit machines).</para>
266 <para>Go into that folder and download the toolchain
267 installer whose name includes the appropriate target
268 architecture.
269 The toolchains provided by the Yocto Project
270 are based off of the
271 <filename>core-image-sato</filename> image and
272 contain libraries appropriate for developing
273 against that image.
274 For example, if your host development system is a
275 64-bit x86 system and you are going to use
276 your cross-toolchain for a 32-bit x86
277 target, go into the <filename>x86_64</filename>
278 folder and download the following installer:
279 <literallayout class='monospaced'>
280 poky-eglibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
281 </literallayout></para></listitem>
282 <listitem><para>Build your own toolchain installer.
283 For cases where you cannot use an installer
284 from the download area, you can build your own as
285 described in the
286 "<link linkend='optionally-building-a-toolchain-installer'>Optionally Building a Toolchain Installer</link>"
287 section.</para></listitem>
288 </itemizedlist></para></listitem>
289 <listitem><para>Once you have the installer, run it to install
290 the toolchain.
291 <note>
292 You must change the permissions on the toolchain
293 installer script so that it is executable.
294 </note></para>
295 <para>The following command shows how to run the installer
296 given a toolchain tarball for a 64-bit x86 development host
297 system and a 32-bit x86 target architecture.
298 The example assumes the toolchain installer is located
299 in <filename>~/Downloads/</filename>.
300 <literallayout class='monospaced'>
301 $ ~/Downloads/poky-eglibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
302 </literallayout>
303 The first thing the installer prompts you for is the
304 directory into which you want to install the toolchain.
305 The default directory used is
306 <filename>/opt/poky/&DISTRO;</filename>.
307 If you do not have write permissions for the directory
308 into which you are installing the toolchain, the
309 toolchain installer notifies you and exits.
310 Be sure you have write permissions in the directory and
311 run the installer again.</para>
312 <para>When the script finishes, the cross-toolchain is
313 installed.
314 You will notice environment setup files for the
315 cross-toolchain in the installation directory.
316 </para></listitem>
317 </orderedlist>
318 </para>
319 </section>
320
321 <section id='using-the-toolchain-from-within-the-build-tree'>
322 <title>Using BitBake and the Build Directory</title>
323
324 <para>
325 A final way of making the cross-toolchain available is to use BitBake
326 to generate the toolchain within an existing
327 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
328 This method does not install the toolchain into the default
329 <filename>/opt</filename> directory.
330 As with the previous method, if you need to install the target sysroot, you must
331 do that separately as well.
332 </para>
333
334 <para>
335 Follow these steps to generate the toolchain into the Build Directory:
336 <orderedlist>
337 <listitem><para><emphasis>Set up the Build Environment:</emphasis>
338 Source the OpenEmbedded build environment setup
339 script (i.e.
340 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
341 or
342 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
343 located in the
344 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
345 </para></listitem>
346 <listitem><para><emphasis>Check your Local Configuration File:</emphasis>
347 At this point, you should be sure that the
348 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> variable
349 in the <filename>local.conf</filename> file found in the
350 <filename>conf</filename> directory of the Build Directory
351 is set for the target architecture.
352 Comments within the <filename>local.conf</filename> file
353 list the values you can use for the
354 <filename>MACHINE</filename> variable.
355 <note>
356 You can populate the Build Directory with the
357 cross-toolchains for more than a single architecture.
358 You just need to edit the <filename>MACHINE</filename>
359 variable in the <filename>local.conf</filename> file and
360 re-run the BitBake command.
361 </note></para></listitem>
362 <listitem><para><emphasis>Generate the Cross-Toolchain:</emphasis>
363 Run <filename>bitbake meta-ide-support</filename> to
364 complete the cross-toolchain generation.
365 Once the BitBake command finishes, the cross-toolchain is
366 generated and populated within the Build Directory.
367 You will notice environment setup files for the
368 cross-toolchain that contain the string
369 "<filename>environment-setup</filename>" in the
370 Build Directory's <filename>tmp</filename> folder.</para>
371 <para>Be aware that when you use this method to install the
372 toolchain, you still need to separately extract and install
373 the sysroot filesystem.
374 For information on how to do this, see the
375 "<link linkend='extracting-the-root-filesystem'>Extracting the Root Filesystem</link>" section.
376 </para></listitem>
377 </orderedlist>
378 </para>
379 </section>
380</section>
381
382<section id='setting-up-the-cross-development-environment'>
383 <title>Setting Up the Cross-Development Environment</title>
384
385 <para>
386 Before you can develop using the cross-toolchain, you need to set up the
387 cross-development environment by sourcing the toolchain's environment setup script.
388 If you used the ADT Installer or hand-installed cross-toolchain,
389 then you can find this script in the directory you chose for installation.
390 The default installation directory is the <filename>&YOCTO_ADTPATH_DIR;</filename>
391 directory.
392 If you installed the toolchain in the
393 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
394 you can find the environment setup
395 script for the toolchain in the Build Directory's <filename>tmp</filename> directory.
396 </para>
397
398 <para>
399 Be sure to run the environment setup script that matches the
400 architecture for which you are developing.
401 Environment setup scripts begin with the string
402 "<filename>environment-setup</filename>" and include as part of their
403 name the architecture.
404 For example, the toolchain environment setup script for a 64-bit
405 IA-based architecture installed in the default installation directory
406 would be the following:
407 <literallayout class='monospaced'>
408 &YOCTO_ADTPATH_DIR;/environment-setup-x86_64-poky-linux
409 </literallayout>
410 </para>
411</section>
412
413<section id='securing-kernel-and-filesystem-images'>
414 <title>Securing Kernel and Filesystem Images</title>
415
416 <para>
417 You will need to have a kernel and filesystem image to boot using your
418 hardware or the QEMU emulator.
419 Furthermore, if you plan on booting your image using NFS or you want to use the root filesystem
420 as the target sysroot, you need to extract the root filesystem.
421 </para>
422
423 <section id='getting-the-images'>
424 <title>Getting the Images</title>
425
426 <para>
427 To get the kernel and filesystem images, you either have to build them or download
428 pre-built versions.
429 You can find examples for both these situations in the
430 "<ulink url='&YOCTO_DOCS_QS_URL;#test-run'>A Quick Test Run</ulink>" section of
431 the Yocto Project Quick Start.
432 </para>
433
434 <para>
435 The Yocto Project ships basic kernel and filesystem images for several
436 architectures (<filename>x86</filename>, <filename>x86-64</filename>,
437 <filename>mips</filename>, <filename>powerpc</filename>, and <filename>arm</filename>)
438 that you can use unaltered in the QEMU emulator.
439 These kernel images reside in the release
440 area - <ulink url='&YOCTO_MACHINES_DL_URL;'></ulink>
441 and are ideal for experimentation using Yocto Project.
442 For information on the image types you can build using the OpenEmbedded build system,
443 see the
444 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter in
445 the Yocto Project Reference Manual.
446 </para>
447
448 <para>
449 If you are planning on developing against your image and you are not
450 building or using one of the Yocto Project development images
451 (e.g. <filename>core-image-*-dev</filename>), you must be sure to
452 include the development packages as part of your image recipe.
453 </para>
454
455 <para>
456 Furthermore, if you plan on remotely deploying and debugging your
457 application from within the
458 Eclipse IDE, you must have an image that contains the Yocto Target Communication
459 Framework (TCF) agent (<filename>tcf-agent</filename>).
460 By default, the Yocto Project provides only one type of pre-built
461 image that contains the <filename>tcf-agent</filename>.
462 And, those images are SDK (e.g.<filename>core-image-sato-sdk</filename>).
463 </para>
464
465 <para>
466 If you want to use a different image type that contains the <filename>tcf-agent</filename>,
467 you can do so one of two ways:
468 <itemizedlist>
469 <listitem><para>Modify the <filename>conf/local.conf</filename> configuration in
470 the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
471 and then rebuild the image.
472 With this method, you need to modify the
473 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
474 variable to have the value of "tools-debug" before rebuilding the image.
475 Once the image is rebuilt, the <filename>tcf-agent</filename> will be included
476 in the image and is launched automatically after the boot.</para></listitem>
477 <listitem><para>Manually build the <filename>tcf-agent</filename>.
478 To build the agent, follow these steps:
479 <orderedlist>
480 <listitem><para>Be sure the ADT is installed as described in the
481 "<link linkend='installing-the-adt'>Installing the ADT and Toolchains</link>" section.
482 </para></listitem>
483 <listitem><para>Set up the cross-development environment as described in the
484 "<link linkend='setting-up-the-cross-development-environment'>Setting
485 Up the Cross-Development Environment</link>" section.</para></listitem>
486 <listitem><para>Get the <filename>tcf-agent</filename> source code using
487 the following commands:
488 <literallayout class='monospaced'>
489 $ git clone http://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git
490 $ cd org.eclipse.tcf.agent/agent
491 </literallayout></para></listitem>
492 <listitem><para>Locate the
493 <filename>Makefile.inc</filename> file inside the
494 <filename>agent</filename> folder and modify it
495 for the cross-compilation environment by setting the
496 <filename>OPSYS</filename> and
497 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
498 variables according to your target.
499 </para></listitem>
500 <listitem><para>Use the cross-development tools to build the
501 <filename>tcf-agent</filename>.
502 Before you "Make" the file, be sure your cross-tools are set up first.
503 See the "<link linkend='makefile-based-projects'>Makefile-Based Projects</link>"
504 section for information on how to make sure the cross-tools are set up
505 correctly.</para>
506 <para>If the build is successful, the <filename>tcf-agent</filename> output will
507 be <filename>obj/$(OPSYS)/$(MACHINE)/Debug/agent</filename>.</para></listitem>
508 <listitem><para>Deploy the agent into the image's root filesystem.</para></listitem>
509 </orderedlist>
510 </para></listitem>
511 </itemizedlist>
512 </para>
513 </section>
514
515 <section id='extracting-the-root-filesystem'>
516 <title>Extracting the Root Filesystem</title>
517
518 <para>
519 If you install your toolchain by hand or build it using BitBake and
520 you need a root filesystem, you need to extract it separately.
521 If you use the ADT Installer to install the ADT, the root
522 filesystem is automatically extracted and installed.
523 </para>
524
525 <para>
526 Here are some cases where you need to extract the root filesystem:
527 <itemizedlist>
528 <listitem><para>You want to boot the image using NFS.
529 </para></listitem>
530 <listitem><para>You want to use the root filesystem as the
531 target sysroot.
532 For example, the Eclipse IDE environment with the Eclipse
533 Yocto Plug-in installed allows you to use QEMU to boot
534 under NFS.</para></listitem>
535 <listitem><para>You want to develop your target application
536 using the root filesystem as the target sysroot.
537 </para></listitem>
538 </itemizedlist>
539 </para>
540
541 <para>
542 To extract the root filesystem, first <filename>source</filename>
543 the cross-development environment setup script.
544 If you built the toolchain in the Build Directory, you will find
545 the toolchain environment script in the
546 <filename>tmp</filename> directory.
547 If you installed the toolchain by hand, the environment setup
548 script is located in <filename>/opt/poky/&DISTRO;</filename>.
549 </para>
550
551 <para>
552 After sourcing the environment script, use the
553 <filename>runqemu-extract-sdk</filename> command and provide the
554 filesystem image.
555 </para>
556
557 <para>
558 Following is an example.
559 The second command sets up the environment.
560 In this case, the setup script is located in the
561 <filename>/opt/poky/&DISTRO;</filename> directory.
562 The third command extracts the root filesystem from a previously
563 built filesystem that is located in the
564 <filename>~/Downloads</filename> directory.
565 Furthermore, this command extracts the root filesystem into the
566 <filename>qemux86-sato</filename> directory:
567 <literallayout class='monospaced'>
568 $ cd ~
569 $ source /opt/poky/&DISTRO;/environment-setup-i586-poky-linux
570 $ runqemu-extract-sdk \
571 ~/Downloads/core-image-sato-sdk-qemux86-2011091411831.rootfs.tar.bz2 \
572 $HOME/qemux86-sato
573 </literallayout>
574 You could now point to the target sysroot at
575 <filename>qemux86-sato</filename>.
576 </para>
577 </section>
578</section>
579
580<section id='optionally-building-a-toolchain-installer'>
581 <title>Optionally Building a Toolchain Installer</title>
582
583 <para>
584 As an alternative to locating and downloading a toolchain installer,
585 you can build the toolchain installer one of two ways if you have a
586 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
587 <itemizedlist>
588 <listitem><para>Use <filename>bitbake meta-toolchain</filename>.
589 This method requires you to still install the target
590 sysroot by installing and extracting it separately.
591 For information on how to install the sysroot, see the
592 "<link linkend='extracting-the-root-filesystem'>Extracting the Root Filesystem</link>"
593 section.</para></listitem>
594 <listitem><para>Use
595 <filename>bitbake image -c populate_sdk</filename>.
596 This method has significant advantages over the previous method
597 because it results in a toolchain installer that contains the
598 sysroot that matches your target root filesystem.
599 </para></listitem>
600 </itemizedlist>
601 </para>
602
603 <para>
604 Remember, before using any BitBake command, you
605 must source the build environment setup script
606 (i.e.
607 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
608 or
609 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
610 located in the Source Directory and you must make sure your
611 <filename>conf/local.conf</filename> variables are correct.
612 In particular, you need to be sure the
613 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
614 variable matches the architecture for which you are building and that
615 the
616 <ulink url='&YOCTO_DOCS_REF_URL;#var-SDKMACHINE'><filename>SDKMACHINE</filename></ulink>
617 variable is correctly set if you are building a toolchain designed to
618 run on an architecture that differs from your current development host
619 machine (i.e. the build machine).
620 </para>
621
622 <para>
623 When the BitBake command completes, the toolchain installer will be in
624 <filename>tmp/deploy/sdk</filename> in the Build Directory.
625 <note>
626 By default, this toolchain does not build static binaries.
627 If you want to use the toolchain to build these types of libraries,
628 you need to be sure your image has the appropriate static
629 development libraries.
630 Use the
631 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>
632 variable inside your <filename>local.conf</filename> file to
633 install the appropriate library packages.
634 Following is an example using <filename>eglibc</filename> static
635 development libraries:
636 <literallayout class='monospaced'>
637 IMAGE_INSTALL_append = " eglibc-staticdev"
638 </literallayout>
639 </note>
640 </para>
641</section>
642
643</chapter>
644<!--
645vim: expandtab tw=80 ts=4
646-->
diff --git a/documentation/adt-manual/adt-style.css b/documentation/adt-manual/adt-style.css
new file mode 100644
index 0000000..3b098aa
--- /dev/null
+++ b/documentation/adt-manual/adt-style.css
@@ -0,0 +1,979 @@
1/*
2 Generic XHTML / DocBook XHTML CSS Stylesheet.
3
4 Browser wrangling and typographic design by
5 Oyvind Kolas / pippin@gimp.org
6
7 Customised for Poky by
8 Matthew Allum / mallum@o-hand.com
9
10 Thanks to:
11 Liam R. E. Quin
12 William Skaggs
13 Jakub Steiner
14
15 Structure
16 ---------
17
18 The stylesheet is divided into the following sections:
19
20 Positioning
21 Margins, paddings, width, font-size, clearing.
22 Decorations
23 Borders, style
24 Colors
25 Colors
26 Graphics
27 Graphical backgrounds
28 Nasty IE tweaks
29 Workarounds needed to make it work in internet explorer,
30 currently makes the stylesheet non validating, but up until
31 this point it is validating.
32 Mozilla extensions
33 Transparency for footer
34 Rounded corners on boxes
35
36*/
37
38
39 /*************** /
40 / Positioning /
41/ ***************/
42
43body {
44 font-family: Verdana, Sans, sans-serif;
45
46 min-width: 640px;
47 width: 80%;
48 margin: 0em auto;
49 padding: 2em 5em 5em 5em;
50 color: #333;
51}
52
53h1,h2,h3,h4,h5,h6,h7 {
54 font-family: Arial, Sans;
55 color: #00557D;
56 clear: both;
57}
58
59h1 {
60 font-size: 2em;
61 text-align: left;
62 padding: 0em 0em 0em 0em;
63 margin: 2em 0em 0em 0em;
64}
65
66h2.subtitle {
67 margin: 0.10em 0em 3.0em 0em;
68 padding: 0em 0em 0em 0em;
69 font-size: 1.8em;
70 padding-left: 20%;
71 font-weight: normal;
72 font-style: italic;
73}
74
75h2 {
76 margin: 2em 0em 0.66em 0em;
77 padding: 0.5em 0em 0em 0em;
78 font-size: 1.5em;
79 font-weight: bold;
80}
81
82h3.subtitle {
83 margin: 0em 0em 1em 0em;
84 padding: 0em 0em 0em 0em;
85 font-size: 142.14%;
86 text-align: right;
87}
88
89h3 {
90 margin: 1em 0em 0.5em 0em;
91 padding: 1em 0em 0em 0em;
92 font-size: 140%;
93 font-weight: bold;
94}
95
96h4 {
97 margin: 1em 0em 0.5em 0em;
98 padding: 1em 0em 0em 0em;
99 font-size: 120%;
100 font-weight: bold;
101}
102
103h5 {
104 margin: 1em 0em 0.5em 0em;
105 padding: 1em 0em 0em 0em;
106 font-size: 110%;
107 font-weight: bold;
108}
109
110h6 {
111 margin: 1em 0em 0em 0em;
112 padding: 1em 0em 0em 0em;
113 font-size: 110%;
114 font-weight: bold;
115}
116
117.authorgroup {
118 background-color: transparent;
119 background-repeat: no-repeat;
120 padding-top: 256px;
121 background-image: url("figures/adt-title.png");
122 background-position: left top;
123 margin-top: -256px;
124 padding-right: 50px;
125 margin-left: 0px;
126 text-align: right;
127 width: 740px;
128}
129
130h3.author {
131 margin: 0em 0me 0em 0em;
132 padding: 0em 0em 0em 0em;
133 font-weight: normal;
134 font-size: 100%;
135 color: #333;
136 clear: both;
137}
138
139.author tt.email {
140 font-size: 66%;
141}
142
143.titlepage hr {
144 width: 0em;
145 clear: both;
146}
147
148.revhistory {
149 padding-top: 2em;
150 clear: both;
151}
152
153.toc,
154.list-of-tables,
155.list-of-examples,
156.list-of-figures {
157 padding: 1.33em 0em 2.5em 0em;
158 color: #00557D;
159}
160
161.toc p,
162.list-of-tables p,
163.list-of-figures p,
164.list-of-examples p {
165 padding: 0em 0em 0em 0em;
166 padding: 0em 0em 0.3em;
167 margin: 1.5em 0em 0em 0em;
168}
169
170.toc p b,
171.list-of-tables p b,
172.list-of-figures p b,
173.list-of-examples p b{
174 font-size: 100.0%;
175 font-weight: bold;
176}
177
178.toc dl,
179.list-of-tables dl,
180.list-of-figures dl,
181.list-of-examples dl {
182 margin: 0em 0em 0.5em 0em;
183 padding: 0em 0em 0em 0em;
184}
185
186.toc dt {
187 margin: 0em 0em 0em 0em;
188 padding: 0em 0em 0em 0em;
189}
190
191.toc dd {
192 margin: 0em 0em 0em 2.6em;
193 padding: 0em 0em 0em 0em;
194}
195
196div.glossary dl,
197div.variablelist dl {
198}
199
200.glossary dl dt,
201.variablelist dl dt,
202.variablelist dl dt span.term {
203 font-weight: normal;
204 width: 20em;
205 text-align: right;
206}
207
208.variablelist dl dt {
209 margin-top: 0.5em;
210}
211
212.glossary dl dd,
213.variablelist dl dd {
214 margin-top: -1em;
215 margin-left: 25.5em;
216}
217
218.glossary dd p,
219.variablelist dd p {
220 margin-top: 0em;
221 margin-bottom: 1em;
222}
223
224
225div.calloutlist table td {
226 padding: 0em 0em 0em 0em;
227 margin: 0em 0em 0em 0em;
228}
229
230div.calloutlist table td p {
231 margin-top: 0em;
232 margin-bottom: 1em;
233}
234
235div p.copyright {
236 text-align: left;
237}
238
239div.legalnotice p.legalnotice-title {
240 margin-bottom: 0em;
241}
242
243p {
244 line-height: 1.5em;
245 margin-top: 0em;
246
247}
248
249dl {
250 padding-top: 0em;
251}
252
253hr {
254 border: solid 1px;
255}
256
257
258.mediaobject,
259.mediaobjectco {
260 text-align: center;
261}
262
263img {
264 border: none;
265}
266
267ul {
268 padding: 0em 0em 0em 1.5em;
269}
270
271ul li {
272 padding: 0em 0em 0em 0em;
273}
274
275ul li p {
276 text-align: left;
277}
278
279table {
280 width :100%;
281}
282
283th {
284 padding: 0.25em;
285 text-align: left;
286 font-weight: normal;
287 vertical-align: top;
288}
289
290td {
291 padding: 0.25em;
292 vertical-align: top;
293}
294
295p a[id] {
296 margin: 0px;
297 padding: 0px;
298 display: inline;
299 background-image: none;
300}
301
302a {
303 text-decoration: underline;
304 color: #444;
305}
306
307pre {
308 overflow: auto;
309}
310
311a:hover {
312 text-decoration: underline;
313 /*font-weight: bold;*/
314}
315
316
317div.informalfigure,
318div.informalexample,
319div.informaltable,
320div.figure,
321div.table,
322div.example {
323 margin: 1em 0em;
324 padding: 1em;
325 page-break-inside: avoid;
326}
327
328
329div.informalfigure p.title b,
330div.informalexample p.title b,
331div.informaltable p.title b,
332div.figure p.title b,
333div.example p.title b,
334div.table p.title b{
335 padding-top: 0em;
336 margin-top: 0em;
337 font-size: 100%;
338 font-weight: normal;
339}
340
341.mediaobject .caption,
342.mediaobject .caption p {
343 text-align: center;
344 font-size: 80%;
345 padding-top: 0.5em;
346 padding-bottom: 0.5em;
347}
348
349.epigraph {
350 padding-left: 55%;
351 margin-bottom: 1em;
352}
353
354.epigraph p {
355 text-align: left;
356}
357
358.epigraph .quote {
359 font-style: italic;
360}
361.epigraph .attribution {
362 font-style: normal;
363 text-align: right;
364}
365
366span.application {
367 font-style: italic;
368}
369
370.programlisting {
371 font-family: monospace;
372 font-size: 80%;
373 white-space: pre;
374 margin: 1.33em 0em;
375 padding: 1.33em;
376}
377
378.tip,
379.warning,
380.caution,
381.note {
382 margin-top: 1em;
383 margin-bottom: 1em;
384
385}
386
387/* force full width of table within div */
388.tip table,
389.warning table,
390.caution table,
391.note table {
392 border: none;
393 width: 100%;
394}
395
396
397.tip table th,
398.warning table th,
399.caution table th,
400.note table th {
401 padding: 0.8em 0.0em 0.0em 0.0em;
402 margin : 0em 0em 0em 0em;
403}
404
405.tip p,
406.warning p,
407.caution p,
408.note p {
409 margin-top: 0.5em;
410 margin-bottom: 0.5em;
411 padding-right: 1em;
412 text-align: left;
413}
414
415.acronym {
416 text-transform: uppercase;
417}
418
419b.keycap,
420.keycap {
421 padding: 0.09em 0.3em;
422 margin: 0em;
423}
424
425.itemizedlist li {
426 clear: none;
427}
428
429.filename {
430 font-size: medium;
431 font-family: Courier, monospace;
432}
433
434
435div.navheader, div.heading{
436 position: absolute;
437 left: 0em;
438 top: 0em;
439 width: 100%;
440 background-color: #cdf;
441 width: 100%;
442}
443
444div.navfooter, div.footing{
445 position: fixed;
446 left: 0em;
447 bottom: 0em;
448 background-color: #eee;
449 width: 100%;
450}
451
452
453div.navheader td,
454div.navfooter td {
455 font-size: 66%;
456}
457
458div.navheader table th {
459 /*font-family: Georgia, Times, serif;*/
460 /*font-size: x-large;*/
461 font-size: 80%;
462}
463
464div.navheader table {
465 border-left: 0em;
466 border-right: 0em;
467 border-top: 0em;
468 width: 100%;
469}
470
471div.navfooter table {
472 border-left: 0em;
473 border-right: 0em;
474 border-bottom: 0em;
475 width: 100%;
476}
477
478div.navheader table td a,
479div.navfooter table td a {
480 color: #777;
481 text-decoration: none;
482}
483
484/* normal text in the footer */
485div.navfooter table td {
486 color: black;
487}
488
489div.navheader table td a:visited,
490div.navfooter table td a:visited {
491 color: #444;
492}
493
494
495/* links in header and footer */
496div.navheader table td a:hover,
497div.navfooter table td a:hover {
498 text-decoration: underline;
499 background-color: transparent;
500 color: #33a;
501}
502
503div.navheader hr,
504div.navfooter hr {
505 display: none;
506}
507
508
509.qandaset tr.question td p {
510 margin: 0em 0em 1em 0em;
511 padding: 0em 0em 0em 0em;
512}
513
514.qandaset tr.answer td p {
515 margin: 0em 0em 1em 0em;
516 padding: 0em 0em 0em 0em;
517}
518.answer td {
519 padding-bottom: 1.5em;
520}
521
522.emphasis {
523 font-weight: bold;
524}
525
526
527 /************* /
528 / decorations /
529/ *************/
530
531.titlepage {
532}
533
534.part .title {
535}
536
537.subtitle {
538 border: none;
539}
540
541/*
542h1 {
543 border: none;
544}
545
546h2 {
547 border-top: solid 0.2em;
548 border-bottom: solid 0.06em;
549}
550
551h3 {
552 border-top: 0em;
553 border-bottom: solid 0.06em;
554}
555
556h4 {
557 border: 0em;
558 border-bottom: solid 0.06em;
559}
560
561h5 {
562 border: 0em;
563}
564*/
565
566.programlisting {
567 border: solid 1px;
568}
569
570div.figure,
571div.table,
572div.informalfigure,
573div.informaltable,
574div.informalexample,
575div.example {
576 border: 1px solid;
577}
578
579
580
581.tip,
582.warning,
583.caution,
584.note {
585 border: 1px solid;
586}
587
588.tip table th,
589.warning table th,
590.caution table th,
591.note table th {
592 border-bottom: 1px solid;
593}
594
595.question td {
596 border-top: 1px solid black;
597}
598
599.answer {
600}
601
602
603b.keycap,
604.keycap {
605 border: 1px solid;
606}
607
608
609div.navheader, div.heading{
610 border-bottom: 1px solid;
611}
612
613
614div.navfooter, div.footing{
615 border-top: 1px solid;
616}
617
618 /********* /
619 / colors /
620/ *********/
621
622body {
623 color: #333;
624 background: white;
625}
626
627a {
628 background: transparent;
629}
630
631a:hover {
632 background-color: #dedede;
633}
634
635
636h1,
637h2,
638h3,
639h4,
640h5,
641h6,
642h7,
643h8 {
644 background-color: transparent;
645}
646
647hr {
648 border-color: #aaa;
649}
650
651
652.tip, .warning, .caution, .note {
653 border-color: #fff;
654}
655
656
657.tip table th,
658.warning table th,
659.caution table th,
660.note table th {
661 border-bottom-color: #fff;
662}
663
664
665.warning {
666 background-color: #f0f0f2;
667}
668
669.caution {
670 background-color: #f0f0f2;
671}
672
673.tip {
674 background-color: #f0f0f2;
675}
676
677.note {
678 background-color: #f0f0f2;
679}
680
681.glossary dl dt,
682.variablelist dl dt,
683.variablelist dl dt span.term {
684 color: #044;
685}
686
687div.figure,
688div.table,
689div.example,
690div.informalfigure,
691div.informaltable,
692div.informalexample {
693 border-color: #aaa;
694}
695
696pre.programlisting {
697 color: black;
698 background-color: #fff;
699 border-color: #aaa;
700 border-width: 2px;
701}
702
703.guimenu,
704.guilabel,
705.guimenuitem {
706 background-color: #eee;
707}
708
709
710b.keycap,
711.keycap {
712 background-color: #eee;
713 border-color: #999;
714}
715
716
717div.navheader {
718 border-color: black;
719}
720
721
722div.navfooter {
723 border-color: black;
724}
725
726
727 /*********** /
728 / graphics /
729/ ***********/
730
731/*
732body {
733 background-image: url("images/body_bg.jpg");
734 background-attachment: fixed;
735}
736
737.navheader,
738.note,
739.tip {
740 background-image: url("images/note_bg.jpg");
741 background-attachment: fixed;
742}
743
744.warning,
745.caution {
746 background-image: url("images/warning_bg.jpg");
747 background-attachment: fixed;
748}
749
750.figure,
751.informalfigure,
752.example,
753.informalexample,
754.table,
755.informaltable {
756 background-image: url("images/figure_bg.jpg");
757 background-attachment: fixed;
758}
759
760*/
761h1,
762h2,
763h3,
764h4,
765h5,
766h6,
767h7{
768}
769
770/*
771Example of how to stick an image as part of the title.
772
773div.article .titlepage .title
774{
775 background-image: url("figures/white-on-black.png");
776 background-position: center;
777 background-repeat: repeat-x;
778}
779*/
780
781div.preface .titlepage .title,
782div.colophon .title,
783div.chapter .titlepage .title,
784div.article .titlepage .title
785{
786}
787
788div.section div.section .titlepage .title,
789div.sect2 .titlepage .title {
790 background: none;
791}
792
793
794h1.title {
795 background-color: transparent;
796 background-image: url("figures/yocto-project-bw.png");
797 background-repeat: no-repeat;
798 height: 256px;
799 text-indent: -9000px;
800 overflow:hidden;
801}
802
803h2.subtitle {
804 background-color: transparent;
805 text-indent: -9000px;
806 overflow:hidden;
807 width: 0px;
808 display: none;
809}
810
811 /*************************************** /
812 / pippin.gimp.org specific alterations /
813/ ***************************************/
814
815/*
816div.heading, div.navheader {
817 color: #777;
818 font-size: 80%;
819 padding: 0;
820 margin: 0;
821 text-align: left;
822 position: absolute;
823 top: 0px;
824 left: 0px;
825 width: 100%;
826 height: 50px;
827 background: url('/gfx/heading_bg.png') transparent;
828 background-repeat: repeat-x;
829 background-attachment: fixed;
830 border: none;
831}
832
833div.heading a {
834 color: #444;
835}
836
837div.footing, div.navfooter {
838 border: none;
839 color: #ddd;
840 font-size: 80%;
841 text-align:right;
842
843 width: 100%;
844 padding-top: 10px;
845 position: absolute;
846 bottom: 0px;
847 left: 0px;
848
849 background: url('/gfx/footing_bg.png') transparent;
850}
851*/
852
853
854
855 /****************** /
856 / nasty ie tweaks /
857/ ******************/
858
859/*
860div.heading, div.navheader {
861 width:expression(document.body.clientWidth + "px");
862}
863
864div.footing, div.navfooter {
865 width:expression(document.body.clientWidth + "px");
866 margin-left:expression("-5em");
867}
868body {
869 padding:expression("4em 5em 0em 5em");
870}
871*/
872
873 /**************************************** /
874 / mozilla vendor specific css extensions /
875/ ****************************************/
876/*
877div.navfooter, div.footing{
878 -moz-opacity: 0.8em;
879}
880
881div.figure,
882div.table,
883div.informalfigure,
884div.informaltable,
885div.informalexample,
886div.example,
887.tip,
888.warning,
889.caution,
890.note {
891 -moz-border-radius: 0.5em;
892}
893
894b.keycap,
895.keycap {
896 -moz-border-radius: 0.3em;
897}
898*/
899
900table tr td table tr td {
901 display: none;
902}
903
904
905hr {
906 display: none;
907}
908
909table {
910 border: 0em;
911}
912
913 .photo {
914 float: right;
915 margin-left: 1.5em;
916 margin-bottom: 1.5em;
917 margin-top: 0em;
918 max-width: 17em;
919 border: 1px solid gray;
920 padding: 3px;
921 background: white;
922}
923 .seperator {
924 padding-top: 2em;
925 clear: both;
926 }
927
928 #validators {
929 margin-top: 5em;
930 text-align: right;
931 color: #777;
932 }
933 @media print {
934 body {
935 font-size: 8pt;
936 }
937 .noprint {
938 display: none;
939 }
940 }
941
942
943.tip,
944.note {
945 background: #f0f0f2;
946 color: #333;
947 padding: 20px;
948 margin: 20px;
949}
950
951.tip h3,
952.note h3 {
953 padding: 0em;
954 margin: 0em;
955 font-size: 2em;
956 font-weight: bold;
957 color: #333;
958}
959
960.tip a,
961.note a {
962 color: #333;
963 text-decoration: underline;
964}
965
966.footnote {
967 font-size: small;
968 color: #333;
969}
970
971/* Changes the announcement text */
972.tip h3,
973.warning h3,
974.caution h3,
975.note h3 {
976 font-size:large;
977 color: #00557D;
978}
979
diff --git a/documentation/adt-manual/figures/adt-title.png b/documentation/adt-manual/figures/adt-title.png
new file mode 100644
index 0000000..6e71e41
--- /dev/null
+++ b/documentation/adt-manual/figures/adt-title.png
Binary files differ
diff --git a/documentation/bsp-guide/bsp-guide-customization.xsl b/documentation/bsp-guide/bsp-guide-customization.xsl
new file mode 100644
index 0000000..5560289
--- /dev/null
+++ b/documentation/bsp-guide/bsp-guide-customization.xsl
@@ -0,0 +1,10 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
5
6 <xsl:param name="html.stylesheet" select="'bsp-style.css'" />
7 <xsl:param name="chapter.autolabel" select="1" />
8 <xsl:param name="section.autolabel" select="1" />
9 <xsl:param name="section.label.includes.component.label" select="1" />
10</xsl:stylesheet>
diff --git a/documentation/bsp-guide/bsp-guide-eclipse-customization.xsl b/documentation/bsp-guide/bsp-guide-eclipse-customization.xsl
new file mode 100644
index 0000000..1c80bee
--- /dev/null
+++ b/documentation/bsp-guide/bsp-guide-eclipse-customization.xsl
@@ -0,0 +1,27 @@
1<?xml version='1.0'?>
2<xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 version="1.0">
7
8 <xsl:import
9 href="http://docbook.sourceforge.net/release/xsl/current/eclipse/eclipse3.xsl" />
10
11 <xsl:param name="chunker.output.indent" select="'yes'"/>
12 <xsl:param name="chunk.quietly" select="1"/>
13 <xsl:param name="chunk.first.sections" select="1"/>
14 <xsl:param name="chunk.section.depth" select="10"/>
15 <xsl:param name="use.id.as.filename" select="1"/>
16 <xsl:param name="ulink.target" select="'_self'" />
17 <xsl:param name="base.dir" select="'html/bsp-guide/'"/>
18 <xsl:param name="html.stylesheet" select="'../book.css'"/>
19 <xsl:param name="eclipse.manifest" select="0"/>
20 <xsl:param name="create.plugin.xml" select="0"/>
21 <xsl:param name="suppress.navigation" select="1"/>
22 <xsl:param name="generate.index" select="0"/>
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel" select="1" />
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27</xsl:stylesheet>
diff --git a/documentation/bsp-guide/bsp-guide.xml b/documentation/bsp-guide/bsp-guide.xml
new file mode 100644
index 0000000..86b16d1
--- /dev/null
+++ b/documentation/bsp-guide/bsp-guide.xml
@@ -0,0 +1,118 @@
1<!DOCTYPE book 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<book id='bsp-guide' lang='en'
6 xmlns:xi="http://www.w3.org/2003/XInclude"
7 xmlns="http://docbook.org/ns/docbook"
8 >
9 <bookinfo>
10
11 <mediaobject>
12 <imageobject>
13 <imagedata fileref='figures/bsp-title.png'
14 format='SVG'
15 align='center' scalefit='1' width='100%'/>
16 </imageobject>
17 </mediaobject>
18
19 <title>
20 Yocto Project Board Support Package Developer's Guide
21 </title>
22
23 <authorgroup>
24 <author>
25 <firstname>Tom</firstname> <surname>Zanussi</surname>
26 <affiliation>
27 <orgname>Intel Corporation</orgname>
28 </affiliation>
29 <email>tom.zanussi@intel.com</email>
30 </author>
31 <author>
32 <firstname>Richard</firstname> <surname>Purdie</surname>
33 <affiliation>
34 <orgname>Linux Foundation</orgname>
35 </affiliation>
36 <email>richard.purdie@linuxfoundation.org</email>
37 </author>
38 </authorgroup>
39
40 <revhistory>
41 <revision>
42 <revnumber>0.9</revnumber>
43 <date>24 November 2010</date>
44 <revremark>The initial document draft released with the Yocto Project 0.9 Release.</revremark>
45 </revision>
46 <revision>
47 <revnumber>1.0</revnumber>
48 <date>6 April 2011</date>
49 <revremark>Released with the Yocto Project 1.0 Release.</revremark>
50 </revision>
51 <revision>
52 <revnumber>1.0.1</revnumber>
53 <date>23 May 2011</date>
54 <revremark>Released with the Yocto Project 1.0.1 Release.</revremark>
55 </revision>
56 <revision>
57 <revnumber>1.1</revnumber>
58 <date>6 October 2011</date>
59 <revremark>Released with the Yocto Project 1.1 Release.</revremark>
60 </revision>
61 <revision>
62 <revnumber>1.2</revnumber>
63 <date>April 2012</date>
64 <revremark>Released with the Yocto Project 1.2 Release.</revremark>
65 </revision>
66 <revision>
67 <revnumber>1.3</revnumber>
68 <date>October 2012</date>
69 <revremark>Released with the Yocto Project 1.3 Release.</revremark>
70 </revision>
71 <revision>
72 <revnumber>1.4</revnumber>
73 <date>April 2013</date>
74 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
75 </revision>
76 <revision>
77 <revnumber>1.5</revnumber>
78 <date>October 2013</date>
79 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
80 </revision>
81 <revision>
82 <revnumber>1.5.1</revnumber>
83 <date>Sometime in 2013</date>
84 <revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
85 </revision>
86 </revhistory>
87
88 <copyright>
89 <year>&COPYRIGHT_YEAR;</year>
90 <holder>Linux Foundation</holder>
91 </copyright>
92
93 <legalnotice>
94 <para>
95 Permission is granted to copy, distribute and/or modify this document under
96 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-nc-sa/2.0/uk/">Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
97 </para>
98 <note>
99 For the latest version of this manual associated with this
100 Yocto Project release, see the
101 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>
102 from the Yocto Project website.
103 </note>
104 </legalnotice>
105
106 </bookinfo>
107
108 <xi:include href="bsp.xml"/>
109
110<!-- <index id='index'>
111 <title>Index</title>
112 </index>
113-->
114
115</book>
116<!--
117vim: expandtab tw=80 ts=4
118-->
diff --git a/documentation/bsp-guide/bsp-style.css b/documentation/bsp-guide/bsp-style.css
new file mode 100644
index 0000000..4a1a45e
--- /dev/null
+++ b/documentation/bsp-guide/bsp-style.css
@@ -0,0 +1,980 @@
1/*
2 Generic XHTML / DocBook XHTML CSS Stylesheet.
3
4 Browser wrangling and typographic design by
5 Oyvind Kolas / pippin@gimp.org
6
7 Customised for Poky by
8 Matthew Allum / mallum@o-hand.com
9
10 Thanks to:
11 Liam R. E. Quin
12 William Skaggs
13 Jakub Steiner
14
15 Structure
16 ---------
17
18 The stylesheet is divided into the following sections:
19
20 Positioning
21 Margins, paddings, width, font-size, clearing.
22 Decorations
23 Borders, style
24 Colors
25 Colors
26 Graphics
27 Graphical backgrounds
28 Nasty IE tweaks
29 Workarounds needed to make it work in internet explorer,
30 currently makes the stylesheet non validating, but up until
31 this point it is validating.
32 Mozilla extensions
33 Transparency for footer
34 Rounded corners on boxes
35
36*/
37
38
39 /*************** /
40 / Positioning /
41/ ***************/
42
43body {
44 font-family: Verdana, Sans, sans-serif;
45
46 min-width: 640px;
47 width: 80%;
48 margin: 0em auto;
49 padding: 2em 5em 5em 5em;
50 color: #333;
51}
52
53h1,h2,h3,h4,h5,h6,h7 {
54 font-family: Arial, Sans;
55 color: #00557D;
56 clear: both;
57}
58
59h1 {
60 font-size: 2em;
61 text-align: left;
62 padding: 0em 0em 0em 0em;
63 margin: 2em 0em 0em 0em;
64}
65
66h2.subtitle {
67 margin: 0.10em 0em 3.0em 0em;
68 padding: 0em 0em 0em 0em;
69 font-size: 1.8em;
70 padding-left: 20%;
71 font-weight: normal;
72 font-style: italic;
73}
74
75h2 {
76 margin: 2em 0em 0.66em 0em;
77 padding: 0.5em 0em 0em 0em;
78 font-size: 1.5em;
79 font-weight: bold;
80}
81
82h3.subtitle {
83 margin: 0em 0em 1em 0em;
84 padding: 0em 0em 0em 0em;
85 font-size: 142.14%;
86 text-align: right;
87}
88
89h3 {
90 margin: 1em 0em 0.5em 0em;
91 padding: 1em 0em 0em 0em;
92 font-size: 140%;
93 font-weight: bold;
94}
95
96h4 {
97 margin: 1em 0em 0.5em 0em;
98 padding: 1em 0em 0em 0em;
99 font-size: 120%;
100 font-weight: bold;
101}
102
103h5 {
104 margin: 1em 0em 0.5em 0em;
105 padding: 1em 0em 0em 0em;
106 font-size: 110%;
107 font-weight: bold;
108}
109
110h6 {
111 margin: 1em 0em 0em 0em;
112 padding: 1em 0em 0em 0em;
113 font-size: 110%;
114 font-weight: bold;
115}
116
117.authorgroup {
118 background-color: transparent;
119 background-repeat: no-repeat;
120 padding-top: 256px;
121 background-image: url("figures/bsp-title.png");
122 background-position: left top;
123 margin-top: -256px;
124 padding-right: 50px;
125 margin-left: 0px;
126 text-align: right;
127 width: 740px;
128}
129
130h3.author {
131 margin: 0em 0me 0em 0em;
132 padding: 0em 0em 0em 0em;
133 font-weight: normal;
134 font-size: 100%;
135 color: #333;
136 clear: both;
137}
138
139.author tt.email {
140 font-size: 66%;
141}
142
143.titlepage hr {
144 width: 0em;
145 clear: both;
146}
147
148.revhistory {
149 padding-top: 2em;
150 clear: both;
151}
152
153.toc,
154.list-of-tables,
155.list-of-examples,
156.list-of-figures {
157 padding: 1.33em 0em 2.5em 0em;
158 color: #00557D;
159}
160
161.toc p,
162.list-of-tables p,
163.list-of-figures p,
164.list-of-examples p {
165 padding: 0em 0em 0em 0em;
166 padding: 0em 0em 0.3em;
167 margin: 1.5em 0em 0em 0em;
168}
169
170.toc p b,
171.list-of-tables p b,
172.list-of-figures p b,
173.list-of-examples p b{
174 font-size: 100.0%;
175 font-weight: bold;
176}
177
178.toc dl,
179.list-of-tables dl,
180.list-of-figures dl,
181.list-of-examples dl {
182 margin: 0em 0em 0.5em 0em;
183 padding: 0em 0em 0em 0em;
184}
185
186.toc dt {
187 margin: 0em 0em 0em 0em;
188 padding: 0em 0em 0em 0em;
189}
190
191.toc dd {
192 margin: 0em 0em 0em 2.6em;
193 padding: 0em 0em 0em 0em;
194}
195
196div.glossary dl,
197div.variablelist dl {
198}
199
200.glossary dl dt,
201.variablelist dl dt,
202.variablelist dl dt span.term {
203 font-weight: normal;
204 width: 20em;
205 text-align: right;
206}
207
208.variablelist dl dt {
209 margin-top: 0.5em;
210}
211
212.glossary dl dd,
213.variablelist dl dd {
214 margin-top: -1em;
215 margin-left: 25.5em;
216}
217
218.glossary dd p,
219.variablelist dd p {
220 margin-top: 0em;
221 margin-bottom: 1em;
222}
223
224
225div.calloutlist table td {
226 padding: 0em 0em 0em 0em;
227 margin: 0em 0em 0em 0em;
228}
229
230div.calloutlist table td p {
231 margin-top: 0em;
232 margin-bottom: 1em;
233}
234
235div p.copyright {
236 text-align: left;
237}
238
239div.legalnotice p.legalnotice-title {
240 margin-bottom: 0em;
241}
242
243p {
244 line-height: 1.5em;
245 margin-top: 0em;
246
247}
248
249dl {
250 padding-top: 0em;
251}
252
253hr {
254 border: solid 1px;
255}
256
257
258.mediaobject,
259.mediaobjectco {
260 text-align: center;
261}
262
263img {
264 border: none;
265}
266
267ul {
268 padding: 0em 0em 0em 1.5em;
269}
270
271ul li {
272 padding: 0em 0em 0em 0em;
273}
274
275ul li p {
276 text-align: left;
277}
278
279table {
280 width :100%;
281}
282
283th {
284 padding: 0.25em;
285 text-align: left;
286 font-weight: normal;
287 vertical-align: top;
288}
289
290td {
291 padding: 0.25em;
292 vertical-align: top;
293}
294
295p a[id] {
296 margin: 0px;
297 padding: 0px;
298 display: inline;
299 background-image: none;
300}
301
302a {
303 text-decoration: underline;
304 color: #444;
305}
306
307pre {
308 overflow: auto;
309}
310
311a:hover {
312 text-decoration: underline;
313 /*font-weight: bold;*/
314}
315
316
317div.informalfigure,
318div.informalexample,
319div.informaltable,
320div.figure,
321div.table,
322div.example {
323 margin: 1em 0em;
324 padding: 1em;
325 page-break-inside: avoid;
326}
327
328
329div.informalfigure p.title b,
330div.informalexample p.title b,
331div.informaltable p.title b,
332div.figure p.title b,
333div.example p.title b,
334div.table p.title b{
335 padding-top: 0em;
336 margin-top: 0em;
337 font-size: 100%;
338 font-weight: normal;
339}
340
341.mediaobject .caption,
342.mediaobject .caption p {
343 text-align: center;
344 font-size: 80%;
345 padding-top: 0.5em;
346 padding-bottom: 0.5em;
347}
348
349.epigraph {
350 padding-left: 55%;
351 margin-bottom: 1em;
352}
353
354.epigraph p {
355 text-align: left;
356}
357
358.epigraph .quote {
359 font-style: italic;
360}
361.epigraph .attribution {
362 font-style: normal;
363 text-align: right;
364}
365
366span.application {
367 font-style: italic;
368}
369
370.programlisting {
371 font-family: monospace;
372 font-size: 80%;
373 white-space: pre;
374 margin: 1.33em 0em;
375 padding: 1.33em;
376}
377
378.tip,
379.warning,
380.caution,
381.note {
382 margin-top: 1em;
383 margin-bottom: 1em;
384
385}
386
387/* force full width of table within div */
388.tip table,
389.warning table,
390.caution table,
391.note table {
392 border: none;
393 width: 100%;
394}
395
396
397.tip table th,
398.warning table th,
399.caution table th,
400.note table th {
401 padding: 0.8em 0.0em 0.0em 0.0em;
402 margin : 0em 0em 0em 0em;
403}
404
405.tip p,
406.warning p,
407.caution p,
408.note p {
409 margin-top: 0.5em;
410 margin-bottom: 0.5em;
411 padding-right: 1em;
412 text-align: left;
413}
414
415.acronym {
416 text-transform: uppercase;
417}
418
419b.keycap,
420.keycap {
421 padding: 0.09em 0.3em;
422 margin: 0em;
423}
424
425.itemizedlist li {
426 clear: none;
427}
428
429.filename {
430 font-size: medium;
431 font-family: Courier, monospace;
432}
433
434
435div.navheader, div.heading{
436 position: absolute;
437 left: 0em;
438 top: 0em;
439 width: 100%;
440 background-color: #cdf;
441 width: 100%;
442}
443
444div.navfooter, div.footing{
445 position: fixed;
446 left: 0em;
447 bottom: 0em;
448 background-color: #eee;
449 width: 100%;
450}
451
452
453div.navheader td,
454div.navfooter td {
455 font-size: 66%;
456}
457
458div.navheader table th {
459 /*font-family: Georgia, Times, serif;*/
460 /*font-size: x-large;*/
461 font-size: 80%;
462}
463
464div.navheader table {
465 border-left: 0em;
466 border-right: 0em;
467 border-top: 0em;
468 width: 100%;
469}
470
471div.navfooter table {
472 border-left: 0em;
473 border-right: 0em;
474 border-bottom: 0em;
475 width: 100%;
476}
477
478div.navheader table td a,
479div.navfooter table td a {
480 color: #777;
481 text-decoration: none;
482}
483
484/* normal text in the footer */
485div.navfooter table td {
486 color: black;
487}
488
489div.navheader table td a:visited,
490div.navfooter table td a:visited {
491 color: #444;
492}
493
494
495/* links in header and footer */
496div.navheader table td a:hover,
497div.navfooter table td a:hover {
498 text-decoration: underline;
499 background-color: transparent;
500 color: #33a;
501}
502
503div.navheader hr,
504div.navfooter hr {
505 display: none;
506}
507
508
509.qandaset tr.question td p {
510 margin: 0em 0em 1em 0em;
511 padding: 0em 0em 0em 0em;
512}
513
514.qandaset tr.answer td p {
515 margin: 0em 0em 1em 0em;
516 padding: 0em 0em 0em 0em;
517}
518.answer td {
519 padding-bottom: 1.5em;
520}
521
522.emphasis {
523 font-weight: bold;
524}
525
526
527 /************* /
528 / decorations /
529/ *************/
530
531.titlepage {
532}
533
534.part .title {
535}
536
537.subtitle {
538 border: none;
539}
540
541/*
542h1 {
543 border: none;
544}
545
546h2 {
547 border-top: solid 0.2em;
548 border-bottom: solid 0.06em;
549}
550
551h3 {
552 border-top: 0em;
553 border-bottom: solid 0.06em;
554}
555
556h4 {
557 border: 0em;
558 border-bottom: solid 0.06em;
559}
560
561h5 {
562 border: 0em;
563}
564*/
565
566.programlisting {
567 border: solid 1px;
568}
569
570div.figure,
571div.table,
572div.informalfigure,
573div.informaltable,
574div.informalexample,
575div.example {
576 border: 1px solid;
577}
578
579
580
581.tip,
582.warning,
583.caution,
584.note {
585 border: 1px solid;
586}
587
588.tip table th,
589.warning table th,
590.caution table th,
591.note table th {
592 border-bottom: 1px solid;
593}
594
595.question td {
596 border-top: 1px solid black;
597}
598
599.answer {
600}
601
602
603b.keycap,
604.keycap {
605 border: 1px solid;
606}
607
608
609div.navheader, div.heading{
610 border-bottom: 1px solid;
611}
612
613
614div.navfooter, div.footing{
615 border-top: 1px solid;
616}
617
618 /********* /
619 / colors /
620/ *********/
621
622body {
623 color: #333;
624 background: white;
625}
626
627a {
628 background: transparent;
629}
630
631a:hover {
632 background-color: #dedede;
633}
634
635
636h1,
637h2,
638h3,
639h4,
640h5,
641h6,
642h7,
643h8 {
644 background-color: transparent;
645}
646
647hr {
648 border-color: #aaa;
649}
650
651
652.tip, .warning, .caution, .note {
653 border-color: #fff;
654}
655
656
657.tip table th,
658.warning table th,
659.caution table th,
660.note table th {
661 border-bottom-color: #fff;
662}
663
664
665.warning {
666 background-color: #f0f0f2;
667}
668
669.caution {
670 background-color: #f0f0f2;
671}
672
673.tip {
674 background-color: #f0f0f2;
675}
676
677.note {
678 background-color: #f0f0f2;
679}
680
681.glossary dl dt,
682.variablelist dl dt,
683.variablelist dl dt span.term {
684 color: #044;
685}
686
687div.figure,
688div.table,
689div.example,
690div.informalfigure,
691div.informaltable,
692div.informalexample {
693 border-color: #aaa;
694}
695
696pre.programlisting {
697 color: black;
698 background-color: #fff;
699 border-color: #aaa;
700 border-width: 2px;
701}
702
703.guimenu,
704.guilabel,
705.guimenuitem {
706 background-color: #eee;
707}
708
709
710b.keycap,
711.keycap {
712 background-color: #eee;
713 border-color: #999;
714}
715
716
717div.navheader {
718 border-color: black;
719}
720
721
722div.navfooter {
723 border-color: black;
724}
725
726
727 /*********** /
728 / graphics /
729/ ***********/
730
731/*
732body {
733 background-image: url("images/body_bg.jpg");
734 background-attachment: fixed;
735}
736
737.navheader,
738.note,
739.tip {
740 background-image: url("images/note_bg.jpg");
741 background-attachment: fixed;
742}
743
744.warning,
745.caution {
746 background-image: url("images/warning_bg.jpg");
747 background-attachment: fixed;
748}
749
750.figure,
751.informalfigure,
752.example,
753.informalexample,
754.table,
755.informaltable {
756 background-image: url("images/figure_bg.jpg");
757 background-attachment: fixed;
758}
759
760*/
761h1,
762h2,
763h3,
764h4,
765h5,
766h6,
767h7{
768}
769
770/*
771Example of how to stick an image as part of the title.
772
773div.article .titlepage .title
774{
775 background-image: url("figures/white-on-black.png");
776 background-position: center;
777 background-repeat: repeat-x;
778}
779*/
780
781div.preface .titlepage .title,
782div.colophon .title,
783div.chapter .titlepage .title {
784 background-image: url("images/title-bg.png");
785 background-position: bottom;
786 background-repeat: repeat-x;
787}
788
789div.section div.section .titlepage .title,
790div.sect2 .titlepage .title {
791 background: none;
792}
793
794
795h1.title {
796 background-color: transparent;
797 background-image: url("poky-ref-manual.png");
798 background-repeat: no-repeat;
799 height: 256px;
800 text-indent: -9000px;
801 overflow:hidden;
802}
803
804h2.subtitle {
805 background-color: transparent;
806 text-indent: -9000px;
807 overflow:hidden;
808 width: 0px;
809 display: none;
810}
811
812 /*************************************** /
813 / pippin.gimp.org specific alterations /
814/ ***************************************/
815
816/*
817div.heading, div.navheader {
818 color: #777;
819 font-size: 80%;
820 padding: 0;
821 margin: 0;
822 text-align: left;
823 position: absolute;
824 top: 0px;
825 left: 0px;
826 width: 100%;
827 height: 50px;
828 background: url('/gfx/heading_bg.png') transparent;
829 background-repeat: repeat-x;
830 background-attachment: fixed;
831 border: none;
832}
833
834div.heading a {
835 color: #444;
836}
837
838div.footing, div.navfooter {
839 border: none;
840 color: #ddd;
841 font-size: 80%;
842 text-align:right;
843
844 width: 100%;
845 padding-top: 10px;
846 position: absolute;
847 bottom: 0px;
848 left: 0px;
849
850 background: url('/gfx/footing_bg.png') transparent;
851}
852*/
853
854
855
856 /****************** /
857 / nasty ie tweaks /
858/ ******************/
859
860/*
861div.heading, div.navheader {
862 width:expression(document.body.clientWidth + "px");
863}
864
865div.footing, div.navfooter {
866 width:expression(document.body.clientWidth + "px");
867 margin-left:expression("-5em");
868}
869body {
870 padding:expression("4em 5em 0em 5em");
871}
872*/
873
874 /**************************************** /
875 / mozilla vendor specific css extensions /
876/ ****************************************/
877/*
878div.navfooter, div.footing{
879 -moz-opacity: 0.8em;
880}
881
882div.figure,
883div.table,
884div.informalfigure,
885div.informaltable,
886div.informalexample,
887div.example,
888.tip,
889.warning,
890.caution,
891.note {
892 -moz-border-radius: 0.5em;
893}
894
895b.keycap,
896.keycap {
897 -moz-border-radius: 0.3em;
898}
899*/
900
901table tr td table tr td {
902 display: none;
903}
904
905
906hr {
907 display: none;
908}
909
910table {
911 border: 0em;
912}
913
914 .photo {
915 float: right;
916 margin-left: 1.5em;
917 margin-bottom: 1.5em;
918 margin-top: 0em;
919 max-width: 17em;
920 border: 1px solid gray;
921 padding: 3px;
922 background: white;
923}
924 .seperator {
925 padding-top: 2em;
926 clear: both;
927 }
928
929 #validators {
930 margin-top: 5em;
931 text-align: right;
932 color: #777;
933 }
934 @media print {
935 body {
936 font-size: 8pt;
937 }
938 .noprint {
939 display: none;
940 }
941 }
942
943
944.tip,
945.note {
946 background: #f0f0f2;
947 color: #333;
948 padding: 20px;
949 margin: 20px;
950}
951
952.tip h3,
953.note h3 {
954 padding: 0em;
955 margin: 0em;
956 font-size: 2em;
957 font-weight: bold;
958 color: #333;
959}
960
961.tip a,
962.note a {
963 color: #333;
964 text-decoration: underline;
965}
966
967.footnote {
968 font-size: small;
969 color: #333;
970}
971
972/* Changes the announcement text */
973.tip h3,
974.warning h3,
975.caution h3,
976.note h3 {
977 font-size:large;
978 color: #00557D;
979}
980
diff --git a/documentation/bsp-guide/bsp.xml b/documentation/bsp-guide/bsp.xml
new file mode 100644
index 0000000..9a8f3af
--- /dev/null
+++ b/documentation/bsp-guide/bsp.xml
@@ -0,0 +1,1480 @@
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='bsp'>
6
7 <title>Board Support Packages (BSP) - Developer's Guide</title>
8
9 <para>
10 A Board Support Package (BSP) is a collection of information that
11 defines how to support a particular hardware device, set of devices, or
12 hardware platform.
13 The BSP includes information about the hardware features
14 present on the device and kernel configuration information along with any
15 additional hardware drivers required.
16 The BSP also lists any additional software
17 components required in addition to a generic Linux software stack for both
18 essential and optional platform features.
19 </para>
20
21 <para>
22 This guide presents information about BSP Layers, defines a structure for components
23 so that BSPs follow a commonly understood layout, discusses how to customize
24 a recipe for a BSP, addresses BSP licensing, and provides information that
25 shows you how to create and manage a
26 <link linkend='bsp-layers'>BSP Layer</link> using two Yocto Project
27 <link linkend='using-the-yocto-projects-bsp-tools'>BSP Tools</link>.
28 </para>
29
30 <section id='bsp-layers'>
31 <title>BSP Layers</title>
32
33 <para>
34 The BSP consists of a file structure inside a base directory.
35 Collectively, you can think of the base directory and the file structure
36 as a BSP Layer.
37 Although not a strict requirement, layers in the Yocto Project use the
38 following well established naming convention:
39 <literallayout class='monospaced'>
40 meta-&lt;bsp_name&gt;
41 </literallayout>
42 The string "meta-" is prepended to the machine or platform name, which is
43 "bsp_name" in the above form.
44 </para>
45
46 <para>
47 The layer's base directory (<filename>meta-&lt;bsp_name&gt;</filename>) is the root
48 of the BSP Layer.
49 This root is what you add to the
50 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
51 variable in the <filename>conf/bblayers.conf</filename> file found in the
52 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
53 Adding the root allows the OpenEmbedded build system to recognize the BSP
54 definition and from it build an image.
55 Here is an example:
56 <literallayout class='monospaced'>
57 BBLAYERS ?= " \
58 /usr/local/src/yocto/meta \
59 /usr/local/src/yocto/meta-yocto \
60 /usr/local/src/yocto/meta-yocto-bsp \
61 /usr/local/src/yocto/meta-mylayer \
62 "
63
64 BBLAYERS_NON_REMOVABLE ?= " \
65 /usr/local/src/yocto/meta \
66 /usr/local/src/yocto/meta-yocto \
67 "
68 </literallayout>
69 </para>
70
71 <para>
72 Some BSPs require additional layers on
73 top of the BSP's root layer in order to be functional.
74 For these cases, you also need to add those layers to the
75 <filename>BBLAYERS</filename> variable in order to build the BSP.
76 You must also specify in the "Dependencies" section of the BSP's
77 <filename>README</filename> file any requirements for additional
78 layers and, preferably, any
79 build instructions that might be contained elsewhere
80 in the <filename>README</filename> file.
81 </para>
82
83 <para>
84 Some layers function as a layer to hold other BSP layers.
85 An example of this type of layer is the <filename>meta-intel</filename> layer.
86 The <filename>meta-intel</filename> layer contains over 10 individual BSP layers.
87 </para>
88
89 <para>
90 For more detailed information on layers, see the
91 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
92 section of the Yocto Project Development Manual.
93 </para>
94 </section>
95
96
97 <section id="bsp-filelayout">
98 <title>Example Filesystem Layout</title>
99
100 <para>
101 Providing a common form allows end-users to understand and become familiar
102 with the layout.
103 A common format also encourages standardization of software support of hardware.
104 </para>
105
106 <para>
107 The proposed form does have elements that are specific to the
108 OpenEmbedded build system.
109 It is intended that this information can be
110 used by other build systems besides the OpenEmbedded build system
111 and that it will be simple
112 to extract information and convert it to other formats if required.
113 The OpenEmbedded build system, through its standard layers mechanism, can directly
114 accept the format described as a layer.
115 The BSP captures all
116 the hardware-specific details in one place in a standard format, which is
117 useful for any person wishing to use the hardware platform regardless of
118 the build system they are using.
119 </para>
120
121 <para>
122 The BSP specification does not include a build system or other tools -
123 it is concerned with the hardware-specific components only.
124 At the end-distribution point, you can ship the BSP combined with a build system
125 and other tools.
126 However, it is important to maintain the distinction that these
127 are separate components that happen to be combined in certain end products.
128 </para>
129
130 <para>
131 Before looking at the common form for the file structure inside a BSP Layer,
132 you should be aware that some requirements do exist in order for a BSP to
133 be considered compliant with the Yocto Project.
134 For that list of requirements, see the
135 "<link linkend='released-bsp-requirements'>Released BSP Requirements</link>"
136 section.
137 </para>
138
139 <para>
140 Below is the common form for the file structure inside a BSP Layer.
141 While you can use this basic form for the standard, realize that the actual structures
142 for specific BSPs could differ.
143
144 <literallayout class='monospaced'>
145 meta-&lt;bsp_name&gt;/
146 meta-&lt;bsp_name&gt;/&lt;bsp_license_file&gt;
147 meta-&lt;bsp_name&gt;/README
148 meta-&lt;bsp_name&gt;/README.sources
149 meta-&lt;bsp_name&gt;/binary/&lt;bootable_images&gt;
150 meta-&lt;bsp_name&gt;/conf/layer.conf
151 meta-&lt;bsp_name&gt;/conf/machine/*.conf
152 meta-&lt;bsp_name&gt;/recipes-bsp/*
153 meta-&lt;bsp_name&gt;/recipes-core/*
154 meta-&lt;bsp_name&gt;/recipes-graphics/*
155 meta-&lt;bsp_name&gt;/recipes-kernel/linux/linux-yocto_&lt;kernel_rev&gt;.bbappend
156 </literallayout>
157 </para>
158
159 <para>
160 Below is an example of the Crown Bay BSP:
161
162 <literallayout class='monospaced'>
163 meta-crownbay/COPYING.MIT
164 meta-crownbay/README
165 meta-crownbay/README.sources
166 meta-crownbay/binary/
167 meta-crownbay/conf/
168 meta-crownbay/conf/layer.conf
169 meta-crownbay/conf/machine/
170 meta-crownbay/conf/machine/crownbay.conf
171 meta-crownbay/conf/machine/crownbay-noemgd.conf
172 meta-crownbay/recipes-bsp/
173 meta-crownbay/recipes-bsp/formfactor/
174 meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
175 meta-crownbay/recipes-bsp/formfactor/formfactor/
176 meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/
177 meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
178 meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/
179 meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/machconfig
180 meta-crownbay/recipes-graphics/
181 meta-crownbay/recipes-graphics/xorg-xserver/
182 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
183 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/
184 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/
185 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xorg.conf
186 meta-crownbay/recipes-kernel/
187 meta-crownbay/recipes-kernel/linux/
188 meta-crownbay/recipes-kernel/linux/linux-yocto_3.4.bbappend
189 meta-crownbay/recipes-kernel/linux/linux-yocto_3.8.bbappend
190 meta-crownbay/recipes-kernel/linux/linux-yocto_3.10.bbappend
191 meta-crownbay/recipes-kernel/linux/linux-yocto-dev.bbappend
192 meta-crownbay/recipes-kernel/linux/linux-yocto-rt_3.4.bbappend
193 meta-crownbay/recipes-kernel/linux/linux-yocto-rt_3.8.bbappend
194 meta-crownbay/recipes-kernel/linux/linux-yocto-rt_3.10.bbappend
195 </literallayout>
196 </para>
197
198 <para>
199 The following sections describe each part of the proposed BSP format.
200 </para>
201
202 <section id="bsp-filelayout-license">
203 <title>License Files</title>
204
205 <para>
206 You can find these files in the BSP Layer at:
207 <literallayout class='monospaced'>
208 meta-&lt;bsp_name&gt;/&lt;bsp_license_file&gt;
209 </literallayout>
210 </para>
211
212 <para>
213 These optional files satisfy licensing requirements for the BSP.
214 The type or types of files here can vary depending on the licensing requirements.
215 For example, in the Crown Bay BSP all licensing requirements are handled with the
216 <filename>COPYING.MIT</filename> file.
217 </para>
218
219 <para>
220 Licensing files can be MIT, BSD, GPLv*, and so forth.
221 These files are recommended for the BSP but are optional and totally up to the BSP developer.
222 </para>
223 </section>
224
225 <section id="bsp-filelayout-readme">
226 <title>README File</title>
227 <para>
228 You can find this file in the BSP Layer at:
229 <literallayout class='monospaced'>
230 meta-&lt;bsp_name&gt;/README
231 </literallayout>
232 </para>
233
234 <para>
235 This file provides information on how to boot the live images that are optionally
236 included in the <filename>binary/</filename> directory.
237 The <filename>README</filename> file also provides special information needed for
238 building the image.
239 </para>
240
241 <para>
242 At a minimum, the <filename>README</filename> file must
243 contain a list of dependencies, such as the names of
244 any other layers on which the BSP depends and the name of
245 the BSP maintainer with his or her contact information.
246 </para>
247 </section>
248
249 <section id="bsp-filelayout-readme-sources">
250 <title>README.sources File</title>
251 <para>
252 You can find this file in the BSP Layer at:
253 <literallayout class='monospaced'>
254 meta-&lt;bsp_name&gt;/README.sources
255 </literallayout>
256 </para>
257
258 <para>
259 This file provides information on where to locate the BSP source files.
260 For example, information provides where to find the sources that comprise
261 the images shipped with the BSP.
262 Information is also included to help you find the
263 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
264 used to generate the images that ship with the BSP.
265 </para>
266 </section>
267
268 <section id="bsp-filelayout-binary">
269 <title>Pre-built User Binaries</title>
270 <para>
271 You can find these files in the BSP Layer at:
272 <literallayout class='monospaced'>
273 meta-&lt;bsp_name&gt;/binary/&lt;bootable_images&gt;
274 </literallayout>
275 </para>
276
277 <para>
278 This optional area contains useful pre-built kernels and user-space filesystem
279 images appropriate to the target system.
280 This directory typically contains graphical (e.g. Sato) and minimal live images
281 when the BSP tarball has been created and made available in the
282 <ulink url='&YOCTO_HOME_URL;'>Yocto Project</ulink> website.
283 You can use these kernels and images to get a system running and quickly get started
284 on development tasks.
285 </para>
286
287 <para>
288 The exact types of binaries present are highly hardware-dependent.
289 However, a README file should be present in the BSP Layer that explains how to use
290 the kernels and images with the target hardware.
291 If pre-built binaries are present, source code to meet licensing requirements must also
292 exist in some form.
293 </para>
294 </section>
295
296 <section id='bsp-filelayout-layer'>
297 <title>Layer Configuration File</title>
298 <para>
299 You can find this file in the BSP Layer at:
300 <literallayout class='monospaced'>
301 meta-&lt;bsp_name&gt;/conf/layer.conf
302 </literallayout>
303 </para>
304
305 <para>
306 The <filename>conf/layer.conf</filename> file identifies the file structure as a
307 layer, identifies the
308 contents of the layer, and contains information about how the build
309 system should use it.
310 Generally, a standard boilerplate file such as the following works.
311 In the following example, you would replace "<filename>bsp</filename>" and
312 "<filename>_bsp</filename>" with the actual name
313 of the BSP (i.e. <filename>&lt;bsp_name&gt;</filename> from the example template).
314 </para>
315
316 <para>
317 <literallayout class='monospaced'>
318 # We have a conf and classes directory, add to BBPATH
319 BBPATH .= ":${LAYERDIR}"
320
321 # We have a recipes directory, add to BBFILES
322 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
323 ${LAYERDIR}/recipes-*/*/*.bbappend"
324
325 BBFILE_COLLECTIONS += "bsp"
326 BBFILE_PATTERN_bsp = "^${LAYERDIR}/"
327 BBFILE_PRIORITY_bsp = "6"
328 </literallayout>
329 </para>
330
331 <para>
332 To illustrate the string substitutions, here are the corresponding statements
333 from the Crown Bay <filename>conf/layer.conf</filename> file:
334 <literallayout class='monospaced'>
335 BBFILE_COLLECTIONS += "crownbay"
336 BBFILE_PATTERN_crownbay = "^${LAYERDIR}/"
337 BBFILE_PRIORITY_crownbay = "6"
338 </literallayout>
339 </para>
340
341 <para>
342 This file simply makes BitBake aware of the recipes and configuration directories.
343 The file must exist so that the OpenEmbedded build system can recognize the BSP.
344 </para>
345 </section>
346
347 <section id="bsp-filelayout-machine">
348 <title>Hardware Configuration Options</title>
349 <para>
350 You can find these files in the BSP Layer at:
351 <literallayout class='monospaced'>
352 meta-&lt;bsp_name&gt;/conf/machine/*.conf
353 </literallayout>
354 </para>
355
356 <para>
357 The machine files bind together all the information contained elsewhere
358 in the BSP into a format that the build system can understand.
359 If the BSP supports multiple machines, multiple machine configuration files
360 can be present.
361 These filenames correspond to the values to which users have set the
362 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink> variable.
363 </para>
364
365 <para>
366 These files define things such as the kernel package to use
367 (<ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'><filename>PREFERRED_PROVIDER</filename></ulink>
368 of virtual/kernel), the hardware drivers to
369 include in different types of images, any special software components
370 that are needed, any bootloader information, and also any special image
371 format requirements.
372 </para>
373
374 <para>
375 Each BSP Layer requires at least one machine file.
376 However, you can supply more than one file.
377 </para>
378
379 <para>
380 This <filename>crownbay.conf</filename> file could also include
381 a hardware "tuning" file that is commonly used to
382 define the package architecture and specify
383 optimization flags, which are carefully chosen to give best
384 performance on a given processor.
385 </para>
386
387 <para>
388 Tuning files are found in the <filename>meta/conf/machine/include</filename>
389 directory within the
390 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
391 For example, the <filename>ia32-base.inc</filename> file resides in the
392 <filename>meta/conf/machine/include</filename> directory.
393 </para>
394
395 <para>
396 To use an include file, you simply include them in the machine configuration file.
397 For example, the Crown Bay BSP <filename>crownbay.conf</filename> contains the
398 following statements:
399 <literallayout class='monospaced'>
400 require conf/machine/include/tune-atom.inc
401 require conf/machine/include/ia32-base.inc
402 require conf/machine/include/meta-intel.inc
403 require conf/machine/include/meta-intel-emgd.inc
404 </literallayout>
405 </para>
406 </section>
407
408 <section id='bsp-filelayout-misc-recipes'>
409 <title>Miscellaneous BSP-Specific Recipe Files</title>
410 <para>
411 You can find these files in the BSP Layer at:
412 <literallayout class='monospaced'>
413 meta-&lt;bsp_name&gt;/recipes-bsp/*
414 </literallayout>
415 </para>
416
417 <para>
418 This optional directory contains miscellaneous recipe files for the BSP.
419 Most notably would be the formfactor files.
420 For example, in the Crown Bay BSP there is the
421 <filename>formfactor_0.0.bbappend</filename> file, which is an
422 append file used to augment the recipe that starts the build.
423 Furthermore, there are machine-specific settings used during the
424 build that are defined by the <filename>machconfig</filename> file.
425 In the Crown Bay example, two <filename>machconfig</filename> files
426 exist: one that supports the Intel® Embedded Media and Graphics
427 Driver (Intel® EMGD) and one that does not:
428 <literallayout class='monospaced'>
429 meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay/machconfig
430 meta-crownbay/recipes-bsp/formfactor/formfactor/crownbay-noemgd/machconfig
431 meta-crownbay/recipes-bsp/formfactor/formfactor_0.0.bbappend
432 </literallayout>
433 </para>
434
435 <note><para>
436 If a BSP does not have a formfactor entry, defaults are established according to
437 the formfactor configuration file that is installed by the main
438 formfactor recipe
439 <filename>meta/recipes-bsp/formfactor/formfactor_0.0.bb</filename>,
440 which is found in the
441 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
442 </para></note>
443 </section>
444
445 <section id='bsp-filelayout-recipes-graphics'>
446 <title>Display Support Files</title>
447 <para>
448 You can find these files in the BSP Layer at:
449 <literallayout class='monospaced'>
450 meta-&lt;bsp_name&gt;/recipes-graphics/*
451 </literallayout>
452 </para>
453
454 <para>
455 This optional directory contains recipes for the BSP if it has
456 special requirements for graphics support.
457 All files that are needed for the BSP to support a display are kept here.
458 For example, the Crown Bay BSP's <filename>xorg.conf</filename> file
459 detects the graphics support needed (i.e. the Intel® Embedded Media
460 Graphics Driver (EMGD) or the Video Electronics Standards Association
461 (VESA) graphics):
462 <literallayout class='monospaced'>
463 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config_0.1.bbappend
464 meta-crownbay/recipes-graphics/xorg-xserver/xserver-xf86-config/crownbay/xorg.conf
465 </literallayout>
466 </para>
467 </section>
468
469 <section id='bsp-filelayout-kernel'>
470 <title>Linux Kernel Configuration</title>
471 <para>
472 You can find these files in the BSP Layer at:
473 <literallayout class='monospaced'>
474 meta-&lt;bsp_name&gt;/recipes-kernel/linux/linux-yocto_*.bbappend
475 </literallayout>
476 </para>
477
478 <para>
479 These files append your specific changes to the main kernel recipe you are using.
480 </para>
481 <para>
482 For your BSP, you typically want to use an existing Yocto Project kernel recipe found in the
483 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
484 at <filename>meta/recipes-kernel/linux</filename>.
485 You can append your specific changes to the kernel recipe by using a
486 similarly named append file, which is located in the BSP Layer (e.g.
487 the <filename>meta-&lt;bsp_name&gt;/recipes-kernel/linux</filename> directory).
488 </para>
489 <para>
490 Suppose you are using the <filename>linux-yocto_3.10.bb</filename> recipe to build
491 the kernel.
492 In other words, you have selected the kernel in your
493 <filename>&lt;bsp_name&gt;.conf</filename> file by adding these types
494 of statements:
495 <literallayout class='monospaced'>
496 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
497 PREFERRED_VERSION_linux-yocto ?= "3.10%"
498 </literallayout>
499 <note>
500 When the preferred provider is assumed by default, the
501 <filename>PREFERRED_PROVIDER</filename> statement does not appear in the
502 <filename>&lt;bsp_name&gt;.conf</filename> file.
503 </note>
504 You would use the <filename>linux-yocto_3.10.bbappend</filename> file to append
505 specific BSP settings to the kernel, thus configuring the kernel for your particular BSP.
506 </para>
507 <para>
508 As an example, look at the existing Crown Bay BSP.
509 The append file used is:
510 <literallayout class='monospaced'>
511 meta-crownbay/recipes-kernel/linux/linux-yocto_3.10.bbappend
512 </literallayout>
513 The following listing shows the file.
514 Be aware that the actual commit ID strings in this example listing might be different
515 than the actual strings in the file from the <filename>meta-intel</filename>
516 Git source repository.
517 <literallayout class='monospaced'>
518 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
519
520 COMPATIBLE_MACHINE_crownbay-noemgd = "crownbay-noemgd"
521 KMACHINE_crownbay-noemgd = "crownbay"
522 KBRANCH_crownbay-noemgd = "standard/crownbay"
523 KERNEL_FEATURES_append_crownbay-noemgd = " cfg/vesafb"
524
525 LINUX_VERSION = "3.10.11"
526
527 SRCREV_meta_crownbay-noemgd = "285f93bf942e8f6fa678ffc6cc53696ed5400718"
528 SRCREV_machine_crownbay-noemgd = "702040ac7c7ec66a29b4d147665ccdd0ff015577"
529 </literallayout>
530 This append file contains statements used to support the Crown Bay BSP.
531 The file defines <filename>crownbay</filename> as the
532 <ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>
533 and uses the
534 <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink> variable to
535 ensure the machine name used by the OpenEmbedded build system maps to the
536 machine name used by the Linux Yocto kernel.
537 The file also uses the optional
538 <ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'><filename>KBRANCH</filename></ulink> variable
539 to ensure the build process uses the <filename>standard/crownbay</filename>
540 kernel branch.
541 The
542 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
543 variable enables features specific to the kernel.
544 Finally, the append file points to specific commits in the
545 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> Git
546 repository and the <filename>meta</filename> Git repository branches to identify the
547 exact kernel needed to build the Crown Bay BSP.
548 </para>
549
550 <para>
551 One thing missing in this particular BSP, which you will typically need when
552 developing a BSP, is the kernel configuration file (<filename>.config</filename>) for your BSP.
553 When developing a BSP, you probably have a kernel configuration file or a set of kernel
554 configuration files that, when taken together, define the kernel configuration for your BSP.
555 You can accomplish this definition by putting the configurations in a file or a set of files
556 inside a directory located at the same level as your kernel's append file and having the same
557 name as the kernel's main recipe file.
558 With all these conditions met, simply reference those files in a
559 <filename>SRC_URI</filename> statement in the append file.
560 </para>
561
562 <para>
563 For example, suppose you had some configuration options in a file called
564 <filename>network_configs.cfg</filename>.
565 You can place that file inside a directory named <filename>linux-yocto</filename> and then add
566 a <filename>SRC_URI</filename> statement such as the following to the append file.
567 When the OpenEmbedded build system builds the kernel, the configuration options are
568 picked up and applied.
569 <literallayout class='monospaced'>
570 SRC_URI += "file://network_configs.cfg"
571 </literallayout>
572 </para>
573
574 <para>
575 To group related configurations into multiple files, you perform a similar procedure.
576 Here is an example that groups separate configurations specifically for Ethernet and graphics
577 into their own files and adds the configurations
578 by using a <filename>SRC_URI</filename> statement like the following in your append file:
579 <literallayout class='monospaced'>
580 SRC_URI += "file://myconfig.cfg \
581 file://eth.cfg \
582 file://gfx.cfg"
583 </literallayout>
584 </para>
585
586 <para>
587 The <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
588 variable is in boilerplate form in the
589 previous example in order to make it easy to do that.
590 This variable must be in your layer or BitBake will not find the patches or
591 configurations even if you have them in your <filename>SRC_URI</filename>.
592 The <filename>FILESEXTRAPATHS</filename> variable enables the build process to
593 find those configuration files.
594 </para>
595
596 <note>
597 <para>
598 Other methods exist to accomplish grouping and defining configuration options.
599 For example, if you are working with a local clone of the kernel repository,
600 you could checkout the kernel's <filename>meta</filename> branch, make your changes,
601 and then push the changes to the local bare clone of the kernel.
602 The result is that you directly add configuration options to the
603 <filename>meta</filename> branch for your BSP.
604 The configuration options will likely end up in that location anyway if the BSP gets
605 added to the Yocto Project.
606 </para>
607
608 <para>
609 In general, however, the Yocto Project maintainers take care of moving the
610 <filename>SRC_URI</filename>-specified
611 configuration options to the kernel's <filename>meta</filename> branch.
612 Not only is it easier for BSP developers to not have to worry about putting those
613 configurations in the branch, but having the maintainers do it allows them to apply
614 'global' knowledge about the kinds of common configuration options multiple BSPs in
615 the tree are typically using.
616 This allows for promotion of common configurations into common features.
617 </para>
618 </note>
619 </section>
620 </section>
621
622 <section id='requirements-and-recommendations-for-released-bsps'>
623 <title>Requirements and Recommendations for Released BSPs</title>
624
625 <para>
626 Certain requirements exist for a released BSP to be considered
627 compliant with the Yocto Project.
628 Additionally, recommendations also exist.
629 This section describes the requirements and recommendations for
630 released BSPs.
631 </para>
632
633 <section id='released-bsp-requirements'>
634 <title>Released BSP Requirements</title>
635
636 <para>
637 Before looking at BSP requirements, you should consider the following:
638 <itemizedlist>
639 <listitem><para>The requirements here assume the BSP layer is a well-formed, "legal"
640 layer that can be added to the Yocto Project.
641 For guidelines on creating a layer that meets these base requirements, see the
642 "<link linkend='bsp-layers'>BSP Layers</link>" and the
643 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding
644 and Creating Layers"</ulink> in the Yocto Project Development Manual.</para></listitem>
645 <listitem><para>The requirements in this section apply regardless of how you
646 ultimately package a BSP.
647 You should consult the packaging and distribution guidelines for your
648 specific release process.
649 For an example of packaging and distribution requirements, see the
650 "<ulink url='https://wiki.yoctoproject.org/wiki/Third_Party_BSP_Release_Process'>Third Party BSP Release Process</ulink>"
651 wiki page.</para></listitem>
652 <listitem><para>The requirements for the BSP as it is made available to a developer
653 are completely independent of the released form of the BSP.
654 For example, the BSP Metadata can be contained within a Git repository
655 and could have a directory structure completely different from what appears
656 in the officially released BSP layer.</para></listitem>
657 <listitem><para>It is not required that specific packages or package
658 modifications exist in the BSP layer, beyond the requirements for general
659 compliance with the Yocto Project.
660 For example, no requirement exists dictating that a specific kernel or
661 kernel version be used in a given BSP.</para></listitem>
662 </itemizedlist>
663 </para>
664
665 <para>
666 Following are the requirements for a released BSP that conforms to the
667 Yocto Project:
668 <itemizedlist>
669 <listitem><para><emphasis>Layer Name:</emphasis>
670 The BSP must have a layer name that follows the Yocto
671 Project standards.
672 For information on BSP layer names, see the
673 "<link linkend='bsp-layers'>BSP Layers</link>" section.
674 </para></listitem>
675 <listitem><para><emphasis>File System Layout:</emphasis>
676 When possible, use the same directory names in your
677 BSP layer as listed in the <filename>recipes.txt</filename> file.
678 In particular, you should place recipes
679 (<filename>.bb</filename> files) and recipe
680 modifications (<filename>.bbappend</filename> files) into
681 <filename>recipes-*</filename> subdirectories by functional area
682 as outlined in <filename>recipes.txt</filename>.
683 If you cannot find a category in <filename>recipes.txt</filename>
684 to fit a particular recipe, you can make up your own
685 <filename>recipes-*</filename> subdirectory.
686 You can find <filename>recipes.txt</filename> in the
687 <filename>meta</filename> directory of the
688 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
689 or in the OpenEmbedded Core Layer
690 (<filename>openembedded-core</filename>) found at
691 <ulink url='http://git.openembedded.org/openembedded-core/tree/meta'></ulink>.
692 </para>
693 <para>Within any particular <filename>recipes-*</filename> category, the layout
694 should match what is found in the OpenEmbedded Core
695 Git repository (<filename>openembedded-core</filename>)
696 or the Source Directory (<filename>poky</filename>).
697 In other words, make sure you place related files in appropriately
698 related <filename>recipes-*</filename> subdirectories specific to the
699 recipe's function, or within a subdirectory containing a set of closely-related
700 recipes.
701 The recipes themselves should follow the general guidelines
702 for recipes used in the Yocto Project found in the
703 "<ulink url='https://wiki.yoctoproject.org/wiki/Recipe_%26_Patch_Style_Guide'>Yocto Recipe and Patch Style Guide</ulink>".
704 </para></listitem>
705 <listitem><para><emphasis>License File:</emphasis>
706 You must include a license file in the
707 <filename>meta-&lt;bsp_name&gt;</filename> directory.
708 This license covers the BSP Metadata as a whole.
709 You must specify which license to use since there is no
710 default license if one is not specified.
711 See the
712 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fri2/COPYING.MIT'><filename>COPYING.MIT</filename></ulink>
713 file for the Fish River Island 2 BSP in the <filename>meta-fri2</filename> BSP layer
714 as an example.</para></listitem>
715 <listitem><para><emphasis>README File:</emphasis>
716 You must include a <filename>README</filename> file in the
717 <filename>meta-&lt;bsp_name&gt;</filename> directory.
718 See the
719 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fri2/README'><filename>README</filename></ulink>
720 file for the Fish River Island 2 BSP in the <filename>meta-fri2</filename> BSP layer
721 as an example.</para>
722 <para>At a minimum, the <filename>README</filename> file should
723 contain the following:
724 <itemizedlist>
725 <listitem><para>A brief description about the hardware the BSP
726 targets.</para></listitem>
727 <listitem><para>A list of all the dependencies
728 on which a BSP layer depends.
729 These dependencies are typically a list of required layers needed
730 to build the BSP.
731 However, the dependencies should also contain information regarding
732 any other dependencies the BSP might have.</para></listitem>
733 <listitem><para>Any required special licensing information.
734 For example, this information includes information on
735 special variables needed to satisfy a EULA,
736 or instructions on information needed to build or distribute
737 binaries built from the BSP Metadata.</para></listitem>
738 <listitem><para>The name and contact information for the
739 BSP layer maintainer.
740 This is the person to whom patches and questions should
741 be sent.
742 For information on how to find the right person, see the
743 "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a Change</ulink>"
744 section in the Yocto Project Development Manual.
745 </para></listitem>
746 <listitem><para>Instructions on how to build the BSP using the BSP
747 layer.</para></listitem>
748 <listitem><para>Instructions on how to boot the BSP build from
749 the BSP layer.</para></listitem>
750 <listitem><para>Instructions on how to boot the binary images
751 contained in the <filename>binary</filename> directory,
752 if present.</para></listitem>
753 <listitem><para>Information on any known bugs or issues that users
754 should know about when either building or booting the BSP
755 binaries.</para></listitem>
756 </itemizedlist></para></listitem>
757 <listitem><para><emphasis>README.sources File:</emphasis>
758 You must include a <filename>README.sources</filename> in the
759 <filename>meta-&lt;bsp_name&gt;</filename> directory.
760 This file specifies exactly where you can find the sources used to
761 generate the binary images contained in the
762 <filename>binary</filename> directory, if present.
763 See the
764 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/meta-intel/tree/meta-fri2/README.sources'><filename>README.sources</filename></ulink>
765 file for the Fish River Island 2 BSP in the <filename>meta-fri2</filename> BSP layer
766 as an example.</para></listitem>
767 <listitem><para><emphasis>Layer Configuration File:</emphasis>
768 You must include a <filename>conf/layer.conf</filename> in the
769 <filename>meta-&lt;bsp_name&gt;</filename> directory.
770 This file identifies the <filename>meta-&lt;bsp_name&gt;</filename>
771 BSP layer as a layer to the build system.</para></listitem>
772 <listitem><para><emphasis>Machine Configuration File:</emphasis>
773 You must include one or more <filename>conf/machine/&lt;bsp_name&gt;.conf</filename>
774 files in the <filename>meta-&lt;bsp_name&gt;</filename> directory.
775 These configuration files define machine targets that can be built
776 using the BSP layer.
777 Multiple machine configuration files define variations of machine
778 configurations that are supported by the BSP.
779 If a BSP supports multiple machine variations, you need to
780 adequately describe each variation in the BSP
781 <filename>README</filename> file.
782 Do not use multiple machine configuration files to describe disparate
783 hardware.
784 If you do have very different targets, you should create separate
785 BSP layers for each target.
786 <note>It is completely possible for a developer to structure the
787 working repository as a conglomeration of unrelated BSP
788 files, and to possibly generate BSPs targeted for release
789 from that directory using scripts or some other mechanism
790 (e.g. <filename>meta-yocto-bsp</filename> layer).
791 Such considerations are outside the scope of this document.</note>
792 </para></listitem>
793 </itemizedlist>
794 </para>
795 </section>
796
797 <section id='released-bsp-recommendations'>
798 <title>Released BSP Recommendations</title>
799
800 <para>
801 Following are recommendations for a released BSP that conforms to the
802 Yocto Project:
803 <itemizedlist>
804 <listitem><para><emphasis>Bootable Images:</emphasis>
805 BSP releases
806 can contain one or more bootable images.
807 Including bootable images allows users to easily try out the BSP
808 on their own hardware.</para>
809 <para>In some cases, it might not be convenient to include a
810 bootable image.
811 In this case, you might want to make two versions of the
812 BSP available: one that contains binary images, and one
813 that does not.
814 The version that does not contain bootable images avoids
815 unnecessary download times for users not interested in the images.
816 </para>
817 <para>If you need to distribute a BSP and include bootable images or build kernel and
818 filesystems meant to allow users to boot the BSP for evaluation
819 purposes, you should put the images and artifacts within a
820 <filename>binary/</filename> subdirectory located in the
821 <filename>meta-&lt;bsp_name&gt;</filename> directory.
822 <note>If you do include a bootable image as part of the BSP and the image
823 was built by software covered by the GPL or other open source licenses,
824 it is your responsibility to understand
825 and meet all licensing requirements, which could include distribution
826 of source files.</note></para></listitem>
827 <listitem><para><emphasis>Use a Yocto Linux Kernel:</emphasis>
828 Kernel recipes in the BSP should be based on a Yocto Linux kernel.
829 Basing your recipes on these kernels reduces the costs for maintaining
830 the BSP and increases its scalability.
831 See the <filename>Yocto Linux Kernel</filename> category in the
832 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>Source Repositories</ulink>
833 for these kernels.</para></listitem>
834 </itemizedlist>
835 </para>
836 </section>
837 </section>
838
839 <section id='customizing-a-recipe-for-a-bsp'>
840 <title>Customizing a Recipe for a BSP</title>
841
842 <para>
843 If you plan on customizing a recipe for a particular BSP, you need to do the
844 following:
845 <itemizedlist>
846 <listitem><para>Create a <filename>.bbappend</filename>
847 file for the modified recipe.
848 For information on using append files, see the
849 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files</ulink>"
850 section in the Yocto Project Development Manual.
851 </para></listitem>
852 <listitem><para>
853 Ensure your directory structure in the BSP layer
854 that supports your machine is such that it can be found
855 by the build system.
856 See the example later in this section for more information.
857 </para></listitem>
858 <listitem><para>
859 Put the append file in a directory whose name matches
860 the machine's name and is located in an appropriate
861 sub-directory inside the BSP layer (i.e.
862 <filename>recipes-bsp</filename>, <filename>recipes-graphics</filename>,
863 <filename>recipes-core</filename>, and so forth).
864 </para></listitem>
865 <listitem><para>Place the BSP-specific files in the directory named for
866 your machine inside the BSP layer.
867 </para></listitem>
868 </itemizedlist>
869 </para>
870
871 <para>
872 Following is a specific example to help you better understand the process.
873 Consider an example that customizes a recipe by adding
874 a BSP-specific configuration file named <filename>interfaces</filename> to the
875 <filename>init-ifupdown_1.0.bb</filename> recipe for machine "xyz".
876 Do the following:
877 <orderedlist>
878 <listitem><para>Edit the <filename>init-ifupdown_1.0.bbappend</filename> file so that it
879 contains the following:
880 <literallayout class='monospaced'>
881 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
882 PRINC := "${@int(PRINC) + 2}"
883 </literallayout>
884 The append file needs to be in the
885 <filename>meta-xyz/recipes-core/init-ifupdown</filename> directory.
886 </para></listitem>
887 <listitem><para>Create and place the new <filename>interfaces</filename>
888 configuration file in the BSP's layer here:
889 <literallayout class='monospaced'>
890 meta-xyz/recipes-core/init-ifupdown/files/xyz/interfaces
891 </literallayout>
892 The
893 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
894 variable in the append files extends the search path
895 the build system uses to find files during the build.
896 Consequently, for this example you need to have the
897 <filename>files</filename> directory in the same location
898 as your append file.</para></listitem>
899 </orderedlist>
900 </para>
901 </section>
902
903 <section id='bsp-licensing-considerations'>
904 <title>BSP Licensing Considerations</title>
905
906 <para>
907 In some cases, a BSP contains separately licensed Intellectual Property (IP)
908 for a component or components.
909 For these cases, you are required to accept the terms of a commercial or other
910 type of license that requires some kind of explicit End User License Agreement (EULA).
911 Once the license is accepted, the OpenEmbedded build system can then build and
912 include the corresponding component in the final BSP image.
913 If the BSP is available as a pre-built image, you can download the image after
914 agreeing to the license or EULA.
915 </para>
916
917 <para>
918 You could find that some separately licensed components that are essential
919 for normal operation of the system might not have an unencumbered (or free)
920 substitute.
921 Without these essential components, the system would be non-functional.
922 Then again, you might find that other licensed components that are simply
923 'good-to-have' or purely elective do have an unencumbered, free replacement
924 component that you can use rather than agreeing to the separately licensed component.
925 Even for components essential to the system, you might find an unencumbered component
926 that is not identical but will work as a less-capable version of the
927 licensed version in the BSP recipe.
928 </para>
929
930 <para>
931 For cases where you can substitute a free component and still
932 maintain the system's functionality, the "Downloads" page from the
933 <ulink url='&YOCTO_HOME_URL;'>Yocto Project website's</ulink>
934 makes available de-featured BSPs
935 that are completely free of any IP encumbrances.
936 For these cases, you can use the substitution directly and
937 without any further licensing requirements.
938 If present, these fully de-featured BSPs are named appropriately
939 different as compared to the names of the respective
940 encumbered BSPs.
941 If available, these substitutions are your
942 simplest and most preferred options.
943 Use of these substitutions of course assumes the resulting functionality meets
944 system requirements.
945 </para>
946
947 <para>
948 If however, a non-encumbered version is unavailable or
949 it provides unsuitable functionality or quality, you can use an encumbered
950 version.
951 </para>
952
953 <para>
954 A couple different methods exist within the OpenEmbedded build system to
955 satisfy the licensing requirements for an encumbered BSP.
956 The following list describes them in order of preference:
957 <orderedlist>
958 <listitem><para><emphasis>Use the <filename>LICENSE_FLAGS</filename> variable
959 to define the recipes that have commercial or other types of
960 specially-licensed packages:</emphasis>
961 For each of those recipes, you can
962 specify a matching license string in a
963 <filename>local.conf</filename> variable named
964 <filename>LICENSE_FLAGS_WHITELIST</filename>.
965 Specifying the matching license string signifies that you agree to the license.
966 Thus, the build system can build the corresponding recipe and include
967 the component in the image.
968 See the
969 "<ulink url='&YOCTO_DOCS_REF_URL;#enabling-commercially-licensed-recipes'>Enabling
970 Commercially Licensed Recipes</ulink>" section in the Yocto Project Reference
971 Manual for details on how to use these variables.</para>
972 <para>If you build as you normally would, without
973 specifying any recipes in the
974 <filename>LICENSE_FLAGS_WHITELIST</filename>, the build stops and
975 provides you with the list of recipes that you have
976 tried to include in the image that need entries in
977 the <filename>LICENSE_FLAGS_WHITELIST</filename>.
978 Once you enter the appropriate license flags into the whitelist,
979 restart the build to continue where it left off.
980 During the build, the prompt will not appear again
981 since you have satisfied the requirement.</para>
982 <para>Once the appropriate license flags are on the white list
983 in the <filename>LICENSE_FLAGS_WHITELIST</filename> variable, you
984 can build the encumbered image with no change at all
985 to the normal build process.</para></listitem>
986 <listitem><para><emphasis>Get a pre-built version of the BSP:</emphasis>
987 You can get this type of BSP by visiting the
988 "Downloads" page of the
989 <ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>.
990 You can download BSP tarballs that contain proprietary components
991 after agreeing to the licensing
992 requirements of each of the individually encumbered
993 packages as part of the download process.
994 Obtaining the BSP this way allows you to access an encumbered
995 image immediately after agreeing to the
996 click-through license agreements presented by the
997 website.
998 Note that if you want to build the image
999 yourself using the recipes contained within the BSP
1000 tarball, you will still need to create an
1001 appropriate <filename>LICENSE_FLAGS_WHITELIST</filename> to match the
1002 encumbered recipes in the BSP.</para></listitem>
1003 </orderedlist>
1004 </para>
1005
1006 <note>
1007 Pre-compiled images are bundled with
1008 a time-limited kernel that runs for a
1009 predetermined amount of time (10 days) before it forces
1010 the system to reboot.
1011 This limitation is meant to discourage direct redistribution
1012 of the image.
1013 You must eventually rebuild the image if you want to remove this restriction.
1014 </note>
1015 </section>
1016
1017 <section id='using-the-yocto-projects-bsp-tools'>
1018 <title>Using the Yocto Project's BSP Tools</title>
1019
1020 <para>
1021 The Yocto Project includes a couple of tools that enable
1022 you to create a <link linkend='bsp-layers'>BSP layer</link>
1023 from scratch and do basic configuration and maintenance
1024 of the kernel without ever looking at a Metadata file.
1025 These tools are <filename>yocto-bsp</filename> and <filename>yocto-kernel</filename>,
1026 respectively.
1027 </para>
1028
1029 <para>
1030 The following sections describe the common location and help features as well
1031 as provide details for the
1032 <filename>yocto-bsp</filename> and <filename>yocto-kernel</filename> tools.
1033 </para>
1034
1035 <section id='common-features'>
1036 <title>Common Features</title>
1037
1038 <para>
1039 Designed to have a command interface somewhat like
1040 <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>, each
1041 tool is structured as a set of sub-commands under a
1042 top-level command.
1043 The top-level command (<filename>yocto-bsp</filename>
1044 or <filename>yocto-kernel</filename>) itself does
1045 nothing but invoke or provide help on the sub-commands
1046 it supports.
1047 </para>
1048
1049 <para>
1050 Both tools reside in the <filename>scripts/</filename> subdirectory
1051 of the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1052 Consequently, to use the scripts, you must <filename>source</filename> the
1053 environment just as you would when invoking a build:
1054 <literallayout class='monospaced'>
1055 $ source oe-init-build-env [build_dir]
1056 </literallayout>
1057 </para>
1058
1059 <para>
1060 The most immediately useful function is to get help on both tools.
1061 The built-in help system makes it easy to drill down at
1062 any time and view the syntax required for any specific command.
1063 Simply enter the name of the command with the <filename>help</filename>
1064 switch:
1065 <literallayout class='monospaced'>
1066 $ yocto-bsp help
1067 Usage:
1068
1069 Create a customized Yocto BSP layer.
1070
1071 usage: yocto-bsp [--version] [--help] COMMAND [ARGS]
1072
1073 Current 'yocto-bsp' commands are:
1074 create Create a new Yocto BSP
1075 list List available values for options and BSP properties
1076
1077 See 'yocto-bsp help COMMAND' for more information on a specific command.
1078
1079
1080 Options:
1081 --version show program's version number and exit
1082 -h, --help show this help message and exit
1083 -D, --debug output debug information
1084 </literallayout>
1085 </para>
1086
1087 <para>
1088 Similarly, entering just the name of a sub-command shows the detailed usage
1089 for that sub-command:
1090 <literallayout class='monospaced'>
1091 $ yocto-bsp create
1092
1093 Usage:
1094
1095 Create a new Yocto BSP
1096
1097 usage: yocto-bsp create &lt;bsp-name&gt; &lt;karch&gt; [-o &lt;DIRNAME&gt; | --outdir &lt;DIRNAME&gt;]
1098 [-i &lt;JSON PROPERTY FILE&gt; | --infile &lt;JSON PROPERTY_FILE&gt;]
1099
1100 This command creates a Yocto BSP based on the specified parameters.
1101 The new BSP will be a new Yocto BSP layer contained by default within
1102 the top-level directory specified as 'meta-bsp-name'. The -o option
1103 can be used to place the BSP layer in a directory with a different
1104 name and location.
1105
1106 ...
1107 </literallayout>
1108 </para>
1109
1110 <para>
1111 For any sub-command, you can use the word "help" option just before the
1112 sub-command to get more extensive documentation:
1113 <literallayout class='monospaced'>
1114 $ yocto-bsp help create
1115
1116 NAME
1117 yocto-bsp create - Create a new Yocto BSP
1118
1119 SYNOPSIS
1120 yocto-bsp create &lt;bsp-name&gt; &lt;karch&gt; [-o &lt;DIRNAME&gt; | --outdir &lt;DIRNAME&gt;]
1121 [-i &lt;JSON PROPERTY FILE&gt; | --infile &lt;JSON PROPERTY_FILE&gt;]
1122
1123 DESCRIPTION
1124 This command creates a Yocto BSP based on the specified
1125 parameters. The new BSP will be a new Yocto BSP layer contained
1126 by default within the top-level directory specified as
1127 'meta-bsp-name'. The -o option can be used to place the BSP layer
1128 in a directory with a different name and location.
1129
1130 The value of the 'karch' parameter determines the set of files
1131 that will be generated for the BSP, along with the specific set of
1132 'properties' that will be used to fill out the BSP-specific
1133 portions of the BSP. The possible values for the 'karch' parameter
1134 can be listed via 'yocto-bsp list karch'.
1135
1136 ...
1137 </literallayout>
1138 </para>
1139
1140 <para>
1141 Now that you know where these two commands reside and how to access information
1142 on them, you should find it relatively straightforward to discover the commands
1143 necessary to create a BSP and perform basic kernel maintenance on that BSP using
1144 the tools.
1145 <note>
1146 You can also use the <filename>yocto-layer</filename> tool to create
1147 a "generic" layer.
1148 For information on this tool, see the
1149 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</ulink>"
1150 section in the Yocto Project Development Guide.
1151 </note>
1152 </para>
1153
1154 <para>
1155 The next sections provide a concrete starting point to expand on a few points that
1156 might not be immediately obvious or that could use further explanation.
1157 </para>
1158 </section>
1159
1160
1161 <section id='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>
1162 <title>Creating a new BSP Layer Using the yocto-bsp Script</title>
1163
1164 <para>
1165 The <filename>yocto-bsp</filename> script creates a new
1166 <link linkend='bsp-layers'>BSP layer</link> for any architecture supported
1167 by the Yocto Project, as well as QEMU versions of the same.
1168 The default mode of the script's operation is to prompt you for information needed
1169 to generate the BSP layer.
1170 </para>
1171
1172 <para>
1173 For the current set of BSPs, the script prompts you for various important
1174 parameters such as:
1175 <itemizedlist>
1176 <listitem><para>The kernel to use</para></listitem>
1177 <listitem><para>The branch of that kernel to use (or re-use)</para></listitem>
1178 <listitem><para>Whether or not to use X, and if so, which drivers to use</para></listitem>
1179 <listitem><para>Whether to turn on SMP</para></listitem>
1180 <listitem><para>Whether the BSP has a keyboard</para></listitem>
1181 <listitem><para>Whether the BSP has a touchscreen</para></listitem>
1182 <listitem><para>Remaining configurable items associated with the BSP</para></listitem>
1183 </itemizedlist>
1184 </para>
1185
1186 <para>
1187 You use the <filename>yocto-bsp create</filename> sub-command to create
1188 a new BSP layer.
1189 This command requires you to specify a particular kernel architecture
1190 (<filename>karch</filename>) on which to base the BSP.
1191 Assuming you have sourced the environment, you can use the
1192 <filename>yocto-bsp list karch</filename> sub-command to list the
1193 architectures available for BSP creation as follows:
1194 <literallayout class='monospaced'>
1195 $ yocto-bsp list karch
1196 Architectures available:
1197 powerpc
1198 i386
1199 x86_64
1200 arm
1201 qemu
1202 mips
1203 </literallayout>
1204 </para>
1205
1206 <para>
1207 The remainder of this section presents an example that uses
1208 <filename>myarm</filename> as the machine name and <filename>qemu</filename>
1209 as the machine architecture.
1210 Of the available architectures, <filename>qemu</filename> is the only architecture
1211 that causes the script to prompt you further for an actual architecture.
1212 In every other way, this architecture is representative of how creating a BSP for
1213 an actual machine would work.
1214 The reason the example uses this architecture is because it is an emulated architecture
1215 and can easily be followed without requiring actual hardware.
1216 </para>
1217
1218 <para>
1219 As the <filename>yocto-bsp create</filename> command runs, default values for
1220 the prompts appear in brackets.
1221 Pressing enter without supplying anything on the command line or pressing enter
1222 with an invalid response causes the script to accept the default value.
1223 Once the script completes, the new <filename>meta-myarm</filename> BSP layer
1224 is created in the current working directory.
1225 This example assumes you have sourced the
1226 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
1227 and are currently in the top-level folder of the
1228 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1229 </para>
1230
1231 <para>
1232 Following is the complete example:
1233 <literallayout class='monospaced'>
1234 $ yocto-bsp create myarm qemu
1235 Checking basic git connectivity...
1236 Done.
1237
1238 Which qemu architecture would you like to use? [default: i386]
1239 1) i386 (32-bit)
1240 2) x86_64 (64-bit)
1241 3) ARM (32-bit)
1242 4) PowerPC (32-bit)
1243 5) MIPS (32-bit)
1244 3
1245 Would you like to use the default (3.10) kernel? (y/n) [default: y] y
1246 Do you need a new machine branch for this BSP (the alternative is to re-use an existing branch)? [y/n] [default: y]
1247 Getting branches from remote repo git://git.yoctoproject.org/linux-yocto-3.10.git...
1248 Please choose a machine branch to base your new BSP branch on: [default: standard/base]
1249 1) standard/arm-versatile-926ejs
1250 2) standard/base
1251 3) standard/beagleboard
1252 4) standard/ck
1253 5) standard/crownbay
1254 6) standard/edf
1255 7) standard/emenlow
1256 8) standard/fri2
1257 9) standard/fsl-mpc8315e-rdb
1258 10) standard/minnow
1259 11) standard/mti-malta32
1260 12) standard/mti-malta64
1261 13) standard/qemuppc
1262 14) standard/routerstationpro
1263 15) standard/sys940x
1264 1
1265 Would you like SMP support? (y/n) [default: y]
1266 Does your BSP have a touchscreen? (y/n) [default: n]
1267 Does your BSP have a keyboard? (y/n) [default: y]
1268
1269 New qemu BSP created in meta-myarm
1270 </literallayout>
1271 Let's take a closer look at the example now:
1272 <orderedlist>
1273 <listitem><para>For the QEMU architecture,
1274 the script first prompts you for which emulated architecture to use.
1275 In the example, we use the ARM architecture.
1276 </para></listitem>
1277 <listitem><para>The script then prompts you for the kernel.
1278 The default 3.10 kernel is acceptable.
1279 So, the example accepts the default.
1280 If you enter 'n', the script prompts you to further enter the kernel
1281 you do want to use (e.g. 3.2, 3.2_preempt-rt, and so forth.).</para></listitem>
1282 <listitem><para>Next, the script asks whether you would like to have a new
1283 branch created especially for your BSP in the local
1284 <ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Linux Yocto Kernel</ulink>
1285 Git repository .
1286 If not, then the script re-uses an existing branch.</para>
1287 <para>In this example, the default (or "yes") is accepted.
1288 Thus, a new branch is created for the BSP rather than using a common, shared
1289 branch.
1290 The new branch is the branch committed to for any patches you might later add.
1291 The reason a new branch is the default is that typically
1292 new BSPs do require BSP-specific patches.
1293 The tool thus assumes that most of time a new branch is required.
1294 </para></listitem>
1295 <listitem><para>Regardless of which choice you make in the previous step,
1296 you are now given the opportunity to select a particular machine branch on
1297 which to base your new BSP-specific machine branch
1298 (or to re-use if you had elected to not create a new branch).
1299 Because this example is generating an ARM-based BSP, the example
1300 uses <filename>#1</filename> at the prompt, which selects the ARM-versatile branch.
1301 </para></listitem>
1302 <listitem><para>The remainder of the prompts are routine.
1303 Defaults are accepted for each.</para></listitem>
1304 <listitem><para>By default, the script creates the new BSP Layer in the
1305 current working directory of the
1306 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
1307 which is <filename>poky</filename> in this case.
1308 </para></listitem>
1309 </orderedlist>
1310 </para>
1311
1312 <para>
1313 Once the BSP Layer is created, you must add it to your
1314 <filename>bblayers.conf</filename> file.
1315 Here is an example:
1316 <literallayout class='monospaced'>
1317 BBLAYERS = ? " \
1318 /usr/local/src/yocto/meta \
1319 /usr/local/src/yocto/meta-yocto \
1320 /usr/local/src/yocto/meta-yocto-bsp \
1321 /usr/local/src/yocto/meta-myarm \
1322 "
1323
1324 BBLAYERS_NON_REMOVABLE ?= " \
1325 /usr/local/src/yocto/meta \
1326 /usr/local/src/yocto/meta-yocto \
1327 "
1328 </literallayout>
1329 Adding the layer to this file allows the build system to build the BSP and
1330 the <filename>yocto-kernel</filename> tool to be able to find the layer and
1331 other Metadata it needs on which to operate.
1332 </para>
1333 </section>
1334
1335 <section id='managing-kernel-patches-and-config-items-with-yocto-kernel'>
1336 <title>Managing Kernel Patches and Config Items with yocto-kernel</title>
1337
1338 <para>
1339 Assuming you have created a <link linkend='bsp-layers'>BSP Layer</link> using
1340 <link linkend='creating-a-new-bsp-layer-using-the-yocto-bsp-script'>
1341 <filename>yocto-bsp</filename></link> and you added it to your
1342 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
1343 variable in the <filename>bblayers.conf</filename> file, you can now use
1344 the <filename>yocto-kernel</filename> script to add patches and configuration
1345 items to the BSP's kernel.
1346 </para>
1347
1348 <para>
1349 The <filename>yocto-kernel</filename> script allows you to add, remove, and list patches
1350 and kernel config settings to a BSP's kernel
1351 <filename>.bbappend</filename> file.
1352 All you need to do is use the appropriate sub-command.
1353 Recall that the easiest way to see exactly what sub-commands are available
1354 is to use the <filename>yocto-kernel</filename> built-in help as follows:
1355 <literallayout class='monospaced'>
1356 $ yocto-kernel
1357 Usage:
1358
1359 Modify and list Yocto BSP kernel config items and patches.
1360
1361 usage: yocto-kernel [--version] [--help] COMMAND [ARGS]
1362
1363 Current 'yocto-kernel' commands are:
1364 config list List the modifiable set of bare kernel config options for a BSP
1365 config add Add or modify bare kernel config options for a BSP
1366 config rm Remove bare kernel config options from a BSP
1367 patch list List the patches associated with a BSP
1368 patch add Patch the Yocto kernel for a BSP
1369 patch rm Remove patches from a BSP
1370 feature list List the features used by a BSP
1371 feature add Have a BSP use a feature
1372 feature rm Have a BSP stop using a feature
1373 features list List the features available to BSPs
1374 feature describe Describe a particular feature
1375 feature create Create a new BSP-local feature
1376 feature destroy Remove a BSP-local feature
1377
1378 See 'yocto-kernel help COMMAND' for more information on a specific command.
1379
1380
1381
1382 Options:
1383 --version show program's version number and exit
1384 -h, --help show this help message and exit
1385 -D, --debug output debug information
1386 </literallayout>
1387 </para>
1388
1389 <para>
1390 The <filename>yocto-kernel patch add</filename> sub-command allows you to add a
1391 patch to a BSP.
1392 The following example adds two patches to the <filename>myarm</filename> BSP:
1393 <literallayout class='monospaced'>
1394 $ yocto-kernel patch add myarm ~/test.patch
1395 Added patches:
1396 test.patch
1397
1398 $ yocto-kernel patch add myarm ~/yocto-testmod.patch
1399 Added patches:
1400 yocto-testmod.patch
1401 </literallayout>
1402 <note>Although the previous example adds patches one at a time, it is possible
1403 to add multiple patches at the same time.</note>
1404 </para>
1405
1406 <para>
1407 You can verify patches have been added by using the
1408 <filename>yocto-kernel patch list</filename> sub-command.
1409 Here is an example:
1410 <literallayout class='monospaced'>
1411 $ yocto-kernel patch list myarm
1412 The current set of machine-specific patches for myarm is:
1413 1) test.patch
1414 2) yocto-testmod.patch
1415 </literallayout>
1416 </para>
1417
1418 <para>
1419 You can also use the <filename>yocto-kernel</filename> script to
1420 remove a patch using the <filename>yocto-kernel patch rm</filename> sub-command.
1421 Here is an example:
1422 <literallayout class='monospaced'>
1423 $ yocto-kernel patch rm myarm
1424 Specify the patches to remove:
1425 1) test.patch
1426 2) yocto-testmod.patch
1427 1
1428 Removed patches:
1429 test.patch
1430 </literallayout>
1431 </para>
1432
1433 <para>
1434 Again, using the <filename>yocto-kernel patch list</filename> sub-command,
1435 you can verify that the patch was in fact removed:
1436 <literallayout class='monospaced'>
1437 $ yocto-kernel patch list myarm
1438 The current set of machine-specific patches for myarm is:
1439 1) yocto-testmod.patch
1440 </literallayout>
1441 </para>
1442
1443 <para>
1444 In a completely similar way, you can use the <filename>yocto-kernel config add</filename>
1445 sub-command to add one or more kernel config item settings to a BSP.
1446 The following commands add a couple of config items to the
1447 <filename>myarm</filename> BSP:
1448 <literallayout class='monospaced'>
1449 $ yocto-kernel config add myarm CONFIG_MISC_DEVICES=y
1450 Added items:
1451 CONFIG_MISC_DEVICES=y
1452
1453 $ yocto-kernel config add myarm CONFIG_YOCTO_TESTMOD=y
1454 Added items:
1455 CONFIG_YOCTO_TESTMOD=y
1456 </literallayout>
1457 <note>Although the previous example adds config items one at a time, it is possible
1458 to add multiple config items at the same time.</note>
1459 </para>
1460
1461 <para>
1462 You can list the config items now associated with the BSP.
1463 Doing so shows you the config items you added as well as others associated
1464 with the BSP:
1465 <literallayout class='monospaced'>
1466 $ yocto-kernel config list myarm
1467 The current set of machine-specific kernel config items for myarm is:
1468 1) CONFIG_MISC_DEVICES=y
1469 2) CONFIG_YOCTO_TESTMOD=y
1470 </literallayout>
1471 </para>
1472
1473 <para>
1474 Finally, you can remove one or more config items using the
1475 <filename>yocto-kernel config rm</filename> sub-command in a manner
1476 completely analogous to <filename>yocto-kernel patch rm</filename>.
1477 </para>
1478 </section>
1479 </section>
1480</chapter>
diff --git a/documentation/bsp-guide/figures/bsp-title.png b/documentation/bsp-guide/figures/bsp-title.png
new file mode 100644
index 0000000..f624dd4
--- /dev/null
+++ b/documentation/bsp-guide/figures/bsp-title.png
Binary files differ
diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml
new file mode 100644
index 0000000..305dc31
--- /dev/null
+++ b/documentation/dev-manual/dev-manual-common-tasks.xml
@@ -0,0 +1,6603 @@
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='extendpoky'>
6
7<title>Common Tasks</title>
8 <para>
9 This chapter describes fundamental procedures such as creating layers,
10 adding new software packages, extending or customizing images,
11 porting work to new hardware (adding a new machine), and so forth.
12 You will find the procedures documented here occur often in the
13 development cycle using the Yocto Project.
14 </para>
15
16 <section id="understanding-and-creating-layers">
17 <title>Understanding and Creating Layers</title>
18
19 <para>
20 The OpenEmbedded build system supports organizing
21 <link linkend='metadata'>Metadata</link> into multiple layers.
22 Layers allow you to isolate different types of customizations from
23 each other.
24 You might find it tempting to keep everything in one layer when
25 working on a single project.
26 However, the more modular you organize your Metadata, the easier
27 it is to cope with future changes.
28 </para>
29
30 <para>
31 To illustrate how layers are used to keep things modular, consider
32 machine customizations.
33 These types of customizations typically reside in a special layer,
34 rather than a general layer, called a Board Support Package (BSP)
35 Layer.
36 Furthermore, the machine customizations should be isolated from
37 recipes and Metadata that support a new GUI environment,
38 for example.
39 This situation gives you a couple of layers: one for the machine
40 configurations, and one for the GUI environment.
41 It is important to understand, however, that the BSP layer can
42 still make machine-specific additions to recipes within the GUI
43 environment layer without polluting the GUI layer itself
44 with those machine-specific changes.
45 You can accomplish this through a recipe that is a BitBake append
46 (<filename>.bbappend</filename>) file, which is described later
47 in this section.
48 </para>
49
50 <para>
51 </para>
52
53 <section id='yocto-project-layers'>
54 <title>Layers</title>
55
56 <para>
57 The <link linkend='source-directory'>Source Directory</link>
58 contains both general layers and BSP
59 layers right out of the box.
60 You can easily identify layers that ship with a
61 Yocto Project release in the Source Directory by their
62 folder names.
63 Folders that represent layers typically have names that begin with
64 the string <filename>meta-</filename>.
65 <note>
66 It is not a requirement that a layer name begin with the
67 prefix <filename>meta-</filename>, but it's a commonly accepted
68 standard in the Yocto Project community.
69 </note>
70 For example, when you set up the Source Directory structure,
71 you will see several layers:
72 <filename>meta</filename>, <filename>meta-hob</filename>,
73 <filename>meta-skeleton</filename>,
74 <filename>meta-yocto</filename>, and
75 <filename>meta-yocto-bsp</filename>.
76 Each of these folders represents a distinct layer.
77 </para>
78
79 <para>
80 Furthermore, if you set up a local copy of the
81 <filename>meta-intel</filename> Git repository
82 and then explore the folder of that general layer,
83 you will discover many Intel-specific BSP layers inside.
84 For more information on BSP layers, see the
85 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
86 section in the Yocto Project Board Support Package (BSP)
87 Developer's Guide.
88 </para>
89 </section>
90
91 <section id='creating-your-own-layer'>
92 <title>Creating Your Own Layer</title>
93
94 <para>
95 It is very easy to create your own layers to use with the
96 OpenEmbedded build system.
97 The Yocto Project ships with scripts that speed up creating
98 general layers and BSP layers.
99 This section describes the steps you perform by hand to create
100 a layer so that you can better understand them.
101 For information about the layer-creation scripts, see the
102 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
103 section in the Yocto Project Board Support Package (BSP)
104 Developer's Guide and the
105 "<link linkend='creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</link>"
106 section further down in this manual.
107 </para>
108
109 <para>
110 Follow these general steps to create your layer:
111 <orderedlist>
112 <listitem><para><emphasis>Check Existing Layers:</emphasis>
113 Before creating a new layer, you should be sure someone
114 has not already created a layer containing the Metadata
115 you need.
116 You can see the
117 <ulink url='http://layers.openembedded.org/layerindex/layers/'><filename>OpenEmbedded Metadata Index</filename></ulink>
118 for a list of layers from the OpenEmbedded community
119 that can be used in the Yocto Project.
120 </para></listitem>
121 <listitem><para><emphasis>Create a Directory:</emphasis>
122 Create the directory for your layer.
123 While not strictly required, prepend the name of the
124 folder with the string <filename>meta-</filename>.
125 For example:
126 <literallayout class='monospaced'>
127 meta-mylayer
128 meta-GUI_xyz
129 meta-mymachine
130 </literallayout>
131 </para></listitem>
132 <listitem><para><emphasis>Create a Layer Configuration
133 File:</emphasis>
134 Inside your new layer folder, you need to create a
135 <filename>conf/layer.conf</filename> file.
136 It is easiest to take an existing layer configuration
137 file and copy that to your layer's
138 <filename>conf</filename> directory and then modify the
139 file as needed.</para>
140 <para>The
141 <filename>meta-yocto-bsp/conf/layer.conf</filename> file
142 demonstrates the required syntax:
143 <literallayout class='monospaced'>
144 # We have a conf and classes directory, add to BBPATH
145 BBPATH .= ":${LAYERDIR}"
146
147 # We have recipes-* directories, add to BBFILES
148 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
149 ${LAYERDIR}/recipes-*/*/*.bbappend"
150
151 BBFILE_COLLECTIONS += "yoctobsp"
152 BBFILE_PATTERN_yoctobsp = "^${LAYERDIR}/"
153 BBFILE_PRIORITY_yoctobsp = "5"
154 LAYERVERSION_yoctobsp = "2"
155 </literallayout></para>
156 <para>Here is an explanation of the example:
157 <itemizedlist>
158 <listitem><para>The configuration and
159 classes directory is appended to
160 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>.
161 <note>
162 All non-distro layers, which include all BSP
163 layers, are expected to append the layer
164 directory to the
165 <filename>BBPATH</filename>.
166 On the other hand, distro layers, such as
167 <filename>meta-yocto</filename>, can choose
168 to enforce their own precedence over
169 <filename>BBPATH</filename>.
170 For an example of that syntax, see the
171 <filename>layer.conf</filename> file for
172 the <filename>meta-yocto</filename> layer.
173 </note></para></listitem>
174 <listitem><para>The recipes for the layers are
175 appended to
176 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILES'>BBFILES</ulink></filename>.
177 </para></listitem>
178 <listitem><para>The
179 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_COLLECTIONS'>BBFILE_COLLECTIONS</ulink></filename>
180 variable is then appended with the layer name.
181 </para></listitem>
182 <listitem><para>The
183 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PATTERN'>BBFILE_PATTERN</ulink></filename>
184 variable is set to a regular expression and is
185 used to match files from
186 <filename>BBFILES</filename> into a particular
187 layer.
188 In this case,
189 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename>
190 is used to make <filename>BBFILE_PATTERN</filename> match within the
191 layer's path.</para></listitem>
192 <listitem><para>The
193 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'>BBFILE_PRIORITY</ulink></filename>
194 variable then assigns a priority to the layer.
195 Applying priorities is useful in situations
196 where the same package might appear in multiple
197 layers and allows you to choose what layer
198 should take precedence.</para></listitem>
199 <listitem><para>The
200 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERVERSION'>LAYERVERSION</ulink></filename>
201 variable optionally specifies the version of a
202 layer as a single number.</para></listitem>
203 </itemizedlist></para>
204 <para>Note the use of the
205 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LAYERDIR'>LAYERDIR</ulink></filename>
206 variable, which expands to the directory of the current
207 layer.</para>
208 <para>Through the use of the <filename>BBPATH</filename>
209 variable, BitBake locates <filename>.bbclass</filename>
210 files, configuration files, and files that are included
211 with <filename>include</filename> and
212 <filename>require</filename> statements.
213 For these cases, BitBake uses the first file that
214 matches the name found in <filename>BBPATH</filename>.
215 This is similar to the way the <filename>PATH</filename>
216 variable is used for binaries.
217 We recommend, therefore, that you use unique
218 <filename>.bbclass</filename> and configuration
219 filenames in your custom layer.</para></listitem>
220 <listitem><para><emphasis>Add Content:</emphasis> Depending
221 on the type of layer, add the content.
222 If the layer adds support for a machine, add the machine
223 configuration in a <filename>conf/machine/</filename>
224 file within the layer.
225 If the layer adds distro policy, add the distro
226 configuration in a <filename>conf/distro/</filename>
227 file with the layer.
228 If the layer introduces new recipes, put the recipes
229 you need in <filename>recipes-*</filename>
230 subdirectories within the layer.
231 <note>In order to be compliant with the Yocto Project,
232 a layer must contain a
233 <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-readme'>README file.</ulink>
234 </note></para></listitem>
235 </orderedlist>
236 </para>
237 </section>
238
239 <section id='best-practices-to-follow-when-creating-layers'>
240 <title>Best Practices to Follow When Creating Layers</title>
241
242 <para>
243 To create layers that are easier to maintain and that will
244 not impact builds for other machines, you should consider the
245 information in the following sections.
246 </para>
247
248 <section id='avoid-overlaying-entire-recipes'>
249 <title>Avoid "Overlaying" Entire Recipes</title>
250
251 <para>
252 Avoid "overlaying" entire recipes from other layers in your
253 configuration.
254 In other words, do not copy an entire recipe into your
255 layer and then modify it.
256 Rather, use <filename>.bbappend</filename> files to override the
257 only those parts of the original recipe you need to modify.
258 </para>
259 </section>
260
261 <section id='avoid-duplicating-include-files'>
262 <title>Avoid Duplicating Include Files</title>
263
264 <para>
265 Avoid duplicating include files.
266 Use <filename>.bbappend</filename> files for each recipe
267 that uses an include file.
268 Or, if you are introducing a new recipe that requires
269 the included file, use the path relative to the original
270 layer directory to refer to the file.
271 For example, use
272 <filename>require recipes-core/somepackage/somefile.inc</filename>
273 instead of <filename>require somefile.inc</filename>.
274 If you're finding you have to overlay the include file,
275 it could indicate a deficiency in the include file in
276 the layer to which it originally belongs.
277 If this is the case, you need to address that deficiency
278 instead of overlaying the include file.
279 </para>
280
281 <para>
282 For example, consider how support plug-ins for the Qt 4
283 database are configured.
284 The Source Directory does not have MySQL or PostgreSQL.
285 However, OpenEmbedded's layer <filename>meta-oe</filename>
286 does.
287 Consequently, <filename>meta-oe</filename> uses
288 <filename>.bbappend</filename> files to modify the
289 <filename>QT_SQL_DRIVER_FLAGS</filename> variable to
290 enable the appropriate plug-ins.
291 This variable was added to the <filename>qt4.inc</filename>
292 include file in the Source Directory specifically to allow
293 the <filename>meta-oe</filename> layer to be able to control
294 which plug-ins are built.
295 </para>
296 </section>
297
298 <section id='structure-your-layers'>
299 <title>Structure Your Layers</title>
300
301 <para>
302 Proper use of overrides within append files and placement
303 of machine-specific files within your layer can ensure that
304 a build is not using the wrong Metadata and negatively
305 impacting a build for a different machine.
306 Following are some examples:
307 <itemizedlist>
308 <listitem><para><emphasis>Modifying Variables to Support
309 a Different Machine:</emphasis>
310 Suppose you have a layer named
311 <filename>meta-one</filename> that adds support
312 for building machine "one".
313 To do so, you use an append file named
314 <filename>base-files.bbappend</filename> and
315 create a dependency on "foo" by altering the
316 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
317 variable:
318 <literallayout class='monospaced'>
319 DEPENDS = "foo"
320 </literallayout>
321 The dependency is created during any build that
322 includes the layer
323 <filename>meta-one</filename>.
324 However, you might not want this dependency
325 for all machines.
326 For example, suppose you are building for
327 machine "two" but your
328 <filename>bblayers.conf</filename> file has the
329 <filename>meta-one</filename> layer included.
330 During the build, the
331 <filename>base-files</filename> for machine
332 "two" will also have the dependency on
333 <filename>foo</filename>.</para>
334 <para>To make sure your changes apply only when
335 building machine "one", use a machine override
336 with the <filename>DEPENDS</filename> statement:
337 <literallayout class='monospaced'>
338 DEPENDS_one = "foo"
339 </literallayout>
340 You should follow the same strategy when using
341 <filename>_append</filename> and
342 <filename>_prepend</filename> operations:
343 <literallayout class='monospaced'>
344 DEPENDS_append_one = " foo"
345 DEPENDS_prepend_one = "foo "
346 </literallayout>
347 <note>
348 Avoiding "+=" and "=+" and using
349 machine-specific
350 <filename>_append</filename>
351 and <filename>_prepend</filename> operations
352 is recommended as well.
353 </note></para></listitem>
354 <listitem><para><emphasis>Place Machine-Specific Files
355 in Machine-Specific Locations:</emphasis>
356 When you have a base recipe, such as
357 <filename>base-files.bb</filename>, that
358 contains a
359 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
360 statement to a file, you can use an append file
361 to cause the build to use your own version of
362 the file.
363 For example, an append file in your layer at
364 <filename>meta-one/recipes-core/base-files/base-files.bbappend</filename>
365 could extend
366 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
367 using
368 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
369 as follows:
370 <literallayout class='monospaced'>
371 FILESEXTRAPATHS_prepend := "${THISDIR}/${BPN}:"
372 </literallayout>
373 The build for machine "one" will pick up your
374 machine-specific file as long as you have the
375 file in
376 <filename>meta-one/recipes-core/base-files/base-files/</filename>.
377 However, if you are building for a different
378 machine and the
379 <filename>bblayers.conf</filename> file includes
380 the <filename>meta-one</filename> layer and
381 the location of your machine-specific file is
382 the first location where that file is found
383 according to <filename>FILESPATH</filename>,
384 builds for all machines will also use that
385 machine-specific file.</para>
386 <para>You can make sure that a machine-specific
387 file is used for a particular machine by putting
388 the file in a subdirectory specific to the
389 machine.
390 For example, rather than placing the file in
391 <filename>meta-one/recipes-core/base-files/base-files/</filename>
392 as shown above, put it in
393 <filename>meta-one/recipes-core/base-files/base-files/one/</filename>.
394 Not only does this make sure the file is used
395 only when building for machine "one" but the
396 build process locates the file more quickly.</para>
397 <para>In summary, you need to place all files
398 referenced from <filename>SRC_URI</filename>
399 in a machine-specific subdirectory within the
400 layer in order to restrict those files to
401 machine-specific builds.</para></listitem>
402 </itemizedlist>
403 </para>
404 </section>
405
406 <section id='other-recommendations'>
407 <title>Other Recommendations</title>
408
409 <para>
410 We also recommend the following:
411 <itemizedlist>
412 <listitem><para>Store custom layers in a Git repository
413 that uses the
414 <filename>meta-&lt;layer_name&gt;</filename> format.
415 </para></listitem>
416 <listitem><para>Clone the repository alongside other
417 <filename>meta</filename> directories in the
418 <link linkend='source-directory'>Source Directory</link>.
419 </para></listitem>
420 </itemizedlist>
421 Following these recommendations keeps your Source Directory and
422 its configuration entirely inside the Yocto Project's core
423 base.
424 </para>
425 </section>
426 </section>
427
428 <section id='enabling-your-layer'>
429 <title>Enabling Your Layer</title>
430
431 <para>
432 Before the OpenEmbedded build system can use your new layer,
433 you need to enable it.
434 To enable your layer, simply add your layer's path to the
435 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'>BBLAYERS</ulink></filename>
436 variable in your <filename>conf/bblayers.conf</filename> file,
437 which is found in the
438 <link linkend='build-directory'>Build Directory</link>.
439 The following example shows how to enable a layer named
440 <filename>meta-mylayer</filename>:
441 <literallayout class='monospaced'>
442 LCONF_VERSION = "6"
443
444 BBPATH = "${TOPDIR}"
445 BBFILES ?= ""
446
447 BBLAYERS ?= " \
448 $HOME/poky/meta \
449 $HOME/poky/meta-yocto \
450 $HOME/poky/meta-yocto-bsp \
451 $HOME/poky/meta-mylayer \
452 "
453
454 BBLAYERS_NON_REMOVABLE ?= " \
455 $HOME/poky/meta \
456 $HOME/poky/meta-yocto \
457 "
458 </literallayout>
459 </para>
460
461 <para>
462 BitBake parses each <filename>conf/layer.conf</filename> file
463 as specified in the <filename>BBLAYERS</filename> variable
464 within the <filename>conf/bblayers.conf</filename> file.
465 During the processing of each
466 <filename>conf/layer.conf</filename> file, BitBake adds the
467 recipes, classes and configurations contained within the
468 particular layer to the source directory.
469 </para>
470 </section>
471
472 <section id='using-bbappend-files'>
473 <title>Using .bbappend Files</title>
474
475 <para>
476 Recipes used to append Metadata to other recipes are called
477 BitBake append files.
478 BitBake append files use the <filename>.bbappend</filename> file
479 type suffix, while the corresponding recipes to which Metadata
480 is being appended use the <filename>.bb</filename> file type
481 suffix.
482 </para>
483
484 <para>
485 A <filename>.bbappend</filename> file allows your layer to make
486 additions or changes to the content of another layer's recipe
487 without having to copy the other recipe into your layer.
488 Your <filename>.bbappend</filename> file resides in your layer,
489 while the main <filename>.bb</filename> recipe file to
490 which you are appending Metadata resides in a different layer.
491 </para>
492
493 <para>
494 Append files must have the same root names as their corresponding
495 recipes.
496 For example, the append file
497 <filename>someapp_&DISTRO;.bbappend</filename> must apply to
498 <filename>someapp_&DISTRO;.bb</filename>.
499 This means the original recipe and append file names are version
500 number-specific.
501 If the corresponding recipe is renamed to update to a newer
502 version, the corresponding <filename>.bbappend</filename> file must
503 be renamed (and possibly updated) as well.
504 During the build process, BitBake displays an error on starting
505 if it detects a <filename>.bbappend</filename> file that does
506 not have a corresponding recipe with a matching name.
507 See the
508 <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_DANGLINGAPPENDS_WARNONLY'><filename>BB_DANGLINGAPPENDS_WARNONLY</filename></ulink>
509 variable for information on how to handle this error.
510 </para>
511
512 <para>
513 Being able to append information to an existing recipe not only
514 avoids duplication, but also automatically applies recipe
515 changes in a different layer to your layer.
516 If you were copying recipes, you would have to manually merge
517 changes as they occur.
518 </para>
519
520 <para>
521 As an example, consider the main formfactor recipe and a
522 corresponding formfactor append file both from the
523 <link linkend='source-directory'>Source Directory</link>.
524 Here is the main formfactor recipe, which is named
525 <filename>formfactor_0.0.bb</filename> and located in the
526 "meta" layer at
527 <filename>meta/recipes-bsp/formfactor</filename>:
528 <literallayout class='monospaced'>
529 DESCRIPTION = "Device formfactor information"
530 SECTION = "base"
531 LICENSE = "MIT"
532 LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3b58 \
533 file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
534 PR = "r41"
535
536 SRC_URI = "file://config file://machconfig"
537 S = "${WORKDIR}"
538
539 PACKAGE_ARCH = "${MACHINE_ARCH}"
540 INHIBIT_DEFAULT_DEPS = "1"
541
542 do_install() {
543 # Only install file if it has a contents
544 install -d ${D}${sysconfdir}/formfactor/
545 install -m 0644 ${S}/config ${D}${sysconfdir}/formfactor/
546 if [ -s "${S}/machconfig" ]; then
547 install -m 0644 ${S}/machconfig ${D}${sysconfdir}/formfactor/
548 fi
549 }
550 </literallayout>
551 In the main recipe, note the
552 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
553 variable, which tells the OpenEmbedded build system where to
554 find files during the build.
555 </para>
556
557 <para>
558 Following is the append file, which is named
559 <filename>formfactor_0.0.bbappend</filename> and is from the
560 Crown Bay BSP Layer named
561 <filename>meta-intel/meta-crownbay</filename>.
562 The file is in <filename>recipes-bsp/formfactor</filename>:
563 <literallayout class='monospaced'>
564 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
565 </literallayout>
566 </para>
567
568 <para>
569 By default, the build system uses the
570 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
571 variable to locate files.
572 This append file extends the locations by setting the
573 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
574 variable.
575 Setting this variable in the <filename>.bbappend</filename>
576 file is the most reliable and recommended method for adding
577 directories to the search path used by the build system
578 to find files.
579 </para>
580
581 <para>
582 The statement in this example extends the directories to include
583 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-THISDIR'><filename>THISDIR</filename></ulink><filename>}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>,
584 which resolves to a directory named
585 <filename>formfactor</filename> in the same directory
586 in which the append file resides (i.e.
587 <filename>meta-intel/meta-crownbay/recipes-bsp/formfactor/formfactor</filename>.
588 This implies that you must have the supporting directory
589 structure set up that will contain any files or patches you
590 will be including from the layer.
591 </para>
592
593 <para>
594 Using the immediate expansion assignment operator
595 <filename>:=</filename> is important because of the reference to
596 <filename>THISDIR</filename>.
597 The trailing colon character is important as it ensures that
598 items in the list remain colon-separated.
599 <note><para>BitBake automatically defines the
600 <filename>THISDIR</filename> variable.
601 You should never set this variable yourself.
602 Using <filename>_prepend</filename> ensures your path will
603 be searched prior to other paths in the final list.</para>
604 <para>Also, not all append files add extra files.
605 Many append files simply exist to add build options
606 (e.g. <filename>systemd</filename>).
607 For these cases, it is not necessary to use the
608 "_prepend" part of the statement.</para>
609 </note>
610 </para>
611 </section>
612
613 <section id='prioritizing-your-layer'>
614 <title>Prioritizing Your Layer</title>
615
616 <para>
617 Each layer is assigned a priority value.
618 Priority values control which layer takes precedence if there
619 are recipe files with the same name in multiple layers.
620 For these cases, the recipe file from the layer with a higher
621 priority number takes precedence.
622 Priority values also affect the order in which multiple
623 <filename>.bbappend</filename> files for the same recipe are
624 applied.
625 You can either specify the priority manually, or allow the
626 build system to calculate it based on the layer's dependencies.
627 </para>
628
629 <para>
630 To specify the layer's priority manually, use the
631 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBFILE_PRIORITY'><filename>BBFILE_PRIORITY</filename></ulink>
632 variable.
633 For example:
634 <literallayout class='monospaced'>
635 BBFILE_PRIORITY_mylayer = "1"
636 </literallayout>
637 </para>
638
639 <note>
640 <para>It is possible for a recipe with a lower version number
641 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
642 in a layer that has a higher priority to take precedence.</para>
643 <para>Also, the layer priority does not currently affect the
644 precedence order of <filename>.conf</filename>
645 or <filename>.bbclass</filename> files.
646 Future versions of BitBake might address this.</para>
647 </note>
648 </section>
649
650 <section id='managing-layers'>
651 <title>Managing Layers</title>
652
653 <para>
654 You can use the BitBake layer management tool to provide a view
655 into the structure of recipes across a multi-layer project.
656 Being able to generate output that reports on configured layers
657 with their paths and priorities and on
658 <filename>.bbappend</filename> files and their applicable
659 recipes can help to reveal potential problems.
660 </para>
661
662 <para>
663 Use the following form when running the layer management tool.
664 <literallayout class='monospaced'>
665 $ bitbake-layers &lt;command&gt; [arguments]
666 </literallayout>
667 The following list describes the available commands:
668 <itemizedlist>
669 <listitem><para><filename><emphasis>help:</emphasis></filename>
670 Displays general help or help on a specified command.
671 </para></listitem>
672 <listitem><para><filename><emphasis>show-layers:</emphasis></filename>
673 Shows the current configured layers.
674 </para></listitem>
675 <listitem><para><filename><emphasis>show-recipes:</emphasis></filename>
676 Lists available recipes and the layers that provide them.
677 </para></listitem>
678 <listitem><para><filename><emphasis>show-overlayed:</emphasis></filename>
679 Lists overlayed recipes.
680 A recipe is overlayed when a recipe with the same name
681 exists in another layer that has a higher layer
682 priority.
683 </para></listitem>
684 <listitem><para><filename><emphasis>show-appends:</emphasis></filename>
685 Lists <filename>.bbappend</filename> files and the
686 recipe files to which they apply.
687 </para></listitem>
688 <listitem><para><filename><emphasis>show-cross-depends:</emphasis></filename>
689 Lists dependency relationships between recipes that
690 cross layer boundaries.
691 </para></listitem>
692 <listitem><para><filename><emphasis>flatten:</emphasis></filename>
693 Flattens the layer configuration into a separate output
694 directory.
695 Flattening your layer configuration builds a "flattened"
696 directory that contains the contents of all layers,
697 with any overlayed recipes removed and any
698 <filename>.bbappend</filename> files appended to the
699 corresponding recipes.
700 You might have to perform some manual cleanup of the
701 flattened layer as follows:
702 <itemizedlist>
703 <listitem><para>Non-recipe files (such as patches)
704 are overwritten.
705 The flatten command shows a warning for these
706 files.
707 </para></listitem>
708 <listitem><para>Anything beyond the normal layer
709 setup has been added to the
710 <filename>layer.conf</filename> file.
711 Only the lowest priority layer's
712 <filename>layer.conf</filename> is used.
713 </para></listitem>
714 <listitem><para>Overridden and appended items from
715 <filename>.bbappend</filename> files need to be
716 cleaned up.
717 The contents of each
718 <filename>.bbappend</filename> end up in the
719 flattened recipe.
720 However, if there are appended or changed
721 variable values, you need to tidy these up
722 yourself.
723 Consider the following example.
724 Here, the <filename>bitbake-layers</filename>
725 command adds the line
726 <filename>#### bbappended ...</filename> so that
727 you know where the following lines originate:
728 <literallayout class='monospaced'>
729 ...
730 DESCRIPTION = "A useful utility"
731 ...
732 EXTRA_OECONF = "--enable-something"
733 ...
734
735 #### bbappended from meta-anotherlayer ####
736
737 DESCRIPTION = "Customized utility"
738 EXTRA_OECONF += "--enable-somethingelse"
739 </literallayout>
740 Ideally, you would tidy up these utilities as
741 follows:
742 <literallayout class='monospaced'>
743 ...
744 DESCRIPTION = "Customized utility"
745 ...
746 EXTRA_OECONF = "--enable-something --enable-somethingelse"
747 ...
748 </literallayout></para></listitem>
749 </itemizedlist></para></listitem>
750 </itemizedlist>
751 </para>
752 </section>
753
754 <section id='creating-a-general-layer-using-the-yocto-layer-script'>
755 <title>Creating a General Layer Using the yocto-layer Script</title>
756
757 <para>
758 The <filename>yocto-layer</filename> script simplifies
759 creating a new general layer.
760 <note>
761 For information on BSP layers, see the
762 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
763 section in the Yocto Project Board Specific (BSP)
764 Developer's Guide.
765 </note>
766 The default mode of the script's operation is to prompt you for
767 information needed to generate the layer:
768 <itemizedlist>
769 <listitem><para>The layer priority
770 </para></listitem>
771 <listitem><para>Whether or not to create a sample recipe.
772 </para></listitem>
773 <listitem><para>Whether or not to create a sample
774 append file.
775 </para></listitem>
776 </itemizedlist>
777 </para>
778
779 <para>
780 Use the <filename>yocto-layer create</filename> sub-command
781 to create a new general layer.
782 In its simplest form, you can create a layer as follows:
783 <literallayout class='monospaced'>
784 $ yocto-layer create mylayer
785 </literallayout>
786 The previous example creates a layer named
787 <filename>meta-mylayer</filename> in the current directory.
788 </para>
789
790 <para>
791 As the <filename>yocto-layer create</filename> command runs,
792 default values for the prompts appear in brackets.
793 Pressing enter without supplying anything for the prompts
794 or pressing enter and providing an invalid response causes the
795 script to accept the default value.
796 Once the script completes, the new layer
797 is created in the current working directory.
798 The script names the layer by prepending
799 <filename>meta-</filename> to the name you provide.
800 </para>
801
802 <para>
803 Minimally, the script creates the following within the layer:
804 <itemizedlist>
805 <listitem><para><emphasis>The <filename>conf</filename>
806 directory:</emphasis>
807 This directory contains the layer's configuration file.
808 The root name for the file is the same as the root name
809 your provided for the layer (e.g.
810 <filename>&lt;layer&gt;.conf</filename>).
811 </para></listitem>
812 <listitem><para><emphasis>The
813 <filename>COPYING.MIT</filename>:</emphasis>
814 The copyright and use notice for the software.
815 </para></listitem>
816 <listitem><para><emphasis>The <filename>README</filename>
817 file:</emphasis>
818 A file describing the contents of your new layer.
819 </para></listitem>
820 </itemizedlist>
821 </para>
822
823 <para>
824 If you choose to generate a sample recipe file, the script
825 prompts you for the name for the recipe and then creates it
826 in <filename>&lt;layer&gt;/recipes-example/example/</filename>.
827 The script creates a <filename>.bb</filename> file and a
828 directory, which contains a sample
829 <filename>helloworld.c</filename> source file and along with
830 a sample patch file.
831 If you do not provide a recipe name, the script uses
832 "example".
833 </para>
834
835 <para>
836 If you choose to generate a sample append file, the script
837 prompts you for the name for the file and then creates it
838 in <filename>&lt;layer&gt;/recipes-example-bbappend/example-bbappend/</filename>.
839 The script creates a <filename>.bbappend</filename> file and a
840 directory, which contains a sample patch file.
841 If you do not provide a recipe name, the script uses
842 "example".
843 The script also prompts you for the version of the append file.
844 The version should match the recipe to which the append file
845 is associated.
846 </para>
847
848 <para>
849 The easiest way to see how the <filename>yocto-layer</filename>
850 script works is to experiment with the script.
851 You can also read the usage information by entering the
852 following:
853 <literallayout class='monospaced'>
854 $ yocto-layer help
855 </literallayout>
856 </para>
857
858 <para>
859 Once you create your general layer, you must add it to your
860 <filename>bblayers.conf</filename> file.
861 Here is an example where a layer named
862 <filename>meta-mylayer</filename> is added:
863 <literallayout class='monospaced'>
864 BBLAYERS = ?" \
865 /usr/local/src/yocto/meta \
866 /usr/local/src/yocto/meta-yocto \
867 /usr/local/src/yocto/meta-yocto-bsp \
868 /usr/local/src/yocto/meta-mylayer \
869 "
870
871 BBLAYERS_NON_REMOVABLE ?= " \
872 /usr/local/src/yocto/meta \
873 /usr/local/src/yocto/meta-yocto \
874 "
875 </literallayout>
876 Adding the layer to this file enables the build system to
877 locate the layer during the build.
878 </para>
879 </section>
880 </section>
881
882 <section id='usingpoky-extend-customimage'>
883 <title>Customizing Images</title>
884
885 <para>
886 You can customize images to satisfy particular requirements.
887 This section describes several methods and provides guidelines for each.
888 </para>
889
890 <section id='usingpoky-extend-customimage-custombb'>
891 <title>Customizing Images Using Custom .bb Files</title>
892
893 <para>
894 One way to get additional software into an image is to create a custom image.
895 The following example shows the form for the two lines you need:
896 <literallayout class='monospaced'>
897 IMAGE_INSTALL = "packagegroup-core-x11-base package1 package2"
898
899 inherit core-image
900 </literallayout>
901 </para>
902
903 <para>
904 By creating a custom image, a developer has total control
905 over the contents of the image.
906 It is important to use the correct names of packages in the
907 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>
908 variable.
909 You must use the OpenEmbedded notation and not the Debian notation for the names
910 (e.g. <filename>eglibc-dev</filename> instead of <filename>libc6-dev</filename>).
911 </para>
912
913 <para>
914 The other method for creating a custom image is to base it on an existing image.
915 For example, if you want to create an image based on <filename>core-image-sato</filename>
916 but add the additional package <filename>strace</filename> to the image,
917 copy the <filename>meta/recipes-sato/images/core-image-sato.bb</filename> to a
918 new <filename>.bb</filename> and add the following line to the end of the copy:
919 <literallayout class='monospaced'>
920 IMAGE_INSTALL += "strace"
921 </literallayout>
922 </para>
923 </section>
924
925 <section id='usingpoky-extend-customimage-customtasks'>
926 <title>Customizing Images Using Custom Package Groups</title>
927
928 <para>
929 For complex custom images, the best approach is to create a
930 custom package group recipe that is used to build the image or
931 images.
932 A good example of a package group recipe is
933 <filename>meta/recipes-core/packagegroups/packagegroup-core-boot.bb</filename>.
934 The
935 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'>PACKAGES</ulink></filename>
936 variable lists the package group packages you wish to produce.
937 <filename>inherit packagegroup</filename> sets appropriate
938 default values and automatically adds <filename>-dev</filename>,
939 <filename>-dbg</filename>, and <filename>-ptest</filename>
940 complementary packages for every package specified in
941 <filename>PACKAGES</filename>.
942 Note that the inherit line should be towards
943 the top of the recipe, certainly before you set
944 <filename>PACKAGES</filename>.
945 For each package you specify in <filename>PACKAGES</filename>,
946 you can use
947 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'>RDEPENDS</ulink></filename>
948 and
949 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'>RRECOMMENDS</ulink></filename>
950 entries to provide a list of packages the parent task package
951 should contain.
952 Following is an example:
953 <literallayout class='monospaced'>
954 DESCRIPTION = "My Custom Package Groups"
955
956 inherit packagegroup
957
958 PACKAGES = "\
959 packagegroup-custom-apps \
960 packagegroup-custom-tools \
961 "
962
963 RDEPENDS_packagegroup-custom-apps = "\
964 dropbear \
965 portmap \
966 psplash"
967
968 RDEPENDS_packagegroup-custom-tools = "\
969 oprofile \
970 oprofileui-server \
971 lttng-control \
972 lttng-viewer"
973
974 RRECOMMENDS_packagegroup-custom-tools = "\
975 kernel-module-oprofile"
976 </literallayout>
977 </para>
978
979 <para>
980 In the previous example, two package group packages are created with their dependencies and their
981 recommended package dependencies listed: <filename>packagegroup-custom-apps</filename>, and
982 <filename>packagegroup-custom-tools</filename>.
983 To build an image using these package group packages, you need to add
984 <filename>packagegroup-custom-apps</filename> and/or
985 <filename>packagegroup-custom-tools</filename> to
986 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>.
987 For other forms of image dependencies see the other areas of this section.
988 </para>
989 </section>
990
991 <section id='usingpoky-extend-customimage-imagefeatures'>
992 <title>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and
993 <filename>EXTRA_IMAGE_FEATURES</filename></title>
994
995 <para>
996 You might want to customize your image by enabling or
997 disabling high-level image features by using the
998 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
999 and <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
1000 variables.
1001 Although the functions for both variables are nearly equivalent,
1002 best practices dictate using <filename>IMAGE_FEATURES</filename>
1003 from within a recipe and using
1004 <filename>EXTRA_IMAGE_FEATURES</filename> from within
1005 your <filename>local.conf</filename> file, which is found in the
1006 <link linkend='build-directory'>Build Directory</link>.
1007 </para>
1008
1009 <para>
1010 To understand how these features work, the best reference is
1011 <filename>meta/classes/core-image.bbclass</filename>.
1012 In summary, the file looks at the contents of the
1013 <filename>IMAGE_FEATURES</filename> variable and then maps
1014 those contents into a set of package groups.
1015 Based on this information, the build system automatically
1016 adds the appropriate packages to the
1017 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>
1018 variable.
1019 Effectively, you are enabling extra features by extending the
1020 class or creating a custom class for use with specialized image
1021 <filename>.bb</filename> files.
1022 </para>
1023
1024 <para>
1025 Use the <filename>EXTRA_IMAGE_FEATURES</filename> variable
1026 from within your local configuration file.
1027 Using a separate area from which to enable features with
1028 this variable helps you avoid overwriting the features in the
1029 image recipe that are enabled with
1030 <filename>IMAGE_FEATURES</filename>.
1031 The value of <filename>EXTRA_IMAGE_FEATURES</filename> is added
1032 to <filename>IMAGE_FEATURES</filename> within
1033 <filename>meta/conf/bitbake.conf</filename>.
1034 </para>
1035
1036 <para>
1037 To illustrate how you can use these variables to modify your
1038 image, consider an example that selects the SSH server.
1039 The Yocto Project ships with two SSH servers you can use
1040 with your images: Dropbear and OpenSSH.
1041 Dropbear is a minimal SSH server appropriate for
1042 resource-constrained environments, while OpenSSH is a
1043 well-known standard SSH server implementation.
1044 By default, the <filename>core-image-sato</filename> image
1045 is configured to use Dropbear.
1046 The <filename>core-image-basic</filename> and
1047 <filename>core-image-lsb</filename> images both
1048 include OpenSSH.
1049 The <filename>core-image-minimal</filename> image does not
1050 contain an SSH server.
1051 </para>
1052
1053 <para>
1054 You can customize your image and change these defaults.
1055 Edit the <filename>IMAGE_FEATURES</filename> variable
1056 in your recipe or use the
1057 <filename>EXTRA_IMAGE_FEATURES</filename> in your
1058 <filename>local.conf</filename> file so that it configures the
1059 image you are working with to include
1060 <filename>ssh-server-dropbear</filename> or
1061 <filename>ssh-server-openssh</filename>.
1062 </para>
1063
1064 <note>
1065 See the
1066 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
1067 section in the Yocto Project Reference Manual for a complete
1068 list of image features that ship with the Yocto Project.
1069 </note>
1070 </section>
1071
1072 <section id='usingpoky-extend-customimage-localconf'>
1073 <title>Customizing Images Using <filename>local.conf</filename></title>
1074
1075 <para>
1076 It is possible to customize image contents by using variables from your
1077 local configuration in your <filename>conf/local.conf</filename> file.
1078 Because it is limited to local use, this method generally only allows you to
1079 add packages and is not as flexible as creating your own customized image.
1080 When you add packages using local variables this way, you need to realize that
1081 these variable changes affect all images at the same time and might not be
1082 what you require.
1083 </para>
1084
1085 <para>
1086 The simplest way to add extra packages to all images is by using the
1087 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'>IMAGE_INSTALL</ulink></filename>
1088 variable with the <filename>_append</filename> operator:
1089 <literallayout class='monospaced'>
1090 IMAGE_INSTALL_append = " strace"
1091 </literallayout>
1092 Use of the syntax is important - specifically, the space between
1093 the quote and the package name, which is
1094 <filename>strace</filename> in this example.
1095 This space is required since the <filename>_append</filename>
1096 operator does not add the space.
1097 </para>
1098
1099 <para>
1100 Furthermore, you must use <filename>_append</filename> instead of the <filename>+=</filename>
1101 operator if you want to avoid ordering issues.
1102 The reason for this is because doing so unconditionally appends to the variable and
1103 avoids ordering problems due to the variable being set in image recipes and
1104 <filename>.bbclass</filename> files with operators like <filename>?=</filename>.
1105 Using <filename>_append</filename> ensures the operation takes affect.
1106 </para>
1107
1108 <para>
1109 As shown in its simplest use, <filename>IMAGE_INSTALL_append</filename> affects
1110 all images.
1111 It is possible to extend the syntax so that the variable applies to a specific image only.
1112 Here is an example:
1113 <literallayout class='monospaced'>
1114 IMAGE_INSTALL_append_pn-core-image-minimal = " strace"
1115 </literallayout>
1116 This example adds <filename>strace</filename> to <filename>core-image-minimal</filename>
1117 only.
1118 </para>
1119
1120 <para>
1121 You can add packages using a similar approach through the
1122 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-CORE_IMAGE_EXTRA_INSTALL'>CORE_IMAGE_EXTRA_INSTALL</ulink></filename>
1123 variable.
1124 If you use this variable, only <filename>core-image-*</filename> images are affected.
1125 </para>
1126 </section>
1127 </section>
1128
1129 <section id='usingpoky-extend-addpkg'>
1130 <title>Writing a Recipe to Add a Package to Your Image</title>
1131
1132 <para>
1133 Recipes add packages to your image.
1134 Writing a recipe means creating a <filename>.bb</filename> file that sets some
1135 variables.
1136 For information on variables that are useful for recipes and for information about recipe naming
1137 issues, see the
1138 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-varlocality-recipe-required'>Required</ulink>"
1139 section of the Yocto Project Reference Manual.
1140 </para>
1141
1142 <para>
1143 Before writing a recipe from scratch, it is often useful to check
1144 whether someone else has written one already.
1145 OpenEmbedded is a good place to look as it has a wider scope and range of packages.
1146 Because the Yocto Project aims to be compatible with OpenEmbedded, most recipes
1147 you find there should work for you.
1148 </para>
1149
1150 <para>
1151 For new packages, the simplest way to add a recipe is to base it on a similar
1152 pre-existing recipe.
1153 The sections that follow provide some examples that show how to add standard
1154 types of packages.
1155 </para>
1156
1157 <note>
1158 <para>When writing shell functions, you need to be aware of BitBake's
1159 curly brace parsing.
1160 If a recipe uses a closing curly brace within the function and
1161 the character has no leading spaces, BitBake produces a parsing
1162 error.
1163 If you use a pair of curly brace in a shell function, the
1164 closing curly brace must not be located at the start of the line
1165 without leading spaces.</para>
1166 <para>Here is an example that causes BitBake to produce a parsing
1167 error:
1168 <literallayout class='monospaced'>
1169 fakeroot create_shar() {
1170 cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
1171 usage()
1172 {
1173 echo "test"
1174 ###### The following "}" at the start of the line causes a parsing error ######
1175 }
1176 EOF
1177 }
1178 </literallayout>
1179 Writing the recipe this way avoids the error:
1180 <literallayout class='monospaced'>
1181 fakeroot create_shar() {
1182 cat &lt;&lt; "EOF" &gt; ${SDK_DEPLOY}/${TOOLCHAIN_OUTPUTNAME}.sh
1183 usage()
1184 {
1185 echo "test"
1186 ######The following "}" with a leading space at the start of the line avoids the error ######
1187 }
1188 EOF
1189 }
1190 </literallayout></para>
1191 </note>
1192
1193 <section id='usingpoky-extend-addpkg-singlec'>
1194 <title>Single .c File Package (Hello World!)</title>
1195
1196 <para>
1197 Building an application from a single file that is stored locally (e.g. under
1198 <filename>files/</filename>) requires a recipe that has the file listed in
1199 the
1200 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>
1201 variable.
1202 Additionally, you need to manually write the <filename>do_compile</filename> and
1203 <filename>do_install</filename> tasks.
1204 The <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'>S</ulink></filename>
1205 variable defines the
1206 directory containing the source code, which is set to
1207 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'>
1208 WORKDIR</ulink></filename> in this case - the directory BitBake uses for the build.
1209 <literallayout class='monospaced'>
1210 DESCRIPTION = "Simple helloworld application"
1211 SECTION = "examples"
1212 LICENSE = "MIT"
1213 LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
1214 PR = "r0"
1215
1216 SRC_URI = "file://helloworld.c"
1217
1218 S = "${WORKDIR}"
1219
1220 do_compile() {
1221 ${CC} helloworld.c -o helloworld
1222 }
1223
1224 do_install() {
1225 install -d ${D}${bindir}
1226 install -m 0755 helloworld ${D}${bindir}
1227 }
1228 </literallayout>
1229 </para>
1230
1231 <para>
1232 By default, the <filename>helloworld</filename>, <filename>helloworld-dbg</filename>,
1233 and <filename>helloworld-dev</filename> packages are built.
1234 For information on how to customize the packaging process, see the
1235 "<link linkend='splitting-an-application-into-multiple-packages'>Splitting an Application
1236 into Multiple Packages</link>" section.
1237 </para>
1238 </section>
1239
1240 <section id='usingpoky-extend-addpkg-autotools'>
1241 <title>Autotooled Package</title>
1242 <para>
1243 Applications that use Autotools such as <filename>autoconf</filename> and
1244 <filename>automake</filename> require a recipe that has a source archive listed in
1245 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename> and
1246 also inherits Autotools, which instructs BitBake to use the
1247 <filename>autotools.bbclass</filename> file, which contains the definitions of all the steps
1248 needed to build an Autotool-based application.
1249 The result of the build is automatically packaged.
1250 And, if the application uses NLS for localization, packages with local information are
1251 generated (one package per language).
1252 Following is one example: (<filename>hello_2.3.bb</filename>)
1253 <literallayout class='monospaced'>
1254 DESCRIPTION = "GNU Helloworld application"
1255 SECTION = "examples"
1256 LICENSE = "GPLv2+"
1257 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
1258 PR = "r0"
1259
1260 SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.gz"
1261
1262 inherit autotools gettext
1263 </literallayout>
1264 </para>
1265
1266 <para>
1267 The variable
1268 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</ulink></filename>
1269 is used to track source license changes as described in the
1270 "<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-configuring-LIC_FILES_CHKSUM'>Tracking License Changes</ulink>" section.
1271 You can quickly create Autotool-based recipes in a manner similar to the previous example.
1272 </para>
1273 </section>
1274
1275 <section id='usingpoky-extend-addpkg-makefile'>
1276 <title>Makefile-Based Package</title>
1277
1278 <para>
1279 Applications that use GNU <filename>make</filename> also require a recipe that has
1280 the source archive listed in
1281 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>.
1282 You do not need to add a <filename>do_compile</filename> step since by default BitBake
1283 starts the <filename>make</filename> command to compile the application.
1284 If you need additional <filename>make</filename> options, you should store them in the
1285 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_OEMAKE'>EXTRA_OEMAKE</ulink></filename>
1286 variable.
1287 BitBake passes these options into the <filename>make</filename> GNU invocation.
1288 Note that a <filename>do_install</filename> task is still required.
1289 Otherwise, BitBake runs an empty <filename>do_install</filename> task by default.
1290 </para>
1291
1292 <para>
1293 Some applications might require extra parameters to be passed to the compiler.
1294 For example, the application might need an additional header path.
1295 You can accomplish this by adding to the
1296 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-CFLAGS'>CFLAGS</ulink></filename> variable.
1297 The following example shows this:
1298 <literallayout class='monospaced'>
1299 CFLAGS_prepend = "-I ${S}/include "
1300 </literallayout>
1301 </para>
1302
1303 <para>
1304 In the following example, <filename>mtd-utils</filename> is a makefile-based package:
1305 <literallayout class='monospaced'>
1306 DESCRIPTION = "Tools for managing memory technology devices."
1307 SECTION = "base"
1308 DEPENDS = "zlib lzo e2fsprogs util-linux"
1309 HOMEPAGE = "http://www.linux-mtd.infradead.org/"
1310 LICENSE = "GPLv2+"
1311 LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
1312 file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
1313
1314 SRC_URI = "git://git.infradead.org/mtd-utils.git;protocol=git;tag=995cfe51b0a3cf32f381c140bf72b21bf91cef1b \
1315 file://add-exclusion-to-mkfs-jffs2-git-2.patch"
1316
1317 S = "${WORKDIR}/git/"
1318
1319 PR = "r1"
1320
1321 EXTRA_OEMAKE = "'CC=${CC}' 'RANLIB=${RANLIB}' 'AR=${AR}' \
1322 'CFLAGS=${CFLAGS} -I${S}/include -DWITHOUT_XATTR' 'BUILDDIR=${S}'"
1323
1324 do_install () {
1325 oe_runmake install DESTDIR=${D} SBINDIR=${sbindir} MANDIR=${mandir} \
1326 INCLUDEDIR=${includedir}
1327 install -d ${D}${includedir}/mtd/
1328 for f in ${S}/include/mtd/*.h; do
1329 install -m 0644 $f ${D}${includedir}/mtd/
1330 done
1331 }
1332
1333 PARALLEL_MAKE = ""
1334
1335 BBCLASSEXTEND = "native"
1336 </literallayout>
1337 </para>
1338
1339 <para>
1340 If your sources are available as a tarball instead of a Git repository, you
1341 will need to provide the URL to the tarball as well as an
1342 <filename>md5</filename> or <filename>sha256</filename> sum of
1343 the download.
1344 Here is an example:
1345 <literallayout class='monospaced'>
1346 SRC_URI="ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.4.9.tar.bz2"
1347 SRC_URI[md5sum]="82b8e714b90674896570968f70ca778b"
1348 </literallayout>
1349 You can generate the <filename>md5</filename> or <filename>sha256</filename> sums
1350 by using the <filename>md5sum</filename> or <filename>sha256sum</filename> commands
1351 with the target file as the only argument.
1352 Here is an example:
1353 <literallayout class='monospaced'>
1354 $ md5sum mtd-utils-1.4.9.tar.bz2
1355 82b8e714b90674896570968f70ca778b mtd-utils-1.4.9.tar.bz2
1356 </literallayout>
1357 </para>
1358 </section>
1359
1360 <section id='splitting-an-application-into-multiple-packages'>
1361 <title>Splitting an Application into Multiple Packages</title>
1362
1363 <para>
1364 You can use the variables
1365 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'>PACKAGES</ulink></filename> and
1366 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'>FILES</ulink></filename>
1367 to split an application into multiple packages.
1368 </para>
1369
1370 <para>
1371 Following is an example that uses the <filename>libXpm</filename> recipe.
1372 By default, this recipe generates a single package that contains the library along
1373 with a few binaries.
1374 You can modify the recipe to split the binaries into separate packages:
1375 <literallayout class='monospaced'>
1376 require xorg-lib-common.inc
1377
1378 DESCRIPTION = "X11 Pixmap library"
1379 LICENSE = "X-BSD"
1380 LIC_FILES_CHKSUM = "file://COPYING;md5=3e07763d16963c3af12db271a31abaa5"
1381 DEPENDS += "libxext libsm libxt"
1382 PR = "r3"
1383 PE = "1"
1384
1385 XORG_PN = "libXpm"
1386
1387 PACKAGES =+ "sxpm cxpm"
1388 FILES_cxpm = "${bindir}/cxpm"
1389 FILES_sxpm = "${bindir}/sxpm"
1390 </literallayout>
1391 </para>
1392
1393 <para>
1394 In the previous example, we want to ship the <filename>sxpm</filename>
1395 and <filename>cxpm</filename> binaries in separate packages.
1396 Since <filename>bindir</filename> would be packaged into the main
1397 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'>PN</ulink></filename>
1398 package by default, we prepend the <filename>PACKAGES</filename>
1399 variable so additional package names are added to the start of list.
1400 This results in the extra <filename>FILES_*</filename>
1401 variables then containing information that define which files and
1402 directories go into which packages.
1403 Files included by earlier packages are skipped by latter packages.
1404 Thus, the main <filename>PN</filename> package
1405 does not include the above listed files.
1406 </para>
1407 </section>
1408
1409 <section id='usingpoky-extend-addpkg-postinstalls'>
1410 <title>Post-Installation Scripts</title>
1411
1412 <para>
1413 To add a post-installation script to a package, add a
1414 <filename>pkg_postinst_PACKAGENAME()</filename> function to the
1415 <filename>.bb</filename> file and use
1416 <filename>PACKAGENAME</filename> as the name of the package you want to attach to the
1417 <filename>postinst</filename> script.
1418 Normally,
1419 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'>PN</ulink></filename>
1420 can be used, which automatically expands to <filename>PACKAGENAME</filename>.
1421 A post-installation function has the following structure:
1422 <literallayout class='monospaced'>
1423 pkg_postinst_PACKAGENAME () {
1424 #!/bin/sh -e
1425 # Commands to carry out
1426 }
1427 </literallayout>
1428 </para>
1429
1430 <para>
1431 The script defined in the post-installation function is called when the
1432 root filesystem is created.
1433 If the script succeeds, the package is marked as installed.
1434 If the script fails, the package is marked as unpacked and the script is
1435 executed when the image boots again.
1436 </para>
1437
1438 <para>
1439 Sometimes it is necessary for the execution of a post-installation
1440 script to be delayed until the first boot.
1441 For example, the script might need to be executed on the device itself.
1442 To delay script execution until boot time, use the following structure in the
1443 post-installation script:
1444 <literallayout class='monospaced'>
1445 pkg_postinst_PACKAGENAME () {
1446 #!/bin/sh -e
1447 if [ x"$D" = "x" ]; then
1448 # Actions to carry out on the device go here
1449 else
1450 exit 1
1451 fi
1452 }
1453 </literallayout>
1454 </para>
1455
1456 <para>
1457 The previous example delays execution until the image boots again because the
1458 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'>D</ulink></filename>
1459 variable points
1460 to the directory containing the image when the root filesystem is created at build time but
1461 is unset when executed on the first boot.
1462 </para>
1463 </section>
1464 </section>
1465
1466 <section id="platdev-newmachine">
1467 <title>Adding a New Machine</title>
1468
1469 <para>
1470 Adding a new machine to the Yocto Project is a straightforward process.
1471 This section provides information that gives you an idea of the changes you must make.
1472 The information covers adding machines similar to those the Yocto Project already supports.
1473 Although well within the capabilities of the Yocto Project, adding a totally new architecture
1474 might require
1475 changes to <filename>gcc/eglibc</filename> and to the site information, which is
1476 beyond the scope of this manual.
1477 </para>
1478
1479 <para>
1480 For a complete example that shows how to add a new machine,
1481 see the
1482 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
1483 in the Yocto Project Board Support Package (BSP) Developer's Guide.
1484 </para>
1485
1486 <section id="platdev-newmachine-conffile">
1487 <title>Adding the Machine Configuration File</title>
1488
1489 <para>
1490 To add a machine configuration, you need to add a <filename>.conf</filename> file
1491 with details of the device being added to the <filename>conf/machine/</filename> file.
1492 The name of the file determines the name the OpenEmbedded build system
1493 uses to reference the new machine.
1494 </para>
1495
1496 <para>
1497 The most important variables to set in this file are as follows:
1498 <itemizedlist>
1499 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_ARCH'>TARGET_ARCH</ulink></filename>
1500 (e.g. "arm")</para></listitem>
1501 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</ulink>_virtual/kernel</filename>
1502 (see below)</para></listitem>
1503 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_FEATURES'>MACHINE_FEATURES</ulink></filename>
1504 (e.g. "apm screen wifi")</para></listitem>
1505 </itemizedlist>
1506 </para>
1507
1508 <para>
1509 You might also need these variables:
1510 <itemizedlist>
1511 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SERIAL_CONSOLES'>SERIAL_CONSOLES</ulink></filename>
1512 (e.g. "115200 ttyS0")</para></listitem>
1513 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_IMAGETYPE'>KERNEL_IMAGETYPE</ulink></filename>
1514 (e.g. "zImage")</para></listitem>
1515 <listitem><para><filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FSTYPES'>IMAGE_FSTYPES</ulink></filename>
1516 (e.g. "tar.gz jffs2")</para></listitem>
1517 </itemizedlist>
1518 </para>
1519
1520 <para>
1521 You can find full details on these variables in the reference section.
1522 You can leverage many existing machine <filename>.conf</filename> files from
1523 <filename>meta/conf/machine/</filename>.
1524 </para>
1525 </section>
1526
1527 <section id="platdev-newmachine-kernel">
1528 <title>Adding a Kernel for the Machine</title>
1529
1530 <para>
1531 The OpenEmbedded build system needs to be able to build a kernel for the machine.
1532 You need to either create a new kernel recipe for this machine, or extend an
1533 existing recipe.
1534 You can find several kernel examples in the
1535 Source Directory at <filename>meta/recipes-kernel/linux</filename>
1536 that you can use as references.
1537 </para>
1538
1539 <para>
1540 If you are creating a new recipe, normal recipe-writing rules apply for setting
1541 up a
1542 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>.
1543 Thus, you need to specify any necessary patches and set
1544 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'>S</ulink></filename> to point at the source code.
1545 You need to create a <filename>configure</filename> task that configures the
1546 unpacked kernel with a defconfig.
1547 You can do this by using a <filename>make defconfig</filename> command or,
1548 more commonly, by copying in a suitable <filename>defconfig</filename> file and and then running
1549 <filename>make oldconfig</filename>.
1550 By making use of <filename>inherit kernel</filename> and potentially some of the
1551 <filename>linux-*.inc</filename> files, most other functionality is
1552 centralized and the the defaults of the class normally work well.
1553 </para>
1554
1555 <para>
1556 If you are extending an existing kernel, it is usually a matter of adding a
1557 suitable defconfig file.
1558 The file needs to be added into a location similar to defconfig files
1559 used for other machines in a given kernel.
1560 A possible way to do this is by listing the file in the
1561 <filename>SRC_URI</filename> and adding the machine to the expression in
1562 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'>COMPATIBLE_MACHINE</ulink></filename>:
1563 <literallayout class='monospaced'>
1564 COMPATIBLE_MACHINE = '(qemux86|qemumips)'
1565 </literallayout>
1566 </para>
1567 </section>
1568
1569 <section id="platdev-newmachine-formfactor">
1570 <title>Adding a Formfactor Configuration File</title>
1571
1572 <para>
1573 A formfactor configuration file provides information about the
1574 target hardware for which the image is being built and information that
1575 the build system cannot obtain from other sources such as the kernel.
1576 Some examples of information contained in a formfactor configuration file include
1577 framebuffer orientation, whether or not the system has a keyboard,
1578 the positioning of the keyboard in relation to the screen, and
1579 the screen resolution.
1580 </para>
1581
1582 <para>
1583 The build system uses reasonable defaults in most cases.
1584 However, if customization is
1585 necessary, you need to create a <filename>machconfig</filename> file
1586 in the <filename>meta/recipes-bsp/formfactor/files</filename>
1587 directory.
1588 This directory contains directories for specific machines such as
1589 <filename>qemuarm</filename> and <filename>qemux86</filename>.
1590 For information about the settings available and the defaults, see the
1591 <filename>meta/recipes-bsp/formfactor/files/config</filename> file found in the
1592 same area.
1593 </para>
1594
1595 <para>
1596 Following is an example for qemuarm:
1597 <literallayout class='monospaced'>
1598 HAVE_TOUCHSCREEN=1
1599 HAVE_KEYBOARD=1
1600
1601 DISPLAY_CAN_ROTATE=0
1602 DISPLAY_ORIENTATION=0
1603 #DISPLAY_WIDTH_PIXELS=640
1604 #DISPLAY_HEIGHT_PIXELS=480
1605 #DISPLAY_BPP=16
1606 DISPLAY_DPI=150
1607 DISPLAY_SUBPIXEL_ORDER=vrgb
1608 </literallayout>
1609 </para>
1610 </section>
1611 </section>
1612
1613 <section id="platdev-working-with-libraries">
1614 <title>Working With Libraries</title>
1615
1616 <para>
1617 Libraries are an integral part of your system.
1618 This section describes some common practices you might find
1619 helpful when working with libraries to build your system:
1620 <itemizedlist>
1621 <listitem><para><link linkend='including-static-library-files'>How to include static library files</link>
1622 </para></listitem>
1623 <listitem><para><link linkend='combining-multiple-versions-library-files-into-one-image'>How to use the Multilib feature to combine multiple versions of library files into a single image</link>
1624 </para></listitem>
1625 <listitem><para><link linkend='installing-multiple-versions-of-the-same-library'>How to install multiple versions of the same library in parallel on the same system</link>
1626 </para></listitem>
1627 </itemizedlist>
1628 </para>
1629
1630 <section id='including-static-library-files'>
1631 <title>Including Static Library Files</title>
1632
1633 <para>
1634 If you are building a library and the library offers static linking, you can control
1635 which static library files (<filename>*.a</filename> files) get included in the
1636 built library.
1637 </para>
1638
1639 <para>
1640 The <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>
1641 and <ulink url='&YOCTO_DOCS_REF_URL;#var-FILES'><filename>FILES_*</filename></ulink>
1642 variables in the
1643 <filename>meta/conf/bitbake.conf</filename> configuration file define how files installed
1644 by the <filename>do_install</filename> task are packaged.
1645 By default, the <filename>PACKAGES</filename> variable contains
1646 <filename>${PN}-staticdev</filename>, which includes all static library files.
1647 <note>
1648 Some previously released versions of the Yocto Project
1649 defined the static library files through
1650 <filename>${PN}-dev</filename>.
1651 </note>
1652 Following, is part of the BitBake configuration file.
1653 You can see where the static library files are defined:
1654 <literallayout class='monospaced'>
1655 PACKAGES = "${PN}-dbg ${PN} ${PN}-doc ${PN}-dev ${PN}-staticdev ${PN}-locale"
1656 PACKAGES_DYNAMIC = "${PN}-locale-*"
1657 FILES = ""
1658
1659 FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* ${libdir}/lib*${SOLIBS} \
1660 ${sysconfdir} ${sharedstatedir} ${localstatedir} \
1661 ${base_bindir}/* ${base_sbindir}/* \
1662 ${base_libdir}/*${SOLIBS} \
1663 ${datadir}/${BPN} ${libdir}/${BPN}/* \
1664 ${datadir}/pixmaps ${datadir}/applications \
1665 ${datadir}/idl ${datadir}/omf ${datadir}/sounds \
1666 ${libdir}/bonobo/servers"
1667
1668 FILES_${PN}-doc = "${docdir} ${mandir} ${infodir} ${datadir}/gtk-doc \
1669 ${datadir}/gnome/help"
1670 SECTION_${PN}-doc = "doc"
1671
1672 FILES_${PN}-dev = "${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la \
1673 ${libdir}/*.o ${libdir}/pkgconfig ${datadir}/pkgconfig \
1674 ${datadir}/aclocal ${base_libdir}/*.o"
1675 SECTION_${PN}-dev = "devel"
1676 ALLOW_EMPTY_${PN}-dev = "1"
1677 RDEPENDS_${PN}-dev = "${PN} (= ${EXTENDPKGV})"
1678
1679 FILES_${PN}-staticdev = "${libdir}/*.a ${base_libdir}/*.a"
1680 SECTION_${PN}-staticdev = "devel"
1681 RDEPENDS_${PN}-staticdev = "${PN}-dev (= ${EXTENDPKGV})"
1682 </literallayout>
1683 </para>
1684 </section>
1685
1686 <section id="combining-multiple-versions-library-files-into-one-image">
1687 <title>Combining Multiple Versions of Library Files into One Image</title>
1688
1689 <para>
1690 The build system offers the ability to build libraries with different
1691 target optimizations or architecture formats and combine these together
1692 into one system image.
1693 You can link different binaries in the image
1694 against the different libraries as needed for specific use cases.
1695 This feature is called "Multilib."
1696 </para>
1697
1698 <para>
1699 An example would be where you have most of a system compiled in 32-bit
1700 mode using 32-bit libraries, but you have something large, like a database
1701 engine, that needs to be a 64-bit application and uses 64-bit libraries.
1702 Multilib allows you to get the best of both 32-bit and 64-bit libraries.
1703 </para>
1704
1705 <para>
1706 While the Multilib feature is most commonly used for 32 and 64-bit differences,
1707 the approach the build system uses facilitates different target optimizations.
1708 You could compile some binaries to use one set of libraries and other binaries
1709 to use other different sets of libraries.
1710 The libraries could differ in architecture, compiler options, or other
1711 optimizations.
1712 </para>
1713
1714 <para>
1715 This section overviews the Multilib process only.
1716 For more details on how to implement Multilib, see the
1717 <ulink url='&YOCTO_WIKI_URL;/wiki/Multilib'>Multilib</ulink> wiki
1718 page.
1719 </para>
1720
1721 <para>
1722 Aside from this wiki page, several examples exist in the
1723 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/tree/meta-skeleton'><filename>meta-skeleton</filename></ulink>
1724 layer found in the
1725 <link linkend='source-directory'>Source Directory</link>:
1726 <itemizedlist>
1727 <listitem><para><filename>conf/multilib-example.conf</filename>
1728 configuration file</para></listitem>
1729 <listitem><para><filename>conf/multilib-example2.conf</filename>
1730 configuration file</para></listitem>
1731 <listitem><para><filename>recipes-multilib/images/core-image-multilib-example.bb</filename>
1732 recipe</para></listitem>
1733 </itemizedlist>
1734 </para>
1735
1736 <section id='preparing-to-use-multilib'>
1737 <title>Preparing to Use Multilib</title>
1738
1739 <para>
1740 User-specific requirements drive the Multilib feature.
1741 Consequently, there is no one "out-of-the-box" configuration that likely
1742 exists to meet your needs.
1743 </para>
1744
1745 <para>
1746 In order to enable Multilib, you first need to ensure your recipe is
1747 extended to support multiple libraries.
1748 Many standard recipes are already extended and support multiple libraries.
1749 You can check in the <filename>meta/conf/multilib.conf</filename>
1750 configuration file in the
1751 <link linkend='source-directory'>Source Directory</link> to see how this is
1752 done using the
1753 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBCLASSEXTEND'><filename>BBCLASSEXTEND</filename></ulink>
1754 variable.
1755 Eventually, all recipes will be covered and this list will be unneeded.
1756 </para>
1757
1758 <para>
1759 For the most part, the Multilib class extension works automatically to
1760 extend the package name from <filename>${PN}</filename> to
1761 <filename>${MLPREFIX}${PN}</filename>, where <filename>MLPREFIX</filename>
1762 is the particular multilib (e.g. "lib32-" or "lib64-").
1763 Standard variables such as
1764 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>,
1765 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>,
1766 <ulink url='&YOCTO_DOCS_REF_URL;#var-RPROVIDES'><filename>RPROVIDES</filename></ulink>,
1767 <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>,
1768 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>,
1769 and <filename>PACKAGES_DYNAMIC</filename> are automatically extended by the system.
1770 If you are extending any manual code in the recipe, you can use the
1771 <filename>${MLPREFIX}</filename> variable to ensure those names are extended
1772 correctly.
1773 This automatic extension code resides in <filename>multilib.bbclass</filename>.
1774 </para>
1775 </section>
1776
1777 <section id='using-multilib'>
1778 <title>Using Multilib</title>
1779
1780 <para>
1781 After you have set up the recipes, you need to define the actual
1782 combination of multiple libraries you want to build.
1783 You accomplish this through your <filename>local.conf</filename>
1784 configuration file in the
1785 <link linkend='build-directory'>Build Directory</link>.
1786 An example configuration would be as follows:
1787 <literallayout class='monospaced'>
1788 MACHINE = "qemux86-64"
1789 require conf/multilib.conf
1790 MULTILIBS = "multilib:lib32"
1791 DEFAULTTUNE_virtclass-multilib-lib32 = "x86"
1792 IMAGE_INSTALL = "lib32-connman"
1793 </literallayout>
1794 This example enables an
1795 additional library named <filename>lib32</filename> alongside the
1796 normal target packages.
1797 When combining these "lib32" alternatives, the example uses "x86" for tuning.
1798 For information on this particular tuning, see
1799 <filename>meta/conf/machine/include/ia32/arch-ia32.inc</filename>.
1800 </para>
1801
1802 <para>
1803 The example then includes <filename>lib32-connman</filename>
1804 in all the images, which illustrates one method of including a
1805 multiple library dependency.
1806 You can use a normal image build to include this dependency,
1807 for example:
1808 <literallayout class='monospaced'>
1809 $ bitbake core-image-sato
1810 </literallayout>
1811 You can also build Multilib packages specifically with a command like this:
1812 <literallayout class='monospaced'>
1813 $ bitbake lib32-connman
1814 </literallayout>
1815 </para>
1816 </section>
1817
1818 <section id='additional-implementation-details'>
1819 <title>Additional Implementation Details</title>
1820
1821 <para>
1822 Different packaging systems have different levels of native Multilib
1823 support.
1824 For the RPM Package Management System, the following implementation details
1825 exist:
1826 <itemizedlist>
1827 <listitem><para>A unique architecture is defined for the Multilib packages,
1828 along with creating a unique deploy folder under
1829 <filename>tmp/deploy/rpm</filename> in the
1830 <link linkend='build-directory'>Build Directory</link>.
1831 For example, consider <filename>lib32</filename> in a
1832 <filename>qemux86-64</filename> image.
1833 The possible architectures in the system are "all", "qemux86_64",
1834 "lib32_qemux86_64", and "lib32_x86".</para></listitem>
1835 <listitem><para>The <filename>${MLPREFIX}</filename> variable is stripped from
1836 <filename>${PN}</filename> during RPM packaging.
1837 The naming for a normal RPM package and a Multilib RPM package in a
1838 <filename>qemux86-64</filename> system resolves to something similar to
1839 <filename>bash-4.1-r2.x86_64.rpm</filename> and
1840 <filename>bash-4.1.r2.lib32_x86.rpm</filename>, respectively.
1841 </para></listitem>
1842 <listitem><para>When installing a Multilib image, the RPM backend first
1843 installs the base image and then installs the Multilib libraries.
1844 </para></listitem>
1845 <listitem><para>The build system relies on RPM to resolve the identical files in the
1846 two (or more) Multilib packages.</para></listitem>
1847 </itemizedlist>
1848 </para>
1849
1850 <para>
1851 For the IPK Package Management System, the following implementation details exist:
1852 <itemizedlist>
1853 <listitem><para>The <filename>${MLPREFIX}</filename> is not stripped from
1854 <filename>${PN}</filename> during IPK packaging.
1855 The naming for a normal RPM package and a Multilib IPK package in a
1856 <filename>qemux86-64</filename> system resolves to something like
1857 <filename>bash_4.1-r2.x86_64.ipk</filename> and
1858 <filename>lib32-bash_4.1-rw_x86.ipk</filename>, respectively.
1859 </para></listitem>
1860 <listitem><para>The IPK deploy folder is not modified with
1861 <filename>${MLPREFIX}</filename> because packages with and without
1862 the Multilib feature can exist in the same folder due to the
1863 <filename>${PN}</filename> differences.</para></listitem>
1864 <listitem><para>IPK defines a sanity check for Multilib installation
1865 using certain rules for file comparison, overridden, etc.
1866 </para></listitem>
1867 </itemizedlist>
1868 </para>
1869 </section>
1870 </section>
1871
1872 <section id='installing-multiple-versions-of-the-same-library'>
1873 <title>Installing Multiple Versions of the Same Library</title>
1874
1875 <para>
1876 Situations can exist where you need to install and use
1877 multiple versions of the same library on the same system
1878 at the same time.
1879 These situations almost always exist when a library API
1880 changes and you have multiple pieces of software that
1881 depend on the separate versions of the library.
1882 To accommodate these situations, you can install multiple
1883 versions of the same library in parallel on the same system.
1884 </para>
1885
1886 <para>
1887 The process is straight forward as long as the libraries use
1888 proper versioning.
1889 With properly versioned libraries, all you need to do to
1890 individually specify the libraries is create separate,
1891 appropriately named recipes where the
1892 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink> part of the
1893 name includes a portion that differentiates each library version
1894 (e.g.the major part of the version number).
1895 Thus, instead of having a single recipe that loads one version
1896 of a library (e.g. <filename>clutter</filename>), you provide
1897 multiple recipes that result in different versions
1898 of the libraries you want.
1899 As an example, the following two recipes would allow the
1900 two separate versions of the <filename>clutter</filename>
1901 library to co-exist on the same system:
1902 <literallayout class='monospaced'>
1903 clutter-1.6_1.6.20.bb
1904 clutter-1.8_1.8.4.bb
1905 </literallayout>
1906 Additionally, if you have other recipes that depend on a given
1907 library, you need to use the
1908 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
1909 variable to create the dependency.
1910 Continuing with the same example, if you want to have a recipe
1911 depend on the 1.8 version of the <filename>clutter</filename>
1912 library, use the following in your recipe:
1913 <literallayout class='monospaced'>
1914 DEPENDS = "clutter-1.8"
1915 </literallayout>
1916 </para>
1917 </section>
1918 </section>
1919
1920 <section id='creating-partitioned-images'>
1921 <title>Creating Partitioned Images</title>
1922
1923 <para>
1924 Creating an image for a particular hardware target using the
1925 OpenEmbedded build system does not necessarily mean you can boot
1926 that image as is on your device.
1927 Physical devices accept and boot images in various ways depending
1928 on the specifics of the device.
1929 Usually, information about the hardware can tell you what image
1930 format the device requires.
1931 Should your device require multiple partitions on an SD card, flash,
1932 or an HDD, you can use the OpenEmbedded Image Creator
1933 () to create the properly partitioned image.
1934 </para>
1935
1936 <para>
1937 The <filename>wic</filename> command generates partitioned images
1938 from existing OpenEmbedded build artifacts.
1939 Image generation is driven by partitioning commands contained
1940 in an Openembedded kickstart file (<filename>.wks</filename>)
1941 specified either directly on the command-line or as one of a
1942 selection of canned <filename>.wks</filename> files
1943 (see 'wic list images').
1944 When applied to a given set of build artifacts, the result is an
1945 image or set of images that can be directly written onto media and
1946 used on a particular system.
1947 </para>
1948
1949 <para>
1950 This section provides some background information on
1951 <filename>wic</filename>, describes what you need to have in
1952 place to run the tool, provides instruction on how to use
1953 <filename>wic</filename>, and provides several examples.
1954 </para>
1955
1956 <section id='wic-background'>
1957 <title>Background</title>
1958
1959 <para>
1960 This section provides some background on the
1961 <filename>wic</filename> utility.
1962 While none of this information is required to use
1963 <filename>wic</filename>, you might find it interesting.
1964 <itemizedlist>
1965 <listitem><para>
1966 The name "wic" is derived from OpenEmbedded
1967 Image Creator (oeic).
1968 The "oe" diphthong in "oeic" was promoted to the
1969 letter "w", because "oeic" is both difficult to remember and
1970 pronounce.</para></listitem>
1971 <listitem><para>
1972 <filename>wic</filename> is loosely based on the
1973 Meego Image Creator (<filename>mic</filename>)
1974 framework.
1975 The <filename>wic</filename> implementation has been
1976 heavily modified to make direct use of OpenEmbedded
1977 build artifacts instead of package installation and
1978 configuration, which are already incorporated within
1979 the OpenEmbedded artifacts.</para></listitem>
1980 <listitem><para>
1981 <filename>wic</filename> is a completely independent
1982 standalone utility that initially provides
1983 easier-to-use and more flexible replacements for a
1984 couple bits of existing functionality in OE Core's
1985 <filename>directdisk.bbclass</filename> and
1986 <filename>mkefidisk.sh</filename> script.
1987 The replaced scripts are implemented by a
1988 general-purpose partitioning language based on Red Hat
1989 kickstart syntax.
1990 Underlying code for <filename>wic</filename> succeeded
1991 from several projects over time.</para></listitem>
1992 </itemizedlist>
1993 </para>
1994 </section>
1995
1996<!--
1997
1998 <para>
1999 This section covers the mechanics of invoking and providing help for
2000the command and sub-commands; it contains hooks for future commits to
2001connect with the actual functionality, once implemented.
2002 </para>
2003
2004 <para>
2005 Help is integrated into the 'wic' command itself - you can also see
2006that for details and reminders on usage (simply invoke 'wic' without
2007any arguments to get started).
2008 </para>
2009
2010 <note>
2011 Just because 'wic' can generate an image doesn't mean that it
2012will boot on a given machine. 'wic' tries to spot the most obvious
2013usages that are likely to cause problems but, as a relatively
2014low-level tool, it can't in general figure out whether a generated
2015image is appropriate for a given piece of hardware - it's really up to
2016you to provide intelligent inputs to the image creation process. If
2017you suspect that your image isn't working as expected due to some bug
2018or missing feature of the tool, please file a bug report describing
2019the details.
2020 </note>
2021
2022-->
2023
2024 <section id='wic-requirements'>
2025 <title>Requirements</title>
2026
2027 <para>
2028 In order to use the <filename>wic</filename> utility with the
2029 OpenEmbedded Build system, you need to meet the following
2030 requirements:
2031 <itemizedlist>
2032 <listitem><para>The Linux distribution on your
2033 development host must support the Yocto Project.
2034 See the
2035 "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
2036 section in the Yocto Project Reference Manual for this
2037 list of distributions.</para></listitem>
2038 <listitem><para>
2039 The standard system utilities, such as
2040 <filename>cp</filename>, must be installed on your
2041 development host system.
2042 </para></listitem>
2043 <listitem><para>
2044 The
2045 <ulink url='http://www.gnu.org/software/parted/'>GNU Parted</ulink>
2046 package must be installed on your development host
2047 system.
2048 </para></listitem>
2049 <listitem><para>
2050 Have the build artifacts already available.
2051 You must already have created an image using the
2052 Openembedded build system (e.g.
2053 <filename>core-image-minimal</filename>.
2054 It might seem redundant to generate an image in order
2055 to create an image using <filename>wic</filename>,
2056 but the artifacts are needed and they are generated
2057 with the build system.</para></listitem>
2058 <listitem><para>
2059 You must have sourced one of the build environment
2060 setup scripts (i.e.
2061 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
2062 or
2063 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>)
2064 found in the
2065 <link linkend='build-directory'>Build Directory</link>.
2066 </para></listitem>
2067 </itemizedlist>
2068 </para>
2069 </section>
2070
2071 <section id='wic-getting-help'>
2072 <title>Getting Help</title>
2073
2074 <para>
2075 You can get general help for the <filename>wic</filename>
2076 by entering the <filename>wic</filename> command by itself
2077 or by entering the command with a help argument as follows:
2078 <literallayout class='monospaced'>
2079 $ wic -h
2080 $ wic --help
2081 </literallayout>
2082 </para>
2083
2084 <para>
2085 Currently, <filename>wic</filename> supports two commands:
2086 <filename>create</filename> and <filename>list</filename>.
2087 You can get help for these commands as follows:
2088 <literallayout class='monospaced'>
2089 $ wic help &lt;command&gt;
2090 </literallayout>
2091 </para>
2092
2093 <para>
2094 You can find more out about the images
2095 <filename>wic</filename> creates using the provided
2096 kickstart files with the following form of the command:
2097 <literallayout class='monospaced'>
2098 $ wic list &lt;image&gt; help
2099 </literallayout>
2100 Where <filename>&lt;image&gt;</filename> is either
2101 <filename>directdisk</filename> or
2102 <filename>mkefidisk</filename>.
2103 </para>
2104 </section>
2105
2106 <section id='operational-modes'>
2107 <title>Operational Modes</title>
2108
2109 <para>
2110 You can run <filename>wic</filename> in two modes: Raw and
2111 Cooked:
2112 <itemizedlist>
2113 <listitem><para><emphasis>Raw Mode:</emphasis>
2114 You explicitly specify build artifacts through
2115 command-line arguments.</para></listitem>
2116 <listitem><para><emphasis>Cooked Mode:</emphasis>
2117 The current
2118 <ulink url='&YOCTO_DOCS_REF_URL;var-MACHINE'><filename>MACHINE</filename></ulink>
2119 setting and image name are used to automatically locate
2120 and provide the build artifacts.</para></listitem>
2121 </itemizedlist>
2122 </para>
2123
2124 <section id='raw-mode'>
2125 <title>Raw Mode</title>
2126
2127 <para>
2128 The general form of the 'wic' command in raw mode is:
2129 <literallayout class='monospaced'>
2130 $ wic create &lt;image_name&gt;.wks -r &lt;rootfs_dir&gt; -b &lt;bootimg_dir&gt; /
2131 -k &lt;kernel_dir&gt; -n &lt;native_sysroot&gt;
2132 </literallayout>
2133 <note>
2134 You do not need root privileges to run
2135 <filename>wic</filename>.
2136 In fact, you should not run as root when using the
2137 utility.
2138 </note>
2139 </para>
2140
2141 <para>
2142 Following is a description of the <filename>wic</filename>
2143 parameters and options:
2144 <itemizedlist>
2145 <listitem><para><emphasis><filename>&lt;image_name&gt;.wks</filename>:</emphasis>
2146 An OpenEmbedded kickstart file.
2147 You can provide your own custom file or use a
2148 file from a set of provided files as described
2149 following this list.</para></listitem>
2150 <listitem><para><emphasis><filename>-r &lt;rootfs_dir&gt;</filename>:</emphasis>
2151 Specifies the path to the root filesystem directory
2152 to be used and the <filename>.wks</filename>
2153 root filesystem source.</para></listitem>
2154 <listitem><para><emphasis><filename>-b &lt;bootimg_dir&gt;</filename>:</emphasis>
2155 Specifies the path to the directory that contains
2156 the boot artifacts (e.g. the
2157 <filename>EFI</filename> or
2158 <filename>syslinux</filename> directories) to use
2159 as the <filename>.wks</filename> boot image source.
2160 </para></listitem>
2161 <listitem><para><emphasis><filename>-k &lt;kernel_dir&gt;</filename>:</emphasis>
2162 Specifies the path to the dir containing the kernel
2163 to use in the <filename>.wks</filename> boot
2164 image.</para></listitem>
2165 <listitem><para><emphasis><filename>-n &lt;native_sysroot&gt;</filename>:</emphasis>
2166 Specifies the path to the native sysroot
2167 that contains the tools used to build the image.
2168 </para></listitem>
2169 </itemizedlist>
2170 </para>
2171 </section>
2172
2173 <section id='cooked-mode'>
2174 <title>Cooked Mode</title>
2175
2176 <para>
2177 The general form of the <filename>wic</filename> command
2178 using Cooked Mode is:
2179 <literallayout class='monospaced'>
2180 $ wic create &lt;kickstart_file&gt; -e &lt;image_name&gt;
2181 </literallayout>
2182 This form is the simplest and most user-friendly, as it
2183 does not requre specifying all individual parameters.
2184 All you need to provide is your own
2185 <filename>.wks</filename> file or one provided with the
2186 release.
2187 </para>
2188
2189 <para>
2190 Following is a description of the <filename>wic</filename>
2191 parameters and options:
2192 <itemizedlist>
2193 <listitem><para><emphasis><filename>&lt;kickstart&gt;</filename>:</emphasis>
2194 An OpenEmbedded kickstart file.
2195 You can provide your own custom file or supplied
2196 file.</para></listitem>
2197 <listitem><para><emphasis><filename>-e &lt;image_name&gt;</filename>:</emphasis>
2198 Specifies the image built using the OpenEmbedded
2199 build system.</para></listitem>
2200 </itemizedlist>
2201 </para>
2202 </section>
2203 </section>
2204
2205 <section id='using-a-provided-kickstart_file'>
2206 <title>Using a Provided Kickstart File</title>
2207
2208 <para>
2209 If you do not want to create your own
2210 <filename>.wks</filename> file, you can use a provided
2211 file.
2212 Use the following command to list the available files:
2213 <literallayout class='monospaced'>
2214 $ wic list images
2215 mkefidisk Create an EFI disk image
2216 directdisk Create a 'pcbios' direct disk image
2217 </literallayout>
2218 When you use a provided file, you do not have to use the
2219 <filename>.wks</filename> extension.
2220 Here is an example in Raw Mode that uses the
2221 <filename>directdisk</filename> file:
2222 <literallayout class='monospaced'>
2223 $ wic create directdisk -r &lt;rootfs_dir&gt; -b &lt;bootimg_dir&gt; \
2224 -k &lt;kernel_dir&gt; -n &lt;native_sysroot&gt;
2225 </literallayout>
2226 </para>
2227 </section>
2228
2229 <section id='wic-usage-examples'>
2230 <title>Examples</title>
2231
2232 <para>
2233 This section provides several examples that show how to use
2234 the <filename>wic</filename> utility.
2235 All the examples assume the list of requirements in the
2236 "<link linkend='wic-requirements'>Requirements</link>" section
2237 have been met.
2238 The examples assume the previously generated image is
2239 <filename>core-image-minimal</filename>.
2240 </para>
2241
2242 <section id='generate-an-image-using-a-provided-kickstart-file'>
2243 <title>Generate an Image using a Provided Kickstart File</title>
2244
2245 <para>
2246 This example runs in Cooked Mode and uses the
2247 <filename>mkefidisk</filename> kickstart file:
2248 <literallayout class='monospaced'>
2249 $ wic create mkefidisk -e core-image-minimal
2250 Checking basic build environment...
2251 Done.
2252
2253 Creating image(s)...
2254
2255 Info: The new image(s) can be found here:
2256 /var/tmp/wic/build/mkefidisk-201310230946-sda.direct
2257
2258 The following build artifacts were used to create the image(s):
2259 ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow-poky-linux/core-image-minimal/1.0-r0/rootfs
2260 BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/work/minnow-poky-linux/core-image-minimal/1.0-r0/core-image-minimal-1.0/hddimg
2261 KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/minnow/usr/src/kernel
2262 NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
2263
2264
2265 The image(s) were created using OE kickstart file:
2266 /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/mkefidisk.wks
2267 </literallayout>
2268 This example shows the easiest way to create an image
2269 by running in Cooked Mode and using the
2270 <filename>&lt;-e&gt;</filename> option with a
2271 provided kickstart file.
2272 All that is necessary is to specify the image
2273 used to generate the artifacts.
2274 Your <filename>local.conf</filename> needs to have the
2275 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
2276 variable set to the machine you are using, which is
2277 "minnow" in this example.
2278 </para>
2279
2280 <para>
2281 The output specifies exactly which image were
2282 created and where the image was created.
2283 The output also names the artifacts used and the exact
2284 <filename>.wks</filename> script that was used to generate
2285 the image.
2286 <note>
2287 You should always verify the details provided in the
2288 output to make sure that the imagewas indeed created
2289 exactly as expected.
2290 </note>
2291 </para>
2292
2293 <para>
2294 Continuing with the example, you can now directly
2295 <filename>dd</filename> the image to a USB stick, or
2296 whatever media for which you built your image,
2297 and boot the resulting media:
2298 <literallayout class='monospaced'>
2299 $ sudo dd if=/var/tmp/wic/build/mkefidisk-201310230946-sda.direct of=/dev/sdb
2300 [sudo] password for trz:
2301 182274+0 records in
2302 182274+0 records out
2303 93324288 bytes (93 MB) copied, 14.4777 s, 6.4 MB/s
2304 [trz@empanada ~]$ sudo eject /dev/sdb
2305 </literallayout>
2306 </para>
2307 </section>
2308
2309 <section id='using-a-modified-kickstart-file'>
2310 <title>Using a Modified Kickstart File</title>
2311
2312 <para>
2313 Because <filename>wic</filename> image creation is driven
2314 by the kickstart file, it is easy to drive image creation
2315 by changing the parameters in the file.
2316 This next example demonstrates that through modification
2317 of the <filename>directdisk</filename> kickstart file.
2318 </para>
2319
2320 <para>
2321 As mentioned earlier, you can use the command
2322 <filename>wic list images</filename> to show the list
2323 of provided kickstart files.
2324 The directory in which these files reside is in the
2325 <link linkend='source-directory'>Source Directory</link>
2326 in <filename>scripts/lib/image/canned-wks/</filename>.
2327 Because the available files reside in this directory, you
2328 can create and add your own custom files to the directory.
2329 Subsequent use of the <filename>wic list images</filename>
2330 command would then include your kickstart files.
2331 </para>
2332
2333 <para>
2334 In this example, the existing
2335 <filename>directdisk</filename> file already does most
2336 of what is needed.
2337 However, for the hardware in this example, the image will
2338 need to boot from <filename>sdb</filename> instead of
2339 <filename>sda</filename>, which is what the
2340 <filename>directdisk</filename> kickstart file uses.
2341 </para>
2342
2343 <para>
2344 The example begins by making a copy of the
2345 <filename>directdisk.wks</filename> file in the
2346 <filename>scripts/lib/image/canned-wks</filename>
2347 directory and then changing the lines that specify the
2348 target disk from which to boot.
2349 <literallayout class='monospaced'>
2350 $ cp /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisk.wks /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisksdb.wks
2351 </literallayout>
2352 Next, the example modifies the
2353 <filename>directdisksdb.wks</filename> file and changes all
2354 instances of "<filename>--ondisk sda</filename>"
2355 to "<filename>--ondisk sdb</filename>".
2356 The example changes the following two lines and leaves the
2357 remaining lines untouched:
2358 <literallayout class='monospaced'>
2359 part /boot --source bootimg --ondisk sdb --fstype=msdos --label boot --active --align 1024
2360 part / --source rootfs --ondisk sdb --fstype=ext3 --label platform --align 1024
2361 </literallayout>
2362 (I AM HERE)
2363 Once the lines are changed, Once we've made that change, we generate a directdisksdb image,
2364pointing the process at the core-image-minimal artifacts for the nuc
2365(Next Unit of Computing), selected as our current MACHINE in
2366local.conf.
2367 </para>
2368
2369 <para>
2370 Once we've set the build up, we run a core-image-minimal nuc build:
2371 <literallayout class='monospaced'>
2372 $ bitbake core-image-minimal
2373 </literallayout>
2374 Once the build is finished, we can then use nuc to create our
2375directdisk image for the nuc to boot. In this case, we'll use the
2376'-e' option to have wic discover the appropriate build artifacts and
2377generate the image:
2378 <literallayout class='monospaced'>
2379 $ wic create directdisksdb -e core-image-minimal
2380 Checking basic build environment...
2381 Done.
2382
2383 Creating image(s)...
2384
2385 Info: The new image(s) can be found here:
2386 /var/tmp/wic/build/directdisksdb-201310231131-sdb.direct
2387
2388 The following build artifacts were used to create the image(s):
2389 ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/nuc-poky-linux/core-image-minimal/1.0-r0/rootfs
2390 BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/nuc/usr/share
2391 KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/nuc/usr/src/kernel
2392 NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
2393
2394
2395 The image(s) were created using OE kickstart file:
2396 /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisksdb.wks
2397 </literallayout>
2398 Using the path specified in the output for the image name and
2399location, you can now directly dd the image to a USB stick or whatever
2400media you built the image for, and boot the resulting media:
2401 <literallayout class='monospaced'>
2402 $ sudo dd if=/var/tmp/wic/build/directdisksdb-201310231131-sdb.direct of=/dev/sdb
2403 86018+0 records in
2404 86018+0 records out
2405 44041216 bytes (44 MB) copied, 13.0734 s, 3.4 MB/s
2406 [trz@empanada tmp]$ sudo eject /dev/sdb
2407 </literallayout>
2408 Of course, you can just use the directdisk image directly if you don't
2409have any special needs.
2410 </para>
2411
2412 <para>
2413 Here'we're creating a wic image based on core-image-minimal and
2414crownbay-noemgd, which works right out of the box.
2415 <literallayout class='monospaced'>
2416 $ wic create directdisk -e core-image-minimal
2417
2418 Checking basic build environment...
2419 Done.
2420
2421 Creating image(s)...
2422
2423 Info: The new image(s) can be found here:
2424 /var/tmp/wic/build/directdisk-201309252350-sda.direct
2425
2426 The following build artifacts were used to create the image(s):
2427
2428 ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs
2429 BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share
2430 KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
2431 NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
2432
2433 The image(s) were created using OE kickstart file:
2434 /home/trz/yocto/yocto-image/scripts/lib/image/canned-wks/directdisk.wks
2435 </literallayout>
2436 Finally, here's an example that doesn't take the easy way out and
2437manually specifies each build artifact, along with a non-canned .wks
2438file, and also uses the -o option to have wic create the output
2439somewhere other than the default /var/tmp/wic:
2440 <literallayout class='monospaced'>
2441 $ wic create ~/test.wks -o /home/trz/testwic --rootfs-dir /home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs --bootimg-dir /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share --kernel-dir /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel --native-sysroot /home/trz/yocto/yocto-image/build/tmp/sysroots/x86_64-linux
2442
2443 Creating image(s)...
2444
2445 Info: The new image(s) can be found here:
2446 /home/trz/testwic/build/test-201309260032-sda.direct
2447
2448 The following build artifacts were used to create the image(s):
2449
2450 ROOTFS_DIR: /home/trz/yocto/yocto-image/build/tmp/work/crownbay_noemgd-poky-linux/core-image-minimal/1.0-r0/rootfs
2451 BOOTIMG_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/share
2452 KERNEL_DIR: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
2453 NATIVE_SYSROOT: /home/trz/yocto/yocto-image/build/tmp/sysroots/crownbay-noemgd/usr/src/kernel
2454
2455 The image(s) were created using OE kickstart file:
2456 /home/trz/test.wks
2457 </literallayout>
2458 In this case, we didn't need to have the proper machine selected in
2459local.conf - we manually specified each artifact and therefore wic
2460doesn't need further information from the build system.
2461 </para>
2462
2463 <para>
2464 Finally, here's an example of the actual partition language commands
2465used to generate the mkefidisk image i.e. these are the contents of the
2466mkefidisk.wks OE kickstart file:
2467 <literallayout class='monospaced'>
2468 # short-description: Create an EFI disk image
2469 # long-description: Creates a partitioned EFI disk image that the user
2470 # can directly dd to boot media.
2471
2472 part /boot --source bootimg --ondisk sda --fstype=efi --label msdos --active --align 1024
2473
2474 part / --source rootfs --ondisk sda --fstype=ext3 --label platform --align 1024
2475
2476 part swap --ondisk sda --size 44 --label swap1 --fstype=swap
2477
2478 bootloader --timeout=10 --append="rootwait rootfstype=ext3 console=ttyPCH0,115200 console=tty0 vmalloc=256MB snd-hda- intel.enable_msi=0"
2479 </literallayout>
2480 </para>
2481 </section>
2482 </section>
2483
2484 <section id='openembedded-kickstart-wks-reference'>
2485 <title>OpenEmbedded Kickstart (.wks) Reference</title>
2486
2487 <para>
2488 The current 'wic' implementation supports only the basic kickstart
2489partitioning commands: 'partition' (or 'part' for short) and
2490'bootloader'.
2491 </para>
2492
2493 <para>
2494 They are listed below and mostly follow the syntax and meaning of the
2495standard kickstart options for those commands. The documentation below
2496is based on the Fedora kickstart documentation of the same commands,
2497but modified to reflect wic capabilities. For reference:
2498 <literallayout class='monospaced'>
2499 http://fedoraproject.org/wiki/Anaconda/Kickstart#part_or_partition
2500 http://fedoraproject.org/wiki/Anaconda/Kickstart#bootloader
2501 </literallayout>
2502 </para>
2503
2504 <section id='command-part-or-partition'>
2505 <title>Command: part or partition</title>
2506
2507 <para>
2508 Creates a partition on the system.
2509 Use the following syntax:
2510 <literallayout class='monospaced'>
2511 part &lt;mntpoint&gt;
2512 </literallayout>
2513 The &lt;mntpoint&gt; is where the partition will be mounted and must be of
2514one of the following forms:
2515 <itemizedlist>
2516 <listitem><para><filename>/&lt;path&gt;</filename>:
2517 For example, <filename>/</filename>,
2518 <filename>/usr</filename>, and
2519 <filename>/home</filename></para></listitem>
2520 <listitem><para><filename>swap</filename>:
2521 The partition will be used as swap space.
2522 </para></listitem>
2523 </itemizedlist>
2524 </para>
2525
2526 <para>
2527 Following are the supported options:
2528 <literallayout class='monospaced'>
2529 --size
2530 The minimum partition size in megabytes. Specify an integer value
2531 here such as 500. Do not append the number with MB. Not needed if
2532 --source is used.
2533
2534 --source
2535 bootimg
2536 rootfs
2537
2538 The --source option is a wic-specific option that can currently
2539 have one of two values, 'bootimg' or 'rootfs'.
2540
2541 If '--source rootfs' is used, it tells the wic command to create a
2542 partition as large as needed to fill with the contents of /rootfs
2543 (specified by the -r 'wic' option) and to fill it with the
2544 contents of /rootfs.
2545
2546 If '--source bootimg' is used, it tells the wic command to create
2547 a partition as large as needed to fill with the contents of the
2548 boot partition (specified by the -b 'wic' option). Exactly what
2549 those contents are depend on the value of the --fstype option for
2550 that partition. If '--fstype=efi' is specified, the boot
2551 artifacts contained in HDDDIR are used, and if '--fstype=msdos' is
2552 specified, the boot artifacts found in STAGING_DATADIR are used.
2553
2554 --ondisk or --ondrive
2555 Forces the partition to be created on a particular disk.
2556
2557 --fstype
2558 Sets the file system type for the partition. Valid values are:
2559 msdos
2560 efi
2561 ext4
2562 ext3
2563 ext2
2564 btrfs
2565 swap
2566
2567 --label label
2568 Specify the label to give to the filesystem to be made on the
2569 partition. If the given label is already in use by another
2570 filesystem, a new label will be created for this partition.
2571
2572 --active
2573 Mark the partition as active.
2574
2575 --align (in kB)
2576 The '--align' option is a mic-specific option that says to start a
2577 partition on an x kB boundary.
2578 </literallayout>
2579 </para>
2580 </section>
2581
2582 <section id='command-bootloader'>
2583 <title>Command: bootloader</title>
2584
2585 <para>
2586 This command specifies how the boot loader should be installed.
2587 </para>
2588
2589 <para>
2590 Following are the supported options:
2591 <literallayout class='monospaced'>
2592 --timeout
2593 Specify the number of seconds before the bootloader times out and
2594 boots the default option.
2595
2596 --append
2597 Specifies kernel parameters. These will be added to the syslinux
2598 APPEND or grub kernel command line.
2599
2600 The boot type is determined by the fstype of the /boot mountpoint. If
2601 the fstype is 'msdos' the boot type is 'pcbios', otherwise it's the
2602 fstype, which currently be: 'efi' (more to be added later).
2603
2604 If the boot type is 'efi', the image will use grub and has one
2605 menuentry: 'boot'.
2606
2607 If the boot type is 'pcbios', the image will use syslinux and has one
2608 menu label: 'boot'.
2609
2610 Future updates will implement more options - using anything not
2611 explicitly supported can result in unpredictable results.
2612 </literallayout>
2613 </para>
2614 </section>
2615 </section>
2616 </section>
2617
2618 <section id='configuring-the-kernel'>
2619 <title>Configuring the Kernel</title>
2620
2621 <para>
2622 Configuring the Yocto Project kernel consists of making sure the <filename>.config</filename>
2623 file has all the right information in it for the image you are building.
2624 You can use the <filename>menuconfig</filename> tool and configuration fragments to
2625 make sure your <filename>.config</filename> file is just how you need it.
2626 This section describes how to use <filename>menuconfig</filename>, create and use
2627 configuration fragments, and how to interactively tweak your <filename>.config</filename>
2628 file to create the leanest kernel configuration file possible.
2629 </para>
2630
2631 <para>
2632 For more information on kernel configuration, see the
2633 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#changing-the-configuration'>Changing the Configuration</ulink>"
2634 section in the Yocto Project Linux Kernel Development Manual.
2635 </para>
2636
2637 <section id='using-menuconfig'>
2638 <title>Using&nbsp;&nbsp;<filename>menuconfig</filename></title>
2639
2640 <para>
2641 The easiest way to define kernel configurations is to set them through the
2642 <filename>menuconfig</filename> tool.
2643 This tool provides an interactive method with which
2644 to set kernel configurations.
2645 For general information on <filename>menuconfig</filename>, see
2646 <ulink url='http://en.wikipedia.org/wiki/Menuconfig'></ulink>.
2647 </para>
2648
2649 <para>
2650 To use the <filename>menuconfig</filename> tool in the Yocto Project development
2651 environment, you must build the tool using BitBake.
2652 Thus, the environment must be set up using the
2653 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
2654 or
2655 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>
2656 script found in the
2657 <link linkend='build-directory'>Build Directory</link>.
2658 The following commands build and invoke <filename>menuconfig</filename> assuming the
2659 <link linkend='source-directory'>Source Directory</link>
2660 top-level folder is <filename>~/poky</filename>:
2661 <literallayout class='monospaced'>
2662 $ cd poky
2663 $ source oe-init-build-env
2664 $ bitbake linux-yocto -c menuconfig
2665 </literallayout>
2666 Once <filename>menuconfig</filename> comes up, its standard interface allows you to
2667 interactively examine and configure all the kernel configuration parameters.
2668 After making your changes, simply exit the tool and save your changes to
2669 create an updated version of the <filename>.config</filename> configuration file.
2670 </para>
2671
2672 <para>
2673 Consider an example that configures the <filename>linux-yocto-3.4</filename>
2674 kernel.
2675 The OpenEmbedded build system recognizes this kernel as
2676 <filename>linux-yocto</filename>.
2677 Thus, the following commands from the shell in which you previously sourced the
2678 environment initialization script cleans the shared state cache and the
2679 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>
2680 directory and then builds and launches <filename>menuconfig</filename>:
2681 <literallayout class='monospaced'>
2682 $ bitbake linux-yocto -c menuconfig
2683 </literallayout>
2684 </para>
2685
2686 <para>
2687 Once <filename>menuconfig</filename> launches, use the interface
2688 to navigate through the selections to find the configuration settings in
2689 which you are interested.
2690 For example, consider the <filename>CONFIG_SMP</filename> configuration setting.
2691 You can find it at <filename>Processor Type and Features</filename> under
2692 the configuration selection <filename>Symmetric Multi-processing Support</filename>.
2693 After highlighting the selection, use the arrow keys to select or deselect
2694 the setting.
2695 When you are finished with all your selections, exit out and save them.
2696 </para>
2697
2698 <para>
2699 Saving the selections updates the <filename>.config</filename> configuration file.
2700 This is the file that the OpenEmbedded build system uses to configure the
2701 kernel during the build.
2702 You can find and examine this file in the Build Directory in
2703 <filename>tmp/work/</filename>.
2704 The actual <filename>.config</filename> is located in the area where the
2705 specific kernel is built.
2706 For example, if you were building a Linux Yocto kernel based on the
2707 Linux 3.4 kernel and you were building a QEMU image targeted for
2708 <filename>x86</filename> architecture, the
2709 <filename>.config</filename> file would be located here:
2710 <literallayout class='monospaced'>
2711 poky/build/tmp/work/qemux86-poky-linux/linux-yocto-3.4.11+git1+84f...
2712 ...656ed30-r1/linux-qemux86-standard-build
2713 </literallayout>
2714 <note>
2715 The previous example directory is artificially split and many of the characters
2716 in the actual filename are omitted in order to make it more readable.
2717 Also, depending on the kernel you are using, the exact pathname
2718 for <filename>linux-yocto-3.4...</filename> might differ.
2719 </note>
2720 </para>
2721
2722 <para>
2723 Within the <filename>.config</filename> file, you can see the kernel settings.
2724 For example, the following entry shows that symmetric multi-processor support
2725 is not set:
2726 <literallayout class='monospaced'>
2727 # CONFIG_SMP is not set
2728 </literallayout>
2729 </para>
2730
2731 <para>
2732 A good method to isolate changed configurations is to use a combination of the
2733 <filename>menuconfig</filename> tool and simple shell commands.
2734 Before changing configurations with <filename>menuconfig</filename>, copy the
2735 existing <filename>.config</filename> and rename it to something else,
2736 use <filename>menuconfig</filename> to make
2737 as many changes an you want and save them, then compare the renamed configuration
2738 file against the newly created file.
2739 You can use the resulting differences as your base to create configuration fragments
2740 to permanently save in your kernel layer.
2741 <note>
2742 Be sure to make a copy of the <filename>.config</filename> and don't just
2743 rename it.
2744 The build system needs an existing <filename>.config</filename>
2745 from which to work.
2746 </note>
2747 </para>
2748 </section>
2749
2750 <section id='creating-config-fragments'>
2751 <title>Creating Configuration Fragments</title>
2752
2753 <para>
2754 Configuration fragments are simply kernel options that appear in a file
2755 placed where the OpenEmbedded build system can find and apply them.
2756 Syntactically, the configuration statement is identical to what would appear
2757 in the <filename>.config</filename> file, which is in the
2758 <link linkend='build-directory'>Build Directory</link> in
2759 <filename>tmp/work/&lt;arch&gt;-poky-linux/linux-yocto-&lt;release-specific-string&gt;/linux-&lt;arch&gt;-&lt;build-type&gt;</filename>.
2760 </para>
2761
2762 <para>
2763 It is simple to create a configuration fragment.
2764 For example, issuing the following from the shell creates a configuration fragment
2765 file named <filename>my_smp.cfg</filename> that enables multi-processor support
2766 within the kernel:
2767 <literallayout class='monospaced'>
2768 $ echo "CONFIG_SMP=y" >> my_smp.cfg
2769 </literallayout>
2770 <note>
2771 All configuration files must use the <filename>.cfg</filename> extension in order
2772 for the OpenEmbedded build system to recognize them as a configuration fragment.
2773 </note>
2774 </para>
2775
2776 <para>
2777 Where do you put your configuration files?
2778 You can place these configuration files in the same area pointed to by
2779 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>.
2780 The OpenEmbedded build system will pick up the configuration and add it to the
2781 kernel's configuration.
2782 For example, suppose you had a set of configuration options in a file called
2783 <filename>myconfig.cfg</filename>.
2784 If you put that file inside a directory named <filename>linux-yocto</filename>
2785 that resides in the same directory as the kernel's append file and then add
2786 a <filename>SRC_URI</filename> statement such as the following to the kernel's append file,
2787 those configuration options will be picked up and applied when the kernel is built.
2788 <literallayout class='monospaced'>
2789 SRC_URI += "file://myconfig.cfg"
2790 </literallayout>
2791 </para>
2792
2793 <para>
2794 As mentioned earlier, you can group related configurations into multiple files and
2795 name them all in the <filename>SRC_URI</filename> statement as well.
2796 For example, you could group separate configurations specifically for Ethernet and graphics
2797 into their own files and add those by using a <filename>SRC_URI</filename> statement like the
2798 following in your append file:
2799 <literallayout class='monospaced'>
2800 SRC_URI += "file://myconfig.cfg \
2801 file://eth.cfg \
2802 file://gfx.cfg"
2803 </literallayout>
2804 </para>
2805 </section>
2806
2807 <section id='fine-tuning-the-kernel-configuration-file'>
2808 <title>Fine-Tuning the Kernel Configuration File</title>
2809
2810 <para>
2811 You can make sure the <filename>.config</filename> file is as lean or efficient as
2812 possible by reading the output of the kernel configuration fragment audit,
2813 noting any issues, making changes to correct the issues, and then repeating.
2814 </para>
2815
2816 <para>
2817 As part of the kernel build process, the
2818 <filename>kernel_configcheck</filename> task runs.
2819 This task validates the kernel configuration by checking the final
2820 <filename>.config</filename> file against the input files.
2821 During the check, the task produces warning messages for the following
2822 issues:
2823 <itemizedlist>
2824 <listitem><para>Requested options that did not make the final
2825 <filename>.config</filename> file.</para></listitem>
2826 <listitem><para>Configuration items that appear twice in the same
2827 configuration fragment.</para></listitem>
2828 <listitem><para>Configuration items tagged as "required" were overridden.
2829 </para></listitem>
2830 <listitem><para>A board overrides a non-board specific option.</para></listitem>
2831 <listitem><para>Listed options not valid for the kernel being processed.
2832 In other words, the option does not appear anywhere.</para></listitem>
2833 </itemizedlist>
2834 <note>
2835 The <filename>kernel_configcheck</filename> task can also optionally report
2836 if an option is overridden during processing.
2837 </note>
2838 </para>
2839
2840 <para>
2841 For each output warning, a message points to the file
2842 that contains a list of the options and a pointer to the config
2843 fragment that defines them.
2844 Collectively, the files are the key to streamlining the configuration.
2845 </para>
2846
2847 <para>
2848 To streamline the configuration, do the following:
2849 <orderedlist>
2850 <listitem><para>Start with a full configuration that you know
2851 works - it builds and boots successfully.
2852 This configuration file will be your baseline.</para></listitem>
2853 <listitem><para>Separately run the <filename>configme</filename> and
2854 <filename>kernel_configcheck</filename> tasks.</para></listitem>
2855 <listitem><para>Take the resulting list of files from the
2856 <filename>kernel_configcheck</filename> task warnings and do the following:
2857 <itemizedlist>
2858 <listitem><para>Drop values that are redefined in the fragment but do not
2859 change the final <filename>.config</filename> file.</para></listitem>
2860 <listitem><para>Analyze and potentially drop values from the
2861 <filename>.config</filename> file that override required
2862 configurations.</para></listitem>
2863 <listitem><para>Analyze and potentially remove non-board specific options.
2864 </para></listitem>
2865 <listitem><para>Remove repeated and invalid options.</para></listitem>
2866 </itemizedlist></para></listitem>
2867 <listitem><para>After you have worked through the output of the kernel configuration
2868 audit, you can re-run the <filename>configme</filename>
2869 and <filename>kernel_configcheck</filename> tasks to see the results of your
2870 changes.
2871 If you have more issues, you can deal with them as described in the
2872 previous step.</para></listitem>
2873 </orderedlist>
2874 </para>
2875
2876 <para>
2877 Iteratively working through steps two through four eventually yields
2878 a minimal, streamlined configuration file.
2879 Once you have the best <filename>.config</filename>, you can build the Linux
2880 Yocto kernel.
2881 </para>
2882 </section>
2883 </section>
2884
2885 <section id="patching-the-kernel">
2886 <title>Patching the Kernel</title>
2887
2888 <para>
2889 Patching the kernel involves changing or adding configurations to an existing kernel,
2890 changing or adding recipes to the kernel that are needed to support specific hardware features,
2891 or even altering the source code itself.
2892 <note>
2893 You can use the <filename>yocto-kernel</filename> script
2894 found in the <link linkend='source-directory'>Source Directory</link>
2895 under <filename>scripts</filename> to manage kernel patches and configuration.
2896 See the "<ulink url='&YOCTO_DOCS_BSP_URL;#managing-kernel-patches-and-config-items-with-yocto-kernel'>Managing kernel Patches and Config Items with yocto-kernel</ulink>"
2897 section in the Yocto Project Board Support Packages (BSP) Developer's Guide for
2898 more information.</note>
2899 </para>
2900
2901 <para>
2902 This example creates a simple patch by adding some QEMU emulator console
2903 output at boot time through <filename>printk</filename> statements in the kernel's
2904 <filename>calibrate.c</filename> source code file.
2905 Applying the patch and booting the modified image causes the added
2906 messages to appear on the emulator's console.
2907 </para>
2908
2909 <para>
2910 The example assumes a clean build exists for the <filename>qemux86</filename>
2911 machine in a Source Directory named <filename>poky</filename>.
2912 Furthermore, the <link linkend='build-directory'>Build Directory</link> is
2913 <filename>build</filename> and is located in <filename>poky</filename> and
2914 the kernel is based on the Linux 3.4 kernel.
2915 For general information on how to configure the most efficient build, see the
2916 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>" section
2917 in the Yocto Project Quick Start.
2918 </para>
2919
2920 <para>
2921 Also, for more information on patching the kernel, see the
2922 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#applying-patches'>Applying Patches</ulink>"
2923 section in the Yocto Project Linux Kernel Development Manual.
2924 </para>
2925
2926 <section id='create-a-layer-for-your-changes'>
2927 <title>Create a Layer for your Changes</title>
2928
2929 <para>
2930 The first step is to create a layer so you can isolate your changes:
2931 <literallayout class='monospaced'>
2932 $cd ~/poky
2933 $mkdir meta-mylayer
2934 </literallayout>
2935 Creating a directory that follows the Yocto Project layer naming
2936 conventions sets up the layer for your changes.
2937 The layer is where you place your configuration files, append
2938 files, and patch files.
2939 To learn more about creating a layer and filling it with the
2940 files you need, see the "<link linkend='understanding-and-creating-layers'>Understanding
2941 and Creating Layers</link>" section.
2942 </para>
2943 </section>
2944
2945 <section id='finding-the-kernel-source-code'>
2946 <title>Finding the Kernel Source Code</title>
2947
2948 <para>
2949 Each time you build a kernel image, the kernel source code is fetched
2950 and unpacked into the following directory:
2951 <literallayout class='monospaced'>
2952 ${S}/linux
2953 </literallayout>
2954 See the "<link linkend='finding-the-temporary-source-code'>Finding the Temporary Source Code</link>"
2955 section and the
2956 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink> variable
2957 for more information about where source is kept during a build.
2958 </para>
2959
2960 <para>
2961 For this example, we are going to patch the
2962 <filename>init/calibrate.c</filename> file
2963 by adding some simple console <filename>printk</filename> statements that we can
2964 see when we boot the image using QEMU.
2965 </para>
2966 </section>
2967
2968 <section id='creating-the-patch'>
2969 <title>Creating the Patch</title>
2970
2971 <para>
2972 Two methods exist by which you can create the patch:
2973 <link linkend='using-a-git-workflow'>Git workflow</link> and
2974 <link linkend='using-a-quilt-workflow'>Quilt workflow</link>.
2975 For kernel patches, the Git workflow is more appropriate.
2976 This section assumes the Git workflow and shows the steps specific to
2977 this example.
2978 <orderedlist>
2979 <listitem><para><emphasis>Change the working directory</emphasis>:
2980 Change to where the kernel source code is before making
2981 your edits to the <filename>calibrate.c</filename> file:
2982 <literallayout class='monospaced'>
2983 $ cd ~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-${PV}-${PR}/linux
2984 </literallayout>
2985 Because you are working in an established Git repository,
2986 you must be in this directory in order to commit your changes
2987 and create the patch file.
2988 <note>The <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink> and
2989 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink> variables
2990 represent the version and revision for the
2991 <filename>linux-yocto</filename> recipe.
2992 The <filename>PV</filename> variable includes the Git meta and machine
2993 hashes, which make the directory name longer than you might
2994 expect.
2995 </note></para></listitem>
2996 <listitem><para><emphasis>Edit the source file</emphasis>:
2997 Edit the <filename>init/calibrate.c</filename> file to have the
2998 following changes:
2999 <literallayout class='monospaced'>
3000 void __cpuinit calibrate_delay(void)
3001 {
3002 unsigned long lpj;
3003 static bool printed;
3004 int this_cpu = smp_processor_id();
3005
3006 printk("*************************************\n");
3007 printk("* *\n");
3008 printk("* HELLO YOCTO KERNEL *\n");
3009 printk("* *\n");
3010 printk("*************************************\n");
3011
3012 if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
3013 .
3014 .
3015 .
3016 </literallayout></para></listitem>
3017 <listitem><para><emphasis>Stage and commit your changes</emphasis>:
3018 These Git commands display the modified file, stage it, and then
3019 commit the file:
3020 <literallayout class='monospaced'>
3021 $ git status
3022 $ git add init/calibrate.c
3023 $ git commit -m "calibrate: Add printk example"
3024 </literallayout></para></listitem>
3025 <listitem><para><emphasis>Generate the patch file</emphasis>:
3026 This Git command creates the a patch file named
3027 <filename>0001-calibrate-Add-printk-example.patch</filename>
3028 in the current directory.
3029 <literallayout class='monospaced'>
3030 $ git format-patch -1
3031 </literallayout>
3032 </para></listitem>
3033 </orderedlist>
3034 </para>
3035 </section>
3036
3037 <section id='set-up-your-layer-for-the-build'>
3038 <title>Set Up Your Layer for the Build</title>
3039
3040 <para>These steps get your layer set up for the build:
3041 <orderedlist>
3042 <listitem><para><emphasis>Create additional structure</emphasis>:
3043 Create the additional layer structure:
3044 <literallayout class='monospaced'>
3045 $ cd ~/poky/meta-mylayer
3046 $ mkdir conf
3047 $ mkdir recipes-kernel
3048 $ mkdir recipes-kernel/linux
3049 $ mkdir recipes-kernel/linux/linux-yocto
3050 </literallayout>
3051 The <filename>conf</filename> directory holds your configuration files, while the
3052 <filename>recipes-kernel</filename> directory holds your append file and
3053 your patch file.</para></listitem>
3054 <listitem><para><emphasis>Create the layer configuration file</emphasis>:
3055 Move to the <filename>meta-mylayer/conf</filename> directory and create
3056 the <filename>layer.conf</filename> file as follows:
3057 <literallayout class='monospaced'>
3058 # We have a conf and classes directory, add to BBPATH
3059 BBPATH .= ":${LAYERDIR}"
3060
3061 # We have recipes-* directories, add to BBFILES
3062 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
3063 ${LAYERDIR}/recipes-*/*/*.bbappend"
3064
3065 BBFILE_COLLECTIONS += "mylayer"
3066 BBFILE_PATTERN_mylayer = "^${LAYERDIR}/"
3067 BBFILE_PRIORITY_mylayer = "5"
3068 </literallayout>
3069 Notice <filename>mylayer</filename> as part of the last three
3070 statements.</para></listitem>
3071 <listitem><para><emphasis>Create the kernel recipe append file</emphasis>:
3072 Move to the <filename>meta-mylayer/recipes-kernel/linux</filename> directory and create
3073 the <filename>linux-yocto_3.4.bbappend</filename> file as follows:
3074 <literallayout class='monospaced'>
3075 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
3076
3077 SRC_URI += "file://0001-calibrate-Add-printk-example.patch"
3078
3079 PRINC := "${@int(PRINC) + 1}"
3080 </literallayout>
3081 The <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
3082 and <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
3083 statements enable the OpenEmbedded build system to find the patch file.
3084 For more information on using append files, see the
3085 "<link linkend='using-bbappend-files'>Using .bbappend Files</link>"
3086 section.
3087 </para></listitem>
3088 <listitem><para><emphasis>Put the patch file in your layer</emphasis>:
3089 Move the <filename>0001-calibrate-Add-printk-example.patch</filename> file to
3090 the <filename>meta-mylayer/recipes-kernel/linux/linux-yocto</filename>
3091 directory.</para></listitem>
3092 </orderedlist>
3093 </para>
3094 </section>
3095
3096 <section id='set-up-for-the-build'>
3097 <title>Set Up for the Build</title>
3098
3099 <para>
3100 Do the following to make sure the build parameters are set up for the example.
3101 Once you set up these build parameters, they do not have to change unless you
3102 change the target architecture of the machine you are building:
3103 <itemizedlist>
3104 <listitem><para><emphasis>Build for the correct target architecture:</emphasis> Your
3105 selected <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
3106 definition within the <filename>local.conf</filename> file in the
3107 <link linkend='build-directory'>Build Directory</link>
3108 specifies the target architecture used when building the Linux kernel.
3109 By default, <filename>MACHINE</filename> is set to
3110 <filename>qemux86</filename>, which specifies a 32-bit
3111 <trademark class='registered'>Intel</trademark> Architecture
3112 target machine suitable for the QEMU emulator.</para></listitem>
3113 <listitem><para><emphasis>Identify your <filename>meta-mylayer</filename>
3114 layer:</emphasis> The
3115 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBLAYERS'><filename>BBLAYERS</filename></ulink>
3116 variable in the
3117 <filename>bblayers.conf</filename> file found in the
3118 <filename>poky/build/conf</filename> directory needs to have the path to your local
3119 <filename>meta-mylayer</filename> layer.
3120 By default, the <filename>BBLAYERS</filename> variable contains paths to
3121 <filename>meta</filename>, <filename>meta-yocto</filename>, and
3122 <filename>meta-yocto-bsp</filename> in the
3123 <filename>poky</filename> Git repository.
3124 Add the path to your <filename>meta-mylayer</filename> location:
3125 <literallayout class='monospaced'>
3126 BBLAYERS ?= " \
3127 $HOME/poky/meta \
3128 $HOME/poky/meta-yocto \
3129 $HOME/poky/meta-yocto-bsp \
3130 $HOME/poky/meta-mylayer \
3131 "
3132
3133 BBLAYERS_NON_REMOVABLE ?= " \
3134 $HOME/poky/meta \
3135 $HOME/poky/meta-yocto \
3136 "
3137 </literallayout></para></listitem>
3138 </itemizedlist>
3139 </para>
3140 </section>
3141
3142 <section id='build-the-modified-qemu-kernel-image'>
3143 <title>Build the Modified QEMU Kernel Image</title>
3144
3145 <para>
3146 The following steps build your modified kernel image:
3147 <orderedlist>
3148 <listitem><para><emphasis>Be sure your build environment is initialized</emphasis>:
3149 Your environment should be set up since you previously sourced
3150 the
3151 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
3152 script.
3153 If it is not, source the script again from <filename>poky</filename>.
3154 <literallayout class='monospaced'>
3155 $ cd ~/poky
3156 $ source &OE_INIT_FILE;
3157 </literallayout>
3158 </para></listitem>
3159 <listitem><para><emphasis>Clean up</emphasis>:
3160 Be sure to clean the shared state out by running the
3161 <filename>cleansstate</filename> BitBake task as follows from your Build Directory:
3162 <literallayout class='monospaced'>
3163 $ bitbake -c cleansstate linux-yocto
3164 </literallayout></para>
3165 <para><note>Never remove any files by hand from the <filename>tmp/deploy</filename>
3166 directory inside the
3167 <link linkend='build-directory'>Build Directory</link>.
3168 Always use the various BitBake clean tasks to clear out previous
3169 build artifacts.
3170 </note></para></listitem>
3171 <listitem><para><emphasis>Build the image</emphasis>:
3172 Next, build the kernel image using this command:
3173 <literallayout class='monospaced'>
3174 $ bitbake -k linux-yocto
3175 </literallayout></para></listitem>
3176 </orderedlist>
3177 </para>
3178 </section>
3179
3180 <section id='boot-the-image-and-verify-your-changes'>
3181 <title>Boot the Image and Verify Your Changes</title>
3182
3183 <para>
3184 These steps boot the image and allow you to see the changes
3185 <orderedlist>
3186 <listitem><para><emphasis>Boot the image</emphasis>:
3187 Boot the modified image in the QEMU emulator
3188 using this command:
3189 <literallayout class='monospaced'>
3190 $ runqemu qemux86
3191 </literallayout></para></listitem>
3192 <listitem><para><emphasis>Verify the changes</emphasis>:
3193 Log into the machine using <filename>root</filename> with no password and then
3194 use the following shell command to scroll through the console's boot output.
3195 <literallayout class='monospaced'>
3196 # dmesg | less
3197 </literallayout>
3198 You should see the results of your <filename>printk</filename> statements
3199 as part of the output.</para></listitem>
3200 </orderedlist>
3201 </para>
3202 </section>
3203 </section>
3204
3205 <section id='creating-your-own-distribution'>
3206 <title>Creating Your Own Distribution</title>
3207
3208 <para>
3209 When you build an image using the Yocto Project and
3210 do not alter any distribution
3211 <link linkend='metadata'>Metadata</link>, you are creating a
3212 Poky distribution.
3213 If you wish to gain more control over package alternative
3214 selections, compile-time options, and other low-level
3215 configurations, you can create your own distribution.
3216 </para>
3217
3218 <para>
3219 To create your own distribution, the basic steps consist of
3220 creating your own distribution layer, creating your own
3221 distribution configuration file, and then adding any needed
3222 code and Metadata to the layer.
3223 The following steps provide some more detail:
3224 <itemizedlist>
3225 <listitem><para><emphasis>Create a layer for your new distro:</emphasis>
3226 Create your distribution layer so that you can keep your
3227 Metadata and code for the distribution separate.
3228 It is strongly recommended that you create and use your own
3229 layer for configuration and code.
3230 Using your own layer as compared to just placing
3231 configurations in a <filename>local.conf</filename>
3232 configuration file makes it easier to reproduce the same
3233 build configuration when using multiple build machines.
3234 See the
3235 "<link linkend='creating-a-general-layer-using-the-yocto-layer-script'>Creating a General Layer Using the yocto-layer Script</link>"
3236 section for information on how to quickly set up a layer.
3237 </para></listitem>
3238 <listitem><para><emphasis>Create the distribution configuration file:</emphasis>
3239 The distribution configuration file needs to be created in
3240 the <filename>conf/distro</filename> directory of your
3241 layer.
3242 You need to name it using your distribution name
3243 (e.g. <filename>mydistro.conf</filename>).</para>
3244 <para>You can split out parts of your configuration file
3245 into include files and then "require" them from within
3246 your distribution configuration file.
3247 Be sure to place the include files in the
3248 <filename>conf/distro/include</filename> directory of
3249 your layer.
3250 A common example usage of include files would be to
3251 separate out the selection of desired version and revisions
3252 for individual recipes.
3253</para>
3254 <para>Your configuration file needs to set the following
3255 required variables:
3256 <literallayout class='monospaced'>
3257 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_NAME'><filename>DISTRO_NAME</filename></ulink> [required]
3258 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_VERSION'><filename>DISTRO_VERSION</filename></ulink> [required]
3259 </literallayout>
3260 These following variables are optional and you typically
3261 set them from the distribution configuration file:
3262 <literallayout class='monospaced'>
3263 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink> [optional]
3264 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_EXTRA_RDEPENDS'><filename>DISTRO_EXTRA_RDEPENDS</filename></ulink> [optional]
3265 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_EXTRA_RRECOMMENDS'><filename>DISTRO_EXTRA_RRECOMMENDS</filename></ulink> [optional]
3266 <ulink url='&YOCTO_DOCS_REF_URL;#var-TCLIBC'><filename>TCLIBC</filename></ulink> [optional]
3267 </literallayout>
3268 <tip>
3269 If you want to base your distribution configuration file
3270 on the very basic configuration from OE-Core, you
3271 can use
3272 <filename>conf/distro/defaultsetup.conf</filename> as
3273 a reference and just include variables that differ
3274 as compared to <filename>defaultsetup.conf</filename>.
3275 Alternatively, you can create a distribution
3276 configuration file from scratch using the
3277 <filename>defaultsetup.conf</filename> file
3278 or configuration files from other distributions
3279 such as Poky or Angstrom as references.
3280 </tip></para></listitem>
3281 <listitem><para><emphasis>Provide miscellaneous variables:</emphasis>
3282 Be sure to define any other variables for which you want to
3283 create a default or enforce as part of the distribution
3284 configuration.
3285 You can include nearly any variable from the
3286 <filename>local.conf</filename> file.
3287 The variables you use are not limited to the list in the
3288 previous bulleted item.</para></listitem>
3289 <listitem><para><emphasis>Point to Your distribution configuration file:</emphasis>
3290 In your <filename>local.conf</filename> file in the
3291 <link linkend='build-directory'>Build Directory</link>,
3292 set your
3293 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
3294 variable to point to your distribution's configuration file.
3295 For example, if your distribution's configuration file is
3296 named <filename>mydistro.conf</filename>, then you point
3297 to it as follows:
3298 <literallayout class='monospaced'>
3299 DISTRO = "mydistro"
3300 </literallayout></para></listitem>
3301 <listitem><para><emphasis>Add more to the layer if necessary:</emphasis>
3302 Use your layer to hold other information needed for the
3303 distribution:
3304 <itemizedlist>
3305 <listitem><para>Add recipes for installing
3306 distro-specific configuration files that are not
3307 already installed by another recipe.
3308 If you have distro-specific configuration files
3309 that are included by an existing recipe, you should
3310 add a <filename>.bbappend</filename> for those.
3311 For general information and recommendations
3312 on how to add recipes to your layer, see the
3313 "<link linkend='creating-your-own-layer'>Creating Your Own Layer</link>"
3314 and
3315 "<link linkend='best-practices-to-follow-when-creating-layers'>Best Practices to Follow When Creating Layers</link>"
3316 sections.</para></listitem>
3317 <listitem><para>Add any image recipes that are specific
3318 to your distribution.</para></listitem>
3319 <listitem><para>Add a <filename>psplash</filename>
3320 append file for a branded splash screen.
3321 For information on append files, see the
3322 "<link linkend='using-bbappend-files'>Using .bbappend Files</link>"
3323 section.</para></listitem>
3324 <listitem><para>Add any other append files to make
3325 custom changes that are specific to individual
3326 recipes.</para></listitem>
3327 </itemizedlist></para></listitem>
3328 </itemizedlist>
3329 </para>
3330 </section>
3331
3332 <section id='building-a-tiny-system'>
3333 <title>Building a Tiny System</title>
3334
3335 <para>
3336 Very small distributions have some significant advantages such
3337 as requiring less on-die or in-package memory (cheaper), better
3338 performance through efficient cache usage, lower power requirements
3339 due to less memory, faster boot times, and reduced development
3340 overhead.
3341 Some real-world examples where a very small distribution gives
3342 you distinct advantages are digital cameras, medical devices,
3343 and small headless systems.
3344 </para>
3345
3346 <para>
3347 This section presents information that shows you how you can
3348 trim your distribution to even smaller sizes than the
3349 <filename>poky-tiny</filename> distribution, which is around
3350 5 Mbytes, that can be built out-of-the-box using the Yocto Project.
3351 </para>
3352
3353 <section id='tiny-system-overview'>
3354 <title>Overview</title>
3355
3356 <para>
3357 The following list presents the overall steps you need to
3358 consider and perform to create distributions with smaller
3359 root filesystems, faster boot times, maintain your critical
3360 functionality, and avoid initial RAM disks:
3361 <itemizedlist>
3362 <listitem><para>Determine your goals and guiding
3363 principles.</para></listitem>
3364 <listitem><para>Understand what gives your image size.
3365 </para></listitem>
3366 <listitem><para>Reduce the size of the root filesystem.
3367 </para></listitem>
3368 <listitem><para>Reduce the size of the kernel.
3369 </para></listitem>
3370 <listitem><para>Eliminate packaging requirements.
3371 </para></listitem>
3372 <listitem><para>Look for other ways to minimize size.
3373 </para></listitem>
3374 <listitem><para>Iterate on the process.</para></listitem>
3375 </itemizedlist>
3376 </para>
3377 </section>
3378
3379 <section id='goals-and-guiding-principles'>
3380 <title>Goals and Guiding Principles</title>
3381
3382 <para>
3383 Before you can reach your destination, you need to know
3384 where you are going.
3385 Here is an example list that you can use as a guide when
3386 creating very small distributions:
3387 <itemizedlist>
3388 <listitem><para>Determine how much space you need
3389 (e.g. a kernel that is 1 Mbyte or less and
3390 a root filesystem that is 3 Mbytes or less).
3391 </para></listitem>
3392 <listitem><para>Find the areas that are currently
3393 taking 90% of the space and concentrate on reducing
3394 those areas.
3395 </para></listitem>
3396 <listitem><para>Do not create any difficult "hacks"
3397 to achieve your goals.</para></listitem>
3398 <listitem><para>Leverage the device-specific
3399 options.</para></listitem>
3400 <listitem><para>Work in a separate layer so that you
3401 keep changes isolated.
3402 For information on how to create layers, see
3403 the "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>" section.
3404 </para></listitem>
3405 </itemizedlist>
3406 </para>
3407 </section>
3408
3409 <section id='understand-what-gives-your-image-size'>
3410 <title>Understand What Gives Your Image Size</title>
3411
3412 <para>
3413 It is easiest to have something to start with when creating
3414 your own distribution.
3415 You can use the Yocto Project out-of-the-box to create the
3416 <filename>poky-tiny</filename> distribution.
3417 Ultimately, you will want to make changes in your own
3418 distribution that are likely modeled after
3419 <filename>poky-tiny</filename>.
3420 <note>
3421 To use <filename>poky-tiny</filename> in your build,
3422 set the
3423 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO'><filename>DISTRO</filename></ulink>
3424 variable in your
3425 <filename>local.conf</filename> file to "poky-tiny"
3426 as described in the
3427 "<link linkend='creating-your-own-distribution'>Creating Your Own Distribution</link>"
3428 section.
3429 </note>
3430 </para>
3431
3432 <para>
3433 Understanding some memory concepts will help you reduce the
3434 system size.
3435 Memory consists of static, dynamic, and temporary memory.
3436 Static memory is the TEXT (code), DATA (initialized data
3437 in the code), and BSS (uninitialized data) sections.
3438 Dynamic memory contains memory that is allocated at runtime,
3439 stacks, hash tables, and so forth.
3440 Temporary memory is recovered after the boot process.
3441 This memory consists of memory used for decompressing
3442 the kernel and for the <filename>__init__</filename>
3443 functions.
3444 </para>
3445
3446 <para>
3447 To help you see where you currently are with kernel and root
3448 filesystem sizes, you can use two tools found in the
3449 <link linkend='source-directory'>Source Directory</link> in
3450 the <filename>scripts</filename> directory:
3451 <itemizedlist>
3452 <listitem><para><filename>ksize.py</filename>: Reports
3453 component sizes for the kernel build objects.
3454 </para></listitem>
3455 <listitem><para><filename>dirsize.py</filename>: Reports
3456 component sizes for the root filesystem.</para></listitem>
3457 </itemizedlist>
3458 This next tool and command helps you organize configuration
3459 fragments and view file dependencies in a human-readable form:
3460 <itemizedlist>
3461 <listitem><para><filename>merge_config.sh</filename>:
3462 Helps you manage configuration files and fragments
3463 within the kernel.
3464 With this tool, you can merge individual configuration
3465 fragments together.
3466 The tool allows you to make overrides and warns you
3467 of any missing configuration options.
3468 The tool is ideal for allowing you to iterate on
3469 configurations, create minimal configurations, and
3470 create configuration files for different machines
3471 without having to duplicate your process.</para>
3472 <para>The <filename>merge_config.sh</filename> script is
3473 part of the Linux Yocto kernel Git repository in the
3474 <filename>scripts/kconfig</filename> directory.</para>
3475 <para>For more information on configuration fragments,
3476 see the
3477 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#generating-configuration-files'>Generating Configuration Files</ulink>"
3478 section of the Yocto Project Linux Kernel Development
3479 Manual and the "<link linkend='creating-config-fragments'>Creating Configuration Fragments</link>"
3480 section, which is in this manual.</para></listitem>
3481 <listitem><para><filename>bitbake -u depexp -g &lt;bitbake_target&gt;</filename>:
3482 Using the BitBake command with these options brings up
3483 a Dependency Explorer from which you can view file
3484 dependencies.
3485 Understanding these dependencies allows you to make
3486 informed decisions when cutting out various pieces of the
3487 kernel and root filesystem.</para></listitem>
3488 </itemizedlist>
3489 </para>
3490 </section>
3491
3492 <section id='trim-the-root-filesystem'>
3493 <title>Trim the Root Filesystem</title>
3494
3495 <para>
3496 The root filesystem is made up of packages for booting,
3497 libraries, and applications.
3498 To change things, you can configure how the packaging happens,
3499 which changes the way you build them.
3500 You can also tweak the filesystem itself or select a different
3501 filesystem.
3502 </para>
3503
3504 <para>
3505 First, find out what is hogging your root filesystem by running the
3506 <filename>dirsize.py</filename> script from your root directory:
3507 <literallayout class='monospaced'>
3508 $ cd &lt;root-directory-of-image&gt;
3509 $ dirsize.py 100000 > dirsize-100k.log
3510 $ cat dirsize-100k.log
3511 </literallayout>
3512 You can apply a filter to the script to ignore files under
3513 a certain size.
3514 This example filters out anything below 100 Kbytes.
3515 The sizes reported by the tool are uncompressed and thus,
3516 will be smaller by a relatively constant factor in a
3517 compressed root filesystem.
3518 When you examine your log file, you can focus on areas of the
3519 root filesystem that take up large amounts of memory.
3520 </para>
3521
3522 <para>
3523 You need to be sure that what you eliminate does not cripple
3524 the functionality you need.
3525 One way to see how packages relate to each other is by using
3526 the Dependency Explorer UI with the BitBake command:
3527 <literallayout class='monospaced'>
3528 $ cd &lt;image-directory&gt;
3529 $ bitbake -u depexp -g &lt;image&gt;
3530 </literallayout>
3531 Use the interface to select potential packages you wish to
3532 eliminate and see their dependency relationships.
3533 </para>
3534
3535 <para>
3536 When deciding how to reduce the size, get rid of packages that
3537 result in minimal impact on the feature set.
3538 For example, you might not need a VGA display.
3539 Or, you might be able to get by with <filename>devtmpfs</filename>
3540 and <filename>mdev</filename> instead of
3541 <filename>udev</filename>.
3542 </para>
3543
3544 <para>
3545 Use the <filename>local.conf</filename> file to make changes.
3546 For example, to eliminate <filename>udev</filename> and
3547 <filename>glib</filename>, set the following in the
3548 local configuration file:
3549 <literallayout class='monospaced'>
3550 VIRTUAL-RUNTIME_dev_manager = ""
3551 </literallayout>
3552 </para>
3553
3554 <para>
3555 Finally, you should consider exactly the type of root
3556 filesystem you need to meet your needs while also reducing
3557 its size.
3558 For example, consider <filename>cramfs</filename>,
3559 <filename>squashfs</filename>, <filename>ubifs</filename>,
3560 <filename>ext2</filename>, or an <filename>initramfs</filename>
3561 using <filename>initramfs</filename>.
3562 Be aware that <filename>ext3</filename> requires a 1 Mbyte
3563 journal.
3564 If you are okay with running read-only you do not need this
3565 journal.
3566 </para>
3567
3568 <note>
3569 After each round of elimination, you need to rebuild your
3570 system and then use the tools to see the effects of your
3571 reductions.
3572 </note>
3573
3574
3575 </section>
3576
3577 <section id='trim-the-kernel'>
3578 <title>Trim the Kernel</title>
3579
3580 <para>
3581 The kernel is built by including policies for hardware-independent
3582 aspects.
3583 What subsystems do you enable?
3584 For what architecture are you building?
3585 Which drivers do you build by default.
3586 <note>You can modify the kernel source if you want to help
3587 with boot time.
3588 </note>
3589 </para>
3590
3591 <para>
3592 Run the <filename>ksize.py</filename> script from the top-level
3593 Linux build directory to get an idea of what is making up
3594 the kernel:
3595 <literallayout class='monospaced'>
3596 $ cd &lt;top-level-linux-build-directory&gt;
3597 $ ksize.py > ksize.log
3598 $ cat ksize.log
3599 </literallayout>
3600 When you examine the log, you will see how much space is
3601 taken up with the built-in <filename>.o</filename> files for
3602 drivers, networking, core kernel files, filesystem, sound,
3603 and so forth.
3604 The sizes reported by the tool are uncompressed and thus,
3605 will be smaller by a relatively constant factor in a compressed
3606 kernel image.
3607 Look to reduce the areas that are large and taking up around
3608 the "90% rule."
3609 </para>
3610
3611 <para>
3612 To examine, or drill down, into any particular area, use the
3613 <filename>-d</filename> option with the script:
3614 <literallayout class='monospaced'>
3615 $ ksize.py -d > ksize.log
3616 </literallayout>
3617 Using this option breaks out the individual file information
3618 for each area of the kernel (e.g. drivers, networking, and
3619 so forth).
3620 </para>
3621
3622 <para>
3623 Use your log file to see what you can eliminate from the kernel
3624 based on features you can let go.
3625 For example, if you are not going to need sound, you do not
3626 need any drivers that support sound.
3627 </para>
3628
3629 <para>
3630 After figuring out what to eliminate, you need to reconfigure
3631 the kernel to reflect those changes during the next build.
3632 You could run <filename>menuconfig</filename> and make all your
3633 changes at once.
3634 However, that makes it difficult to see the effects of your
3635 individual eliminations and also makes it difficult to replicate
3636 the changes for perhaps another target device.
3637 A better method is to start with no configurations using
3638 <filename>allnoconfig</filename>, create configuration
3639 fragments for individual changes, and then manage the
3640 fragments into a single configuration file using
3641 <filename>merge_config.sh</filename>.
3642 The tool makes it easy for you to iterate using the
3643 configuration change and build cycle.
3644 </para>
3645
3646 <para>
3647 Each time you make configuration changes, you need to rebuild
3648 the kernel and check to see what impact your changes had on
3649 the overall size.
3650 </para>
3651 </section>
3652
3653 <section id='remove-package-management-requirements'>
3654 <title>Remove Package Management Requirements</title>
3655
3656 <para>
3657 Packaging requirements add size to the image.
3658 One way to reduce the size of the image is to remove all the
3659 packaging requirements from the image.
3660 This reduction includes both removing the package manager
3661 and its unique dependencies as well as removing the package
3662 management data itself.
3663 </para>
3664
3665 <para>
3666 To eliminate all the packaging requirements for an image,
3667 follow these steps:
3668 <orderedlist>
3669 <listitem><para>Put the following line in your main
3670 recipe for the image to remove package management
3671 data files:
3672 <literallayout class='monospaced'>
3673 ROOTFS_POSTPROCESS_COMMAND += "remove_packaging_data_files ;
3674 </literallayout>
3675 For example, the recipe for the
3676 <filename>core-image-minimal</filename> image contains
3677 this line.
3678 You can also add the line to the
3679 <filename>local.conf</filename> configuration file.
3680 </para></listitem>
3681 <listitem><para>Be sure that "package-management" is not
3682 part of your
3683 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
3684 statement for the image.
3685 When you remove this feature, you are removing the
3686 package manager as well as its dependencies
3687 from the root filesystem.
3688 </para></listitem>
3689 </orderedlist>
3690 </para>
3691 </section>
3692
3693 <section id='look-for-other-ways-to-minimize-size'>
3694 <title>Look for Other Ways to Minimize Size</title>
3695
3696 <para>
3697 Depending on your particular circumstances, other areas that you
3698 can trim likely exist.
3699 The key to finding these areas is through tools and methods
3700 described here combined with experimentation and iteration.
3701 Here are a couple of areas to experiment with:
3702 <itemizedlist>
3703 <listitem><para><filename>eglibc</filename>:
3704 In general, follow this process:
3705 <orderedlist>
3706 <listitem><para>Remove <filename>eglibc</filename>
3707 features from
3708 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
3709 that you think you do not need.</para></listitem>
3710 <listitem><para>Build your distribution.
3711 </para></listitem>
3712 <listitem><para>If the build fails due to missing
3713 symbols in a package, determine if you can
3714 reconfigure the package to not need those
3715 features.
3716 For example, change the configuration to not
3717 support wide character support as is done for
3718 <filename>ncurses</filename>.
3719 Or, if support for those characters is needed,
3720 determine what <filename>eglibc</filename>
3721 features provide the support and restore the
3722 configuration.
3723 </para></listitem>
3724 <listitem><para>Rebuild and repeat the process.
3725 </para></listitem>
3726 </orderedlist></para></listitem>
3727 <listitem><para><filename>busybox</filename>:
3728 For BusyBox, use a process similar as described for
3729 <filename>eglibc</filename>.
3730 A difference is you will need to boot the resulting
3731 system to see if you are able to do everything you
3732 expect from the running system.
3733 You need to be sure to integrate configuration fragments
3734 into Busybox because BusyBox handles its own core
3735 features and then allows you to add configuration
3736 fragments on top.
3737 </para></listitem>
3738 </itemizedlist>
3739 </para>
3740 </section>
3741
3742 <section id='iterate-on-the-process'>
3743 <title>Iterate on the Process</title>
3744
3745 <para>
3746 If you have not reached your goals on system size, you need
3747 to iterate on the process.
3748 The process is the same.
3749 Use the tools and see just what is taking up 90% of the root
3750 filesystem and the kernel.
3751 Decide what you can eliminate without limiting your device
3752 beyond what you need.
3753 </para>
3754
3755 <para>
3756 Depending on your system, a good place to look might be
3757 Busybox, which provides a stripped down
3758 version of Unix tools in a single, executable file.
3759 You might be able to drop virtual terminal services or perhaps
3760 ipv6.
3761 </para>
3762 </section>
3763 </section>
3764
3765 <section id='working-with-packages'>
3766 <title>Working with Packages</title>
3767
3768 <para>
3769 This section describes a few tasks that involve packages:
3770 <itemizedlist>
3771 <listitem><para>Excluding packages from an image
3772 </para></listitem>
3773 <listitem><para>Incrementing a package revision number
3774 </para></listitem>
3775 <listitem><para>Handling a package name alias
3776 </para></listitem>
3777 <listitem><para>Handling optional module packaging
3778 </para></listitem>
3779 <listitem><para>Using Runtime Package Management
3780 </para></listitem>
3781 <listitem><para>Setting up and running package test
3782 (ptest)
3783 </para></listitem>
3784 </itemizedlist>
3785 </para>
3786
3787 <section id='excluding-packages-from-an-image'>
3788 <title>Excluding Packages from an Image</title>
3789
3790 <para>
3791 You might find it necessary to prevent specific packages
3792 from being installed into an image.
3793 If so, you can use several variables to direct the build
3794 system to essentially ignore installing recommended packages
3795 or to not install a package at all.
3796 </para>
3797
3798 <para>
3799 The following list introduces variables you can use to
3800 prevent packages from being installed into your image.
3801 Each of these variables only works with IPK and RPM
3802 package types.
3803 Support for Debian packages does not exist.
3804 Also, you can use these variables from your
3805 <filename>local.conf</filename> file or attach them to a
3806 specific image recipe by using a recipe name override.
3807 For more detail on the variables, see the descriptions in the
3808 Yocto Project Reference Manual's glossary chapter.
3809 <itemizedlist>
3810 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></ulink>:
3811 Use this variable to specify "recommended-only"
3812 packages that you do not want installed.
3813 </para></listitem>
3814 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></ulink>:
3815 Use this variable to prevent all "recommended-only"
3816 packages from being installed.
3817 </para></listitem>
3818 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></ulink>:
3819 Use this variable to prevent specific packages from
3820 being installed regardless of whether they are
3821 "recommended-only" or not.
3822 You need to realize that the build process could
3823 fail with an error when you
3824 prevent the installation of a package whose presence
3825 is required by an installed package.
3826 </para></listitem>
3827 </itemizedlist>
3828 </para>
3829 </section>
3830
3831 <section id='incrementing-a-package-revision-number'>
3832 <title>Incrementing a Package Revision Number</title>
3833
3834 <para>
3835 If a committed change results in changing the package output,
3836 then the value of the
3837 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
3838 variable needs to be increased (or "bumped").
3839 Increasing <filename>PR</filename> occurs one of two ways:
3840 <itemizedlist>
3841 <listitem><para>Automatically using a Package Revision
3842 Service (PR Service).</para></listitem>
3843 <listitem><para>Manually incrementing the
3844 <filename>PR</filename> variable.</para></listitem>
3845 </itemizedlist>
3846 </para>
3847
3848 <para>
3849 Given that one of the challenges any build system and its
3850 users face is how to maintain a package feed that is compatible
3851 with existing package manager applications such as
3852 RPM, APT, and OPKG, using an automated system is much
3853 preferred over a manual system.
3854 In either system, the main requirement is that version
3855 numbering increases in a linear fashion and that a number of
3856 version components exist that support that linear progression.
3857 </para>
3858
3859 <para>
3860 The following two sections provide information on the PR Service
3861 and on manual <filename>PR</filename> bumping.
3862 </para>
3863
3864 <section id='working-with-a-pr-service'>
3865 <title>Working With a PR Service</title>
3866
3867 <para>
3868 As mentioned, attempting to maintain revision numbers in the
3869 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
3870 is error prone, inaccurate and causes problems for people
3871 submitting recipes.
3872 Conversely, the PR Service automatically generates
3873 increasing numbers, particularly the revision field,
3874 which removes the human element.
3875 <note>
3876 For additional information on using a PR Service, you
3877 can see the
3878 <ulink url='&YOCTO_WIKI_URL;/wiki/PR_Service'>PR Service</ulink>
3879 wiki page.
3880 </note>
3881 </para>
3882
3883 <para>
3884 The Yocto Project uses variables in order of
3885 decreasing priority to facilitate revision numbering (i.e.
3886 <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>,
3887 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>, and
3888 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
3889 for epoch, version and revision, respectively).
3890 The values are highly dependent on the policies and
3891 procedures of a given distribution and package feed.
3892 </para>
3893
3894 <para>
3895 Because the OpenEmbedded build system uses
3896 "<ulink url='&YOCTO_DOCS_REF_URL;#checksums'>signatures</ulink>",
3897 which are unique to a given build, the build system
3898 knows when to rebuild packages.
3899 All the inputs into a given task are represented by a
3900 signature, which can trigger a rebuild when different.
3901 Thus, the build system itself does not rely on the
3902 <filename>PR</filename> numbers to trigger a rebuild.
3903 The signatures, however, can be used to generate
3904 <filename>PR</filename> values.
3905 </para>
3906
3907 <para>
3908 The PR Service works with both
3909 <filename>OEBasic</filename> and
3910 <filename>OEBasicHash</filename> generators.
3911 The value of <filename>PR</filename> bumps when the
3912 checksum changes and the different generator mechanisms
3913 change signatures under different circumstances.
3914 </para>
3915
3916 <para>
3917 As implemented, the build system includes values from
3918 the PR Service into the <filename>PR</filename> field as
3919 an addition using the form "<filename>.x</filename>" so
3920 <filename>r0</filename> becomes <filename>r0.1</filename>,
3921 <filename>r0.2</filename> and so forth.
3922 This scheme allows existing <filename>PR</filename> values
3923 to be used for whatever reasons, which include manual
3924 <filename>PR</filename> bumps should it be necessary.
3925 </para>
3926
3927 <para>
3928 By default, the PR Service is not enabled or running.
3929 Thus, the packages generated are just "self consistent".
3930 The build system adds and removes packages and
3931 there are no guarantees about upgrade paths but images
3932 will be consistent and correct with the latest changes.
3933 </para>
3934
3935 <para>
3936 The simplest form for a PR Service is for it to exist
3937 for a single host development system that builds the
3938 package feed (building system).
3939 For this scenario, you can enable the PR Service by adding
3940 the following to your <filename>local.conf</filename>
3941 file in the
3942 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
3943 <literallayout class='monospaced'>
3944 PRSERV_HOST = "localhost:0"
3945 </literallayout>
3946 Once the service is started, packages will automatically
3947 get increasing <filename>PR</filename> values and
3948 BitBake will take care of starting and stopping the server.
3949 </para>
3950
3951 <para>
3952 If you have a more complex setup where multiple host
3953 development systems work against a common, shared package
3954 feed, you have a single PR Service running and it is
3955 connected to each building system.
3956 For this scenario, you need to start the PR Service using
3957 the <filename>bitbake-prserv</filename> command:
3958 <literallayout class='monospaced'>
3959 bitbake-prserv &dash;&dash;host &lt;ip&gt; &dash;&dash;port &lt;port&gt; &dash;&dash;start
3960 </literallayout>
3961 In addition to hand-starting the service, you need to
3962 update the <filename>local.conf</filename> file of each
3963 building system as described earlier so each system
3964 points to the server and port.
3965 </para>
3966
3967 <para>
3968 It is also recommended you use Build History, which adds
3969 some sanity checks to package versions, in conjunction with
3970 the server that is running the PR Service.
3971 To enable build history, add the following to each building
3972 system's <filename>local.conf</filename> file:
3973 <literallayout class='monospaced'>
3974 # It is recommended to activate "buildhistory" for testing the PR service
3975 INHERIT += "buildhistory"
3976 BUILDHISTORY_COMMIT = "1"
3977 </literallayout>
3978 For information on Build History, see the
3979 "<ulink url='&YOCTO_DOCS_REF_URL;#maintaining-build-output-quality'>Maintaining Build Output Quality</ulink>"
3980 section in the Yocto Project Reference Manual.
3981 </para>
3982
3983 <note>
3984 <para>The OpenEmbedded build system does not maintain
3985 <filename>PR</filename> information as part of the
3986 shared state (sstate) packages.
3987 If you maintain an sstate feed, its expected that either
3988 all your building systems that contribute to the sstate
3989 feed use a shared PR Service, or you do not run a PR
3990 Service on any of your building systems.
3991 Having some systems use a PR Service while others do
3992 not leads to obvious problems.</para>
3993 <para>For more information on shared state, see the
3994 "<ulink url='&YOCTO_DOCS_REF_URL;#shared-state-cache'>Shared State Cache</ulink>"
3995 section in the Yocto Project Reference Manual.</para>
3996 </note>
3997 </section>
3998
3999 <section id='manually-bumping-pr'>
4000 <title>Manually Bumping PR</title>
4001
4002 <para>
4003 The alternative to setting up a PR Service is to manually
4004 bump the
4005 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
4006 variable.
4007 </para>
4008
4009 <para>
4010 If a committed change results in changing the package output,
4011 then the value of the PR variable needs to be increased
4012 (or "bumped") as part of that commit.
4013 For new recipes you should add the <filename>PR</filename>
4014 variable and set its initial value equal to "r0", which is the default.
4015 Even though the default value is "r0", the practice of adding it to a new recipe makes
4016 it harder to forget to bump the variable when you make changes
4017 to the recipe in future.
4018 </para>
4019
4020 <para>
4021 If you are sharing a common <filename>.inc</filename> file with multiple recipes,
4022 you can also use the
4023 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-INC_PR'>INC_PR</ulink></filename>
4024 variable to ensure that
4025 the recipes sharing the <filename>.inc</filename> file are rebuilt when the
4026 <filename>.inc</filename> file itself is changed.
4027 The <filename>.inc</filename> file must set <filename>INC_PR</filename>
4028 (initially to "r0"), and all recipes referring to it should set <filename>PR</filename>
4029 to "$(INC_PR).0" initially, incrementing the last number when the recipe is changed.
4030 If the <filename>.inc</filename> file is changed then its
4031 <filename>INC_PR</filename> should be incremented.
4032 </para>
4033
4034 <para>
4035 When upgrading the version of a package, assuming the
4036 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'>PV</ulink></filename>
4037 changes, the <filename>PR</filename> variable should be
4038 reset to "r0" (or "$(INC_PR).0" if you are using
4039 <filename>INC_PR</filename>).
4040 </para>
4041
4042 <para>
4043 Usually, version increases occur only to packages.
4044 However, if for some reason <filename>PV</filename> changes but does not
4045 increase, you can increase the
4046 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PE'>PE</ulink></filename>
4047 variable (Package Epoch).
4048 The <filename>PE</filename> variable defaults to "0".
4049 </para>
4050
4051 <para>
4052 Version numbering strives to follow the
4053 <ulink url='http://www.debian.org/doc/debian-policy/ch-controlfields.html'>
4054 Debian Version Field Policy Guidelines</ulink>.
4055 These guidelines define how versions are compared and what "increasing" a version means.
4056 </para>
4057 </section>
4058 </section>
4059
4060 <section id="usingpoky-configuring-DISTRO_PN_ALIAS">
4061 <title>Handling a Package Name Alias</title>
4062 <para>
4063 Sometimes a package name you are using might exist under an alias or as a similarly named
4064 package in a different distribution.
4065 The OpenEmbedded build system implements a <filename>distro_check</filename>
4066 task that automatically connects to major distributions
4067 and checks for these situations.
4068 If the package exists under a different name in a different distribution, you get a
4069 <filename>distro_check</filename> mismatch.
4070 You can resolve this problem by defining a per-distro recipe name alias using the
4071 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_PN_ALIAS'>DISTRO_PN_ALIAS</ulink></filename>
4072 variable.
4073 </para>
4074
4075 <para>
4076 Following is an example that shows how you specify the <filename>DISTRO_PN_ALIAS</filename>
4077 variable:
4078 <literallayout class='monospaced'>
4079 DISTRO_PN_ALIAS_pn-PACKAGENAME = "distro1=package_name_alias1 \
4080 distro2=package_name_alias2 \
4081 distro3=package_name_alias3 \
4082 ..."
4083 </literallayout>
4084 </para>
4085
4086 <para>
4087 If you have more than one distribution alias, separate them with a space.
4088 Note that the build system currently automatically checks the
4089 Fedora, OpenSUSE, Debian, Ubuntu,
4090 and Mandriva distributions for source package recipes without having to specify them
4091 using the <filename>DISTRO_PN_ALIAS</filename> variable.
4092 For example, the following command generates a report that lists the Linux distributions
4093 that include the sources for each of the recipes.
4094 <literallayout class='monospaced'>
4095 $ bitbake world -f -c distro_check
4096 </literallayout>
4097 The results are stored in the <filename>build/tmp/log/distro_check-${DATETIME}.results</filename>
4098 file found in the
4099 <link linkend='source-directory'>Source Directory</link>.
4100 </para>
4101 </section>
4102
4103 <section id='handling-optional-module-packaging'>
4104 <title>Handling Optional Module Packaging</title>
4105
4106 <para>
4107 Many pieces of software split functionality into optional
4108 modules (or plug-ins) and the plug-ins that are built
4109 might depend on configuration options.
4110 To avoid having to duplicate the logic that determines what
4111 modules are available in your recipe or to avoid having
4112 to package each module by hand, the OpenEmbedded build system
4113 provides functionality to handle module packaging dynamically.
4114 </para>
4115
4116 <para>
4117 To handle optional module packaging, you need to do two things:
4118 <itemizedlist>
4119 <listitem><para>Ensure the module packaging is actually
4120 done</para></listitem>
4121 <listitem><para>Ensure that any dependencies on optional
4122 modules from other recipes are satisfied by your recipe
4123 </para></listitem>
4124 </itemizedlist>
4125 </para>
4126
4127 <section id='making-sure-the-packaging-is-done'>
4128 <title>Making Sure the Packaging is Done</title>
4129
4130 <para>
4131 To ensure the module packaging actually gets done, you use
4132 the <filename>do_split_packages</filename> function within
4133 the <filename>populate_packages</filename> Python function
4134 in your recipe.
4135 The <filename>do_split_packages</filename> function
4136 searches for a pattern of files or directories under a
4137 specified path and creates a package for each one it finds
4138 by appending to the
4139 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES'><filename>PACKAGES</filename></ulink>
4140 variable and setting the appropriate values for
4141 <filename>FILES_packagename</filename>,
4142 <filename>RDEPENDS_packagename</filename>,
4143 <filename>DESCRIPTION_packagename</filename>, and so forth.
4144 Here is an example from the <filename>lighttpd</filename>
4145 recipe:
4146 <literallayout class='monospaced'>
4147 python populate_packages_prepend () {
4148 lighttpd_libdir = d.expand('${libdir}')
4149 do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$',
4150 'lighttpd-module-%s', 'Lighttpd module for %s',
4151 extra_depends='')
4152 }
4153 </literallayout>
4154 The previous example specifies a number of things in the
4155 call to <filename>do_split_packages</filename>.
4156 <itemizedlist>
4157 <listitem><para>A directory within the files installed
4158 by your recipe through <filename>do_install</filename>
4159 in which to search.</para></listitem>
4160 <listitem><para>A regular expression to match module
4161 files in that directory.
4162 In the example, note the parentheses () that mark
4163 the part of the expression from which the module
4164 name should be derived.</para></listitem>
4165 <listitem><para>A pattern to use for the package names.
4166 </para></listitem>
4167 <listitem><para>A description for each package.
4168 </para></listitem>
4169 <listitem><para>An empty string for
4170 <filename>extra_depends</filename>, which disables
4171 the default dependency on the main
4172 <filename>lighttpd</filename> package.
4173 Thus, if a file in <filename>${libdir}</filename>
4174 called <filename>mod_alias.so</filename> is found,
4175 a package called <filename>lighttpd-module-alias</filename>
4176 is created for it and the
4177 <ulink url='&YOCTO_DOCS_REF_URL;#var-DESCRIPTION'><filename>DESCRIPTION</filename></ulink>
4178 is set to "Lighttpd module for alias".</para></listitem>
4179 </itemizedlist>
4180 </para>
4181
4182 <para>
4183 Often, packaging modules is as simple as the previous
4184 example.
4185 However, more advanced options exist that you can use
4186 within <filename>do_split_packages</filename> to modify its
4187 behavior.
4188 And, if you need to, you can add more logic by specifying
4189 a hook function that is called for each package.
4190 It is also perfectly acceptable to call
4191 <filename>do_split_packages</filename> multiple times if
4192 you have more than one set of modules to package.
4193 </para>
4194
4195 <para>
4196 For more examples that show how to use
4197 <filename>do_split_packages</filename>, see the
4198 <filename>connman.inc</filename> file in the
4199 <filename>meta/recipes-connectivity/connman/</filename>
4200 directory of the <filename>poky</filename>
4201 <link linkend='yocto-project-repositories'>source repository</link>.
4202 You can also find examples in
4203 <filename>meta/classes/kernel.bbclass</filename>.
4204 </para>
4205
4206 <para>
4207 Following is a reference that shows
4208 <filename>do_split_packages</filename> mandatory and
4209 optional arguments:
4210 <literallayout class='monospaced'>
4211 Mandatory arguments
4212
4213 root
4214 The path in which to search
4215 file_regex
4216 Regular expression to match searched files.
4217 Use parentheses () to mark the part of this
4218 expression that should be used to derive the
4219 module name (to be substituted where %s is
4220 used in other function arguments as noted below)
4221 output_pattern
4222 Pattern to use for the package names. Must
4223 include %s.
4224 description
4225 Description to set for each package. Must
4226 include %s.
4227
4228 Optional arguments
4229
4230 postinst
4231 Postinstall script to use for all packages
4232 (as a string)
4233 recursive
4234 True to perform a recursive search - default
4235 False
4236 hook
4237 A hook function to be called for every match.
4238 The function will be called with the following
4239 arguments (in the order listed):
4240
4241 f
4242 Full path to the file/directory match
4243 pkg
4244 The package name
4245 file_regex
4246 As above
4247 output_pattern
4248 As above
4249 modulename
4250 The module name derived using file_regex
4251
4252 extra_depends
4253 Extra runtime dependencies (RDEPENDS) to be
4254 set for all packages. The default value of None
4255 causes a dependency on the main package
4256 (${PN}) - if you do not want this, pass empty
4257 string '' for this parameter.
4258 aux_files_pattern
4259 Extra item(s) to be added to FILES for each
4260 package. Can be a single string item or a list
4261 of strings for multiple items. Must include %s.
4262 postrm
4263 postrm script to use for all packages (as a
4264 string)
4265 allow_dirs
4266 True to allow directories to be matched -
4267 default False
4268 prepend
4269 If True, prepend created packages to PACKAGES
4270 instead of the default False which appends them
4271 match_path
4272 match file_regex on the whole relative path to
4273 the root rather than just the file name
4274 aux_files_pattern_verbatim
4275 Extra item(s) to be added to FILES for each
4276 package, using the actual derived module name
4277 rather than converting it to something legal
4278 for a package name. Can be a single string item
4279 or a list of strings for multiple items. Must
4280 include %s.
4281 allow_links
4282 True to allow symlinks to be matched - default
4283 False
4284 </literallayout>
4285 </para>
4286 </section>
4287
4288 <section id='satisfying-dependencies'>
4289 <title>Satisfying Dependencies</title>
4290
4291 <para>
4292 The second part for handling optional module packaging
4293 is to ensure that any dependencies on optional modules
4294 from other recipes are satisfied by your recipe.
4295 You can be sure these dependencies are satisfied by
4296 using the
4297 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGES_DYNAMIC'><filename>PACKAGES_DYNAMIC</filename></ulink> variable.
4298 Here is an example that continues with the
4299 <filename>lighttpd</filename> recipe shown earlier:
4300 <literallayout class='monospaced'>
4301 PACKAGES_DYNAMIC = "lighttpd-module-.*"
4302 </literallayout>
4303 The name specified in the regular expression can of
4304 course be anything.
4305 In this example, it is <filename>lighttpd-module-</filename>
4306 and is specified as the prefix to ensure that any
4307 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>
4308 and <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>
4309 on a package name starting with the prefix are satisfied
4310 during build time.
4311 If you are using <filename>do_split_packages</filename>
4312 as described in the previous section, the value you put in
4313 <filename>PACKAGES_DYNAMIC</filename> should correspond to
4314 the name pattern specified in the call to
4315 <filename>do_split_packages</filename>.
4316 </para>
4317 </section>
4318 </section>
4319
4320 <section id='using-runtime-package-management'>
4321 <title>Using Runtime Package Management</title>
4322
4323 <para>
4324 During a build, BitBake always transforms a recipe into one or
4325 more packages.
4326 For example, BitBake takes the <filename>bash</filename> recipe
4327 and currently produces the <filename>bash-dbg</filename>,
4328 <filename>bash-staticdev</filename>,
4329 <filename>bash-dev</filename>, <filename>bash-doc</filename>,
4330 <filename>bash-locale</filename>, and
4331 <filename>bash</filename> packages.
4332 Not all generated packages are included in an image.
4333 </para>
4334
4335 <para>
4336 In several situations, you might need to update, add, remove,
4337 or query the packages on a target device at runtime
4338 (i.e. without having to generate a new image).
4339 Examples of such situations include:
4340 <itemizedlist>
4341 <listitem><para>
4342 You want to provide in-the-field updates to deployed
4343 devices (e.g. security updates).
4344 </para></listitem>
4345 <listitem><para>
4346 You want to have a fast turn-around development cycle
4347 for one or more applications that run on your device.
4348 </para></listitem>
4349 <listitem><para>
4350 You want to temporarily install the "debug" packages
4351 of various applications on your device so that
4352 debugging can be greatly improved by allowing
4353 access to symbols and source debugging.
4354 </para></listitem>
4355 <listitem><para>
4356 You want to deploy a more minimal package selection of
4357 your device but allow in-the-field updates to add a
4358 larger selection for customization.
4359 </para></listitem>
4360 </itemizedlist>
4361 </para>
4362
4363 <para>
4364 In all these situations, you have something similar to a more
4365 traditional Linux distribution in that in-field devices
4366 are able to receive pre-compiled packages from a server for
4367 installation or update.
4368 Being able to install these packages on a running,
4369 in-field device is what is termed "runtime package
4370 management".
4371 </para>
4372
4373 <para>
4374 In order to use runtime package management, you
4375 need a host/server machine that serves up the pre-compiled
4376 packages plus the required metadata.
4377 You also need package manipulation tools on the target.
4378 The build machine is a likely candidate to act as the server.
4379 However, that machine does not necessarily have to be the
4380 package server.
4381 The build machine could push its artifacts to another machine
4382 that acts as the server (e.g. Internet-facing).
4383 </para>
4384
4385 <para>
4386 A simple build that targets just one device produces
4387 more than one package database.
4388 In other words, the packages produced by a build are separated
4389 out into a couple of different package groupings based on
4390 criteria such as the target's CPU architecture, the target
4391 board, or the C library used on the target.
4392 For example, a build targeting the <filename>qemuarm</filename>
4393 device produces the following three package databases:
4394 <filename>all</filename>, <filename>armv5te</filename>, and
4395 <filename>qemuarm</filename>.
4396 If you wanted your <filename>qemuarm</filename> device to be
4397 aware of all the packages that were available to it,
4398 you would need to point it to each of these databases
4399 individually.
4400 In a similar way, a traditional Linux distribution usually is
4401 configured to be aware of a number of software repositories
4402 from which it retrieves packages.
4403 </para>
4404
4405 <para>
4406 Using runtime package management is completely optional and
4407 not required for a successful build or deployment in any
4408 way.
4409 But if you want to make use of runtime package management,
4410 you need to do a couple things above and beyond the basics.
4411 The remainder of this section describes what you need to do.
4412 </para>
4413
4414 <section id='runtime-package-management-build'>
4415 <title>Build Considerations</title>
4416
4417 <para>
4418 This section describes build considerations that you need
4419 to be aware of in order to provide support for runtime
4420 package management.
4421 </para>
4422
4423 <para>
4424 When BitBake generates packages it needs to know
4425 what format(s) to use.
4426 In your configuration, you use the
4427 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink>
4428 variable to specify the format.
4429 <note>
4430 You can choose to have more than one format but you must
4431 provide at least one.
4432 </note>
4433 </para>
4434
4435 <para>
4436 If you would like your image to start off with a basic
4437 package database of the packages in your current build
4438 as well as have the relevant tools available on the
4439 target for runtime package management, you can include
4440 "package-management" in the
4441 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
4442 variable.
4443 Including "package-management" in this
4444 configuration variable ensures that when the image
4445 is assembled for your target, the image includes
4446 the currently-known package databases as well as
4447 the target-specific tools required for runtime
4448 package management to be performed on the target.
4449 However, this is not strictly necessary.
4450 You could start your image off without any databases
4451 but only include the required on-target package
4452 tool(s).
4453 As an example, you could include "opkg" in your
4454 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></ulink>
4455 variable if you are using the IPK package format.
4456 You can then initialize your target's package database(s)
4457 later once your image is up and running.
4458 </para>
4459
4460 <para>
4461 Whenever you perform any sort of build step that can
4462 potentially generate a package or modify an existing
4463 package, it is always a good idea to re-generate the
4464 package index with:
4465 <literallayout class='monospaced'>
4466 $ bitbake package-index
4467 </literallayout>
4468 Realize that it is not sufficient to simply do the
4469 following:
4470 <literallayout class='monospaced'>
4471 $ bitbake &lt;some-package&gt; package-index
4472 </literallayout>
4473 This is because BitBake does not properly schedule the
4474 <filename>package-index</filename> target fully after any
4475 other target has completed.
4476 Thus, be sure to run the package update step separately.
4477 </para>
4478
4479 <para>
4480 As described below in the
4481 "<link linkend='runtime-package-management-target-ipk'>Using IPK</link>"
4482 section, if you are using IPK as your package format, you
4483 can make use of the
4484 <filename>distro-feed-configs</filename> recipe provided
4485 by <filename>meta-oe</filename> in order to configure your
4486 target to use your IPK databases.
4487 </para>
4488
4489 <para>
4490 When your build is complete, your packages reside in the
4491 <filename>${TMPDIR}/deploy/&lt;package-format&gt;</filename>
4492 directory.
4493 For example, if <filename>${TMPDIR}</filename>
4494 is <filename>tmp</filename> and your selected package type
4495 is IPK, then your IPK packages are available in
4496 <filename>tmp/deploy/ipk</filename>.
4497 </para>
4498 </section>
4499
4500 <section id='runtime-package-management-server'>
4501 <title>Host or Server Machine Setup</title>
4502
4503 <para>
4504 Typically, packages are served from a server using
4505 HTTP.
4506 However, other protocols are possible.
4507 If you want to use HTTP, then setup and configure a
4508 web server, such as Apache 2 or lighttpd, on the machine
4509 serving the packages.
4510 </para>
4511
4512 <para>
4513 As previously mentioned, the build machine can act as the
4514 package server.
4515 In the following sections that describe server machine
4516 setups, the build machine is assumed to also be the server.
4517 </para>
4518
4519 <section id='package-server-apache'>
4520 <title>Serving Packages via Apache 2</title>
4521
4522 <para>
4523 This example assumes you are using the Apache 2
4524 server:
4525 <orderedlist>
4526 <listitem><para>
4527 Add the directory to your Apache
4528 configuration, which you can find at
4529 <filename>/etc/httpd/conf/httpd.conf</filename>.
4530 Use commands similar to these on the
4531 development system.
4532 These example commands assume a top-level
4533 <link linkend='source-directory'>Source Directory</link>
4534 named <filename>poky</filename> in your home
4535 directory.
4536 The example also assumes an RPM package type.
4537 If you are using a different package type, such
4538 as IPK, use "ipk" in the pathnames:
4539 <literallayout class='monospaced'>
4540 &lt;VirtualHost *:80&gt;
4541 ....
4542 Alias /rpm ~/poky/build/tmp/deploy/rpm
4543 &lt;Directory "~/poky/build/tmp/deploy/rpm"&gt;
4544 Options +Indexes
4545 &lt;/Directory&gt;
4546 &lt;/VirtualHost&gt;
4547 </literallayout></para></listitem>
4548 <listitem><para>
4549 Reload the Apache configuration as described
4550 in this step.
4551 For all commands, be sure you have root
4552 privileges.
4553 </para>
4554
4555 <para>
4556 If your development system is using Fedora or
4557 CentOS, use the following:
4558 <literallayout class='monospaced'>
4559 # service httpd reload
4560 </literallayout>
4561 For Ubuntu and Debian, use the following:
4562 <literallayout class='monospaced'>
4563 # /etc/init.d/apache2 reload
4564 </literallayout>
4565 For OpenSUSE, use the following:
4566 <literallayout class='monospaced'>
4567 # /etc/init.d/apache2 reload
4568 </literallayout></para></listitem>
4569 <listitem><para>
4570 If you are using Security-Enhanced Linux
4571 (SELinux), you need to label the files as
4572 being accessible through Apache.
4573 Use the following command from the development
4574 host.
4575 This example assumes RPM package types:
4576 <literallayout class='monospaced'>
4577 # chcon -R -h -t httpd_sys_content_t tmp/deploy/rpm
4578 </literallayout></para></listitem>
4579 </orderedlist>
4580 </para>
4581 </section>
4582
4583 <section id='package-server-lighttpd'>
4584 <title>Serving Packages via lighttpd</title>
4585
4586 <para>
4587 If you are using lighttpd, all you need
4588 to do is to provide a link from your
4589 <filename>${TMPDIR}/deploy/&lt;package-format&gt;</filename>
4590 directory to lighttpd's document-root.
4591 You can determine the specifics of your lighttpd
4592 installation by looking through its configuration file,
4593 which is usually found at:
4594 <filename>/etc/lighttpd/lighttpd.conf</filename>.
4595 </para>
4596
4597 <para>
4598 For example, if you are using IPK, lighttpd's
4599 document-root is set to
4600 <filename>/var/www/lighttpd</filename>, and you had
4601 packages for a target named "BOARD",
4602 then you might create a link from your build location
4603 to lighttpd's document-root as follows:
4604 <literallayout class='monospaced'>
4605 # ln -s $(PWD)/tmp/deploy/ipk /var/www/lighttpd/BOARD-dir
4606 </literallayout>
4607 </para>
4608
4609 <para>
4610 At this point, you need to start the lighttpd server.
4611 The method used to start the server varies by
4612 distribution.
4613 However, one basic method that starts it by hand is:
4614 <literallayout class='monospaced'>
4615 # lighttpd -f /etc/lighttpd/lighttpd.conf
4616 </literallayout>
4617 </para>
4618 </section>
4619 </section>
4620
4621 <section id='runtime-package-management-target'>
4622 <title>Target Setup</title>
4623
4624 <para>
4625 Setting up the target differs depending on the
4626 package management system.
4627 This section provides information for RPM and IPK.
4628 </para>
4629
4630 <section id='runtime-package-management-target-rpm'>
4631 <title>Using RPM</title>
4632
4633 <para>
4634 The application for performing runtime package
4635 management of RPM packages on the target is called
4636 <filename>smart</filename>.
4637 </para>
4638
4639 <para>
4640 On the target machine, you need to inform
4641 <filename>smart</filename> of every package database
4642 you want to use.
4643 As an example, suppose your target device can use the
4644 following three package databases from a server named
4645 <filename>server.name</filename>:
4646 <filename>all</filename>, <filename>i586</filename>,
4647 and <filename>qemux86</filename>.
4648 Given this example, issue the following commands on the
4649 target:
4650 <literallayout class='monospaced'>
4651 # smart channel --add all type=rpm-md baseurl=http://server.name/rpm/all
4652 # smart channel --add i585 type=rpm-md baseurl=http://server.name/rpm/i586
4653 # smart channel --add qemux86 type=rpm-md baseurl=http://server.name/rpm/qemux86
4654 </literallayout>
4655 Also from the target machine, fetch the repository
4656 information using this command:
4657 <literallayout class='monospaced'>
4658 # smart update
4659 </literallayout>
4660 You can now use the <filename>smart query</filename>
4661 and <filename>smart install</filename> commands to
4662 find and install packages from the repositories.
4663 </para>
4664 </section>
4665
4666 <section id='runtime-package-management-target-ipk'>
4667 <title>Using IPK</title>
4668
4669 <para>
4670 The application for performing runtime package
4671 management of IPK packages on the target is called
4672 <filename>opkg</filename>.
4673 </para>
4674
4675 <para>
4676 In order to inform <filename>opkg</filename> of the
4677 package databases you want to use, simply create one
4678 or more <filename>*.conf</filename> files in the
4679 <filename>/etc/opkg</filename> directory on the target.
4680 The <filename>opkg</filename> application uses them
4681 to find its available package databases.
4682 As an example, suppose you configured your HTTP server
4683 on your machine named
4684 <filename>www.mysite.com</filename> to serve files
4685 from a <filename>BOARD-dir</filename> directory under
4686 its document-root.
4687 In this case, you might create a configuration
4688 file on the target called
4689 <filename>/etc/opkg/base-feeds.conf</filename> that
4690 contains:
4691 <literallayout class='monospaced'>
4692 src/gz all http://www.mysite.com/BOARD-dir/all
4693 src/gz armv7a http://www.mysite.com/BOARD-dir/armv7a
4694 src/gz beagleboard http://www.mysite.com/BOARD-dir/beagleboard
4695 </literallayout>
4696 </para>
4697
4698 <para>
4699 As a way of making it easier to generate and make
4700 these IPK configuration files available on your
4701 target, simply define
4702 <ulink url='&YOCTO_DOCS_REF_URL;#var-FEED_DEPLOYDIR_BASE_URI'><filename>FEED_DEPLOYDIR_BASE_URI</filename></ulink>
4703 to point to your server and the location within the
4704 document-root which contains the databases.
4705 For example: if you are serving your packages over
4706 HTTP, your server's IP address is 192.168.7.1, and
4707 your databases are located in a directory called
4708 <filename>BOARD-dir</filename> underneath your HTTP
4709 server's document-root, you need to set
4710 <filename>FEED_DEPLOYDIR_BASE_URI</filename> to
4711 <filename>http://192.168.7.1/BOARD-dir</filename> and
4712 a set of configuration files will be generated for you
4713 in your target to work with this feed.
4714 </para>
4715
4716 <para>
4717 On the target machine, fetch (or refresh) the
4718 repository information using this command:
4719 <literallayout class='monospaced'>
4720 # opkg update
4721 </literallayout>
4722 You can now use the <filename>opkg list</filename> and
4723 <filename>opkg install</filename> commands to find and
4724 install packages from the repositories.
4725 </para>
4726 </section>
4727 </section>
4728 </section>
4729
4730 <section id='testing-packages-with-ptest'>
4731 <title>Testing Packages With ptest</title>
4732
4733 <para>
4734 A Package Test (ptest) runs tests against packages built
4735 by the OpenEmbedded build system on the target machine.
4736 A ptest contains at least two items: the actual test, and
4737 a shell script (<filename>run-ptest</filename>) that starts
4738 the test.
4739 The shell script that starts the test must not contain
4740 the actual test, the script only starts it.
4741 On the other hand, the test can be anything from a simple
4742 shell script that runs a binary and checks the output to
4743 an elaborate system of test binaries and data files.
4744 </para>
4745
4746 <para>
4747 The test generates output in the format used by
4748 Automake:
4749 <literallayout class='monospaced'>
4750 &lt;result&gt;: &lt;testname&gt;
4751 </literallayout>
4752 where the result can be <filename>PASS</filename>,
4753 <filename>FAIL</filename>, or <filename>SKIP</filename>,
4754 and the testname can be any identifying string.
4755 </para>
4756
4757 <note>
4758 With this release of the Yocto Project, three recipes exist
4759 that are "ptest-enabled": <filename>bash</filename>,
4760 <filename>glib-2.0</filename>, and
4761 <filename>dbus</filename>.
4762 These three recipes are Autotool-enabled.
4763 </note>
4764
4765 <section id='adding-ptest-to-your-build'>
4766 <title>Adding ptest to Your Build</title>
4767
4768 <para>
4769 To add package testing to your build, add the
4770 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>
4771 and <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>
4772 variables to your <filename>local.conf</filename> file,
4773 which is found in the
4774 <link linkend='build-directory'>Build Directory</link>:
4775 <literallayout class='monospaced'>
4776 DISTRO_FEATURES_append = " ptest"
4777 EXTRA_IMAGE_FEATURES += "ptest-pkgs"
4778 </literallayout>
4779 Once your build is complete, the ptest files are installed
4780 into the <filename>/usr/lib/&lt;package&gt;/ptest</filename>
4781 directory within the image, where
4782 <filename>&lt;package&gt;</filename> is the name of the
4783 package.
4784 </para>
4785 </section>
4786
4787 <section id='running-ptest'>
4788 <title>Running ptest</title>
4789
4790 <para>
4791 The <filename>ptest-runner</filename> package installs a
4792 shell script that loops through all installed ptest test
4793 suites and runs them in sequence.
4794 Consequently, you might want to add this package to
4795 your image.
4796 </para>
4797 </section>
4798
4799 <section id='getting-your-package-ready'>
4800 <title>Getting Your Package Ready</title>
4801
4802 <para>
4803 In order to enable a recipe to run installed ptests
4804 on target hardware,
4805 you need to prepare the recipes that build the packages
4806 you want to test.
4807 Here is what you have to do for each recipe:
4808 <itemizedlist>
4809 <listitem><para><emphasis>Be sure the recipe
4810 inherits ptest:</emphasis>
4811 Include the following line in each recipe:
4812 <literallayout class='monospaced'>
4813 inherit ptest
4814 </literallayout>
4815 </para></listitem>
4816 <listitem><para><emphasis>Create <filename>run-ptest</filename>:</emphasis>
4817 This script starts your test.
4818 Locate the script where you will refer to it
4819 using
4820 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>.
4821 Here is an example that starts a test for
4822 <filename>dbus</filename>:
4823 <literallayout class='monospaced'>
4824 #!/bin/sh
4825 cd test
4826 make -k runtest-TESTS
4827 </literallayout>
4828 </para></listitem>
4829 <listitem><para><emphasis>Ensure dependencies are
4830 met:</emphasis>
4831 If the test adds build or runtime dependencies
4832 that normally do not exist for the package
4833 (such as requiring "make" to run the test suite),
4834 use the
4835 <ulink url='&YOCTO_DOCS_REF_URL;#var-DEPENDS'><filename>DEPENDS</filename></ulink>
4836 and
4837 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>
4838 variables in your recipe in order for the package
4839 to meet the dependencies.
4840 Here is an example where the package has a runtime
4841 dependency on "make":
4842 <literallayout class='monospaced'>
4843 RDEPENDS_${PN}-ptest += "make"
4844 </literallayout>
4845 </para></listitem>
4846 <listitem><para><emphasis>Add a function to build the
4847 test suite:</emphasis>
4848 Not many packages support cross-compilation of
4849 their test suites.
4850 Consequently, you usually need to add a
4851 cross-compilation function to the package.
4852 </para>
4853 <para>Many packages based on Automake compile and
4854 run the test suite by using a single command
4855 such as <filename>make check</filename>.
4856 However, the native <filename>make check</filename>
4857 builds and runs on the same computer, while
4858 cross-compiling requires that the package is built
4859 on the host but executed on the target.
4860 The built version of Automake that ships with the
4861 Yocto Project includes a patch that separates
4862 building and execution.
4863 Consequently, packages that use the unaltered,
4864 patched version of <filename>make check</filename>
4865 automatically cross-compiles.</para>
4866 <para>However, you still must add a
4867 <filename>do_compile_ptest</filename> function to
4868 build the test suite.
4869 Add a function similar to the following to your
4870 recipe:
4871 <literallayout class='monospaced'>
4872 do_compile_ptest() {
4873 oe_runmake buildtest-TESTS
4874 }
4875 </literallayout>
4876 </para></listitem>
4877 <listitem><para><emphasis>Ensure special configurations
4878 are set:</emphasis>
4879 If the package requires special configurations
4880 prior to compiling the test code, you must
4881 insert a <filename>do_configure_ptest</filename>
4882 function into the recipe.
4883 </para></listitem>
4884 <listitem><para><emphasis>Install the test
4885 suite:</emphasis>
4886 The <filename>ptest.bbclass</filename> class
4887 automatically copies the file
4888 <filename>run-ptest</filename> to the target and
4889 then runs make <filename>install-ptest</filename>
4890 to run the tests.
4891 If this is not enough, you need to create a
4892 <filename>do_install_ptest</filename> function and
4893 make sure it gets called after the
4894 "make install-ptest" completes.
4895 </para></listitem>
4896 </itemizedlist>
4897 </para>
4898 </section>
4899 </section>
4900 </section>
4901
4902 <section id="building-software-from-an-external-source">
4903 <title>Building Software from an External Source</title>
4904
4905 <para>
4906 By default, the OpenEmbedded build system uses the
4907 <link linkend='build-directory'>Build Directory</link> to
4908 build source code.
4909 The build process involves fetching the source files, unpacking
4910 them, and then patching them if necessary before the build takes
4911 place.
4912 </para>
4913
4914 <para>
4915 Situations exist where you might want to build software from source
4916 files that are external to and thus outside of the
4917 OpenEmbedded build system.
4918 For example, suppose you have a project that includes a new BSP with
4919 a heavily customized kernel.
4920 And, you want to minimize exposing the build system to the
4921 development team so that they can focus on their project and
4922 maintain everyone's workflow as much as possible.
4923 In this case, you want a kernel source directory on the development
4924 machine where the development occurs.
4925 You want the recipe's
4926 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
4927 variable to point to the external directory and use it as is, not
4928 copy it.
4929 </para>
4930
4931 <para>
4932 To build from software that comes from an external source, all you
4933 need to do is inherit
4934 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></ulink>
4935 and then set the
4936 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>
4937 variable to point to your external source code.
4938 Here are the statements to put in your
4939 <filename>local.conf</filename> file:
4940 <literallayout class='monospaced'>
4941 INHERIT += "externalsrc"
4942 EXTERNALSRC_pn-myrecipe = "/some/path/to/your/source/tree"
4943 </literallayout>
4944 </para>
4945
4946 <para>
4947 By default, <filename>externalsrc.bbclass</filename> builds
4948 the source code in a directory separate from the external source
4949 directory as specified by
4950 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC'><filename>EXTERNALSRC</filename></ulink>.
4951 If you need to have the source built in the same directory in
4952 which it resides, or some other nominated directory, you can set
4953 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></ulink>
4954 to point to that directory:
4955 <literallayout class='monospaced'>
4956 EXTERNALSRC_BUILD_pn-myrecipe = "/path/to/my/source/tree"
4957 </literallayout>
4958 </para>
4959 </section>
4960
4961 <section id="selecting-an-initialization-manager">
4962 <title>Selecting an Initialization Manager</title>
4963
4964 <para>
4965 By default, the Yocto Project uses
4966 <filename>SysVinit</filename> as the initialization manager.
4967 However, support also exists for <filename>systemd</filename>,
4968 which is a full replacement for <filename>init</filename> with
4969 parallel starting of services, reduced shell overhead and other
4970 features that are used by many distributions.
4971 </para>
4972
4973 <para>
4974 If you want to use <filename>sysvinit</filename>, you do
4975 not have to do anything.
4976 But, if you want to use <filename>systemd</filename>, you must
4977 take some steps as described in the following sections.
4978 </para>
4979
4980<!--
4981 <note>
4982 It is recommended that you create your own distribution configuration
4983 file to hold these settings instead of using your
4984 <filename>local.conf</filename> file.
4985 For information on creating your own distribution, see the
4986 "<link linkend='creating-your-own-distribution'>Creating Your Own Distribution</link>"
4987 section.
4988 </note>
4989-->
4990
4991 <section id='using-systemd-exclusively'>
4992 <title>Using systemd Exclusively</title>
4993
4994 <para>
4995 Set the following variables in your distribution configuration
4996 file as follows:
4997 <literallayout class='monospaced'>
4998 DISTRO_FEATURES_append = " systemd"
4999 VIRTUAL-RUNTIME_init_manager = "systemd"
5000 </literallayout>
5001 You can also prevent the <filename>sysvinit</filename>
5002 distribution feature from
5003 being automatically enabled as follows:
5004 <literallayout class='monospaced'>
5005 DISTRO_FEATURES_BACKFILL_CONSIDERED = "sysvinit"
5006 </literallayout>
5007 Doing so removes any redundant <filename>sysvinit</filename>
5008 scripts.
5009 </para>
5010
5011 <para>
5012 For information on the backfill variable, see
5013 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></ulink>
5014 in the Yocto Project Reference Manual.
5015 </para>
5016 </section>
5017
5018 <section id='using-systemd-for-the-main-image-and-using-sysvinit-for-the-rescue-image'>
5019 <title>Using systemd for the Main Image and Using SysVinit for the Rescue Image</title>
5020
5021 <para>
5022 Set the following variables in your distribution configuration
5023 file as follows:
5024 <literallayout class='monospaced'>
5025 DISTRO_FEATURES_append = " systemd"
5026 VIRTUAL-RUNTIME_init_manager = "systemd"
5027 </literallayout>
5028 Doing so causes your main image to use the
5029 <filename>packagegroup-core-boot.bb</filename> recipe and
5030 <filename>systemd</filename>.
5031 The rescue/minimal image cannot use this package group.
5032 However, it can install <filename>sysvinit</filename>
5033 and the appropriate packages will have support for both
5034 <filename>systemd</filename> and <filename>sysvinit</filename>.
5035 </para>
5036 </section>
5037 </section>
5038
5039 <section id='excluding-recipes-from-the-build'>
5040 <title>Excluding Recipes From the Build</title>
5041
5042 <para>
5043 You might find that there are groups of recipes or append files
5044 that you want to filter out of the build process.
5045 Usually, this is not necessary.
5046 However, on rare occasions where you might want to use a
5047 layer but exclude parts that are causing problems, such
5048 as introducing a different version of a recipe, you can
5049 use
5050 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBMASK'><filename>BBMASK</filename></ulink>
5051 to exclude the recipe.
5052 </para>
5053
5054 <para>
5055 It is possible to filter or mask out <filename>.bb</filename> and
5056 <filename>.bbappend</filename> files.
5057 You can do this by providing an expression with the
5058 <filename>BBMASK</filename> variable.
5059 Here is an example:
5060 <literallayout class='monospaced'>
5061 BBMASK = "/meta-mymachine/recipes-maybe/"
5062 </literallayout>
5063 Here, all <filename>.bb</filename> and
5064 <filename>.bbappend</filename> files in the directory that match
5065 the expression are ignored during the build process.
5066 </para>
5067
5068 <note>
5069 The value you provide is passed to Python's regular expression
5070 compiler.
5071 The expression is compared against the full paths to the files.
5072 For complete syntax information, see Python's documentation at
5073 <ulink url='http://docs.python.org/release/2.3/lib/re-syntax.html'></ulink>.
5074 </note>
5075 </section>
5076
5077 <section id="platdev-appdev-srcrev">
5078 <title>Using an External SCM</title>
5079
5080 <para>
5081 If you're working on a recipe that pulls from an external Source Code Manager (SCM), it
5082 is possible to have the OpenEmbedded build system notice new recipe changes added to the
5083 SCM and then build the resulting package that depends on the new recipes by using the latest
5084 versions.
5085 This only works for SCMs from which it is possible to get a sensible revision number for changes.
5086 Currently, you can do this with Apache Subversion (SVN), Git, and Bazaar (BZR) repositories.
5087 </para>
5088
5089 <para>
5090 To enable this behavior, simply add the following to the <filename>local.conf</filename>
5091 configuration file found in the
5092 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
5093 <literallayout class='monospaced'>
5094 SRCREV_pn-&lt;PN&gt; = "${AUTOREV}"
5095 </literallayout>
5096 where <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>
5097 is the name of the recipe for which you want to enable automatic source
5098 revision updating.
5099 </para>
5100 </section>
5101
5102 <section id='creating-a-read-only-root-filesystem'>
5103 <title>Creating a Read-Only Root Filesystem</title>
5104
5105 <para>
5106 Suppose, for security reasons, you need to disable
5107 your target device's root filesystem's write permissions
5108 (i.e. you need a read-only root filesystem).
5109 Or, perhaps you are running the device's operating system
5110 from a read-only storage device.
5111 For either case, you can customize your image for
5112 that behavior.
5113 </para>
5114
5115 <note>
5116 Supporting a read-only root filesystem requires that the system and
5117 applications do not try to write to the root filesystem.
5118 You must configure all parts of the target system to write
5119 elsewhere, or to gracefully fail in the event of failing to
5120 write to the root filesystem.
5121 </note>
5122
5123 <section id='creating-the-root-filesystem'>
5124 <title>Creating the Root Filesystem</title>
5125
5126 <para>
5127 To create the read-only root filesystem, simply add the
5128 <filename>read-only-rootfs</filename> feature to your image.
5129 Using either of the following statements in your
5130 image recipe or from within the
5131 <filename>local.conf</filename> file found in the
5132 <link linkend='build-directory'>Build Directory</link>
5133 causes the build system to create a read-only root filesystem:
5134 <literallayout class='monospaced'>
5135 IMAGE_FEATURES = "read-only-rootfs"
5136 </literallayout>
5137 or
5138 <literallayout class='monospaced'>
5139 EXTRA_IMAGE_FEATURES = "read-only-rootfs"
5140 </literallayout>
5141 </para>
5142
5143 <para>
5144 For more information on how to use these variables, see the
5145 "<link linkend='usingpoky-extend-customimage-imagefeatures'>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and <filename>EXTRA_IMAGE_FEATURES</filename></link>"
5146 section.
5147 For information on the variables, see
5148 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
5149 and <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTRA_IMAGE_FEATURES'><filename>EXTRA_IMAGE_FEATURES</filename></ulink>.
5150 </para>
5151 </section>
5152
5153 <section id='post-installation-scripts'>
5154 <title>Post-Installation Scripts</title>
5155
5156 <para>
5157 It is very important that you make sure all
5158 post-Installation (<filename>pkg_postinst</filename>) scripts
5159 for packages that are installed into the image can be run
5160 at the time when the root filesystem is created during the
5161 build on the host system.
5162 These scripts cannot attempt to run during first-boot on the
5163 target device.
5164 With the <filename>read-only-rootfs</filename> feature enabled,
5165 the build system checks during root filesystem creation to make
5166 sure all post-installation scripts succeed.
5167 If any of these scripts still need to be run after the root
5168 filesystem is created, the build immediately fails.
5169 These checks during build time ensure that the build fails
5170 rather than the target device fails later during its
5171 initial boot operation.
5172 </para>
5173
5174 <para>
5175 Most of the common post-installation scripts generated by the
5176 build system for the out-of-the-box Yocto Project are engineered
5177 so that they can run during root filesystem creation
5178 (e.g. post-installation scripts for caching fonts).
5179 However, if you create and add custom scripts, you need
5180 to be sure they can be run during file system creation.
5181 </para>
5182
5183 <para>
5184 Here are some common problems that prevent
5185 post-installation scripts from running during root filesystem
5186 creation:
5187 <itemizedlist>
5188 <listitem><para><emphasis>Not using $D in front of absolute paths:</emphasis>
5189 The build system defines
5190 <filename>$</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-D'><filename>D</filename></ulink>
5191 at root filesystem creation time, and
5192 it is blank when run on the target device.
5193 This implies two purposes for <filename>$D</filename>:
5194 ensuring paths are valid in both the host and target
5195 environments, and checking to determine which
5196 environment is being used as a method for taking
5197 appropriate actions.
5198 </para></listitem>
5199 <listitem><para><emphasis>Attempting to run processes that are
5200 specific to or dependent on the target
5201 architecture:</emphasis>
5202 You can work around these attempts by using native
5203 tools to accomplish the same tasks, or
5204 by alternatively running the processes under QEMU,
5205 which has the <filename>qemu_run_binary</filename>
5206 function.
5207 For more information, see the
5208 <filename>meta/classes/qemu.bbclass</filename>
5209 class in the
5210 <link linkend='source-directory'>Source Directory</link>.
5211 </para></listitem>
5212 </itemizedlist>
5213 </para>
5214 </section>
5215
5216 <section id='areas-with-write-access'>
5217 <title>Areas With Write Access</title>
5218
5219 <para>
5220 With the <filename>read-only-rootfs</filename> feature enabled,
5221 any attempt by the target to write to the root filesystem at
5222 runtime fails.
5223 Consequently, you must make sure that you configure processes
5224 and applications that attempt these types of writes do so
5225 to directories with write access (e.g.
5226 <filename>/tmp</filename> or <filename>/var/run</filename>).
5227 </para>
5228 </section>
5229 </section>
5230
5231 <section id="performing-automated-runtime-testing">
5232 <title>Performing Automated Runtime Testing</title>
5233
5234 <para>
5235 The OpenEmbedded build system makes available a series of automated
5236 tests for images to verify runtime functionality.
5237 <note>
5238 Currently, there is only support for running these tests
5239 under QEMU.
5240 </note>
5241 These tests are written in Python making use of the
5242 <filename>unittest</filename> module, and the majority of them
5243 run commands on the target system over
5244 <filename>ssh</filename>.
5245 This section describes how you set up the environment to use these
5246 tests, run available tests, and write and add your own tests.
5247 </para>
5248
5249 <section id="qemu-image-enabling-tests">
5250 <title>Enabling Tests</title>
5251
5252 <para>
5253 In order to run tests, you need to do the following:
5254 <itemizedlist>
5255 <listitem><para><emphasis>Set up to avoid interaction
5256 with <filename>sudo</filename> for networking:</emphasis>
5257 To accomplish this, you must do one of the
5258 following:
5259 <itemizedlist>
5260 <listitem><para>Add
5261 <filename>NOPASSWD</filename> for your user
5262 in <filename>/etc/sudoers</filename> either for
5263 ALL commands or just for
5264 <filename>runqemu-ifup</filename>.
5265 You must provide the full path as that can
5266 change if you are using multiple clones of the
5267 source repository.
5268 <note>
5269 On some distributions, you also need to
5270 comment out "Defaults requiretty" in
5271 <filename>/etc/sudoers</filename>.
5272 </note></para></listitem>
5273 <listitem><para>Manually configure a tap interface
5274 for your system.</para></listitem>
5275 <listitem><para>Run as root the script in
5276 <filename>scripts/runqemu-gen-tapdevs</filename>,
5277 which should generate a list of tap devices.
5278 This is the option typically chosen for
5279 Autobuilder-type environments.
5280 </para></listitem>
5281 </itemizedlist></para></listitem>
5282 <listitem><para><emphasis>Set the
5283 <filename>DISPLAY</filename> variable:</emphasis>
5284 You need to set this variable so that you have an X
5285 server available (e.g. start
5286 <filename>vncserver</filename> for a headless machine).
5287 </para></listitem>
5288 <listitem><para><emphasis>Be sure your host's firewall
5289 accepts incoming connections from
5290 192.168.7.0/24:</emphasis>
5291 Some of the tests (in particular smart tests) start a
5292 HTTP server on a random high number port, which is
5293 used to serve files to the target.
5294 The smart module serves
5295 <filename>${DEPLOY_DIR}/rpm</filename> so it can run
5296 smart channel commands. That means your host's firewall
5297 must accept incoming connections from 192.168.7.0/24,
5298 which is the default IP range used for tap devices
5299 by <filename>runqemu</filename>.</para></listitem>
5300 </itemizedlist>
5301 </para>
5302
5303 <note>
5304 Regardless of how you initiate the tests, if you built your
5305 image using <filename>rm_work</filename>,
5306 most of the tests will fail with errors because they rely on
5307 <filename>${WORKDIR}/installed_pkgs.txt</filename>.
5308 </note>
5309 </section>
5310
5311 <section id="qemu-image-running-tests">
5312 <title>Running Tests</title>
5313
5314 <para>
5315 You can start the tests automatically or manually:
5316 <itemizedlist>
5317 <listitem><para><emphasis>Automatically Running Tests:</emphasis>
5318 To run the tests automatically after the
5319 OpenEmbedded build system successfully creates an image,
5320 first set the
5321 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_IMAGE'><filename>TEST_IMAGE</filename></ulink>
5322 variable to "1" in your <filename>local.conf</filename>
5323 file in the
5324 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
5325 <literallayout class='monospaced'>
5326 TEST_IMAGE = "1"
5327 </literallayout>
5328 Next, simply build your image.
5329 If the image successfully builds, the tests will be
5330 run:
5331 <literallayout class='monospaced'>
5332 bitbake core-image-sato
5333 </literallayout></para></listitem>
5334 <listitem><para><emphasis>Manually Running Tests:</emphasis>
5335 To manually run the tests, first globally inherit
5336 <ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-testimage'><filename>testimage.class</filename></ulink>
5337 by editing your <filename>local.conf</filename> file:
5338 <literallayout class='monospaced'>
5339 INHERIT += "testimage"
5340 </literallayout>
5341 Next, use BitBake to run the tests:
5342 <literallayout class='monospaced'>
5343 bitbake -c testimage &lt;image&gt;
5344 </literallayout></para></listitem>
5345 </itemizedlist>
5346 </para>
5347
5348 <para>
5349 Regardless of how you run the tests, once they start, the
5350 following happens:
5351 <itemizedlist>
5352 <listitem><para>A copy of the root filesystem is written
5353 to <filename>${WORKDIR}/testimage</filename>.
5354 </para></listitem>
5355 <listitem><para>The image is booted under QEMU using the
5356 standard <filename>runqemu</filename> script.
5357 </para></listitem>
5358 <listitem><para>A default timeout of 500 seconds occurs
5359 to allow for the boot process to reach the login prompt.
5360 You can change the timeout period by setting
5361 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_QEMUBOOT_TIMEOUT'><filename>TEST_QEMUBOOT_TIMEOUT</filename></ulink>
5362 in the <filename>local.conf</filename> file.
5363 </para></listitem>
5364 <listitem><para>Once the boot process is reached and the
5365 login prompt appears, the tests run.
5366 The full boot log is written to
5367 <filename>${WORKDIR}/testimage/qemu_boot_log</filename>.
5368 </para></listitem>
5369 <listitem><para>Each test module loads in the order found
5370 in <filename>TEST_SUITES</filename>.
5371 You can find the full output of the commands run over
5372 <filename>ssh</filename> in
5373 <filename>${WORKDIR}/testimgage/ssh_target_log</filename>.
5374 </para></listitem>
5375 <listitem><para>If no failures occur, the task running the
5376 tests ends successfully.
5377 You can find the output from the
5378 <filename>unittest</filename> in the task log at
5379 <filename>${WORKDIR}/temp/log.do_testimage</filename>.
5380 </para></listitem>
5381 </itemizedlist>
5382 </para>
5383
5384 <para>
5385 All test files reside in
5386 <filename>meta/lib/oeqa/runtime</filename> in the
5387 <link linkend='source-directory'>Source Directory</link>.
5388 A test name maps directly to a Python module.
5389 Each test module may contain a number of individual tests.
5390 Tests are usually grouped together by the area
5391 tested (e.g tests for <filename>systemd</filename> reside in
5392 <filename>meta/lib/oeqa/runtime/systemd.py</filename>).
5393 </para>
5394
5395 <para>
5396 You can add tests to any layer provided you place them in the
5397 proper area and you extend
5398 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>
5399 in the <filename>local.conf</filename> file as normal.
5400 Be sure that tests reside in
5401 <filename>&lt;layer&gt;/lib/oeqa/runtime</filename>.
5402 <note>
5403 Be sure that module names do not collide with module names
5404 used in the default set of test modules in
5405 <filename>meta/lib/oeqa/runtime</filename>.
5406 </note>
5407 </para>
5408
5409 <para>
5410 You can change the set of tests run by appending or overriding
5411 <ulink url='&YOCTO_DOCS_REF_URL;#var-TEST_SUITES'><filename>TEST_SUITES</filename></ulink>
5412 variable in <filename>local.conf</filename>.
5413 Each name in <filename>TEST_SUITES</filename> represents a
5414 required test for the image.
5415 Test modules named within <filename>TEST_SUITES</filename>
5416 cannot be skipped even if a test is not suitable for an image
5417 (e.g. running the rpm tests on an image without
5418 <filename>rpm</filename>).
5419 Appending "auto" to <filename>TEST_SUITES</filename> causes the
5420 build system to try to run all tests that are suitable for the
5421 image (i.e. each test module may elect to skip itself).
5422 </para>
5423
5424 <para>
5425 The order you list tests in <filename>TEST_SUITES</filename>
5426 is important.
5427 The order influences test dependencies.
5428 Consequently, tests that depend on other tests should be added
5429 after the test on which they depend.
5430 For example, since <filename>ssh</filename> depends on the
5431 <filename>ping</filename> test, <filename>ssh</filename>
5432 needs to come after <filename>ping</filename> in the list.
5433 The test class provides no re-ordering or dependency handling.
5434 <note>
5435 Each module can have multiple classes with multiple test
5436 methods.
5437 And, Python <filename>unittest</filename> rules apply.
5438 </note>
5439 </para>
5440
5441 <para>
5442 Here are some things to keep in mind when running tests:
5443 <itemizedlist>
5444 <listitem><para>The default tests for the image are defined
5445 as:
5446 <literallayout class='monospaced'>
5447 DEFAULT_TEST_SUITES_pn-&lt;image&gt; = "ping ssh df connman syslog xorg scp vnc date rpm smart dmesg"
5448 </literallayout></para></listitem>
5449 <listitem><para>Add your own test to the list of the
5450 by using the following:
5451 <literallayout class='monospaced'>
5452 TEST_SUITES_append = " mytest"
5453 </literallayout></para></listitem>
5454 <listitem><para>Run a specific list of tests as follows:
5455 <literallayout class='monospaced'>
5456 TEST_SUITES = "test1 test2 test3"
5457 </literallayout>
5458 Remember, order is important.
5459 Be sure to place a test that is dependent on another test
5460 later in the order.</para></listitem>
5461 </itemizedlist>
5462 </para>
5463 </section>
5464
5465 <section id="qemu-image-writing-new-tests">
5466 <title>Writing New Tests</title>
5467
5468 <para>
5469 As mentioned previously, all new test files need to be in the
5470 proper place for the build system to find them.
5471 New tests for additional functionality outside of the core
5472 should be added to the layer that adds the functionality, in
5473 <filename>&lt;layer&gt;/lib/oeqa/runtime</filename> (as
5474 long as
5475 <ulink url='&YOCTO_DOCS_REF_URL;#var-BBPATH'><filename>BBPATH</filename></ulink>
5476 is extended in the layer's
5477 <filename>layer.conf</filename> file as normal).
5478 Just remember that filenames need to map directly to test
5479 (module) names and that you do not use module names that
5480 collide with existing core tests.
5481 </para>
5482
5483 <para>
5484 To create a new test, start by copying an existing module
5485 (e.g. <filename>syslog.py</filename> or
5486 <filename>gcc.py</filename> are good ones to use).
5487 Test modules can use code from
5488 <filename>meta/lib/oeqa/utils</filename>, which are helper
5489 classes.
5490 </para>
5491
5492 <note>
5493 Structure shell commands such that you rely on them and they
5494 return a single code for success.
5495 Be aware that sometimes you will need to parse the output.
5496 See the <filename>df.py</filename> and
5497 <filename>date.py</filename> modules for examples.
5498 </note>
5499
5500 <para>
5501 You will notice that all test classes inherit
5502 <filename>oeRuntimeTest</filename>, which is found in
5503 <filename>meta/lib/oetest.py</filename>.
5504 This base class offers some helper attributes, which are
5505 described in the following sections:
5506 </para>
5507
5508 <section id='qemu-image-writing-tests-class-methods'>
5509 <title>Class Methods</title>
5510
5511 <para>
5512 Class methods are as follows:
5513 <itemizedlist>
5514 <listitem><para><emphasis><filename>hasPackage(pkg)</filename>:</emphasis>
5515 Returns "True" if <filename>pkg</filename> is in the
5516 installed package list of the image, which is based
5517 on
5518 <filename>${WORKDIR}/installed_pkgs.txt</filename>
5519 that is generated during the
5520 <filename>do.rootfs</filename> task.
5521 </para></listitem>
5522 <listitem><para><emphasis><filename>hasFeature(feature)</filename>:</emphasis>
5523 Returns "True" if the feature is in
5524 <ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></ulink>
5525 or
5526 <ulink url='&YOCTO_DOCS_REF_URL;#var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></ulink>.
5527 </para></listitem>
5528 <listitem><para><emphasis><filename>restartTarget(params)</filename>:</emphasis>
5529 Restarts the QEMU image optionally passing
5530 <filename>params</filename> to the
5531 <filename>runqemu</filename> script's
5532 <filename>qemuparams</filename> list (e.g "-m 1024" for
5533 more memory).</para></listitem>
5534 </itemizedlist>
5535 </para>
5536 </section>
5537
5538 <section id='qemu-image-writing-tests-class-attributes'>
5539 <title>Class Attributes</title>
5540
5541 <para>
5542 Class attributes are as follows:
5543 <itemizedlist>
5544 <listitem><para><emphasis><filename>pscmd</filename>:</emphasis>
5545 Equals "ps -ef" if <filename>procps</filename> is
5546 installed in the image.
5547 Otherwise, <filename>pscmd</filename> equals
5548 "ps" (busybox).
5549 </para></listitem>
5550 <listitem><para><emphasis><filename>tc</filename>:</emphasis>
5551 The called text context, which gives access to the
5552 following attributes:
5553 <itemizedlist>
5554 <listitem><para><emphasis><filename>d</filename>:</emphasis>
5555 The BitBake data store, which allows you to
5556 use stuff such as
5557 <filename>oeRuntimeTest.tc.d.getVar("VIRTUAL-RUNTIME_init_manager")</filename>.
5558 </para></listitem>
5559 <listitem><para><emphasis><filename>testslist</filename> and <filename>testsrequired</filename>:</emphasis>
5560 Used internally.
5561 The tests do not need these.
5562 </para></listitem>
5563 <listitem><para><emphasis><filename>filesdir</filename>:</emphasis>
5564 The absolute path to
5565 <filename>meta/lib/oeqa/runtime/files</filename>,
5566 which contains helper files for tests meant
5567 for copying on the target such as small
5568 files written in C for compilation.
5569 </para></listitem>
5570 <listitem><para><emphasis><filename>qemu</filename>:</emphasis>
5571 Provides access to the
5572 <filename>QemuRunner</filename> object,
5573 which is the class that boots the image.
5574 The <filename>qemu</filename> attribute
5575 provides the following useful attributes:
5576 <itemizedlist>
5577 <listitem><para><emphasis><filename>ip</filename>:</emphasis>
5578 The machine's IP address.
5579 </para></listitem>
5580 <listitem><para><emphasis><filename>host_ip</filename>:</emphasis>
5581 The host IP address, which is only
5582 used by smart tests.
5583 </para></listitem>
5584 </itemizedlist></para></listitem>
5585 <listitem><para><emphasis><filename>target</filename>:</emphasis>
5586 The <filename>SSHControl</filename> object,
5587 which is used for running the following
5588 commands on the image:
5589 <itemizedlist>
5590 <listitem><para><emphasis><filename>host</filename>:</emphasis>
5591 Used internally.
5592 The tests do not use this command.
5593 </para></listitem>
5594 <listitem><para><emphasis><filename>timeout</filename>:</emphasis>
5595 A global timeout for commands run on
5596 the target for the instance of a
5597 test.
5598 The default is 300 seconds.
5599 </para></listitem>
5600 <listitem><para><emphasis><filename>run(cmd, timeout=None)</filename>:</emphasis>
5601 The single, most used method.
5602 This command is a wrapper for:
5603 <filename>ssh root@host "cmd"</filename>.
5604 The command returns a tuple:
5605 (status, output), which are what
5606 their names imply - the return code
5607 of 'cmd' and whatever output
5608 it produces.
5609 The optional timeout argument
5610 represents the number of seconds the
5611 test should wait for 'cmd' to
5612 return.
5613 If the argument is "None", the
5614 test uses the default instance's
5615 timeout period, which is 300
5616 seconds.
5617 If the argument is "0", the test
5618 runs until the command returns.
5619 </para></listitem>
5620 <listitem><para><emphasis><filename>copy_to(localpath, remotepath)</filename>:</emphasis>
5621 <filename>scp localpath root@ip:remotepath</filename>.
5622 </para></listitem>
5623 <listitem><para><emphasis><filename>copy_from(remotepath, localpath)</filename>:</emphasis>
5624 <filename>scp root@host:remotepath localpath</filename>.
5625 </para></listitem>
5626 </itemizedlist></para></listitem>
5627 </itemizedlist></para></listitem>
5628 </itemizedlist>
5629 </para>
5630 </section>
5631
5632 <section id='qemu-image-writing-tests-instance-attributes'>
5633 <title>Instance Attributes</title>
5634
5635 <para>
5636 A single instance attribute exists, which is
5637 <filename>target</filename>.
5638 The <filename>target</filename> instance attribute is
5639 identical to the class attribute of the same name, which
5640 is described in the previous section.
5641 This attribute exists as both an instance and class
5642 attribute so tests can use
5643 <filename>self.target.run(cmd)</filename> in instance
5644 methods instead of
5645 <filename>oeRuntimeTest.tc.target.run(cmd)</filename>.
5646 </para>
5647 </section>
5648 </section>
5649 </section>
5650
5651 <section id="platdev-gdb-remotedebug">
5652 <title>Debugging With the GNU Project Debugger (GDB) Remotely</title>
5653
5654 <para>
5655 GDB allows you to examine running programs, which in turn helps you to understand and fix problems.
5656 It also allows you to perform post-mortem style analysis of program crashes.
5657 GDB is available as a package within the Yocto Project and is
5658 installed in SDK images by default.
5659 See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter
5660 in the Yocto Project Reference Manual for a description of these images.
5661 You can find information on GDB at <ulink url="http://sourceware.org/gdb/"/>.
5662 </para>
5663
5664 <tip>
5665 For best results, install <filename>-dbg</filename> packages for
5666 the applications you are going to debug.
5667 Doing so makes extra debug symbols available that give you more
5668 meaningful output.
5669 </tip>
5670
5671 <para>
5672 Sometimes, due to memory or disk space constraints, it is not possible
5673 to use GDB directly on the remote target to debug applications.
5674 These constraints arise because GDB needs to load the debugging information and the
5675 binaries of the process being debugged.
5676 Additionally, GDB needs to perform many computations to locate information such as function
5677 names, variable names and values, stack traces and so forth - even before starting the
5678 debugging process.
5679 These extra computations place more load on the target system and can alter the
5680 characteristics of the program being debugged.
5681 </para>
5682
5683 <para>
5684 To help get past the previously mentioned constraints, you can use Gdbserver.
5685 Gdbserver runs on the remote target and does not load any debugging information
5686 from the debugged process.
5687 Instead, a GDB instance processes the debugging information that is run on a
5688 remote computer - the host GDB.
5689 The host GDB then sends control commands to Gdbserver to make it stop or start the debugged
5690 program, as well as read or write memory regions of that debugged program.
5691 All the debugging information loaded and processed as well
5692 as all the heavy debugging is done by the host GDB.
5693 Offloading these processes gives the Gdbserver running on the target a chance to remain
5694 small and fast.
5695 </para>
5696
5697 <para>
5698 Because the host GDB is responsible for loading the debugging information and
5699 for doing the necessary processing to make actual debugging happen, the
5700 user has to make sure the host can access the unstripped binaries complete
5701 with their debugging information and also be sure the target is compiled with no optimizations.
5702 The host GDB must also have local access to all the libraries used by the
5703 debugged program.
5704 Because Gdbserver does not need any local debugging information, the binaries on
5705 the remote target can remain stripped.
5706 However, the binaries must also be compiled without optimization
5707 so they match the host's binaries.
5708 </para>
5709
5710 <para>
5711 To remain consistent with GDB documentation and terminology, the binary being debugged
5712 on the remote target machine is referred to as the "inferior" binary.
5713 For documentation on GDB see the
5714 <ulink url="http://sourceware.org/gdb/documentation/">GDB site</ulink>.
5715 </para>
5716
5717 <para>
5718 The remainder of this section describes the steps you need to take
5719 to debug using the GNU project debugger.
5720 </para>
5721
5722 <section id='platdev-gdb-remotedebug-setup'>
5723 <title>Set Up the Cross-Development Debugging Environment</title>
5724
5725 <para>
5726 Before you can initiate a remote debugging session, you need
5727 to be sure you have set up the cross-development environment,
5728 toolchain, and sysroot.
5729 The "<ulink url='&YOCTO_DOCS_ADT_URL;#adt-prepare'>Preparing for Application Development</ulink>"
5730 chapter of the Yocto Project Application Developer's Guide
5731 describes this process.
5732 Be sure you have read that chapter and have set up
5733 your environment.
5734 </para>
5735 </section>
5736
5737 <section id="platdev-gdb-remotedebug-launch-gdbserver">
5738 <title>Launch Gdbserver on the Target</title>
5739
5740 <para>
5741 Make sure Gdbserver is installed on the target.
5742 If it is not, install the package
5743 <filename>gdbserver</filename>, which needs the
5744 <filename>libthread-db1</filename> package.
5745 </para>
5746
5747 <para>
5748 Here is an example that when entered from the host
5749 connects to the target and launches Gdbserver in order to
5750 "debug" a binary named <filename>helloworld</filename>:
5751 <literallayout class='monospaced'>
5752 $ gdbserver localhost:2345 /usr/bin/helloworld
5753 </literallayout>
5754 Gdbserver should now be listening on port 2345 for debugging
5755 commands coming from a remote GDB process that is running on
5756 the host computer.
5757 Communication between Gdbserver and the host GDB are done
5758 using TCP.
5759 To use other communication protocols, please refer to the
5760 <ulink url='http://www.gnu.org/software/gdb/'>Gdbserver documentation</ulink>.
5761 </para>
5762 </section>
5763
5764 <section id="platdev-gdb-remotedebug-launch-gdb">
5765 <title>Launch GDB on the Host Computer</title>
5766
5767 <para>
5768 Running GDB on the host computer takes a number of stages, which
5769 this section describes.
5770 </para>
5771
5772 <section id="platdev-gdb-remotedebug-launch-gdb-buildcross">
5773 <title>Build the Cross-GDB Package</title>
5774 <para>
5775 A suitable GDB cross-binary is required that runs on your
5776 host computer but also knows about the the ABI of the
5777 remote target.
5778 You can get this binary from the
5779 <link linkend='cross-development-toolchain'>Cross-Development Toolchain</link>.
5780 Here is an example where the toolchain has been installed
5781 in the default directory
5782 <filename>/opt/poky/&DISTRO;</filename>:
5783 <literallayout class='monospaced'>
5784 /opt/poky/1.4/sysroots/i686-pokysdk-linux/usr/bin/armv7a-vfp-neon-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
5785 </literallayout>
5786 where <filename>arm</filename> is the target architecture
5787 and <filename>linux-gnueabi</filename> is the target ABI.
5788 </para>
5789
5790 <para>
5791 Alternatively, you can use BitBake to build the
5792 <filename>gdb-cross</filename> binary.
5793 Here is an example:
5794 <literallayout class='monospaced'>
5795 $ bitbake gdb-cross
5796 </literallayout>
5797 Once the binary is built, you can find it here:
5798 <literallayout class='monospaced'>
5799 tmp/sysroots/&lt;host-arch&gt;/usr/bin/&lt;target-platform&gt;/&lt;target-abi&gt;-gdb
5800 </literallayout>
5801 </para>
5802 </section>
5803
5804 <section id='create-the-gdb-initialization-file'>
5805 <title>Create the GDB Initialization File and Point to Your Root Filesystem</title>
5806
5807 <para>
5808 Aside from the GDB cross-binary, you also need a GDB
5809 initialization file in the same top directory in which
5810 your binary resides.
5811 When you start GDB on your host development system, GDB
5812 finds this initialization file and executes all the
5813 commands within.
5814 For information on the <filename>.gdbinit</filename>, see
5815 "<ulink url='http://sourceware.org/gdb/onlinedocs/gdb/'>Debugging with GDB</ulink>",
5816 which is maintained by
5817 <ulink url='http://www.sourceware.org'>sourceware.org</ulink>.
5818 </para>
5819
5820 <para>
5821 You need to add a statement in the
5822 <filename>.gdbinit</filename> file that points to your
5823 root filesystem.
5824 Here is an example that points to the root filesystem for
5825 an ARM-based target device:
5826 <literallayout class='monospaced'>
5827 set sysroot /home/jzhang/sysroot_arm
5828 </literallayout>
5829 </para>
5830 </section>
5831
5832 <section id="platdev-gdb-remotedebug-launch-gdb-launchhost">
5833 <title>Launch the Host GDB</title>
5834
5835 <para>
5836 Before launching the host GDB, you need to be sure
5837 you have sourced the cross-debugging environment script,
5838 which if you installed the root filesystem in the default
5839 location is at <filename>/opt/poky/&DISTRO;</filename>
5840 and begins with the string "environment-setup".
5841 For more information, see the
5842 "<ulink url='&YOCTO_DOCS_ADT_URL;#setting-up-the-cross-development-environment'>Setting Up the Cross-Development Environment</ulink>"
5843 section in the Yocto Project Application Developer's
5844 Guide.
5845 </para>
5846
5847 <para>
5848 Finally, switch to the directory where the binary resides
5849 and run the <filename>cross-gdb</filename> binary.
5850 Provide the binary file you are going to debug.
5851 For example, the following command continues with the
5852 example used in the previous section by loading
5853 the <filename>helloworld</filename> binary as well as the
5854 debugging information:
5855 <literallayout class='monospaced'>
5856 $ arm-poky-linux-gnuabi-gdb helloworld
5857 </literallayout>
5858 The commands in your <filename>.gdbinit</filename> execute
5859 and the GDB prompt appears.
5860 </para>
5861 </section>
5862 </section>
5863
5864 <section id='platdev-gdb-connect-to-the-remote-gdb-server'>
5865 <title>Connect to the Remote GDB Server</title>
5866
5867 <para>
5868 From the target, you need to connect to the remote GDB
5869 server that is running on the host.
5870 You need to specify the remote host and port.
5871 Here is the command continuing with the example:
5872 <literallayout class='monospaced'>
5873 target remote 192.168.7.2:2345
5874 </literallayout>
5875 </para>
5876 </section>
5877
5878 <section id="platdev-gdb-remotedebug-launch-gdb-using">
5879 <title>Use the Debugger</title>
5880
5881 <para>
5882 You can now proceed with debugging as normal - as if you were debugging
5883 on the local machine.
5884 For example, to instruct GDB to break in the "main" function and then
5885 continue with execution of the inferior binary use the following commands
5886 from within GDB:
5887 <literallayout class='monospaced'>
5888 (gdb) break main
5889 (gdb) continue
5890 </literallayout>
5891 </para>
5892
5893 <para>
5894 For more information about using GDB, see the project's online documentation at
5895 <ulink url="http://sourceware.org/gdb/download/onlinedocs/"/>.
5896 </para>
5897 </section>
5898 </section>
5899
5900 <section id="examining-builds-using-toaster">
5901 <title>Examining Builds Using the Toaster API</title>
5902
5903 <para>
5904 Toaster is an Application Programming Interface (API) and
5905 web-based interface to the OpenEmbedded build system, which uses
5906 BitBake.
5907 Both interfaces are based on a Representational State Transfer
5908 (REST) API that queries for and returns build information using
5909 <filename>GET</filename> and <filename>JSON</filename>.
5910 These types of search operations retrieve sets of objects from
5911 a data store used to collect build information.
5912 The results contain all the data for the objects being returned.
5913 You can order the results of the search by key and the search
5914 parameters are consistent for all object types.
5915 </para>
5916
5917 <para>
5918 Using the interfaces you can do the following:
5919 <itemizedlist>
5920 <listitem><para>See information about the tasks executed
5921 and reused during the build.</para></listitem>
5922 <listitem><para>See what is built (recipes and
5923 packages) and what packages were installed into the final
5924 image.</para></listitem>
5925 <listitem><para>See performance-related information such
5926 as build time, CPU usage, and disk I/O.</para></listitem>
5927 <listitem><para>Examine error, warning and trace messages
5928 to aid in debugging.</para></listitem>
5929 </itemizedlist>
5930 </para>
5931
5932 <note>
5933 <para>This release of Toaster provides you with information
5934 about a BitBake run.
5935 The tool does not allow you to configure and launch a build.
5936 However, future development includes plans to integrate the
5937 configuration and build launching capabilities of
5938 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>.
5939 </para>
5940 <para>For more information on using Hob to build an image,
5941 see the
5942 "<link linkend='image-development-using-hob'>Image Development Using Hob</link>"
5943 section.</para>
5944 </note>
5945
5946 <para>
5947 The remainder of this section describes what you need to have in
5948 place to use Toaster, how to start it, use it, and stop it.
5949 For additional information on installing and running Toaster, see the
5950 "<ulink url='https://wiki.yoctoproject.org/wiki/Toaster#Installation_and_Running'>Installation and Running</ulink>"
5951 section of the "Toaster" wiki page.
5952 For complete information on the API and its search operation
5953 URI, parameters, and responses, see the
5954 <ulink url='https://wiki.yoctoproject.org/wiki/REST_API_Contracts'>REST API Contracts</ulink>
5955 Wiki page.
5956 </para>
5957
5958 <section id='starting-toaster'>
5959 <title>Starting Toaster</title>
5960
5961 <para>
5962 Getting set up to use and start Toaster is simple.
5963 First, be sure you have met the following requirements:
5964 <itemizedlist>
5965 <listitem><para>You have set up your
5966 <link linkend='source-directory'>Source Directory</link>
5967 by cloning the upstream <filename>poky</filename>
5968 repository.
5969 See the
5970 <link linkend='local-yp-release'>Yocto Project Release</link>
5971 item for information on how to set up the Source
5972 Directory.</para></listitem>
5973 <listitem><para>You have checked out the
5974 <filename>dora-toaster</filename> branch:
5975 <literallayout class='monospaced'>
5976 $ cd poky
5977 $ git checkout -b dora-toaster origin/dora-toaster
5978 </literallayout></para></listitem>
5979 <listitem><para>Be sure your build machine has
5980 <ulink url='http://en.wikipedia.org/wiki/Django_%28web_framework%29'>Django</ulink>
5981 version 1.4.5 installed.</para></listitem>
5982 <listitem><para>Make sure that port 8000 and 8200 are
5983 free (i.e. they have no servers on them).
5984 </para></listitem>
5985 </itemizedlist>
5986 </para>
5987
5988 <para>
5989 Once you have met the requirements, follow these steps to
5990 start Toaster running in the background of your shell:
5991 <orderedlist>
5992 <listitem><para><emphasis>Set up your build environment:</emphasis>
5993 Source a build environment script (i.e.
5994 <filename>oe-init-build-env</filename> or
5995 <filename>oe-init-build-env-memres</filename>).
5996 </para></listitem>
5997 <listitem><para><emphasis>Prepare your local configuration file:</emphasis>
5998 Toaster needs the Toaster class enabled
5999 in Bitbake in order to record target image package
6000 information.
6001 You can enable it by adding the following line to your
6002 <filename>conf/local.conf</filename> file:
6003 <literallayout class='monospaced'>
6004 INHERIT += "toaster"
6005 </literallayout>
6006 Toaster also needs Build History enabled in Bitbake in
6007 order to record target image package information.
6008 You can enable this by adding the following two lines
6009 to your <filename>conf/local.conf</filename> file:
6010 <literallayout class='monospaced'>
6011 INHERIT += "buildhistory"
6012 BUILDHISTORY_COMMIT = "1"
6013 </literallayout></para></listitem>
6014 <listitem><para><emphasis>Start Toaster:</emphasis>
6015 Start the Toaster service using this
6016 command from within your build directory:
6017 <literallayout class='monospaced'>
6018 $ source toaster start
6019 </literallayout></para></listitem>
6020 <note>
6021 The Toaster must be started and running in order
6022 for it to collect data.
6023 </note>
6024 </orderedlist>
6025 </para>
6026
6027 <para>
6028 When Toaster starts, it creates some additional files in your
6029 Build Directory.
6030 Deleting these files will cause you to lose data or interrupt
6031 Toaster:
6032 <itemizedlist>
6033 <listitem><para><emphasis><filename>toaster.sqlite</filename>:</emphasis>
6034 Toaster's database file.</para></listitem>
6035 <listitem><para><emphasis><filename>toaster_web.log</filename>:</emphasis>
6036 The log file of the web server.</para></listitem>
6037 <listitem><para><emphasis><filename>toaster_ui.log</filename>:</emphasis>
6038 The log file of the user interface component.
6039 </para></listitem>
6040 <listitem><para><emphasis><filename>toastermain.pid</filename>:</emphasis>
6041 The PID of the web server.</para></listitem>
6042 <listitem><para><emphasis><filename>toasterui.pid</filename>:</emphasis>
6043 The PID of the DSI data bridge.</para></listitem>
6044 <listitem><para><emphasis><filename>bitbake-cookerdaemon.log</filename>:</emphasis>
6045 The BitBake server's log file.</para></listitem>
6046 </itemizedlist>
6047 </para>
6048 </section>
6049
6050 <section id='using-toaster'>
6051 <title>Using Toaster</title>
6052
6053 <para>
6054 Once Toaster is running, it logs information for any BitBake
6055 run from your Build Directory.
6056 This logging is automatic.
6057 All you need to do is access and use the information.
6058 </para>
6059
6060 <para>
6061 You access the information one of two ways:
6062 <itemizedlist>
6063 <listitem><para>Open a Browser and type enter in the
6064 <filename>http://localhost:8000</filename> URL.
6065 </para></listitem>
6066 <listitem><para>Use the <filename>xdg-open</filename>
6067 tool from the shell and pass it the same URL.
6068 </para></listitem>
6069 </itemizedlist>
6070 Either method opens the home page for the Toaster interface,
6071 which is temporary for this release.
6072 </para>
6073 </section>
6074
6075 <section id='examining-toaster-data'>
6076 <title>Examining Toaster Data</title>
6077
6078 <para>
6079 The Toaster database is persistent regardless of whether you
6080 start or stop the service.
6081 </para>
6082
6083 <para>
6084 Toaster's interface shows you a list of builds
6085 (successful and unsuccessful) for which it has data.
6086 You can click on any build to see related information.
6087 This information includes configuration details, information
6088 about tasks, all recipes and packages built and their
6089 dependencies, packages installed in your final image,
6090 execution time, CPU usage and disk I/O per task.
6091 </para>
6092 </section>
6093
6094 <section id='stopping-toaster'>
6095 <title>Stopping Toaster</title>
6096
6097 <para>
6098 Stop the Toaster service with the following command:
6099 <literallayout class='monospaced'>
6100 $ source toaster stop
6101 </literallayout>
6102 The service stops but the Toaster database remains persistent.
6103 </para>
6104 </section>
6105 </section>
6106
6107 <section id="platdev-oprofile">
6108 <title>Profiling with OProfile</title>
6109
6110 <para>
6111 <ulink url="http://oprofile.sourceforge.net/">OProfile</ulink> is a
6112 statistical profiler well suited for finding performance
6113 bottlenecks in both user-space software and in the kernel.
6114 This profiler provides answers to questions like "Which functions does my application spend
6115 the most time in when doing X?"
6116 Because the OpenEmbedded build system is well integrated with OProfile, it makes profiling
6117 applications on target hardware straightforward.
6118 <note>
6119 For more information on how to set up and run OProfile, see the
6120 "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-oprofile'>OProfile</ulink>"
6121 section in the Yocto Project Profiling and Tracing Manual.
6122 </note>
6123 </para>
6124
6125 <para>
6126 To use OProfile, you need an image that has OProfile installed.
6127 The easiest way to do this is with <filename>tools-profile</filename> in the
6128 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-IMAGE_FEATURES'>IMAGE_FEATURES</ulink></filename> variable.
6129 You also need debugging symbols to be available on the system where the analysis
6130 takes place.
6131 You can gain access to the symbols by using <filename>dbg-pkgs</filename> in the
6132 <filename>IMAGE_FEATURES</filename> variable or by
6133 installing the appropriate <filename>-dbg</filename> packages.
6134 </para>
6135
6136 <para>
6137 For successful call graph analysis, the binaries must preserve the frame
6138 pointer register and should also be compiled with the
6139 <filename>-fno-omit-framepointer</filename> flag.
6140 You can achieve this by setting the
6141 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SELECTED_OPTIMIZATION'>SELECTED_OPTIMIZATION</ulink></filename>
6142 variable with the following options:
6143 <literallayout class='monospaced'>
6144 -fexpensive-optimizations
6145 -fno-omit-framepointer
6146 -frename-registers
6147 -O2
6148 </literallayout>
6149 You can also achieve it by setting the
6150 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-DEBUG_BUILD'>DEBUG_BUILD</ulink></filename>
6151 variable to "1" in the <filename>local.conf</filename> configuration file.
6152 If you use the <filename>DEBUG_BUILD</filename> variable,
6153 you also add extra debugging information that can make the debug
6154 packages large.
6155 </para>
6156
6157 <section id="platdev-oprofile-target">
6158 <title>Profiling on the Target</title>
6159
6160 <para>
6161 Using OProfile you can perform all the profiling work on the target device.
6162 A simple OProfile session might look like the following:
6163 </para>
6164
6165 <para>
6166 <literallayout class='monospaced'>
6167 # opcontrol --reset
6168 # opcontrol --start --separate=lib --no-vmlinux -c 5
6169 .
6170 .
6171 [do whatever is being profiled]
6172 .
6173 .
6174 # opcontrol --stop
6175 $ opreport -cl
6176 </literallayout>
6177 </para>
6178
6179 <para>
6180 In this example, the <filename>reset</filename> command clears any previously profiled data.
6181 The next command starts OProfile.
6182 The options used when starting the profiler separate dynamic library data
6183 within applications, disable kernel profiling, and enable callgraphing up to
6184 five levels deep.
6185 <note>
6186 To profile the kernel, you would specify the
6187 <filename>--vmlinux=/path/to/vmlinux</filename> option.
6188 The <filename>vmlinux</filename> file is usually in the source directory in the
6189 <filename>/boot/</filename> directory and must match the running kernel.
6190 </note>
6191 </para>
6192
6193 <para>
6194 After you perform your profiling tasks, the next command stops the profiler.
6195 After that, you can view results with the <filename>opreport</filename> command with options
6196 to see the separate library symbols and callgraph information.
6197 </para>
6198
6199 <para>
6200 Callgraphing logs information about time spent in functions and about a function's
6201 calling function (parent) and called functions (children).
6202 The higher the callgraphing depth, the more accurate the results.
6203 However, higher depths also increase the logging overhead.
6204 Consequently, you should take care when setting the callgraphing depth.
6205 <note>
6206 On ARM, binaries need to have the frame pointer enabled for callgraphing to work.
6207 To accomplish this use the <filename>-fno-omit-framepointer</filename> option
6208 with <filename>gcc</filename>.
6209 </note>
6210 </para>
6211
6212 <para>
6213 For more information on using OProfile, see the OProfile
6214 online documentation at
6215 <ulink url="http://oprofile.sourceforge.net/docs/"/>.
6216 </para>
6217 </section>
6218
6219 <section id="platdev-oprofile-oprofileui">
6220 <title>Using OProfileUI</title>
6221
6222 <para>
6223 A graphical user interface for OProfile is also available.
6224 You can download and build this interface from the Yocto Project at
6225 <ulink url="&YOCTO_GIT_URL;/cgit.cgi/oprofileui/"></ulink>.
6226 If the "tools-profile" image feature is selected, all necessary binaries
6227 are installed onto the target device for OProfileUI interaction.
6228 For a list of image features that ship with the Yocto Project,
6229 see the
6230 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-features-image'>Images</ulink>"
6231 section in the Yocto Project Reference Manual.
6232 </para>
6233
6234 <para>
6235 Even though the source directory usually includes all needed patches on the target device, you
6236 might find you need other OProfile patches for recent OProfileUI features.
6237 If so, see the <ulink url='&YOCTO_GIT_URL;/cgit.cgi/oprofileui/tree/README'>
6238 OProfileUI README</ulink> for the most recent information.
6239 </para>
6240
6241 <section id="platdev-oprofile-oprofileui-online">
6242 <title>Online Mode</title>
6243
6244 <para>
6245 Using OProfile in online mode assumes a working network connection with the target
6246 hardware.
6247 With this connection, you just need to run "oprofile-server" on the device.
6248 By default, OProfile listens on port 4224.
6249 <note>
6250 You can change the port using the <filename>--port</filename> command-line
6251 option.
6252 </note>
6253 </para>
6254
6255 <para>
6256 The client program is called <filename>oprofile-viewer</filename> and its UI is relatively
6257 straightforward.
6258 You access key functionality through the buttons on the toolbar, which
6259 are duplicated in the menus.
6260 Here are the buttons:
6261 <itemizedlist>
6262 <listitem><para><emphasis>Connect:</emphasis> Connects to the remote host.
6263 You can also supply the IP address or hostname.</para></listitem>
6264 <listitem><para><emphasis>Disconnect:</emphasis> Disconnects from the target.
6265 </para></listitem>
6266 <listitem><para><emphasis>Start:</emphasis> Starts profiling on the device.
6267 </para></listitem>
6268 <listitem><para><emphasis>Stop:</emphasis> Stops profiling on the device and
6269 downloads the data to the local host.
6270 Stopping the profiler generates the profile and displays it in the viewer.
6271 </para></listitem>
6272 <listitem><para><emphasis>Download:</emphasis> Downloads the data from the
6273 target and generates the profile, which appears in the viewer.</para></listitem>
6274 <listitem><para><emphasis>Reset:</emphasis> Resets the sample data on the device.
6275 Resetting the data removes sample information collected from previous
6276 sampling runs.
6277 Be sure you reset the data if you do not want to include old sample information.
6278 </para></listitem>
6279 <listitem><para><emphasis>Save:</emphasis> Saves the data downloaded from the
6280 target to another directory for later examination.</para></listitem>
6281 <listitem><para><emphasis>Open:</emphasis> Loads previously saved data.
6282 </para></listitem>
6283 </itemizedlist>
6284 </para>
6285
6286 <para>
6287 The client downloads the complete 'profile archive' from
6288 the target to the host for processing.
6289 This archive is a directory that contains the sample data, the object files,
6290 and the debug information for the object files.
6291 The archive is then converted using the <filename>oparchconv</filename> script, which is
6292 included in this distribution.
6293 The script uses <filename>opimport</filename> to convert the archive from
6294 the target to something that can be processed on the host.
6295 </para>
6296
6297 <para>
6298 Downloaded archives reside in the
6299 <link linkend='build-directory'>Build Directory</link> in
6300 <filename>tmp</filename> and are cleared up when they are no longer in use.
6301 </para>
6302
6303 <para>
6304 If you wish to perform kernel profiling, you need to be sure
6305 a <filename>vmlinux</filename> file that matches the running kernel is available.
6306 In the source directory, that file is usually located in
6307 <filename>/boot/vmlinux-KERNELVERSION</filename>, where
6308 <filename>KERNEL-version</filename> is the version of the kernel.
6309 The OpenEmbedded build system generates separate <filename>vmlinux</filename>
6310 packages for each kernel it builds.
6311 Thus, it should just be a question of making sure a matching package is
6312 installed (e.g. <filename>opkg install kernel-vmlinux</filename>).
6313 The files are automatically installed into development and profiling images
6314 alongside OProfile.
6315 A configuration option exists within the OProfileUI settings page that you can use to
6316 enter the location of the <filename>vmlinux</filename> file.
6317 </para>
6318
6319 <para>
6320 Waiting for debug symbols to transfer from the device can be slow, and it
6321 is not always necessary to actually have them on the device for OProfile use.
6322 All that is needed is a copy of the filesystem with the debug symbols present
6323 on the viewer system.
6324 The "<link linkend='platdev-gdb-remotedebug-launch-gdb'>Launch GDB on the Host Computer</link>"
6325 section covers how to create such a directory with
6326 the <link linkend='source-directory'>Source Directory</link>
6327 and how to use the OProfileUI Settings Dialog to specify the location.
6328 If you specify the directory, it will be used when the file checksums
6329 match those on the system you are profiling.
6330 </para>
6331 </section>
6332
6333 <section id="platdev-oprofile-oprofileui-offline">
6334 <title>Offline Mode</title>
6335
6336 <para>
6337 If network access to the target is unavailable, you can generate
6338 an archive for processing in <filename>oprofile-viewer</filename> as follows:
6339 <literallayout class='monospaced'>
6340 # opcontrol --reset
6341 # opcontrol --start --separate=lib --no-vmlinux -c 5
6342 .
6343 .
6344 [do whatever is being profiled]
6345 .
6346 .
6347 # opcontrol --stop
6348 # oparchive -o my_archive
6349 </literallayout>
6350 </para>
6351
6352 <para>
6353 In the above example, <filename>my_archive</filename> is the name of the
6354 archive directory where you would like the profile archive to be kept.
6355 After the directory is created, you can copy it to another host and load it
6356 using <filename>oprofile-viewer</filename> open functionality.
6357 If necessary, the archive is converted.
6358 </para>
6359 </section>
6360 </section>
6361 </section>
6362
6363 <section id='maintaining-open-source-license-compliance-during-your-products-lifecycle'>
6364 <title>Maintaining Open Source License Compliance During Your Product's Lifecycle</title>
6365
6366 <para>
6367 One of the concerns for a development organization using open source
6368 software is how to maintain compliance with various open source
6369 licensing during the lifecycle of the product.
6370 While this section does not provide legal advice or
6371 comprehensively cover all scenarios, it does
6372 present methods that you can use to
6373 assist you in meeting the compliance requirements during a software
6374 release.
6375 </para>
6376
6377 <para>
6378 With hundreds of different open source licenses that the Yocto
6379 Project tracks, it is difficult to know the requirements of each
6380 and every license.
6381 However, we can begin to cover the requirements of the major FLOSS licenses, by
6382 assuming that there are three main areas of concern:
6383 <itemizedlist>
6384 <listitem><para>Source code must be provided.</para></listitem>
6385 <listitem><para>License text for the software must be
6386 provided.</para></listitem>
6387 <listitem><para>Compilation scripts and modifications to the
6388 source code must be provided.
6389 </para></listitem>
6390 </itemizedlist>
6391 There are other requirements beyond the scope of these
6392 three and the methods described in this section
6393 (e.g. the mechanism through which source code is distributed).
6394 </para>
6395
6396 <para>
6397 As different organizations have different methods of complying with
6398 open source licensing, this section is not meant to imply that
6399 there is only one single way to meet your compliance obligations,
6400 but rather to describe one method of achieving compliance.
6401 The remainder of this section describes methods supported to meet the
6402 previously mentioned three requirements.
6403 Once you take steps to meet these requirements,
6404 and prior to releasing images, sources, and the build system,
6405 you should audit all artifacts to ensure completeness.
6406 <note>
6407 The Yocto Project generates a license manifest during
6408 image creation that is located
6409 in <filename>${DEPLOY_DIR}/licenses/&lt;image_name-datestamp&gt;</filename>
6410 to assist with any audits.
6411 </note>
6412 </para>
6413
6414 <section id='providing-the-source-code'>
6415 <title>Providing the Source Code</title>
6416
6417 <para>
6418 Compliance activities should begin before you generate the
6419 final image.
6420 The first thing you should look at is the requirement that
6421 tops the list for most compliance groups - providing
6422 the source.
6423 The Yocto Project has a few ways of meeting this
6424 requirement.
6425 </para>
6426
6427 <para>
6428 One of the easiest ways to meet this requirement is
6429 to provide the entire
6430 <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
6431 used by the build.
6432 This method, however, has a few issues.
6433 The most obvious is the size of the directory since it includes
6434 all sources used in the build and not just the source used in
6435 the released image.
6436 It will include toolchain source, and other artifacts, which
6437 you would not generally release.
6438 However, the more serious issue for most companies is accidental
6439 release of proprietary software.
6440 The Yocto Project provides an archiver class to help avoid
6441 some of these concerns.
6442 See the
6443 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-archiver'>Archiving Sources - <filename>archive*.bbclass</filename></ulink>"
6444 section in the Yocto Project Reference Manual for information
6445 on this class.
6446 </para>
6447
6448 <para>
6449 Before you employ <filename>DL_DIR</filename> or the
6450 archiver class, you need to decide how you choose to
6451 provide source.
6452 The source archiver class can generate tarballs and SRPMs
6453 and can create them with various levels of compliance in mind.
6454 One way of doing this (but certainly not the only way) is to
6455 release just the original source as a tarball.
6456 You can do this by adding the following to the
6457 <filename>local.conf</filename> file found in the
6458 <link linkend='build-directory'>Build Directory</link>:
6459 <literallayout class='monospaced'>
6460 ARCHIVER_MODE ?= "original"
6461 ARCHIVER_CLASS = "${@'archive-${ARCHIVER_MODE}-source' if
6462 ARCHIVER_MODE != 'none' else ''}"
6463 INHERIT += "${ARCHIVER_CLASS}"
6464 SOURCE_ARCHIVE_PACKAGE_TYPE = "tar"
6465 </literallayout>
6466 During the creation of your image, the source from all
6467 recipes that deploy packages to the image is placed within
6468 subdirectories of
6469 <filename>DEPLOY_DIR/sources</filename> based on the
6470 <ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE</filename></ulink>
6471 for each recipe.
6472 Releasing the entire directory enables you to comply with
6473 requirements concerning providing the unmodified source.
6474 It is important to note that the size of the directory can
6475 get large.
6476 </para>
6477
6478 <para>
6479 A way to help mitigate the size issue is to only release
6480 tarballs for licenses that require the release of
6481 source.
6482 Let's assume you are only concerned with GPL code as
6483 identified with the following:
6484 <literallayout class='monospaced'>
6485 $ cd poky/build/tmp/deploy/sources
6486 $ mkdir ~/gpl_source_release
6487 $ for dir in */*GPL*; do cp -r $dir ~/gpl_source_release; done
6488 </literallayout>
6489 At this point, you could create a tarball from the
6490 <filename>gpl_source_release</filename> directory and
6491 provide that to the end user.
6492 This method would be a step toward achieving compliance
6493 with section 3a of GPLv2 and with section 6 of GPLv3.
6494 </para>
6495 </section>
6496
6497 <section id='providing-license-text'>
6498 <title>Providing License Text</title>
6499
6500 <para>
6501 One requirement that is often overlooked is inclusion
6502 of license text.
6503 This requirement also needs to be dealt with prior to
6504 generating the final image.
6505 Some licenses require the license text to accompany
6506 the binary.
6507 You can achieve this by adding the following to your
6508 <filename>local.conf</filename> file:
6509 <literallayout class='monospaced'>
6510 COPY_LIC_MANIFEST = "1"
6511 COPY_LIC_DIRS = "1"
6512 </literallayout>
6513 Adding these statements to the configuration file ensures
6514 that the licenses collected during package generation
6515 are included on your image.
6516 As the source archiver has already archived the original
6517 unmodified source that contains the license files,
6518 you would have already met the requirements for inclusion
6519 of the license information with source as defined by the GPL
6520 and other open source licenses.
6521 </para>
6522 </section>
6523
6524 <section id='providing-compilation-scripts-and-source-code-modifications'>
6525 <title>Providing Compilation Scripts and Source Code Modifications</title>
6526
6527 <para>
6528 At this point, we have addressed all we need to address
6529 prior to generating the image.
6530 The next two requirements are addressed during the final
6531 packaging of the release.
6532 </para>
6533
6534 <para>
6535 By releasing the version of the OpenEmbedded build system
6536 and the layers used during the build, you will be providing both
6537 compilation scripts and the source code modifications in one
6538 step.
6539 </para>
6540
6541 <para>
6542 If the deployment team has a
6543 <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP layer</ulink>
6544 and a distro layer, and those those layers are used to patch,
6545 compile, package, or modify (in any way) any open source
6546 software included in your released images, you
6547 may be required to to release those layers under section 3 of
6548 GPLv2 or section 1 of GPLv3.
6549 One way of doing that is with a clean
6550 checkout of the version of the Yocto Project and layers used
6551 during your build.
6552 Here is an example:
6553 <literallayout class='monospaced'>
6554 # We built using the &DISTRO_NAME; branch of the poky repo
6555 $ git clone -b &DISTRO_NAME; git://git.yoctoproject.org/poky
6556 $ cd poky
6557 # We built using the release_branch for our layers
6558 $ git clone -b release_branch git://git.mycompany.com/meta-my-bsp-layer
6559 $ git clone -b release_branch git://git.mycompany.com/meta-my-software-layer
6560 # clean up the .git repos
6561 $ find . -name ".git" -type d -exec rm -rf {} \;
6562 </literallayout>
6563 One thing a development organization might want to consider
6564 for end-user convenience is to modify
6565 <filename>meta-yocto/conf/bblayers.conf.sample</filename> to
6566 ensure that when the end user utilizes the released build
6567 system to build an image, the development organization's
6568 layers are included in the <filename>bblayers.conf</filename>
6569 file automatically:
6570 <literallayout class='monospaced'>
6571 # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
6572 # changes incompatibly
6573 LCONF_VERSION = "6"
6574
6575 BBPATH = "${TOPDIR}"
6576 BBFILES ?= ""
6577
6578 BBLAYERS ?= " \
6579 ##OEROOT##/meta \
6580 ##OEROOT##/meta-yocto \
6581 ##OEROOT##/meta-yocto-bsp \
6582 ##OEROOT##/meta-mylayer \
6583 "
6584
6585 BBLAYERS_NON_REMOVABLE ?= " \
6586 ##OEROOT##/meta \
6587 ##OEROOT##/meta-yocto \
6588 "
6589 </literallayout>
6590 Creating and providing an archive of the
6591 <link linkend='metadata'>Metadata</link> layers
6592 (recipes, configuration files, and so forth)
6593 enables you to meet your
6594 requirements to include the scripts to control compilation
6595 as well as any modifications to the original source.
6596 </para>
6597 </section>
6598 </section>
6599</chapter>
6600
6601<!--
6602vim: expandtab tw=80 ts=4
6603-->
diff --git a/documentation/dev-manual/dev-manual-customization.xsl b/documentation/dev-manual/dev-manual-customization.xsl
new file mode 100644
index 0000000..8969605
--- /dev/null
+++ b/documentation/dev-manual/dev-manual-customization.xsl
@@ -0,0 +1,10 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
5
6 <xsl:param name="html.stylesheet" select="'dev-style.css'" />
7 <xsl:param name="chapter.autolabel" select="1" />
8 <xsl:param name="section.autolabel" select="1" />
9 <xsl:param name="section.label.includes.component.label" select="1" />
10</xsl:stylesheet>
diff --git a/documentation/dev-manual/dev-manual-eclipse-customization.xsl b/documentation/dev-manual/dev-manual-eclipse-customization.xsl
new file mode 100644
index 0000000..8ac4c18
--- /dev/null
+++ b/documentation/dev-manual/dev-manual-eclipse-customization.xsl
@@ -0,0 +1,27 @@
1<?xml version='1.0'?>
2<xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 version="1.0">
7
8 <xsl:import
9 href="http://docbook.sourceforge.net/release/xsl/current/eclipse/eclipse3.xsl" />
10
11 <xsl:param name="chunker.output.indent" select="'yes'"/>
12 <xsl:param name="chunk.quietly" select="1"/>
13 <xsl:param name="chunk.first.sections" select="1"/>
14 <xsl:param name="chunk.section.depth" select="10"/>
15 <xsl:param name="use.id.as.filename" select="1"/>
16 <xsl:param name="ulink.target" select="'_self'" />
17 <xsl:param name="base.dir" select="'html/dev-manual/'"/>
18 <xsl:param name="html.stylesheet" select="'../book.css'"/>
19 <xsl:param name="eclipse.manifest" select="0"/>
20 <xsl:param name="create.plugin.xml" select="0"/>
21 <xsl:param name="suppress.navigation" select="1"/>
22 <xsl:param name="generate.index" select="0"/>
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel" select="1" />
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27</xsl:stylesheet>
diff --git a/documentation/dev-manual/dev-manual-intro.xml b/documentation/dev-manual/dev-manual-intro.xml
new file mode 100644
index 0000000..8923a1d
--- /dev/null
+++ b/documentation/dev-manual/dev-manual-intro.xml
@@ -0,0 +1,210 @@
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='dev-manual-intro'>
6
7<title>The Yocto Project Development Manual</title>
8 <section id='intro'>
9 <title>Introduction</title>
10
11 <para>
12 Welcome to the Yocto Project Development Manual!
13 This manual provides information on how to use the Yocto Project to
14 develop embedded Linux images and user-space applications that
15 run on targeted devices.
16 The manual provides an overview of image, kernel, and
17 user-space application development using the Yocto Project.
18 Because much of the information in this manual is general, it
19 contains many references to other sources where you can find more
20 detail.
21 For example, you can find detailed information on Git, repositories,
22 and open source in general in many places on the Internet.
23 Another example specific to the Yocto Project is how to quickly
24 set up your host development system and build an image, which you
25 find in the
26 <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
27 </para>
28
29 <para>
30 The Yocto Project Development Manual does, however, provide
31 guidance and examples on how to change the kernel source code,
32 reconfigure the kernel, and develop an application using the
33 popular <trademark class='trade'>Eclipse</trademark> IDE.
34 </para>
35
36 <note>
37 By default, using the Yocto Project creates a Poky distribution.
38 However, you can create your own distribution by providing key
39 <link linkend='metadata'>Metadata</link>.
40 A good example is Angstrom, which has had a distribution
41 based on the Yocto Project since its inception.
42 Other examples include commercial distributions like
43 Wind River Linux, Mentor Embedded Linux, and ENEA Linux.
44 See the "<link linkend='creating-your-own-distribution'>Creating Your Own Distribution</link>"
45 section for more information.
46 </note>
47 </section>
48
49 <section id='what-this-manual-provides'>
50 <title>What This Manual Provides</title>
51
52 <para>
53 The following list describes what you can get from this manual:
54 <itemizedlist>
55 <listitem><para>Information that lets you get set
56 up to develop using the Yocto Project.</para></listitem>
57 <listitem><para>Information to help developers who are new to
58 the open source environment and to the distributed revision
59 control system Git, which the Yocto Project uses.
60 </para></listitem>
61 <listitem><para>An understanding of common end-to-end
62 development models and tasks.</para></listitem>
63 <listitem><para>Information about common development tasks
64 generally used during image development for
65 embedded devices.
66 </para></listitem>
67 <listitem><para>Many references to other sources of related
68 information.</para></listitem>
69 </itemizedlist>
70 </para>
71 </section>
72
73 <section id='what-this-manual-does-not-provide'>
74 <title>What this Manual Does Not Provide</title>
75
76 <para>
77 This manual will not give you the following:
78 <itemizedlist>
79 <listitem><para><emphasis>Step-by-step instructions when those instructions exist in other Yocto
80 Project documentation:</emphasis>
81 For example, the Yocto Project Application Developer's Guide contains detailed
82 instructions on how to run the
83 <ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>ADT Installer</ulink>,
84 which is used to set up a cross-development environment.</para></listitem>
85 <listitem><para><emphasis>Reference material:</emphasis>
86 This type of material resides in an appropriate reference manual.
87 For example, system variables are documented in the
88 <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>.</para></listitem>
89 <listitem><para><emphasis>Detailed public information that is not specific to the Yocto Project:</emphasis>
90 For example, exhaustive information on how to use Git is covered better through the
91 Internet than in this manual.</para></listitem>
92 </itemizedlist>
93 </para>
94 </section>
95
96 <section id='other-information'>
97 <title>Other Information</title>
98
99 <para>
100 Because this manual presents overview information for many different
101 topics, supplemental information is recommended for full
102 comprehension.
103 The following list presents other sources of information you might find helpful:
104 <itemizedlist>
105 <listitem><para><emphasis><ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>:
106 </emphasis> The home page for the Yocto Project provides lots of information on the project
107 as well as links to software and documentation.</para></listitem>
108 <listitem><para><emphasis>
109 <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>:</emphasis> This short document lets you get started
110 with the Yocto Project and quickly begin building an image.</para></listitem>
111 <listitem><para><emphasis>
112 <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>:</emphasis> This manual is a reference
113 guide to the OpenEmbedded build system, which is based on BitBake.
114 The build system is sometimes referred to as "Poky".
115 </para></listitem>
116 <listitem><para><emphasis>
117 <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>:</emphasis>
118 This guide provides information that lets you get going with the Application
119 Development Toolkit (ADT) and stand-alone cross-development toolchains to
120 develop projects using the Yocto Project.</para></listitem>
121 <listitem><para><emphasis>
122 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>:</emphasis>
123 This guide defines the structure for BSP components.
124 Having a commonly understood structure encourages standardization.</para></listitem>
125 <listitem><para><emphasis>
126 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>:</emphasis>
127 This manual describes how to work with Linux Yocto kernels as well as provides a bit
128 of conceptual information on the construction of the Yocto Linux kernel tree.
129 </para></listitem>
130 <listitem><para><emphasis>
131 <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>:</emphasis>
132 This manual presents a set of common and generally useful tracing and
133 profiling schemes along with their applications (as appropriate) to each tool.
134 </para></listitem>
135 <listitem><para><emphasis>
136 <ulink url='http://www.youtube.com/watch?v=3ZlOu-gLsh0'>
137 Eclipse IDE Yocto Plug-in</ulink>:</emphasis> A step-by-step instructional video that
138 demonstrates how an application developer uses Yocto Plug-in features within
139 the Eclipse IDE.</para></listitem>
140 <listitem><para><emphasis>
141 <ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>FAQ</ulink>:</emphasis>
142 A list of commonly asked questions and their answers.</para></listitem>
143 <listitem><para><emphasis>
144 <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>:</emphasis>
145 Features, updates and known issues for the current
146 release of the Yocto Project.</para></listitem>
147 <listitem><para><emphasis>
148 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>
149 Hob</ulink>:</emphasis> A graphical user interface for BitBake.
150 Hob's primary goal is to enable a user to perform common tasks more easily.</para></listitem>
151 <listitem><para><emphasis>
152 <ulink url='&YOCTO_HOME_URL;/download/build-appliance-0'>
153 Build Appliance</ulink>:</emphasis> A virtual machine that
154 enables you to build and boot a custom embedded Linux image
155 with the Yocto Project using a non-Linux development system.
156 For more information, see the
157 <ulink url='&YOCTO_HOME_URL;/documentation/build-appliance-manual'>Build Appliance</ulink>
158 page.
159 </para></listitem>
160 <listitem><para><emphasis>
161 <ulink url='&YOCTO_BUGZILLA_URL;'>Bugzilla</ulink>:</emphasis>
162 The bug tracking application the Yocto Project uses.
163 If you find problems with the Yocto Project, you should report them using this
164 application.</para></listitem>
165 <listitem><para><emphasis>
166 Yocto Project Mailing Lists:</emphasis> To subscribe to the Yocto Project mailing
167 lists, click on the following URLs and follow the instructions:
168 <itemizedlist>
169 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'></ulink> for a
170 Yocto Project Discussions mailing list.</para></listitem>
171 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/poky'></ulink> for a
172 Yocto Project Discussions mailing list about the
173 OpenEmbedded build system (Poky).
174 </para></listitem>
175 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto-announce'></ulink>
176 for a mailing list to receive official Yocto Project announcements
177 as well as Yocto Project milestones.</para></listitem>
178 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo'></ulink> for a
179 listing of all public mailing lists on <filename>lists.yoctoproject.org</filename>.
180 </para></listitem>
181 </itemizedlist></para></listitem>
182 <listitem><para><emphasis>Internet Relay Chat (IRC):</emphasis>
183 Two IRC channels on freenode are available
184 for Yocto Project and Poky discussions: <filename>#yocto</filename> and
185 <filename>#poky</filename>, respectively.</para></listitem>
186 <listitem><para><emphasis>
187 <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:</emphasis>
188 The build system used by the Yocto Project.
189 This project is the upstream, generic, embedded distribution that the Yocto
190 Project derives its build system (Poky) from and to which it contributes.</para></listitem>
191 <listitem><para><emphasis>
192 <ulink url='http://developer.berlios.de/projects/bitbake/'>
193 BitBake</ulink>:</emphasis> The tool used by the OpenEmbedded build system
194 to process project metadata.</para></listitem>
195 <listitem><para><emphasis>
196 BitBake User Manual:</emphasis>
197 A comprehensive guide to the BitBake tool.
198 If you want information on BitBake, see the user manual included in the
199 <filename>bitbake/doc/manual</filename> directory of the
200 <link linkend='source-directory'>Source Directory</link>.</para></listitem>
201 <listitem><para><emphasis>
202 <ulink url='http://wiki.qemu.org/Index.html'>Quick EMUlator (QEMU)</ulink>:
203 </emphasis> An open-source machine emulator and virtualizer.</para></listitem>
204 </itemizedlist>
205 </para>
206 </section>
207</chapter>
208<!--
209vim: expandtab tw=80 ts=4
210-->
diff --git a/documentation/dev-manual/dev-manual-model.xml b/documentation/dev-manual/dev-manual-model.xml
new file mode 100644
index 0000000..c185522
--- /dev/null
+++ b/documentation/dev-manual/dev-manual-model.xml
@@ -0,0 +1,2060 @@
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='dev-manual-model'>
6
7<title>Common Development Models</title>
8
9<para>
10 Many development models exist for which you can use the Yocto Project.
11 This chapter overviews simple methods that use tools provided by the
12 Yocto Project:
13 <itemizedlist>
14 <listitem><para><emphasis>System Development:</emphasis>
15 System Development covers Board Support Package (BSP) development and kernel
16 modification or configuration.
17 For an example on how to create a BSP, see the
18 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
19 section in the Yocto Project Board Support Package (BSP) Developer's Guide.
20 For more complete information on how to work with the kernel, see the
21 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel
22 Development Manual</ulink>.
23 </para></listitem>
24 <listitem><para><emphasis>User Application Development:</emphasis>
25 User Application Development covers development of applications that you intend
26 to run on target hardware.
27 For information on how to set up your host development system for user-space
28 application development, see the
29 <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>.
30 For a simple example of user-space application development using the
31 <trademark class='trade'>Eclipse</trademark> IDE, see the
32 "<link linkend='application-development-workflow'>Application
33 Development Workflow</link>" section.
34 </para></listitem>
35 <listitem><para><emphasis>Temporary Source Code Modification:</emphasis>
36 Direct modification of temporary source code is a convenient development model
37 to quickly iterate and develop towards a solution.
38 Once you implement the solution, you should of course take steps to
39 get the changes upstream and applied in the affected recipes.</para></listitem>
40 <listitem><para><emphasis>Image Development using Hob:</emphasis>
41 You can use the <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink> to build
42 custom operating system images within the build environment.
43 Hob provides an efficient interface to the OpenEmbedded build system.</para></listitem>
44 <listitem><para><emphasis>Using a Development Shell:</emphasis>
45 You can use a <filename>devshell</filename> to efficiently debug commands or simply
46 edit packages.
47 Working inside a development shell is a quick way to set up the OpenEmbedded build
48 environment to work on parts of a project.</para></listitem>
49 </itemizedlist>
50</para>
51
52<section id='system-development-model'>
53 <title>System Development Workflow</title>
54
55 <para>
56 System development involves modification or creation of an image that you want to run on
57 a specific hardware target.
58 Usually, when you want to create an image that runs on embedded hardware, the image does
59 not require the same number of features that a full-fledged Linux distribution provides.
60 Thus, you can create a much smaller image that is designed to use only the
61 features for your particular hardware.
62 </para>
63
64 <para>
65 To help you understand how system development works in the Yocto Project, this section
66 covers two types of image development: BSP creation and kernel modification or
67 configuration.
68 </para>
69
70 <section id='developing-a-board-support-package-bsp'>
71 <title>Developing a Board Support Package (BSP)</title>
72
73 <para>
74 A BSP is a package of recipes that, when applied during a build, results in
75 an image that you can run on a particular board.
76 Thus, the package when compiled into the new image, supports the operation of the board.
77 </para>
78
79 <note>
80 For a brief list of terms used when describing the development process in the Yocto Project,
81 see the "<link linkend='yocto-project-terms'>Yocto Project Terms</link>" section.
82 </note>
83
84 <para>
85 The remainder of this section presents the basic
86 steps used to create a BSP using the Yocto Project's
87 <ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>BSP Tools</ulink>.
88 Although not required for BSP creation, the
89 <filename>meta-intel</filename> repository, which contains
90 many BSPs supported by the Yocto Project, is part of the example.
91 </para>
92
93 <para>
94 For an example that shows how to create a new layer using the tools, see the
95 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
96 section in the Yocto Project Board Support Package (BSP) Developer's Guide.
97 </para>
98
99 <para>
100 The following illustration and list summarize the BSP creation general workflow.
101 </para>
102
103 <para>
104 <imagedata fileref="figures/bsp-dev-flow.png" width="6in" depth="7in" align="center" scalefit="1" />
105 </para>
106
107 <para>
108 <orderedlist>
109 <listitem><para><emphasis>Set up your host development system to support
110 development using the Yocto Project</emphasis>: See the
111 "<ulink url='&YOCTO_DOCS_QS_URL;#the-linux-distro'>The Linux Distribution</ulink>"
112 and the
113 "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" sections both
114 in the Yocto Project Quick Start for requirements.</para></listitem>
115 <listitem><para><emphasis>Establish a local copy of the project files on your
116 system</emphasis>: You need this <link linkend='source-directory'>Source
117 Directory</link> available on your host system.
118 Having these files on your system gives you access to the build
119 process and to the tools you need.
120 For information on how to set up the Source Directory,
121 see the
122 "<link linkend='getting-setup'>Getting Set Up</link>" section.</para></listitem>
123 <listitem><para><emphasis>Establish the <filename>meta-intel</filename>
124 repository on your system</emphasis>: Having local copies
125 of these supported BSP layers on your system gives you
126 access to layers you might be able to build on or modify
127 to create your BSP.
128 For information on how to get these files, see the
129 "<link linkend='getting-setup'>Getting Set Up</link>" section.</para></listitem>
130 <listitem><para><emphasis>Create your own BSP layer using the
131 <ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'><filename>yocto-bsp</filename></ulink> script</emphasis>:
132 Layers are ideal for
133 isolating and storing work for a given piece of hardware.
134 A layer is really just a location or area in which you place
135 the recipes and configurations for your BSP.
136 In fact, a BSP is, in itself, a special type of layer.
137 The simplest way to create a new BSP layer that is compliant with the
138 Yocto Project is to use the <filename>yocto-bsp</filename> script.
139 For information about that script, see the
140 "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>"
141 section in the Yocto Project Board Support (BSP) Developer's Guide.
142 </para>
143 <para>
144 Another example that illustrates a layer is an application.
145 Suppose you are creating an application that has library or other dependencies in
146 order for it to compile and run.
147 The layer, in this case, would be where all the recipes that define those dependencies
148 are kept.
149 The key point for a layer is that it is an isolated area that contains
150 all the relevant information for the project that the OpenEmbedded build
151 system knows about.
152 For more information on layers, see the
153 "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>"
154 section.
155 For more information on BSP layers, see the
156 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>" section in the
157 Yocto Project Board Support Package (BSP) Developer's Guide.</para>
158 <note>Five BSPs exist that are part of the
159 Yocto Project release: <filename>genericx86</filename>, <filename>genericx86-64</filename>,
160 <filename>beagleboard</filename>,
161 <filename>mpc8315e</filename>, and <filename>routerstationpro</filename>.
162 The recipes and configurations for these five BSPs are located and dispersed
163 within the <link linkend='source-directory'>Source Directory</link>.
164 On the other hand, BSP layers for Chief River, Crown Bay,
165 Crystal Forest, Emenlow, Fish River Island 2, Jasper Forest, N450, NUC DC3217IYE,
166 Romley, sys940x, Sugar Bay, and tlk exist in their own separate layers
167 within the larger <filename>meta-intel</filename> layer.</note>
168 <para>When you set up a layer for a new BSP, you should follow a standard layout.
169 This layout is described in the
170 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout'>Example Filesystem Layout</ulink>"
171 section of the Board Support Package (BSP) Development Guide.
172 In the standard layout, you will notice a suggested structure for recipes and
173 configuration information.
174 You can see the standard layout for a BSP by examining
175 any supported BSP found in the <filename>meta-intel</filename> layer inside
176 the Source Directory.</para></listitem>
177 <listitem><para><emphasis>Make configuration changes to your new BSP
178 layer</emphasis>: The standard BSP layer structure organizes the files you need
179 to edit in <filename>conf</filename> and several <filename>recipes-*</filename>
180 directories within the BSP layer.
181 Configuration changes identify where your new layer is on the local system
182 and identify which kernel you are going to use.
183 When you run the <filename>yocto-bsp</filename> script, you are able to interactively
184 configure many things for the BSP (e.g. keyboard, touchscreen, and so forth).
185 </para></listitem>
186 <listitem><para><emphasis>Make recipe changes to your new BSP layer</emphasis>: Recipe
187 changes include altering recipes (<filename>.bb</filename> files), removing
188 recipes you don't use, and adding new recipes or append files
189 (<filename>.bbappend</filename>) that you need to support your hardware.
190 </para></listitem>
191 <listitem><para><emphasis>Prepare for the build</emphasis>: Once you have made all the
192 changes to your BSP layer, there remains a few things
193 you need to do for the OpenEmbedded build system in order for it to create your image.
194 You need to get the build environment ready by sourcing an environment setup script
195 and you need to be sure two key configuration files are configured appropriately:
196 the <filename>conf/local.conf</filename> and the
197 <filename>conf/bblayers.conf</filename> file.
198 You must make the OpenEmbedded build system aware of your new layer.
199 See the
200 "<link linkend='enabling-your-layer'>Enabling Your Layer</link>" section
201 for information on how to let the build system know about your new layer.</para>
202 <para>The entire process for building an image is overviewed in the section
203 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>" section
204 of the Yocto Project Quick Start.
205 You might want to reference this information.</para></listitem>
206 <listitem><para><emphasis>Build the image</emphasis>: The OpenEmbedded build system
207 uses the BitBake tool to build images based on the type of image you want to create.
208 You can find more information about BitBake in the user manual, which is found in the
209 <filename>bitbake/doc/manual</filename> directory of the
210 <link linkend='source-directory'>Source Directory</link>.</para>
211 <para>The build process supports several types of images to satisfy different needs.
212 See the
213 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter
214 in the Yocto Project Reference Manual for information on
215 supported images.</para></listitem>
216 </orderedlist>
217 </para>
218
219 <para>
220 You can view a video presentation on "Building Custom Embedded Images with Yocto"
221 at <ulink url='http://free-electrons.com/blog/elc-2011-videos'>Free Electrons</ulink>.
222 You can also find supplemental information in the
223 <ulink url='&YOCTO_DOCS_BSP_URL;'>
224 Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
225 Finally, there is a wiki page write up of the example also located
226 <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>
227 here</ulink> that you might find helpful.
228 </para>
229 </section>
230
231 <section id='modifying-the-kernel'>
232 <title><anchor id='kernel-spot' />Modifying the Kernel</title>
233
234 <para>
235 Kernel modification involves changing the Yocto Project kernel, which could involve changing
236 configuration options as well as adding new kernel recipes.
237 Configuration changes can be added in the form of configuration fragments, while recipe
238 modification comes through the kernel's <filename>recipes-kernel</filename> area
239 in a kernel layer you create.
240 </para>
241
242 <para>
243 The remainder of this section presents a high-level overview of the Yocto Project
244 kernel architecture and the steps to modify the kernel.
245 You can reference the
246 "<link linkend='patching-the-kernel'>Patching the Kernel</link>" section
247 for an example that changes the source code of the kernel.
248 For information on how to configure the kernel, see the
249 "<link linkend='configuring-the-kernel'>Configuring the Kernel</link>" section.
250 For more information on the kernel and on modifying the kernel, see the
251 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
252 </para>
253
254 <section id='kernel-overview'>
255 <title>Kernel Overview</title>
256
257 <para>
258 Traditionally, when one thinks of a patched kernel, they think of a base kernel
259 source tree and a fixed structure that contains kernel patches.
260 The Yocto Project, however, employs mechanisms that, in a sense, result in a kernel source
261 generator.
262 By the end of this section, this analogy will become clearer.
263 </para>
264
265 <para>
266 You can find a web interface to the Yocto Project kernel source repositories at
267 <ulink url='&YOCTO_GIT_URL;'></ulink>.
268 If you look at the interface, you will see to the left a grouping of
269 Git repositories titled "Yocto Linux Kernel."
270 Within this group, you will find several kernels supported by
271 the Yocto Project:
272 <itemizedlist>
273 <listitem><para><emphasis><filename>linux-yocto-3.4</filename></emphasis> - The
274 stable Yocto Project kernel to use with the Yocto Project Release 1.3. This kernel
275 is based on the Linux 3.4 released kernel.</para></listitem>
276 <listitem><para><emphasis><filename>linux-yocto-3.8</filename></emphasis> - The
277 stable Yocto Project kernel to use with the Yocto Project Release 1.4. This kernel
278 is based on the Linux 3.8 released kernel.</para></listitem>
279 <listitem><para><emphasis><filename>linux-yocto-3.10</filename></emphasis> - The
280 stable Yocto Project kernel to use with the Yocto Project Release 1.5. This kernel
281 is based on the Linux 3.10 released kernel.</para></listitem>
282 <listitem><para><emphasis><filename>linux-yocto-dev</filename></emphasis> - A development
283 kernel based on the latest upstream release candidate available.</para></listitem>
284 </itemizedlist>
285 </para>
286
287 <para>
288 The kernels are maintained using the Git revision control system
289 that structures them using the familiar "tree", "branch", and "leaf" scheme.
290 Branches represent diversions from general code to more specific code, while leaves
291 represent the end-points for a complete and unique kernel whose source files,
292 when gathered from the root of the tree to the leaf, accumulate to create the files
293 necessary for a specific piece of hardware and its features.
294 The following figure displays this concept:
295 <para>
296 <imagedata fileref="figures/kernel-overview-1.png"
297 width="6in" depth="6in" align="center" scale="100" />
298 </para>
299
300 <para>
301 Within the figure, the "Kernel.org Branch Point" represents the point in the tree
302 where a supported base kernel is modified from the Linux kernel.
303 For example, this could be the branch point for the <filename>linux-yocto-3.4</filename>
304 kernel.
305 Thus, everything further to the right in the structure is based on the
306 <filename>linux-yocto-3.4</filename> kernel.
307 Branch points to right in the figure represent where the
308 <filename>linux-yocto-3.4</filename> kernel is modified for specific hardware
309 or types of kernels, such as real-time kernels.
310 Each leaf thus represents the end-point for a kernel designed to run on a specific
311 targeted device.
312 </para>
313
314 <para>
315 The overall result is a Git-maintained repository from which all the supported
316 kernel types can be derived for all the supported devices.
317 A big advantage to this scheme is the sharing of common features by keeping them in
318 "larger" branches within the tree.
319 This practice eliminates redundant storage of similar features shared among kernels.
320 </para>
321
322 <note>
323 Keep in mind the figure does not take into account all the supported Yocto
324 Project kernel types, but rather shows a single generic kernel just for conceptual purposes.
325 Also keep in mind that this structure represents the Yocto Project source repositories
326 that are either pulled from during the build or established on the host development system
327 prior to the build by either cloning a particular kernel's Git repository or by
328 downloading and unpacking a tarball.
329 </note>
330
331 <para>
332 Upstream storage of all the available kernel source code is one thing, while
333 representing and using the code on your host development system is another.
334 Conceptually, you can think of the kernel source repositories as all the
335 source files necessary for all the supported kernels.
336 As a developer, you are just interested in the source files for the kernel on
337 which you are working.
338 And, furthermore, you need them available on your host system.
339 </para>
340
341 <para>
342 Kernel source code is available on your host system a couple of different
343 ways.
344 If you are working in the kernel all the time, you probably would want
345 to set up your own local Git repository of the kernel tree.
346 If you just need to make some patches to the kernel, you can access
347 temporary kernel source files that were extracted and used
348 during a build.
349 We will just talk about working with the temporary source code.
350 For more information on how to get kernel source code onto your
351 host system, see the
352 "<link linkend='local-kernel-files'>Yocto Project Kernel</link>"
353 bulleted item earlier in the manual.
354 </para>
355
356 <para>
357 What happens during the build?
358 When you build the kernel on your development system, all files needed for the build
359 are taken from the source repositories pointed to by the
360 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> variable
361 and gathered in a temporary work area
362 where they are subsequently used to create the unique kernel.
363 Thus, in a sense, the process constructs a local source tree specific to your
364 kernel to generate the new kernel image - a source generator if you will.
365 </para>
366 The following figure shows the temporary file structure
367 created on your host system when the build occurs.
368 This
369 <link linkend='build-directory'>Build Directory</link> contains all the
370 source files used during the build.
371 </para>
372
373 <para>
374 <imagedata fileref="figures/kernel-overview-2-generic.png"
375 width="6in" depth="5in" align="center" scale="100" />
376 </para>
377
378 <para>
379 Again, for additional information the Yocto Project kernel's
380 architecture and its branching strategy, see the
381 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
382 You can also reference the
383 "<link linkend='patching-the-kernel'>Patching the Kernel</link>"
384 section for a detailed example that modifies the kernel.
385 </para>
386 </section>
387
388 <section id='kernel-modification-workflow'>
389 <title>Kernel Modification Workflow</title>
390
391 <para>
392 This illustration and the following list summarizes the kernel modification general workflow.
393 </para>
394
395 <para>
396 <imagedata fileref="figures/kernel-dev-flow.png"
397 width="6in" depth="5in" align="center" scalefit="1" />
398 </para>
399
400 <para>
401 <orderedlist>
402 <listitem><para><emphasis>Set up your host development system to support
403 development using the Yocto Project</emphasis>: See
404 "<ulink url='&YOCTO_DOCS_QS_URL;#the-linux-distro'>The Linux Distribution</ulink>" and
405 "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" sections both
406 in the Yocto Project Quick Start for requirements.</para></listitem>
407 <listitem><para><emphasis>Establish a local copy of project files on your
408 system</emphasis>: Having the <link linkend='source-directory'>Source
409 Directory</link> on your system gives you access to the build process and tools
410 you need.
411 For information on how to get these files, see the bulleted item
412 "<link linkend='local-yp-release'>Yocto Project Release</link>" earlier in this manual.
413 </para></listitem>
414 <listitem><para><emphasis>Establish the temporary kernel source files</emphasis>:
415 Temporary kernel source files are kept in the
416 <link linkend='build-directory'>Build Directory</link>
417 created by the
418 OpenEmbedded build system when you run BitBake.
419 If you have never built the kernel you are interested in, you need to run
420 an initial build to establish local kernel source files.</para>
421 <para>If you are building an image for the first time, you need to get the build
422 environment ready by sourcing
423 the environment setup script.
424 You also need to be sure two key configuration files
425 (<filename>local.conf</filename> and <filename>bblayers.conf</filename>)
426 are configured appropriately.</para>
427 <para>The entire process for building an image is overviewed in the
428 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
429 section of the Yocto Project Quick Start.
430 You might want to reference this information.
431 You can find more information on BitBake in the user manual, which is found in the
432 <filename>bitbake/doc/manual</filename> directory of the
433 Source Directory.</para>
434 <para>The build process supports several types of images to satisfy different needs.
435 See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter in
436 the Yocto Project Reference Manual for information on supported images.
437 </para></listitem>
438 <listitem><para><emphasis>Make changes to the kernel source code if
439 applicable</emphasis>: Modifying the kernel does not always mean directly
440 changing source files.
441 However, if you have to do this, you make the changes to the files in the
442 Build directory.</para></listitem>
443 <listitem><para><emphasis>Make kernel configuration changes
444 if applicable</emphasis>:
445 If your situation calls for changing the kernel's configuration, you can
446 use the <filename>yocto-kernel</filename> script or <filename>menuconfig</filename>
447 to enable and disable kernel configurations.
448 Using the script lets you interactively set up kernel configurations.
449 Using <filename>menuconfig</filename> allows you to interactively develop and test the
450 configuration changes you are making to the kernel.
451 When saved, changes using <filename>menuconfig</filename> update the kernel's
452 <filename>.config</filename> file.
453 Try to resist the temptation of directly editing the <filename>.config</filename>
454 file found in the Build Directory at
455 <filename>tmp/sysroots/&lt;machine-name&gt;/kernel</filename>.
456 Doing so, can produce unexpected results when the OpenEmbedded build system
457 regenerates the configuration file.</para>
458 <para>Once you are satisfied with the configuration changes made using
459 <filename>menuconfig</filename>, you can directly compare the
460 <filename>.config</filename> file against a saved original and gather those
461 changes into a config fragment to be referenced from within the kernel's
462 <filename>.bbappend</filename> file.</para></listitem>
463 <listitem><para><emphasis>Rebuild the kernel image with your changes</emphasis>:
464 Rebuilding the kernel image applies your changes.</para></listitem>
465 </orderedlist>
466 </para>
467 </section>
468 </section>
469</section>
470
471<section id='application-development-workflow'>
472 <title>Application Development Workflow</title>
473
474 <para>
475 Application development involves creating an application that you want
476 to run on your target hardware, which is running a kernel image created using the
477 OpenEmbedded build system.
478 The Yocto Project provides an
479 <ulink url='&YOCTO_DOCS_ADT_URL;#adt-intro-section'>Application Development Toolkit (ADT)</ulink>
480 and stand-alone
481 <ulink url='&YOCTO_DOCS_ADT_URL;#the-cross-development-toolchain'>cross-development toolchains</ulink>
482 that facilitate quick development and integration of your application into its runtime environment.
483 Using the ADT and toolchains, you can compile and link your application.
484 You can then deploy your application to the actual hardware or to the QEMU emulator for testing.
485 If you are familiar with the popular <trademark class='trade'>Eclipse</trademark> IDE,
486 you can use an Eclipse Yocto Plug-in to
487 allow you to develop, deploy, and test your application all from within Eclipse.
488 </para>
489
490 <para>
491 While we strongly suggest using the ADT to develop your application, this option might not
492 be best for you.
493 If this is the case, you can still use pieces of the Yocto Project for your development process.
494 However, because the process can vary greatly, this manual does not provide detail on the process.
495 </para>
496
497 <section id='workflow-using-the-adt-and-eclipse'>
498 <title>Workflow Using the ADT and <trademark class='trade'>Eclipse</trademark></title>
499
500 <para>
501 To help you understand how application development works using the ADT, this section
502 provides an overview of the general development process and a detailed example of the process
503 as it is used from within the Eclipse IDE.
504 </para>
505
506 <para>
507 The following illustration and list summarize the application development general workflow.
508 </para>
509
510 <para>
511 <imagedata fileref="figures/app-dev-flow.png"
512 width="7in" depth="8in" align="center" scale="100" />
513 </para>
514
515 <para>
516 <orderedlist>
517 <listitem><para><emphasis>Prepare the host system for the Yocto Project</emphasis>:
518 See
519 "<ulink url='&YOCTO_DOCS_QS_URL;#the-linux-distro'>The Linux Distribution</ulink>" and
520 "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" sections both
521 in the Yocto Project Quick Start for requirements.</para></listitem>
522 <listitem><para><emphasis>Secure the Yocto Project kernel target image</emphasis>:
523 You must have a target kernel image that has been built using the OpenEmbedded
524 build system.</para>
525 <para>Depending on whether the Yocto Project has a pre-built image that matches your target
526 architecture and where you are going to run the image while you develop your application
527 (QEMU or real hardware), the area from which you get the image differs.
528 <itemizedlist>
529 <listitem><para>Download the image from
530 <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
531 if your target architecture is supported and you are going to develop
532 and test your application on actual hardware.</para></listitem>
533 <listitem><para>Download the image from
534 <ulink url='&YOCTO_QEMU_DL_URL;'>
535 <filename>machines/qemu</filename></ulink> if your target architecture is supported
536 and you are going to develop and test your application using the QEMU
537 emulator.</para></listitem>
538 <listitem><para>Build your image if you cannot find a pre-built image that matches
539 your target architecture.
540 If your target architecture is similar to a supported architecture, you can
541 modify the kernel image before you build it.
542 See the
543 "<link linkend='patching-the-kernel'>Patching the Kernel</link>"
544 section for an example.</para></listitem>
545 </itemizedlist></para>
546 <para>For information on pre-built kernel image naming schemes for images
547 that can run on the QEMU emulator, see the
548 "<ulink url='&YOCTO_DOCS_QS_URL;#downloading-the-pre-built-linux-kernel'>Downloading the Pre-Built Linux Kernel</ulink>"
549 section in the Yocto Project Quick Start.</para></listitem>
550 <listitem><para><emphasis>Install the ADT</emphasis>:
551 The ADT provides a target-specific cross-development toolchain, the root filesystem,
552 the QEMU emulator, and other tools that can help you develop your application.
553 While it is possible to get these pieces separately, the ADT Installer provides an
554 easy, inclusive method.
555 You can get these pieces by running an ADT installer script, which is configurable.
556 For information on how to install the ADT, see the
557 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Using the ADT Installer</ulink>"
558 section
559 in the Yocto Project Application Developer's Guide.</para></listitem>
560 <listitem><para><emphasis>If applicable, secure the target root filesystem
561 and the Cross-development toolchain</emphasis>:
562 If you choose not to install the ADT using the ADT Installer,
563 you need to find and download the appropriate root filesystem and
564 the cross-development toolchain.</para>
565 <para>You can find the tarballs for the root filesystem in the same area used
566 for the kernel image.
567 Depending on the type of image you are running, the root filesystem you need differs.
568 For example, if you are developing an application that runs on an image that
569 supports Sato, you need to get a root filesystem that supports Sato.</para>
570 <para>You can find the cross-development toolchains at
571 <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'><filename>toolchains</filename></ulink>.
572 Be sure to get the correct toolchain for your development host and your
573 target architecture.
574 See the "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>"
575 section in the Yocto Project Application Developer's Guide for information
576 and the
577 "<ulink url='&YOCTO_DOCS_QS_URL;#installing-the-toolchain'>Installing the Toolchain</ulink>"
578 in the Yocto Project Quick Start for information on finding and installing
579 the correct toolchain based on your host development system and your target
580 architecture.
581 </para></listitem>
582 <listitem><para><emphasis>Create and build your application</emphasis>:
583 At this point, you need to have source files for your application.
584 Once you have the files, you can use the Eclipse IDE to import them and build the
585 project.
586 If you are not using Eclipse, you need to use the cross-development tools you have
587 installed to create the image.</para></listitem>
588 <listitem><para><emphasis>Deploy the image with the application</emphasis>:
589 If you are using the Eclipse IDE, you can deploy your image to the hardware or to
590 QEMU through the project's preferences.
591 If you are not using the Eclipse IDE, then you need to deploy the application
592 to the hardware using other methods.
593 Or, if you are using QEMU, you need to use that tool and load your image in for testing.
594 </para></listitem>
595 <listitem><para><emphasis>Test and debug the application</emphasis>:
596 Once your application is deployed, you need to test it.
597 Within the Eclipse IDE, you can use the debugging environment along with the
598 set of user-space tools installed along with the ADT to debug your application.
599 Of course, the same user-space tools are available separately if you choose
600 not to use the Eclipse IDE.</para></listitem>
601 </orderedlist>
602 </para>
603 </section>
604
605 <section id='adt-eclipse'>
606 <title>Working Within Eclipse</title>
607
608 <para>
609 The Eclipse IDE is a popular development environment and it fully
610 supports development using the Yocto Project.
611 <note>
612 This release of the Yocto Project supports both the Kepler
613 and Juno versions of the Eclipse IDE.
614 Thus, the following information provides setup information for
615 both versions.
616 </note>
617 </para>
618
619 <para>
620 When you install and configure the Eclipse Yocto Project Plug-in
621 into the Eclipse IDE, you maximize your Yocto Project experience.
622 Installing and configuring the Plug-in results in an environment
623 that has extensions specifically designed to let you more easily
624 develop software.
625 These extensions allow for cross-compilation, deployment, and
626 execution of your output into a QEMU emulation session as well as
627 actual target hardware.
628 You can also perform cross-debugging and profiling.
629 The environment also supports a suite of tools that allows you
630 to perform remote profiling, tracing, collection of power data,
631 collection of latency data, and collection of performance data.
632 </para>
633
634 <para>
635 This section describes how to install and configure the Eclipse IDE
636 Yocto Plug-in and how to use it to develop your application.
637 </para>
638
639 <section id='setting-up-the-eclipse-ide'>
640 <title>Setting Up the Eclipse IDE</title>
641
642 <para>
643 To develop within the Eclipse IDE, you need to do the following:
644 <orderedlist>
645 <listitem><para>Install the optimal version of the Eclipse
646 IDE.</para></listitem>
647 <listitem><para>Configure the Eclipse IDE.
648 </para></listitem>
649 <listitem><para>Install the Eclipse Yocto Plug-in.
650 </para></listitem>
651 <listitem><para>Configure the Eclipse Yocto Plug-in.
652 </para></listitem>
653 </orderedlist>
654 <note>
655 Do not install Eclipse from your distribution's package
656 repository.
657 Be sure to install Eclipse from the official Eclipse
658 download site as directed in the next section.
659 </note>
660 </para>
661
662 <section id='installing-eclipse-ide'>
663 <title>Installing the Eclipse IDE</title>
664
665 <para>
666 It is recommended that you have the Kepler 4.3 version of
667 the Eclipse IDE installed on your development system.
668 However, if you currently have the Juno 4.2 version
669 installed and you do not want to upgrade the IDE, you can
670 configure Juno to work with the Yocto Project.
671 </para>
672
673 <para>
674 If you do not have the Kepler 4.3 Eclipse IDE installed, you
675 can find the tarball at
676 <ulink url='&ECLIPSE_MAIN_URL;'></ulink>.
677 From that site, choose the Eclipse Standard 4.3 version
678 particular to your development host.
679 This version contains the Eclipse Platform, the Java
680 Development Tools (JDT), and the Plug-in Development
681 Environment.
682 </para>
683
684 <para>
685 Once you have downloaded the tarball, extract it into a
686 clean directory.
687 For example, the following commands unpack and install the
688 downloaded Eclipse IDE tarball into a clean directory
689 using the default name <filename>eclipse</filename>:
690 <literallayout class='monospaced'>
691 $ cd ~
692 $ tar -xzvf ~/Downloads/eclipse-standard-kepler-R-linux-gtk-x86_64.tar.gz
693 </literallayout>
694 </para>
695 </section>
696
697 <section id='configuring-the-eclipse-ide'>
698 <title>Configuring the Eclipse IDE</title>
699
700 <para>
701 This section presents the steps needed to configure the
702 Eclipse IDE.
703 </para>
704
705 <para>
706 Before installing and configuring the Eclipse Yocto Plug-in,
707 you need to configure the Eclipse IDE.
708 Follow these general steps:
709 <orderedlist>
710 <listitem><para>Start the Eclipse IDE.</para></listitem>
711 <listitem><para>Make sure you are in your Workbench and
712 select "Install New Software" from the "Help"
713 pull-down menu.</para></listitem>
714 <listitem><para>Select
715 <filename>Kepler - &ECLIPSE_KEPLER_URL;</filename>
716 from the "Work with:" pull-down menu.
717 <note>
718 For Juno, select
719 <filename>Juno - &ECLIPSE_JUNO_URL;</filename>
720 </note>
721 </para></listitem>
722 <listitem><para>Expand the box next to "Linux Tools"
723 and select the
724 <filename>LTTng - Linux Tracing Toolkit</filename>
725 boxes.</para></listitem>
726 <listitem><para>Expand the box next to "Mobile and
727 Device Development" and select the following boxes:
728 <itemizedlist>
729 <listitem><para><filename>C/C++ Remote Launch</filename></para></listitem>
730 <listitem><para><filename>Remote System Explorer End-user Runtime</filename></para></listitem>
731 <listitem><para><filename>Remote System Explorer User Actions</filename></para></listitem>
732 <listitem><para><filename>Target Management Terminal</filename></para></listitem>
733 <listitem><para><filename>TCF Remote System Explorer add-in</filename></para></listitem>
734 <listitem><para><filename>TCF Target Explorer</filename></para></listitem>
735 </itemizedlist></para></listitem>
736 <listitem><para>Expand the box next to "Programming
737 Languages" and select the
738 <filename>Autotools Support for CDT</filename>
739 and <filename>C/C++ Development Tools</filename>
740 boxes.</para></listitem>
741 <listitem><para>Complete the installation and restart
742 the Eclipse IDE.</para></listitem>
743 </orderedlist>
744 </para>
745 </section>
746
747 <section id='installing-the-eclipse-yocto-plug-in'>
748 <title>Installing or Accessing the Eclipse Yocto Plug-in</title>
749
750 <para>
751 You can install the Eclipse Yocto Plug-in into the Eclipse
752 IDE one of two ways: use the Yocto Project's Eclipse
753 Update site to install the pre-built plug-in or build and
754 install the plug-in from the latest source code.
755 </para>
756
757 <section id='new-software'>
758 <title>Installing the Pre-built Plug-in from the Yocto Project Eclipse Update Site</title>
759
760 <para>
761 To install the Eclipse Yocto Plug-in from the update
762 site, follow these steps:
763 <orderedlist>
764 <listitem><para>Start up the Eclipse IDE.
765 </para></listitem>
766 <listitem><para>In Eclipse, select "Install New
767 Software" from the "Help" menu.
768 </para></listitem>
769 <listitem><para>Click "Add..." in the "Work with:"
770 area.</para></listitem>
771 <listitem><para>Enter
772 <filename>&ECLIPSE_DL_PLUGIN_URL;/kepler</filename>
773 in the URL field and provide a meaningful name
774 in the "Name" field.
775 <note>
776 If you are using Juno, use
777 <filename>&ECLIPSE_DL_PLUGIN_URL;/juno</filename>
778 in the URL field.
779 </note></para></listitem>
780 <listitem><para>Click "OK" to have the entry added
781 to the "Work with:" drop-down list.
782 </para></listitem>
783 <listitem><para>Select the entry for the plug-in
784 from the "Work with:" drop-down list.
785 </para></listitem>
786 <listitem><para>Check the boxes next to
787 <filename>Yocto Project ADT Plug-in</filename>,
788 <filename>Yocto Project Bitbake Commander Plug-in</filename>,
789 and
790 <filename>Yocto Project Documentation plug-in</filename>.
791 </para></listitem>
792 <listitem><para>Complete the remaining software
793 installation steps and then restart the Eclipse
794 IDE to finish the installation of the plug-in.
795 </para></listitem>
796 </orderedlist>
797 </para>
798 </section>
799
800 <section id='zip-file-method'>
801 <title>Installing the Plug-in Using the Latest Source Code</title>
802
803 <para>
804 To install the Eclipse Yocto Plug-in from the latest
805 source code, follow these steps:
806 <orderedlist>
807 <listitem><para>Be sure your development system
808 is not using OpenJDK to build the plug-in
809 by doing the following:
810 <orderedlist>
811 <listitem><para>Use the Oracle JDK.
812 If you don't have that, go to
813 <ulink url='http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html'></ulink>
814 and download the appropriate tarball
815 for your development system and
816 extract it into your home directory.
817 </para></listitem>
818 <listitem><para>In the shell you are going
819 to do your work, export the location of
820 the Oracle Java as follows:
821 <literallayout class='monospaced'>
822 export PATH=~/jdk1.7.0_40/bin:$PATH
823 </literallayout></para></listitem>
824 </orderedlist></para></listitem>
825 <listitem><para>In the same shell, create a Git
826 repository with:
827 <literallayout class='monospaced'>
828 $ cd ~
829 $ git clone git://git.yoctoproject.org/eclipse-poky-kepler
830 </literallayout>
831 <note>
832 If you are using Juno, the repository is
833 located at
834 <filename>git://git.yoctoproject.org/eclipse-poky-juno</filename>.
835 </note>
836 For this example, the repository is named
837 <filename>~/eclipse-poky-kepler</filename>.
838 </para></listitem>
839 <listitem><para>Change to the directory where you
840 set up the Git repository:
841 <literallayout class='monospaced'>
842 $ cd ~/eclipse-poky-kepler
843 </literallayout></para></listitem>
844 <listitem><para>Be sure you are in the right branch
845 for your Git repository.
846 For this release set the branch to
847 <filename>&DISTRO_NAME;</filename>:
848 <literallayout class='monospaced'>
849 $ git checkout &DISTRO_NAME;
850 </literallayout></para></listitem>
851 <listitem><para>Change to the
852 <filename>scripts</filename>
853 directory within the Git repository:
854 <literallayout class='monospaced'>
855 $ cd scripts
856 </literallayout></para></listitem>
857 <listitem><para>Set up the local build environment
858 by running the setup script:
859 <literallayout class='monospaced'>
860 $ ./setup.sh
861 </literallayout></para></listitem>
862 <listitem><para>When the script finishes execution,
863 it prompts you with instructions on how to run
864 the <filename>build.sh</filename> script, which
865 is also in the <filename>scripts</filename> of
866 the Git repository created earlier.
867 </para></listitem>
868 <listitem><para>Run the <filename>build.sh</filename> script
869 as directed.
870 Be sure to provide the name of the Git branch
871 along with the Yocto Project release you are
872 using.
873 Here is an example that uses the
874 <filename>&DISTRO_NAME;</filename> branch:
875 <literallayout class='monospaced'>
876 $ ECLIPSE_HOME=/home/scottrif/eclipse-poky-kepler/scripts/eclipse ./build.sh &DISTRO_NAME; &DISTRO_NAME;
877 </literallayout>
878 After running the script, the file
879 <filename>org.yocto.sdk-&lt;release&gt;-&lt;date&gt;-archive.zip</filename>
880 is in the current directory.</para></listitem>
881 <listitem><para>If necessary, start the Eclipse IDE
882 and be sure you are in the Workbench.
883 </para></listitem>
884 <listitem><para>Select "Install New Software" from the "Help" pull-down menu.
885 </para></listitem>
886 <listitem><para>Click "Add".</para></listitem>
887 <listitem><para>Provide anything you want in the
888 "Name" field.</para></listitem>
889 <listitem><para>Click "Archive" and browse to the
890 ZIP file you built in step seven.
891 This ZIP file should not be "unzipped", and must
892 be the <filename>*archive.zip</filename> file
893 created by running the
894 <filename>build.sh</filename> script.
895 </para></listitem>
896 <listitem><para>Click through the "Okay" buttons.
897 </para></listitem>
898 <listitem><para>Check the boxes
899 in the installation window and complete
900 the installation.</para></listitem>
901 <listitem><para>Restart the Eclipse IDE if
902 necessary.</para></listitem>
903 </orderedlist>
904 </para>
905
906 <para>
907 At this point you should be able to configure the
908 Eclipse Yocto Plug-in as described in the
909 "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse Yocto Plug-in</link>"
910 section.</para>
911 </section>
912 </section>
913
914 <section id='configuring-the-eclipse-yocto-plug-in'>
915 <title>Configuring the Eclipse Yocto Plug-in</title>
916
917 <para>
918 Configuring the Eclipse Yocto Plug-in involves setting the
919 Cross Compiler options and the Target options.
920 The configurations you choose become the default settings
921 for all projects.
922 You do have opportunities to change them later when
923 you configure the project (see the following section).
924 </para>
925
926 <para>
927 To start, you need to do the following from within the
928 Eclipse IDE:
929 <itemizedlist>
930 <listitem><para>Choose "Preferences" from the
931 "Windows" menu to display the Preferences Dialog.
932 </para></listitem>
933 <listitem><para>Click "Yocto Project ADT".
934 </para></listitem>
935 </itemizedlist>
936 </para>
937
938 <section id='configuring-the-cross-compiler-options'>
939 <title>Configuring the Cross-Compiler Options</title>
940
941 <para>
942 To configure the Cross Compiler Options, you must select
943 the type of toolchain, point to the toolchain, specify
944 the sysroot location, and select the target
945 architecture.
946 <itemizedlist>
947 <listitem><para><emphasis>Selecting the Toolchain Type:</emphasis>
948 Choose between
949 <filename>Standalone pre-built toolchain</filename>
950 and
951 <filename>Build system derived toolchain</filename>
952 for Cross Compiler Options.
953 <itemizedlist>
954 <listitem><para><emphasis>
955 <filename>Standalone Pre-built Toolchain:</filename></emphasis>
956 Select this mode when you are using
957 a stand-alone cross-toolchain.
958 For example, suppose you are an
959 application developer and do not
960 need to build a target image.
961 Instead, you just want to use an
962 architecture-specific toolchain on
963 an existing kernel and target root
964 filesystem.</para></listitem>
965 <listitem><para><emphasis>
966 <filename>Build System Derived Toolchain:</filename></emphasis>
967 Select this mode if the
968 cross-toolchain has been installed
969 and built as part of the
970 <link linkend='build-directory'>Build Directory</link>.
971 When you select
972 <filename>Build system derived toolchain</filename>,
973 you are using the toolchain bundled
974 inside the Build Directory.
975 </para></listitem>
976 </itemizedlist>
977 </para></listitem>
978 <listitem><para><emphasis>Point to the Toolchain:</emphasis>
979 If you are using a stand-alone pre-built
980 toolchain, you should be pointing to where it is
981 installed.
982 If you used the ADT Installer script and
983 accepted the default installation directory, the
984 toolchain will be installed in the
985 <filename>&YOCTO_ADTPATH_DIR;</filename>
986 directory.
987 Sections "<ulink url='&YOCTO_DOCS_ADT_URL;#configuring-and-running-the-adt-installer-script'>Configuring and Running the ADT Installer Script</ulink>"
988 and
989 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>"
990 in the Yocto Project Application Developer's
991 Guide describe how to install a stand-alone
992 cross-toolchain.</para>
993 <para>If you are using a system-derived
994 toolchain, the path you provide for the
995 <filename>Toolchain Root Location</filename>
996 field is the
997 <link linkend='build-directory'>Build Directory</link>.
998 See the
999 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using BitBake and the Build Directory</ulink>"
1000 section in the Yocto Project Application
1001 Developer's Guide for information on how to
1002 install the toolchain into the Build
1003 Directory.</para></listitem>
1004 <listitem><para><emphasis>Specify the Sysroot Location:</emphasis>
1005 This location is where the root filesystem for
1006 the target hardware resides.
1007 If you used the ADT Installer script and
1008 accepted the default installation directory,
1009 then the location is
1010 <filename>/opt/poky/&lt;release&gt;</filename>.
1011 Additionally, when you use the ADT Installer
1012 script, the same location is used for the QEMU
1013 user-space tools and the NFS boot process.
1014 </para>
1015 <para>If you used either of the other two
1016 methods to install the toolchain or did not
1017 accept the ADT Installer script's default
1018 installation directory, then the location of
1019 the sysroot filesystem depends on where you
1020 separately extracted and installed the
1021 filesystem.</para>
1022 <para>For information on how to install the
1023 toolchain and on how to extract and install the
1024 sysroot filesystem, see the
1025 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>" section.
1026 </para></listitem>
1027 <listitem><para><emphasis>Select the Target Architecture:</emphasis>
1028 The target architecture is the type of hardware
1029 you are going to use or emulate.
1030 Use the pull-down
1031 <filename>Target Architecture</filename> menu
1032 to make your selection.
1033 The pull-down menu should have the supported
1034 architectures.
1035 If the architecture you need is not listed in
1036 the menu, you will need to build the image.
1037 See the
1038 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
1039 section of the Yocto Project Quick Start for
1040 more information.</para></listitem>
1041 </itemizedlist>
1042 </para>
1043 </section>
1044
1045 <section id='configuring-the-target-options'>
1046 <title>Configuring the Target Options</title>
1047
1048 <para>
1049 You can choose to emulate hardware using the QEMU
1050 emulator, or you can choose to run your image on actual
1051 hardware.
1052 <itemizedlist>
1053 <listitem><para><emphasis><filename>QEMU:</filename></emphasis>
1054 Select this option if you will be using the
1055 QEMU emulator.
1056 If you are using the emulator, you also need to
1057 locate the kernel and specify any custom
1058 options.</para>
1059 <para>If you selected
1060 <filename>Build system derived toolchain</filename>,
1061 the target kernel you built will be located in
1062 the Build Directory in
1063 <filename>tmp/deploy/images/&lt;machine&gt;</filename>
1064 directory.
1065 If you selected
1066 <filename>Standalone pre-built toolchain</filename>,
1067 the pre-built image you downloaded is located
1068 in the directory you specified when you
1069 downloaded the image.</para>
1070 <para>Most custom options are for advanced QEMU
1071 users to further customize their QEMU instance.
1072 These options are specified between paired
1073 angled brackets.
1074 Some options must be specified outside the
1075 brackets.
1076 In particular, the options
1077 <filename>serial</filename>,
1078 <filename>nographic</filename>, and
1079 <filename>kvm</filename> must all be outside the
1080 brackets.
1081 Use the <filename>man qemu</filename> command
1082 to get help on all the options and their use.
1083 The following is an example:
1084 <literallayout class='monospaced'>
1085 serial ‘&lt;-m 256 -full-screen&gt;’
1086 </literallayout></para>
1087 <para>
1088 Regardless of the mode, Sysroot is already
1089 defined as part of the Cross-Compiler Options
1090 configuration in the
1091 <filename>Sysroot Location:</filename> field.
1092 </para></listitem>
1093 <listitem><para><emphasis><filename>External HW:</filename></emphasis>
1094 Select this option if you will be using actual
1095 hardware.</para></listitem>
1096 </itemizedlist>
1097 </para>
1098
1099 <para>
1100 Click the "OK" to save your plug-in configurations.
1101 </para>
1102 </section>
1103 </section>
1104 </section>
1105
1106 <section id='creating-the-project'>
1107 <title>Creating the Project</title>
1108
1109 <para>
1110 You can create two types of projects: Autotools-based, or
1111 Makefile-based.
1112 This section describes how to create Autotools-based projects
1113 from within the Eclipse IDE.
1114 For information on creating Makefile-based projects in a
1115 terminal window, see the section
1116 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-command-line'>Using the Command Line</ulink>"
1117 in the Yocto Project Application Developer's Guide.
1118 </para>
1119
1120 <para>
1121 To create a project based on a Yocto template and then display
1122 the source code, follow these steps:
1123 <orderedlist>
1124 <listitem><para>Select "Project" from the "File -> New" menu.
1125 </para></listitem>
1126 <listitem><para>Double click <filename>CC++</filename>.
1127 </para></listitem>
1128 <listitem><para>Double click <filename>C Project</filename>
1129 to create the project.</para></listitem>
1130 <listitem><para>Expand <filename>Yocto Project ADT Project</filename>.
1131 </para></listitem>
1132 <listitem><para>Select <filename>Hello World ANSI C Autotools Project</filename>.
1133 This is an Autotools-based project based on a Yocto
1134 template.</para></listitem>
1135 <listitem><para>Put a name in the <filename>Project name:</filename>
1136 field.
1137 Do not use hyphens as part of the name.
1138 </para></listitem>
1139 <listitem><para>Click "Next".</para></listitem>
1140 <listitem><para>Add information in the
1141 <filename>Author</filename> and
1142 <filename>Copyright notice</filename> fields.
1143 </para></listitem>
1144 <listitem><para>Be sure the <filename>License</filename>
1145 field is correct.</para></listitem>
1146 <listitem><para>Click "Finish".</para></listitem>
1147 <listitem><para>If the "open perspective" prompt appears,
1148 click "Yes" so that you in the C/C++ perspective.
1149 </para></listitem>
1150 <listitem><para>The left-hand navigation pane shows your
1151 project.
1152 You can display your source by double clicking the
1153 project's source file.</para></listitem>
1154 </orderedlist>
1155 </para>
1156 </section>
1157
1158 <section id='configuring-the-cross-toolchains'>
1159 <title>Configuring the Cross-Toolchains</title>
1160
1161 <para>
1162 The earlier section,
1163 "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse Yocto Plug-in</link>",
1164 sets up the default project configurations.
1165 You can override these settings for a given project by following
1166 these steps:
1167 <orderedlist>
1168 <listitem><para>Select "Change Yocto Project Settings" from
1169 the "Project" menu.
1170 This selection brings up the Yocto Project Settings
1171 Dialog and allows you to make changes specific to an
1172 individual project.</para>
1173 <para>By default, the Cross Compiler Options and Target
1174 Options for a project are inherited from settings you
1175 provide using the Preferences Dialog as described
1176 earlier in the
1177 "<link linkend='configuring-the-eclipse-yocto-plug-in'>Configuring the Eclipse Yocto Plug-in</link>" section.
1178 The Yocto Project Settings Dialog allows you to override
1179 those default settings for a given project.
1180 </para></listitem>
1181 <listitem><para>Make your configurations for the project
1182 and click "OK".
1183 If you are running the Juno version of Eclipse, you can
1184 skip down to the next section where you build the
1185 project.
1186 If you are not working with Juno, you need to reconfigure the
1187 project as described in the next step.
1188 </para></listitem>
1189 <listitem><para>Select "Reconfigure Project" from the
1190 "Project" menu.
1191 This selection reconfigures the project by running
1192 <filename>autogen.sh</filename> in the workspace for
1193 your project.
1194 The script also runs <filename>libtoolize</filename>,
1195 <filename>aclocal</filename>,
1196 <filename>autoconf</filename>,
1197 <filename>autoheader</filename>,
1198 <filename>automake --a</filename>, and
1199 <filename>./configure</filename>.
1200 Click on the "Console" tab beneath your source code to
1201 see the results of reconfiguring your project.
1202 </para></listitem>
1203 </orderedlist>
1204 </para>
1205 </section>
1206
1207 <section id='building-the-project'>
1208 <title>Building the Project</title>
1209
1210 <para>
1211 To build the project in Juno, right click on the project in
1212 the navigator pane and select "Build Project".
1213 If you are not running Juno, select "Build Project" from the
1214 "Project" menu.
1215 The console should update and you can note the cross-compiler
1216 you are using.
1217 </para>
1218 </section>
1219
1220 <section id='starting-qemu-in-user-space-nfs-mode'>
1221 <title>Starting QEMU in User-Space NFS Mode</title>
1222
1223 <para>
1224 To start the QEMU emulator from within Eclipse, follow these
1225 steps:
1226 <orderedlist>
1227 <listitem><para>Expose and select "External Tools" from
1228 the "Run" menu.
1229 Your image should appear as a selectable menu item.
1230 </para></listitem>
1231 <listitem><para>Select your image from the menu to launch
1232 the emulator in a new window.</para></listitem>
1233 <listitem><para>If needed, enter your host root password in
1234 the shell window at the prompt.
1235 This sets up a <filename>Tap 0</filename> connection
1236 needed for running in user-space NFS mode.
1237 </para></listitem>
1238 <listitem><para>Wait for QEMU to launch.</para></listitem>
1239 <listitem><para>Once QEMU launches, you can begin operating
1240 within that environment.
1241 For example, you could determine the IP Address
1242 for the user-space NFS by using the
1243 <filename>ifconfig</filename> command.</para></listitem>
1244 </orderedlist>
1245 </para>
1246 </section>
1247
1248 <section id='deploying-and-debugging-the-application'>
1249 <title>Deploying and Debugging the Application</title>
1250
1251 <para>
1252 Once the QEMU emulator is running the image, you can deploy
1253 your application using the Eclipse IDE and use then use
1254 the emulator to perform debugging.
1255 Follow these steps to deploy the application.
1256 <orderedlist>
1257 <listitem><para>Select "Debug Configurations..." from the
1258 "Run" menu.</para></listitem>
1259 <listitem><para>In the left area, expand
1260 <filename>C/C++Remote Application</filename>.
1261 </para></listitem>
1262 <listitem><para>Locate your project and select it to bring
1263 up a new tabbed view in the Debug Configurations Dialog.
1264 </para></listitem>
1265 <listitem><para>Enter the absolute path into which you want
1266 to deploy the application.
1267 Use the "Remote Absolute File Path for
1268 C/C++Application:" field.
1269 For example, enter
1270 <filename>/usr/bin/&lt;programname&gt;</filename>.
1271 </para></listitem>
1272 <listitem><para>Click on the "Debugger" tab to see the
1273 cross-tool debugger you are using.</para></listitem>
1274 <listitem><para>Click on the "Main" tab.</para></listitem>
1275 <listitem><para>Create a new connection to the QEMU instance
1276 by clicking on "new".</para></listitem>
1277 <listitem><para>Select <filename>TCF</filename>, which means
1278 Target Communication Framework.</para></listitem>
1279 <listitem><para>Click "Next".</para></listitem>
1280 <listitem><para>Clear out the "host name" field and enter
1281 the IP Address determined earlier.</para></listitem>
1282 <listitem><para>Click "Finish" to close the
1283 New Connections Dialog.</para></listitem>
1284 <listitem><para>Use the drop-down menu now in the
1285 "Connection" field and pick the IP Address you entered.
1286 </para></listitem>
1287 <listitem><para>Click "Run" to bring up a login screen
1288 and login.</para></listitem>
1289 <listitem><para>Accept the debug perspective.
1290 </para></listitem>
1291 </orderedlist>
1292 </para>
1293 </section>
1294
1295 <section id='running-user-space-tools'>
1296 <title>Running User-Space Tools</title>
1297
1298 <para>
1299 As mentioned earlier in the manual, several tools exist that
1300 enhance your development experience.
1301 These tools are aids in developing and debugging applications
1302 and images.
1303 You can run these user-space tools from within the Eclipse
1304 IDE through the "YoctoTools" menu.
1305 </para>
1306
1307 <para>
1308 Once you pick a tool, you need to configure it for the remote
1309 target.
1310 Every tool needs to have the connection configured.
1311 You must select an existing TCF-based RSE connection to the
1312 remote target.
1313 If one does not exist, click "New" to create one.
1314 </para>
1315
1316 <para>
1317 Here are some specifics about the remote tools:
1318 <itemizedlist>
1319 <listitem><para><emphasis><filename>OProfile</filename>:</emphasis>
1320 Selecting this tool causes the
1321 <filename>oprofile-server</filename> on the remote
1322 target to launch on the local host machine.
1323 The <filename>oprofile-viewer</filename> must be
1324 installed on the local host machine and the
1325 <filename>oprofile-server</filename> must be installed
1326 on the remote target, respectively, in order to use.
1327 You must compile and install the
1328 <filename>oprofile-viewer</filename> from the source
1329 code on your local host machine.
1330 Furthermore, in order to convert the target's sample
1331 format data into a form that the host can use, you must
1332 have OProfile version 0.9.4 or greater installed on the
1333 host.</para>
1334 <para>You can locate both the viewer and server from
1335 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/oprofileui/'></ulink>.
1336 You can also find more information on setting up and
1337 using this tool in the
1338 "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-oprofile'>OProfile</ulink>"
1339 section of the Yocto Project Profiling and Tracing
1340 Manual.
1341 <note>The <filename>oprofile-server</filename> is
1342 installed by default on the
1343 <filename>core-image-sato-sdk</filename> image.</note>
1344 </para></listitem>
1345 <listitem><para><emphasis><filename>Lttng2.0 ust trace import</filename>:</emphasis>
1346 Selecting this tool transfers the remote target's
1347 <filename>Lttng</filename> tracing data back to the
1348 local host machine and uses the Lttng Eclipse plug-in
1349 to graphically display the output.
1350 For information on how to use Lttng to trace an
1351 application,
1352 see <ulink url='http://lttng.org/documentation'></ulink>
1353 and the
1354 "<ulink url='&YOCTO_DOCS_PROF_URL;#lttng-linux-trace-toolkit-next-generation'>LTTng (Linux Trace Toolkit, next generation)</ulink>"
1355 section, which is in the Yocto Project Profiling and
1356 Tracing Manual.
1357 <note>Do not use
1358 <filename>Lttng-user space (legacy)</filename> tool.
1359 This tool no longer has any upstream support.</note>
1360 </para>
1361 <para>Before you use the
1362 <filename>Lttng2.0 ust trace import</filename> tool,
1363 you need to setup the Lttng Eclipse plug-in and create a
1364 Tracing project.
1365 Do the following:
1366 <orderedlist>
1367 <listitem><para>Select "Open Perspective" from the
1368 "Window" menu and then select "Tracing".
1369 </para></listitem>
1370 <listitem><para>Click "OK" to change the Eclipse
1371 perspective into the Tracing perspective.
1372 </para></listitem>
1373 <listitem><para>Create a new Tracing project by
1374 selecting "Project" from the "File -> New" menu.
1375 </para></listitem>
1376 <listitem><para>Choose "Tracing Project" from the
1377 "Tracing" menu.
1378 </para></listitem>
1379 <listitem><para>Generate your tracing data on the
1380 remote target.</para></listitem>
1381 <listitem><para>Select "Lttng2.0 ust trace import"
1382 from the "Yocto Project Tools" menu to
1383 start the data import process.</para></listitem>
1384 <listitem><para>Specify your remote connection name.
1385 </para></listitem>
1386 <listitem><para>For the Ust directory path, specify
1387 the location of your remote tracing data.
1388 Make sure the location ends with
1389 <filename>ust</filename> (e.g.
1390 <filename>/usr/mysession/ust</filename>).
1391 </para></listitem>
1392 <listitem><para>Click "OK" to complete the import
1393 process.
1394 The data is now in the local tracing project
1395 you created.</para></listitem>
1396 <listitem><para>Right click on the data and then use
1397 the menu to Select "Generic CTF Trace" from the
1398 "Trace Type... -> Common Trace Format" menu to
1399 map the tracing type.</para></listitem>
1400 <listitem><para>Right click the mouse and select
1401 "Open" to bring up the Eclipse Lttng Trace
1402 Viewer so you view the tracing data.
1403 </para></listitem>
1404 </orderedlist></para></listitem>
1405 <listitem><para><emphasis><filename>PowerTOP</filename>:</emphasis>
1406 Selecting this tool runs PowerTOP on the remote target
1407 machine and displays the results in a new view called
1408 PowerTOP.</para>
1409 <para>The "Time to gather data(sec):" field is the time
1410 passed in seconds before data is gathered from the
1411 remote target for analysis.</para>
1412 <para>The "show pids in wakeups list:" field corresponds
1413 to the <filename>-p</filename> argument passed to
1414 <filename>PowerTOP</filename>.</para></listitem>
1415 <listitem><para><emphasis><filename>LatencyTOP and Perf</filename>:</emphasis>
1416 LatencyTOP identifies system latency, while
1417 Perf monitors the system's performance counter
1418 registers.
1419 Selecting either of these tools causes an RSE terminal
1420 view to appear from which you can run the tools.
1421 Both tools refresh the entire screen to display results
1422 while they run.
1423 For more information on setting up and using
1424 <filename>perf</filename>, see the
1425 "<ulink url='&YOCTO_DOCS_PROF_URL;#profile-manual-perf'>perf</ulink>"
1426 section in the Yocto Project Profiling and Tracing
1427 Manual.
1428 </para></listitem>
1429 </itemizedlist>
1430 </para>
1431 </section>
1432
1433 <section id='customizing-an-image-using-a-bitbake-commander-project-and-hob'>
1434 <title>Customizing an Image Using a BitBake Commander Project and Hob</title>
1435
1436 <para>
1437 Within the Eclipse IDE, you can create a Yocto BitBake Commander
1438 project, edit the <link linkend='metadata'>Metadata</link>, and
1439 then use
1440 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink> to build a customized image all within one IDE.
1441 </para>
1442
1443 <section id='creating-the-yocto-bitbake-commander-project'>
1444 <title>Creating the Yocto BitBake Commander Project</title>
1445
1446 <para>
1447 To create a Yocto BitBake Commander project, follow these
1448 steps:
1449 <orderedlist>
1450 <listitem><para>Select "Other" from the
1451 "Window -> Open Perspective" menu
1452 and then choose "Bitbake Commander".
1453 </para></listitem>
1454 <listitem><para>Click "OK" to change the perspective to
1455 Bitbake Commander.</para></listitem>
1456 <listitem><para>Select "Project" from the "File -> New"
1457 menu to create a new Yocto
1458 Bitbake Commander project.</para></listitem>
1459 <listitem><para>Choose "New Yocto Project" from the
1460 "Yocto Project Bitbake Commander" menu and click
1461 "Next".</para></listitem>
1462 <listitem><para>Enter the Project Name and choose the
1463 Project Location.
1464 The Yocto project's Metadata files will be put under
1465 the directory
1466 <filename>&lt;project_location&gt;/&lt;project_name&gt;</filename>.
1467 If that directory does not exist, you need to check
1468 the "Clone from Yocto Git Repository" box, which
1469 would execute a <filename>git clone</filename>
1470 command to get the project's Metadata files.
1471 <note>
1472 Do not specify your BitBake Commander project
1473 location as your Eclipse workspace.
1474 Doing so causes an error indicating that the
1475 current project overlaps the location of
1476 another project.
1477 This error occurs even if no such project exits.
1478 </note></para></listitem>
1479 <listitem><para>Select <filename>Finish</filename> to
1480 create the project.</para></listitem>
1481 </orderedlist>
1482 </para>
1483 </section>
1484
1485 <section id='editing-the-metadata'>
1486 <title>Editing the Metadata</title>
1487
1488 <para>
1489 After you create the Yocto Bitbake Commander project, you
1490 can modify the <link linkend='metadata'>Metadata</link>
1491 files by opening them in the project.
1492 When editing recipe files (<filename>.bb</filename> files),
1493 you can view BitBake variable values and information by
1494 hovering the mouse pointer over the variable name and
1495 waiting a few seconds.
1496 </para>
1497
1498 <para>
1499 To edit the Metadata, follow these steps:
1500 <orderedlist>
1501 <listitem><para>Select your Yocto Bitbake Commander
1502 project.</para></listitem>
1503 <listitem><para>Select "BitBake Recipe" from the
1504 "File -> New -> Yocto BitBake Commander" menu
1505 to open a new recipe wizard.</para></listitem>
1506 <listitem><para>Point to your source by filling in the
1507 "SRC_URL" field.
1508 For example, you can add a recipe to your
1509 <link linkend='source-directory'>Source Directory</link>
1510 by defining "SRC_URL" as follows:
1511 <literallayout class='monospaced'>
1512 ftp://ftp.gnu.org/gnu/m4/m4-1.4.9.tar.gz
1513 </literallayout></para></listitem>
1514 <listitem><para>Click "Populate" to calculate the
1515 archive md5, sha256, license checksum values and to
1516 auto-generate the recipe filename.</para></listitem>
1517 <listitem><para>Fill in the "Description" field.
1518 </para></listitem>
1519 <listitem><para>Be sure values for all required
1520 fields exist.</para></listitem>
1521 <listitem><para>Click "Finish".</para></listitem>
1522 </orderedlist>
1523 </para>
1524 </section>
1525
1526 <section id='biding-and-customizing-the-image-using-hob'>
1527 <title>Building and Customizing the Image Using Hob</title>
1528
1529 <para>
1530 To build and customize the image using Hob from within the
1531 Eclipse IDE, follow these steps:
1532 <orderedlist>
1533 <listitem><para>Select your Yocto Bitbake Commander
1534 project.</para></listitem>
1535 <listitem><para>Select "Launch Hob" from the "Project"
1536 menu.</para></listitem>
1537 <listitem><para>Enter the
1538 <link linkend='build-directory'>Build Directory</link>
1539 where you want to put your final images.
1540 </para></listitem>
1541 <listitem><para>Click "OK" to launch Hob.
1542 </para></listitem>
1543 <listitem><para>Use Hob to customize and build your own
1544 images.
1545 For information on Hob, see the
1546 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob Project Page</ulink>
1547 on the Yocto Project website.</para></listitem>
1548 </orderedlist>
1549 </para>
1550 </section>
1551 </section>
1552 </section>
1553
1554 <section id='workflow-using-stand-alone-cross-development-toolchains'>
1555 <title>Workflow Using Stand-Alone Cross-Development Toolchains</title>
1556
1557 <para>
1558 If you want to develop an application without prior installation
1559 of the ADT, you still can employ the
1560 <link linkend='cross-development-toolchain'>Cross Development Toolchain</link>,
1561 the QEMU emulator, and a number of supported target image files.
1562 You just need to follow these general steps:
1563 <orderedlist>
1564 <listitem><para><emphasis>Install the cross-development
1565 toolchain for your target hardware:</emphasis>
1566 For information on how to install the toolchain, see the
1567 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>"
1568 section in the Yocto Project Application Developer's
1569 Guide.</para></listitem>
1570 <listitem><para><emphasis>Download the Target Image:</emphasis>
1571 The Yocto Project supports several target architectures
1572 and has many pre-built kernel images and root filesystem
1573 images.</para>
1574 <para>If you are going to develop your application on
1575 hardware, go to the
1576 <ulink url='&YOCTO_MACHINES_DL_URL;'><filename>machines</filename></ulink>
1577 download area and choose a target machine area
1578 from which to download the kernel image and root filesystem.
1579 This download area could have several files in it that
1580 support development using actual hardware.
1581 For example, the area might contain
1582 <filename>.hddimg</filename> files that combine the
1583 kernel image with the filesystem, boot loaders, and
1584 so forth.
1585 Be sure to get the files you need for your particular
1586 development process.</para>
1587 <para>If you are going to develop your application and
1588 then run and test it using the QEMU emulator, go to the
1589 <ulink url='&YOCTO_QEMU_DL_URL;'><filename>machines/qemu</filename></ulink>
1590 download area.
1591 From this area, go down into the directory for your
1592 target architecture (e.g. <filename>qemux86_64</filename>
1593 for an <trademark class='registered'>Intel</trademark>-based
1594 64-bit architecture).
1595 Download kernel, root filesystem, and any other files you
1596 need for your process.
1597 <note>In order to use the root filesystem in QEMU, you
1598 need to extract it.
1599 See the
1600 "<ulink url='&YOCTO_DOCS_ADT_URL;#extracting-the-root-filesystem'>Extracting the Root Filesystem</ulink>"
1601 section for information on how to extract the root
1602 filesystem.</note></para></listitem>
1603 <listitem><para><emphasis>Develop and Test your
1604 Application:</emphasis> At this point, you have the tools
1605 to develop your application.
1606 If you need to separately install and use the QEMU
1607 emulator, you can go to
1608 <ulink url='http://wiki.qemu.org/Main_Page'>QEMU Home Page</ulink>
1609 to download and learn about the emulator.</para></listitem>
1610 </orderedlist>
1611 </para>
1612 </section>
1613</section>
1614
1615<section id="modifying-temporary-source-code">
1616 <title>Modifying Temporary Source Code</title>
1617
1618 <para>
1619 You might
1620 find it helpful during development to modify the temporary source code used by recipes
1621 to build packages.
1622 For example, suppose you are developing a patch and you need to experiment a bit
1623 to figure out your solution.
1624 After you have initially built the package, you can iteratively tweak the
1625 source code, which is located in the
1626 <link linkend='build-directory'>Build Directory</link>, and then
1627 you can force a re-compile and quickly test your altered code.
1628 Once you settle on a solution, you can then preserve your changes in the form of
1629 patches.
1630 You can accomplish these steps all within either a
1631 <ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink> or
1632 <link linkend='git'>Git</link> workflow.
1633 </para>
1634
1635 <section id='finding-the-temporary-source-code'>
1636 <title>Finding the Temporary Source Code</title>
1637
1638 <para>
1639 During a build, the unpacked temporary source code used by recipes
1640 to build packages is available in the Build Directory as
1641 defined by the
1642 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-S'>S</ulink></filename> variable.
1643 Below is the default value for the <filename>S</filename> variable as defined in the
1644 <filename>meta/conf/bitbake.conf</filename> configuration file in the
1645 <link linkend='source-directory'>Source Directory</link>:
1646 <literallayout class='monospaced'>
1647 S = "${WORKDIR}/${BP}"
1648 </literallayout>
1649 You should be aware that many recipes override the <filename>S</filename> variable.
1650 For example, recipes that fetch their source from Git usually set
1651 <filename>S</filename> to <filename>${WORKDIR}/git</filename>.
1652 <note>
1653 The
1654 <ulink url='&YOCTO_DOCS_REF_URL;#var-BP'><filename>BP</filename></ulink>
1655 represents the base recipe name, which consists of the name and version:
1656 <literallayout class='monospaced'>
1657 BP = "${BPN}-${PV}"
1658 </literallayout>
1659 </note>
1660 </para>
1661
1662 <para>
1663 The path to the work directory for the recipe
1664 (<ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>) depends
1665 on the recipe name and the architecture of the target device.
1666 For example, here is the work directory for recipes and resulting packages that are
1667 not device-dependent:
1668 <literallayout class='monospaced'>
1669 ${TMPDIR}/work/${PACKAGE_ARCH}-poky-${TARGET_OS}/${PN}/${EXTENDPE}${PV}-${PR}
1670 </literallayout>
1671 Let's look at an example without variables.
1672 Assuming a top-level <link linkend='source-directory'>Source Directory</link>
1673 named <filename>poky</filename>
1674 and a default Build Directory of <filename>poky/build</filename>,
1675 the following is the work directory for the <filename>acl</filename> recipe that
1676 creates the <filename>acl</filename> package:
1677 <literallayout class='monospaced'>
1678 poky/build/tmp/work/i586-poky-linux/acl/2.2.51-r3/
1679 </literallayout>
1680 </para>
1681
1682 <para>
1683 If your resulting package is dependent on the target device,
1684 the work directory varies slightly:
1685 <literallayout class='monospaced'>
1686 ${TMPDIR}/work/${MACHINE}-poky-${TARGET_OS}/${PN}/${EXTENDPE}${PV}-${PR}
1687 </literallayout>
1688 Again, assuming top-level Source Directory named <filename>poky</filename>
1689 and a default Build Directory of <filename>poky/build</filename>, the
1690 following are the work and temporary source directories, respectively,
1691 for the <filename>acl</filename> package that is being
1692 built for a MIPS-based device:
1693 <literallayout class='monospaced'>
1694 poky/build/tmp/work/mips-poky-linux/acl/2.2.51-r2
1695 poky/build/tmp/work/mips-poky-linux/acl/2.2.51-r2/acl-2.2.51
1696 </literallayout>
1697 </para>
1698
1699 <note>
1700 To better understand how the OpenEmbedded build system resolves directories during the
1701 build process, see the glossary entries for the
1702 <ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink>,
1703 <ulink url='&YOCTO_DOCS_REF_URL;#var-TMPDIR'><filename>TMPDIR</filename></ulink>,
1704 <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink>,
1705 <ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></ulink>,
1706 <ulink url='&YOCTO_DOCS_REF_URL;#var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></ulink>,
1707 <ulink url='&YOCTO_DOCS_REF_URL;#var-TARGET_OS'><filename>TARGET_OS</filename></ulink>,
1708 <ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink>,
1709 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>,
1710 <ulink url='&YOCTO_DOCS_REF_URL;#var-EXTENDPE'><filename>EXTENDPE</filename></ulink>,
1711 and
1712 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
1713 variables in the Yocto Project Reference Manual.
1714 </note>
1715
1716 <para>
1717 Now that you know where to locate the directory that has the temporary source code,
1718 you can use a Quilt or Git workflow to make your edits, test the changes,
1719 and preserve the changes in the form of patches.
1720 </para>
1721 </section>
1722
1723 <section id="using-a-quilt-workflow">
1724 <title>Using a Quilt Workflow</title>
1725
1726 <para>
1727 <ulink url='http://savannah.nongnu.org/projects/quilt'>Quilt</ulink>
1728 is a powerful tool that allows you to capture source code changes without having
1729 a clean source tree.
1730 This section outlines the typical workflow you can use to modify temporary source code,
1731 test changes, and then preserve the changes in the form of a patch all using Quilt.
1732 </para>
1733
1734 <para>
1735 Follow these general steps:
1736 <orderedlist>
1737 <listitem><para><emphasis>Find the Source Code:</emphasis>
1738 The temporary source code used by the OpenEmbedded build system is kept in the
1739 Build Directory.
1740 See the
1741 "<link linkend='finding-the-temporary-source-code'>Finding the Temporary Source Code</link>"
1742 section to learn how to locate the directory that has the temporary source code for a
1743 particular package.</para></listitem>
1744 <listitem><para><emphasis>Change Your Working Directory:</emphasis>
1745 You need to be in the directory that has the temporary source code.
1746 That directory is defined by the
1747 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
1748 variable.</para></listitem>
1749 <listitem><para><emphasis>Create a New Patch:</emphasis>
1750 Before modifying source code, you need to create a new patch.
1751 To create a new patch file, use <filename>quilt new</filename> as below:
1752 <literallayout class='monospaced'>
1753 $ quilt new my_changes.patch
1754 </literallayout></para></listitem>
1755 <listitem><para><emphasis>Notify Quilt and Add Files:</emphasis>
1756 After creating the patch, you need to notify Quilt about the files
1757 you plan to edit.
1758 You notify Quilt by adding the files to the patch you just created:
1759 <literallayout class='monospaced'>
1760 $ quilt add file1.c file2.c file3.c
1761 </literallayout>
1762 </para></listitem>
1763 <listitem><para><emphasis>Edit the Files:</emphasis>
1764 Make your changes in the temporary source code to the files you added
1765 to the patch.</para></listitem>
1766 <listitem><para><emphasis>Test Your Changes:</emphasis>
1767 Once you have modified the source code, the easiest way to test your changes
1768 is by calling the <filename>compile</filename> task as shown in the following example:
1769 <literallayout class='monospaced'>
1770 $ bitbake -c compile -f &lt;name_of_package&gt;
1771 </literallayout>
1772 The <filename>-f</filename> or <filename>--force</filename>
1773 option forces the specified task to execute.
1774 If you find problems with your code, you can just keep editing and
1775 re-testing iteratively until things work as expected.
1776 <note>All the modifications you make to the temporary source code
1777 disappear once you <filename>-c clean</filename> or
1778 <filename>-c cleanall</filename> with BitBake for the package.
1779 Modifications will also disappear if you use the <filename>rm_work</filename>
1780 feature as described in the
1781 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
1782 section of the Yocto Project Quick Start.
1783 </note></para></listitem>
1784 <listitem><para><emphasis>Generate the Patch:</emphasis>
1785 Once your changes work as expected, you need to use Quilt to generate the final patch that
1786 contains all your modifications.
1787 <literallayout class='monospaced'>
1788 $ quilt refresh
1789 </literallayout>
1790 At this point, the <filename>my_changes.patch</filename> file has all your edits made
1791 to the <filename>file1.c</filename>, <filename>file2.c</filename>, and
1792 <filename>file3.c</filename> files.</para>
1793 <para>You can find the resulting patch file in the <filename>patches/</filename>
1794 subdirectory of the source (<filename>S</filename>) directory.</para></listitem>
1795 <listitem><para><emphasis>Copy the Patch File:</emphasis>
1796 For simplicity, copy the patch file into a directory named <filename>files</filename>,
1797 which you can create in the same directory that holds the recipe
1798 (<filename>.bb</filename>) file or the
1799 append (<filename>.bbappend</filename>) file.
1800 Placing the patch here guarantees that the OpenEmbedded build system will find
1801 the patch.
1802 Next, add the patch into the
1803 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>
1804 of the recipe.
1805 Here is an example:
1806 <literallayout class='monospaced'>
1807 SRC_URI += "file://my_changes.patch"
1808 </literallayout></para></listitem>
1809 <listitem><para><emphasis>Increment the Recipe Revision Number:</emphasis>
1810 Finally, don't forget to 'bump' the
1811 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'>PR</ulink></filename>
1812 value in the recipe since the resulting packages have changed.</para></listitem>
1813 </orderedlist>
1814 </para> </section>
1815
1816 <section id='using-a-git-workflow'>
1817 <title>Using a Git Workflow</title>
1818 <para>
1819 Git is an even more powerful tool that allows you to capture source code changes without having
1820 a clean source tree.
1821 This section outlines the typical workflow you can use to modify temporary source code,
1822 test changes, and then preserve the changes in the form of a patch all using Git.
1823 For general information on Git as it is used in the Yocto Project, see the
1824 "<link linkend='git'>Git</link>" section.
1825 </para>
1826
1827 <note>
1828 This workflow uses Git only for its ability to manage local changes to the source code
1829 and produce patches independent of any version control system used with the Yocto Project.
1830 </note>
1831
1832 <para>
1833 Follow these general steps:
1834 <orderedlist>
1835 <listitem><para><emphasis>Find the Source Code:</emphasis>
1836 The temporary source code used by the OpenEmbedded build system is kept in the
1837 Build Directory.
1838 See the
1839 "<link linkend='finding-the-temporary-source-code'>Finding the Temporary Source Code</link>"
1840 section to learn how to locate the directory that has the temporary source code for a
1841 particular package.</para></listitem>
1842 <listitem><para><emphasis>Change Your Working Directory:</emphasis>
1843 You need to be in the directory that has the temporary source code.
1844 That directory is defined by the
1845 <ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>
1846 variable.</para></listitem>
1847 <listitem><para><emphasis>If needed, initialize a Git Repository:</emphasis>
1848 If the recipe you are working with does not use a Git fetcher,
1849 you need to set up a Git repository as follows:
1850 <literallayout class='monospaced'>
1851 $ git init
1852 $ git add *
1853 $ git commit -m "initial revision"
1854 </literallayout>
1855 The above Git commands initialize a Git repository that is based on the
1856 files in your current working directory, stage all the files, and commit
1857 the files.
1858 At this point, your Git repository is aware of all the source code files.
1859 Any edits you now make to files can be committed later and will be tracked by
1860 Git.</para></listitem>
1861 <listitem><para><emphasis>Edit the Files:</emphasis>
1862 Make your changes to the temporary source code.</para></listitem>
1863 <listitem><para><emphasis>Test Your Changes:</emphasis>
1864 Once you have modified the source code, the easiest way to test your changes
1865 is by calling the <filename>compile</filename> task as shown in the following example:
1866 <literallayout class='monospaced'>
1867 $ bitbake -c compile -f &lt;name_of_package&gt;
1868 </literallayout>
1869 The <filename>-f</filename> or <filename>--force</filename>
1870 option forces the specified task to execute.
1871 If you find problems with your code, you can just keep editing and
1872 re-testing iteratively until things work as expected.
1873 <note>All the modifications you make to the temporary source code
1874 disappear once you <filename>-c clean</filename>, <filename>-c cleansstate</filename>,
1875 or <filename>-c cleanall</filename> with BitBake for the package.
1876 Modifications will also disappear if you use the <filename>rm_work</filename>
1877 feature as described in the
1878 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
1879 section of the Yocto Project Quick Start.
1880 </note></para></listitem>
1881 <listitem><para><emphasis>See the List of Files You Changed:</emphasis>
1882 Use the <filename>git status</filename> command to see what files you have actually edited.
1883 The ability to have Git track the files you have changed is an advantage that this
1884 workflow has over the Quilt workflow.
1885 Here is the Git command to list your changed files:
1886 <literallayout class='monospaced'>
1887 $ git status
1888 </literallayout></para></listitem>
1889 <listitem><para><emphasis>Stage the Modified Files:</emphasis>
1890 Use the <filename>git add</filename> command to stage the changed files so they
1891 can be committed as follows:
1892 <literallayout class='monospaced'>
1893 $ git add file1.c file2.c file3.c
1894 </literallayout></para></listitem>
1895 <listitem><para><emphasis>Commit the Staged Files and View Your Changes:</emphasis>
1896 Use the <filename>git commit</filename> command to commit the changes to the
1897 local repository.
1898 Once you have committed the files, you can use the <filename>git log</filename>
1899 command to see your changes:
1900 <literallayout class='monospaced'>
1901 $ git commit -m "&lt;commit-summary-message&gt;"
1902 $ git log
1903 </literallayout>
1904 <note>The name of the patch file created in the next step is based on your
1905 <filename>commit-summary-message</filename>.</note></para></listitem>
1906 <listitem><para><emphasis>Generate the Patch:</emphasis>
1907 Once the changes are committed, use the <filename>git format-patch</filename>
1908 command to generate a patch file:
1909 <literallayout class='monospaced'>
1910 $ git format-patch -1
1911 </literallayout>
1912 Specifying "-1" causes Git to generate the
1913 patch file for the most recent commit.</para>
1914 <para>At this point, the patch file has all your edits made
1915 to the <filename>file1.c</filename>, <filename>file2.c</filename>, and
1916 <filename>file3.c</filename> files.
1917 You can find the resulting patch file in the current directory and it
1918 is named according to the <filename>git commit</filename> summary line.
1919 The patch file ends with <filename>.patch</filename>.</para></listitem>
1920 <listitem><para><emphasis>Copy the Patch File:</emphasis>
1921 For simplicity, copy the patch file into a directory named <filename>files</filename>,
1922 which you can create in the same directory that holds the recipe
1923 (<filename>.bb</filename>) file or the
1924 append (<filename>.bbappend</filename>) file.
1925 Placing the patch here guarantees that the OpenEmbedded build system will find
1926 the patch.
1927 Next, add the patch into the
1928 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'>SRC_URI</ulink></filename>
1929 of the recipe.
1930 Here is an example:
1931 <literallayout class='monospaced'>
1932 SRC_URI += "file://0001-&lt;commit-summary-message&gt;.patch"
1933 </literallayout></para></listitem>
1934 <listitem><para><emphasis>Increment the Recipe Revision Number:</emphasis>
1935 Finally, don't forget to 'bump' the
1936 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'>PR</ulink></filename>
1937 value in the recipe since the resulting packages have changed.</para></listitem>
1938 </orderedlist>
1939 </para>
1940 </section>
1941</section>
1942
1943<section id='image-development-using-hob'>
1944 <title>Image Development Using Hob</title>
1945
1946 <para>
1947 The <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink> is a graphical user interface for the
1948 OpenEmbedded build system, which is based on BitBake.
1949 You can use the Hob to build custom operating system images within the Yocto Project build environment.
1950 Hob simply provides a friendly interface over the build system used during development.
1951 In other words, building images with the Hob lets you take care of common build tasks more easily.
1952 </para>
1953
1954 <para>
1955 For a better understanding of Hob, see the project page at
1956 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'></ulink>
1957 on the Yocto Project website.
1958 If you follow the "Documentation" link from the Hob page, you will
1959 find a short introductory training video on Hob.
1960 The following lists some features of Hob:
1961 <itemizedlist>
1962 <listitem><para>You can setup and run Hob using these commands:
1963 <literallayout class='monospaced'>
1964 $ source oe-init-build-env
1965 $ hob
1966 </literallayout></para></listitem>
1967 <listitem><para>You can set the
1968 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
1969 for which you are building the image.</para></listitem>
1970 <listitem><para>You can modify various policy settings such as the
1971 package format with which to build,
1972 the parallelism BitBake uses, whether or not to build an
1973 external toolchain, and which host to build against.
1974 </para></listitem>
1975 <listitem><para>You can manage
1976 <link linkend='understanding-and-creating-layers'>layers</link>.</para></listitem>
1977 <listitem><para>You can select a base image and then add extra packages for your custom build.
1978 </para></listitem>
1979 <listitem><para>You can launch and monitor the build from within Hob.</para></listitem>
1980 </itemizedlist>
1981 </para>
1982</section>
1983
1984<section id="platdev-appdev-devshell">
1985 <title>Using a Development Shell</title>
1986
1987 <para>
1988 When debugging certain commands or even when just editing packages,
1989 <filename>devshell</filename> can be a useful tool.
1990 When you invoke <filename>devshell</filename>, source files are
1991 extracted into your working directory and patches are applied.
1992 Then, a new terminal is opened and you are placed in the working directory.
1993 In the new terminal, all the OpenEmbedded build-related environment variables are
1994 still defined so you can use commands such as <filename>configure</filename> and
1995 <filename>make</filename>.
1996 The commands execute just as if the OpenEmbedded build system were executing them.
1997 Consequently, working this way can be helpful when debugging a build or preparing
1998 software to be used with the OpenEmbedded build system.
1999 </para>
2000
2001 <para>
2002 Following is an example that uses <filename>devshell</filename> on a target named
2003 <filename>matchbox-desktop</filename>:
2004 <literallayout class='monospaced'>
2005 $ bitbake matchbox-desktop -c devshell
2006 </literallayout>
2007 </para>
2008
2009 <para>
2010 This command spawns a terminal with a shell prompt within the OpenEmbedded build environment.
2011 The <ulink url='&YOCTO_DOCS_REF_URL;#var-OE_TERMINAL'><filename>OE_TERMINAL</filename></ulink>
2012 variable controls what type of shell is opened.
2013 </para>
2014
2015 <para>
2016 For spawned terminals, the following occurs:
2017 <itemizedlist>
2018 <listitem><para>The <filename>PATH</filename> variable includes the
2019 cross-toolchain.</para></listitem>
2020 <listitem><para>The <filename>pkgconfig</filename> variables find the correct
2021 <filename>.pc</filename> files.</para></listitem>
2022 <listitem><para>The <filename>configure</filename> command finds the
2023 Yocto Project site files as well as any other necessary files.</para></listitem>
2024 </itemizedlist>
2025 </para>
2026
2027 <para>
2028 Within this environment, you can run configure or compile
2029 commands as if they were being run by
2030 the OpenEmbedded build system itself.
2031 As noted earlier, the working directory also automatically changes to the
2032 Source Directory (<ulink url='&YOCTO_DOCS_REF_URL;#var-S'><filename>S</filename></ulink>).
2033 </para>
2034
2035 <para>
2036 When you are finished, you just exit the shell or close the terminal window.
2037 </para>
2038
2039 <note>
2040 <para>
2041 It is worth remembering that when using <filename>devshell</filename>
2042 you need to use the full compiler name such as <filename>arm-poky-linux-gnueabi-gcc</filename>
2043 instead of just using <filename>gcc</filename>.
2044 The same applies to other applications such as <filename>binutils</filename>,
2045 <filename>libtool</filename> and so forth.
2046 BitBake sets up environment variables such as <filename>CC</filename>
2047 to assist applications, such as <filename>make</filename> to find the correct tools.
2048 </para>
2049
2050 <para>
2051 It is also worth noting that <filename>devshell</filename> still works over
2052 X11 forwarding and similar situations.
2053 </para>
2054 </note>
2055</section>
2056
2057</chapter>
2058<!--
2059vim: expandtab tw=80 ts=4
2060-->
diff --git a/documentation/dev-manual/dev-manual-newbie.xml b/documentation/dev-manual/dev-manual-newbie.xml
new file mode 100644
index 0000000..694bb7c
--- /dev/null
+++ b/documentation/dev-manual/dev-manual-newbie.xml
@@ -0,0 +1,1590 @@
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='dev-manual-newbie'>
6
7<title>The Yocto Project Open Source Development Environment</title>
8
9<para>
10 This chapter helps you understand the Yocto Project as an open source development project.
11 In general, working in an open source environment is very different from working in a
12 closed, proprietary environment.
13 Additionally, the Yocto Project uses specific tools and constructs as part of its development
14 environment.
15 This chapter specifically addresses open source philosophy, using the
16 Yocto Project in a team environment, source repositories, Yocto Project
17 terms, licensing, the open source distributed version control system Git,
18 workflows, bug tracking, and how to submit changes.
19</para>
20
21<section id='open-source-philosophy'>
22 <title>Open Source Philosophy</title>
23
24 <para>
25 Open source philosophy is characterized by software development directed by peer production
26 and collaboration through an active community of developers.
27 Contrast this to the more standard centralized development models used by commercial software
28 companies where a finite set of developers produces a product for sale using a defined set
29 of procedures that ultimately result in an end product whose architecture and source material
30 are closed to the public.
31 </para>
32
33 <para>
34 Open source projects conceptually have differing concurrent agendas, approaches, and production.
35 These facets of the development process can come from anyone in the public (community) that has a
36 stake in the software project.
37 The open source environment contains new copyright, licensing, domain, and consumer issues
38 that differ from the more traditional development environment.
39 In an open source environment, the end product, source material, and documentation are
40 all available to the public at no cost.
41 </para>
42
43 <para>
44 A benchmark example of an open source project is the Linux Kernel, which was initially conceived
45 and created by Finnish computer science student Linus Torvalds in 1991.
46 Conversely, a good example of a non-open source project is the
47 <trademark class='registered'>Windows</trademark> family of operating
48 systems developed by <trademark class='registered'>Microsoft</trademark> Corporation.
49 </para>
50
51 <para>
52 Wikipedia has a good historical description of the Open Source Philosophy
53 <ulink url='http://en.wikipedia.org/wiki/Open_source'>here</ulink>.
54 You can also find helpful information on how to participate in the Linux Community
55 <ulink url='http://ldn.linuxfoundation.org/book/how-participate-linux-community'>here</ulink>.
56 </para>
57</section>
58
59<section id="usingpoky-changes-collaborate">
60 <title>Using the Yocto Project in a Team Environment</title>
61
62 <para>
63 It might not be immediately clear how you can use the Yocto
64 Project in a team environment, or scale it for a large team of
65 developers.
66 One of the strengths of the Yocto Project is that it is extremely
67 flexible.
68 Thus, you can adapt it to many different use cases and scenarios.
69 However, these characteristics can cause a struggle if you are trying
70 to create a working setup that scales across a large team.
71 </para>
72
73 <para>
74 To help with these types of situations, this section presents
75 some of the project's most successful experiences,
76 practices, solutions, and available technologies that work well.
77 Keep in mind, the information here is a starting point.
78 You can build off it and customize it to fit any
79 particular working environment and set of practices.
80 </para>
81
82 <section id='best-practices-system-configurations'>
83 <title>System Configurations</title>
84
85 <para>
86 Systems across a large team should meet the needs of
87 two types of developers: those working on the contents of the
88 operating system image itself and those developing applications.
89 Regardless of the type of developer, their workstations must
90 be both reasonably powerful and run Linux.
91 </para>
92
93 <section id='best-practices-application-development'>
94 <title>Application Development</title>
95
96 <para>
97 For developers who mainly do application level work
98 on top of an existing software stack,
99 here are some practices that work best:
100 <itemizedlist>
101 <listitem><para>Use a pre-built toolchain that
102 contains the software stack itself.
103 Then, develop the application code on top of the
104 stack.
105 This method works well for small numbers of relatively
106 isolated applications.</para></listitem>
107 <listitem><para>When possible, use the Yocto Project
108 plug-in for the <trademark class='trade'>Eclipse</trademark> IDE
109 and other pieces of Application Development
110 Technology (ADT).
111 For more information, see the
112 "<link linkend='application-development-workflow'>Application
113 Development Workflow</link>" section as well as the
114 <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project Application Developer's Guide</ulink>.
115 </para></listitem>
116 <listitem><para>Keep your cross-development toolchains
117 updated.
118 You can do this through provisioning either as new
119 toolchain downloads or as updates through a package
120 update mechanism using <filename>opkg</filename>
121 to provide updates to an existing toolchain.
122 The exact mechanics of how and when to do this are a
123 question for local policy.</para></listitem>
124 <listitem><para>Use multiple toolchains installed locally
125 into different locations to allow development across
126 versions.</para></listitem>
127 </itemizedlist>
128 </para>
129 </section>
130
131 <section id='best-practices-core-system-development'>
132 <title>Core System Development</title>
133
134 <para>
135 For core system development, it is often best to have the
136 build system itself available on the developer workstations
137 so developers can run their own builds and directly
138 rebuild the software stack.
139 You should keep the core system unchanged as much as
140 possible and do your work in layers on top of the core system.
141 Doing so gives you a greater level of portability when
142 upgrading to new versions of the core system or Board
143 Support Packages (BSPs).
144 You can share layers amongst the developers of a particular
145 project and contain the policy configuration that defines
146 the project.
147 </para>
148
149 <para>
150 Aside from the previous best practices, there exists a number
151 of tips and tricks that can help speed up core development
152 projects:
153 <itemizedlist>
154 <listitem><para>Use a
155 <ulink url='&YOCTO_DOCS_REF_URL;#shared-state-cache'>Shared State Cache</ulink>
156 (sstate) among groups of developers who are on a
157 fast network.
158 The best way to share sstate is through a
159 Network File System (NFS) share.
160 The first user to build a given component for the
161 first time contributes that object to the sstate,
162 while subsequent builds from other developers then
163 reuse the object rather than rebuild it themselves.
164 </para>
165 <para>Although it is possible to use other protocols for the
166 sstate such as HTTP and FTP, you should avoid these.
167 Using HTTP limits the sstate to read-only and
168 FTP provides poor performance.
169 </para></listitem>
170 <listitem><para>Have autobuilders contribute to the sstate
171 pool similarly to how the developer workstations
172 contribute.
173 For information, see the
174 <link linkend='best-practices-autobuilders'>Autobuilders</link>
175 section.</para></listitem>
176 <listitem><para>Build stand-alone tarballs that contain
177 "missing" system requirements if for some reason
178 developer workstations do not meet minimum system
179 requirements such as latest Python versions,
180 <filename>chrpath</filename>, or other tools.
181 You can install and relocate the tarball exactly as you
182 would the usual cross-development toolchain so that
183 all developers can meet minimum version requirements
184 on most distributions.</para></listitem>
185 <listitem><para>Use a small number of shared,
186 high performance systems for testing purposes
187 (e.g. dual six core Xeons with 24GB RAM and plenty of
188 disk space).
189 Developers can use these systems for wider, more
190 extensive testing while they continue to develop
191 locally using their primary development system.
192 </para></listitem>
193 <listitem><para>Enable the PR Service when package feeds
194 need to be incremental with continually increasing
195 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'>PR</ulink>
196 values.
197 Typically, this situation occurs when you use or
198 publish package feeds and use a shared state.
199 You should enable the PR Service for all users who
200 use the shared state pool.
201 For more information on the PR Service, see the
202 "<link linkend='working-with-a-pr-service'>Working With a PR Service</link>".
203 </para></listitem>
204 </itemizedlist>
205 </para>
206 </section>
207 </section>
208
209 <section id='best-practices-source-control-management'>
210 <title>Source Control Management (SCM)</title>
211
212 <para>
213 Keeping your
214 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
215 and any software you are developing under the
216 control of an SCM system that is compatible
217 with the OpenEmbedded build system is advisable.
218 Of the SCMs BitBake supports, the
219 Yocto Project team strongly recommends using
220 <link linkend='git'>Git</link>.
221 Git is a distributed system that is easy to backup,
222 allows you to work remotely, and then connects back to the
223 infrastructure.
224 <note>
225 For information about BitBake and SCMs, see the
226 BitBake manual located in the
227 <filename>bitbake/doc/manual</filename> directory of the
228 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
229 </note>
230 </para>
231
232 <para>
233 It is relatively easy to set up Git services and create
234 infrastructure like
235 <ulink url='&YOCTO_GIT_URL;'>http://git.yoctoproject.org</ulink>,
236 which is based on server software called
237 <filename>gitolite</filename> with <filename>cgit</filename>
238 being used to generate the web interface that lets you view the
239 repositories.
240 The <filename>gitolite</filename> software identifies users
241 using <filename>ssh</filename> keys and allows branch-based
242 access controls to repositories that you can control as little
243 or as much as necessary.
244 </para>
245
246 <note>
247 The setup of these services is beyond the scope of this manual.
248 However, sites such as these exist that describe how to perform
249 setup:
250 <itemizedlist>
251 <listitem><para><ulink url='http://git-scm.com/book/ch4-8.html'>Git documentation</ulink>:
252 Describes how to install <filename>gitolite</filename>
253 on the server.</para></listitem>
254 <listitem><para><ulink url='http://sitaramc.github.com/gitolite/master-toc.html'>The <filename>gitolite</filename> master index</ulink>:
255 All topics for <filename>gitolite</filename>.
256 </para></listitem>
257 <listitem><para><ulink url='https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools'>Interfaces, frontends, and tools</ulink>:
258 Documentation on how to create interfaces and frontends
259 for Git.</para></listitem>
260 </itemizedlist>
261 </note>
262 </section>
263
264 <section id='best-practices-autobuilders'>
265 <title>Autobuilders</title>
266
267 <para>
268 Autobuilders are often the core of a development project.
269 It is here that changes from individual developers are brought
270 together and centrally tested and subsequent decisions about
271 releases can be made.
272 Autobuilders also allow for "continuous integration" style
273 testing of software components and regression identification
274 and tracking.
275 </para>
276
277 <para>
278 See "<ulink url='http://autobuilder.yoctoproject.org'>Yocto Project Autobuilder</ulink>"
279 for more information and links to buildbot.
280 The Yocto Project team has found this implementation
281 works well in this role.
282 A public example of this is the Yocto Project
283 Autobuilders, which we use to test the overall health of the
284 project.
285 </para>
286
287 <para>
288 The features of this system are:
289 <itemizedlist>
290 <listitem><para>Highlights when commits break the build.
291 </para></listitem>
292 <listitem><para>Populates an sstate cache from which
293 developers can pull rather than requiring local
294 builds.</para></listitem>
295 <listitem><para>Allows commit hook triggers,
296 which trigger builds when commits are made.
297 </para></listitem>
298 <listitem><para>Allows triggering of automated image booting
299 and testing under the QuickEMUlator (QEMU).
300 </para></listitem>
301 <listitem><para>Supports incremental build testing and from
302 scratch builds.</para></listitem>
303 <listitem><para>Shares output that allows developer
304 testing and historical regression investigation.
305 </para></listitem>
306 <listitem><para>Creates output that can be used for releases.
307 </para></listitem>
308 <listitem><para>Allows scheduling of builds so that resources
309 can be used efficiently.</para></listitem>
310 </itemizedlist>
311 </para>
312 </section>
313
314 <section id='best-practices-policies-and-change-flow'>
315 <title>Policies and Change Flow</title>
316
317 <para>
318 The Yocto Project itself uses a hierarchical structure and a
319 pull model.
320 Scripts exist to create and send pull requests
321 (i.e. <filename>create-pull-request</filename> and
322 <filename>send-pull-request</filename>).
323 This model is in line with other open source projects where
324 maintainers are responsible for specific areas of the project
325 and a single maintainer handles the final "top-of-tree" merges.
326 </para>
327
328 <note>
329 You can also use a more collective push model.
330 The <filename>gitolite</filename> software supports both the
331 push and pull models quite easily.
332 </note>
333
334 <para>
335 As with any development environment, it is important
336 to document the policy used as well as any main project
337 guidelines so they are understood by everyone.
338 It is also a good idea to have well structured
339 commit messages, which are usually a part of a project's
340 guidelines.
341 Good commit messages are essential when looking back in time and
342 trying to understand why changes were made.
343 </para>
344
345 <para>
346 If you discover that changes are needed to the core layer of the
347 project, it is worth sharing those with the community as soon
348 as possible.
349 Chances are if you have discovered the need for changes, someone
350 else in the community needs them also.
351 </para>
352 </section>
353
354 <section id='best-practices-summary'>
355 <title>Summary</title>
356
357 <para>
358 This section summarizes the key recommendations described in the
359 previous sections:
360 <itemizedlist>
361 <listitem><para>Use <link linkend='git'>Git</link>
362 as the source control system.</para></listitem>
363 <listitem><para>Maintain your Metadata in layers that make sense
364 for your situation.
365 See the "<link linkend='understanding-and-creating-layers'>Understanding
366 and Creating Layers</link>" section for more information on
367 layers.</para></listitem>
368 <listitem><para>Separate the project's Metadata and code by using
369 separate Git repositories.
370 See the "<link linkend='yocto-project-repositories'>Yocto Project
371 Source Repositories</link>" section for information on these
372 repositories.
373 See the "<link linkend='getting-setup'>Getting Set Up</link>" section
374 for information on how to set up various Yocto Project related
375 Git repositories.</para></listitem>
376 <listitem><para>Set up the directory for the shared state cache
377 (<ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>)
378 where it makes sense.
379 For example, set up the sstate cache on a system used
380 by developers in the same organization and share the
381 same source directories on their machines.
382 </para></listitem>
383 <listitem><para>Set up an Autobuilder and have it populate the
384 sstate cache and source directories.</para></listitem>
385 <listitem><para>The Yocto Project community encourages you
386 to send patches to the project to fix bugs or add features.
387 If you do submit patches, follow the project commit
388 guidelines for writing good commit messages.
389 See the "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
390 section.</para></listitem>
391 <listitem><para>Send changes to the core sooner than later
392 as others likely run into the same issues.
393 For some guidance on mailing lists to use, see the list in the
394 "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
395 section.
396 For a description of the available mailing lists, see the
397 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
398 section in the Yocto Project Reference Manual.
399 </para></listitem>
400 </itemizedlist>
401 </para>
402 </section>
403</section>
404
405<section id='yocto-project-repositories'>
406 <title>Yocto Project Source Repositories</title>
407
408 <para>
409 The Yocto Project team maintains complete source repositories for all Yocto Project files
410 at <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>.
411 This web-based source code browser is organized into categories by function such as
412 IDE Plugins, Matchbox, Poky, Yocto Linux Kernel, and so forth.
413 From the interface, you can click on any particular item in the "Name" column and
414 see the URL at the bottom of the page that you need to clone a Git repository for
415 that particular item.
416 Having a local Git repository of the Source Directory (poky) allows you to
417 make changes, contribute to the history, and ultimately enhance the Yocto Project's
418 tools, Board Support Packages, and so forth.
419 </para>
420
421 <para>
422 Conversely, if you are a developer that is not interested in contributing back to the
423 Yocto Project, you have the ability to simply download and extract release tarballs
424 and use them within the Yocto Project environment.
425 All that is required is a particular release of the Yocto Project and
426 your application source code.
427 </para>
428
429 <para>
430 For any supported release of Yocto Project, you can go to the
431 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> and
432 select the "Downloads" tab and get a released tarball of the
433 <filename>poky</filename> repository or any supported BSP tarballs.
434 Unpacking these tarballs gives you a snapshot of the released
435 files.
436 <note>
437 The recommended method for setting up the Yocto Project
438 <link linkend='source-directory'>Source Directory</link> and the
439 files for supported BSPs (eg., <filename>meta-intel</filename>) is to
440 use <link linkend='git'>Git</link> to create a local copy of the
441 upstream repositories.
442 </note>
443 </para>
444
445 <para>
446 In summary, here is where you can get the project files needed for development:
447 <itemizedlist>
448 <listitem><para id='source-repositories'><emphasis><ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'>Source Repositories:</ulink></emphasis>
449 This area contains IDE Plugins, Matchbox, Poky, Poky Support, Tools, Yocto Linux Kernel, and Yocto
450 Metadata Layers.
451 You can create local copies of Git repositories for each of these areas.</para>
452 <para>
453 <imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" />
454 </para></listitem>
455 <listitem><para><anchor id='index-downloads' /><emphasis><ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink></emphasis>
456 This area contains index releases such as
457 the <trademark class='trade'>Eclipse</trademark>
458 Yocto Plug-in, miscellaneous support, poky, pseudo, installers for cross-development toolchains,
459 and all released versions of Yocto Project in the form of images or tarballs.
460 Downloading and extracting these files does not produce a local copy of the
461 Git repository but rather a snapshot of a particular release or image.</para>
462 <para>
463 <imagedata fileref="figures/index-downloads.png" align="center" width="6in" depth="3.5in" />
464 </para></listitem>
465 <listitem><para><emphasis>"Downloads" page for the
466 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>:</emphasis>
467 Access this page by going to the website and then selecting
468 the "Downloads" tab.
469 This page allows you to download any Yocto Project
470 release or Board Support Package (BSP) in tarball form.
471 The tarballs are similar to those found in the
472 <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink> area.</para>
473 <para>
474 <imagedata fileref="figures/yp-download.png" align="center" width="6in" depth="4in" />
475 </para></listitem>
476 </itemizedlist>
477 </para>
478</section>
479
480<section id='yocto-project-terms'>
481 <title>Yocto Project Terms</title>
482
483 <para>
484 Following is a list of terms and definitions users new to the Yocto Project development
485 environment might find helpful.
486 While some of these terms are universal, the list includes them just in case:
487 <itemizedlist>
488 <listitem><para><emphasis>Append Files:</emphasis> Files that append build information to
489 a recipe file.
490 Append files are known as BitBake append files and <filename>.bbappend</filename> files.
491 The OpenEmbedded build system expects every append file to have a corresponding
492 recipe (<filename>.bb</filename>) file.
493 Furthermore, the append file and corresponding recipe file
494 must use the same root filename.
495 The filenames can differ only in the file type suffix used (e.g.
496 <filename>formfactor_0.0.bb</filename> and <filename>formfactor_0.0.bbappend</filename>).
497 </para>
498 <para>Information in append files overrides the information in the similarly-named recipe file.
499 For an example of an append file in use, see the
500 "<link linkend='using-bbappend-files'>Using .bbappend Files</link>" section.
501 </para></listitem>
502 <listitem><para id='bitbake-term'><emphasis>BitBake:</emphasis>
503 The task executor and scheduler used by
504 the OpenEmbedded build system to build images.
505 For more information on BitBake, see the BitBake documentation
506 in the <filename>bitbake/doc/manual</filename> directory of the
507 <link linkend='source-directory'>Source Directory</link>.</para></listitem>
508 <listitem>
509 <para id='build-directory'><emphasis>Build Directory:</emphasis>
510 This term refers to the area used by the OpenEmbedded build system for builds.
511 The area is created when you <filename>source</filename> the setup
512 environment script that is found in the Source Directory
513 (i.e. <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
514 or
515 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>).
516 The <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink>
517 variable points to the Build Directory.</para>
518
519 <para>
520 You have a lot of flexibility when creating the Build
521 Directory.
522 Following are some examples that show how to create the
523 directory.
524 The examples assume your
525 <link linkend='source-directory'>Source Directory</link> is
526 named <filename>poky</filename>:
527 <itemizedlist>
528 <listitem><para>Create the Build Directory inside your
529 Source Directory and let the name of the Build
530 Directory default to <filename>build</filename>:
531 <literallayout class='monospaced'>
532 $ cd $HOME/poky
533 $ source &OE_INIT_FILE;
534 </literallayout></para></listitem>
535 <listitem><para>Create the Build Directory inside your
536 home directory and specifically name it
537 <filename>test-builds</filename>:
538 <literallayout class='monospaced'>
539 $ cd $HOME
540 $ source poky/&OE_INIT_FILE; test-builds
541 </literallayout></para></listitem>
542 <listitem><para>Provide a directory path and
543 specifically name the build directory.
544 Any intermediate folders in the pathname must
545 exist.
546 This next example creates a Build Directory named
547 <filename>YP-&POKYVERSION;</filename>
548 in your home directory within the existing
549 directory <filename>mybuilds</filename>:
550 <literallayout class='monospaced'>
551 $cd $HOME
552 $ source $HOME/poky/&OE_INIT_FILE; $HOME/mybuilds/YP-&POKYVERSION;
553 </literallayout></para></listitem>
554 </itemizedlist>
555 </para></listitem>
556 <listitem><para><emphasis>Build System:</emphasis> In the context of the Yocto Project,
557 this term refers to the OpenEmbedded build system used by the project.
558 This build system is based on the project known as "Poky."
559 For some historical information about Poky, see the
560 <link linkend='poky'>Poky</link> term.
561 </para></listitem>
562 <listitem><para><emphasis>Classes:</emphasis> Files that provide for logic encapsulation
563 and inheritance so that commonly used patterns can be defined once and then easily used
564 in multiple recipes.
565 Class files end with the <filename>.bbclass</filename> filename extension.
566 </para></listitem>
567 <listitem><para><emphasis>Configuration File:</emphasis> Configuration information in various
568 <filename>.conf</filename> files provides global definitions of variables.
569 The <filename>conf/local.conf</filename> configuration file in the
570 <link linkend='build-directory'>Build Directory</link>
571 contains user-defined variables that affect each build.
572 The <filename>meta-yocto/conf/distro/poky.conf</filename> configuration file
573 defines Yocto "distro" configuration
574 variables used only when building with this policy.
575 Machine configuration files, which
576 are located throughout the
577 <link linkend='source-directory'>Source Directory</link>, define
578 variables for specific hardware and are only used when building for that target
579 (e.g. the <filename>machine/beagleboard.conf</filename> configuration file defines
580 variables for the Texas Instruments ARM Cortex-A8 development board).
581 Configuration files end with a <filename>.conf</filename> filename extension.
582 </para></listitem>
583 <listitem><para id='cross-development-toolchain'>
584 <emphasis>Cross-Development Toolchain:</emphasis>
585 In general, a cross-development toolchain is a collection of
586 software development tools and utilities that run on one
587 architecture and allow you to develop software for a
588 different, or targeted, architecture.
589 These toolchains contain cross-compilers, linkers, and
590 debuggers that are specific to the target architecture.
591 </para>
592
593 <para>The Yocto Project supports two different cross-development
594 toolchains:
595 <itemizedlist>
596 <listitem><para>A toolchain only used by and within
597 BitBake when building an image for a target
598 architecture.</para></listitem>
599 <listitem><para>A relocatable toolchain used outside of
600 BitBake by developers when developing applications
601 that will run on a targeted device.
602 Sometimes this relocatable cross-development
603 toolchain is referred to as the meta-toolchain.
604 </para></listitem>
605 </itemizedlist>
606 </para>
607
608 <para>
609 Creation of these toolchains is simple and automated.
610 For information on toolchain concepts as they apply to the
611 Yocto Project, see the
612 "<ulink url='&YOCTO_DOCS_REF_URL;#cross-development-toolchain-generation'>Cross-Development Toolchain Generation</ulink>"
613 section in the Yocto Project Reference Manual.
614 You can also find more information on using the
615 relocatable toolchain in the
616 <ulink url='&YOCTO_DOCS_ADT_URL;'>Yocto Project
617 Application Developer's Guide</ulink>.
618 </para></listitem>
619 <listitem><para><emphasis>Image:</emphasis> An image is the result produced when
620 BitBake processes a given collection of recipes and related Metadata.
621 Images are the binary output that run on specific hardware or QEMU
622 and for specific use cases.
623 For a list of the supported image types that the Yocto Project provides, see the
624 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
625 chapter in the Yocto Project Reference Manual.</para></listitem>
626 <listitem><para id='layer'><emphasis>Layer:</emphasis> A collection of recipes representing the core,
627 a BSP, or an application stack.
628 For a discussion on BSP Layers, see the
629 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
630 section in the Yocto Project Board Support Packages (BSP)
631 Developer's Guide.</para></listitem>
632 <listitem><para id='meta-toolchain'><emphasis>Meta-Toolchain:</emphasis>
633 A term sometimes used for
634 <link linkend='cross-development-toolchain'>Cross-Development Toolchain</link>.
635 </para></listitem>
636 <listitem><para id='metadata'><emphasis>Metadata:</emphasis>
637 The files that BitBake parses when building an image.
638 In general, Metadata includes recipes, classes, and
639 configuration files.
640 In the context of the kernel ("kernel Metadata"),
641 it refers to Metadata in the <filename>meta</filename>
642 branches of the kernel source Git repositories.
643 </para></listitem>
644 <listitem><para id='oe-core'><emphasis>OE-Core:</emphasis> A core set of Metadata originating
645 with OpenEmbedded (OE) that is shared between OE and the Yocto Project.
646 This Metadata is found in the <filename>meta</filename> directory of the
647 <link linkend='source-directory'>Source Directory</link>.</para></listitem>
648 <listitem><para><emphasis>Package:</emphasis> In the context of the Yocto Project,
649 this term refers to the packaged output from a baked recipe.
650 A package is generally the compiled binaries produced from the recipe's sources.
651 You "bake" something by running it through BitBake.</para>
652 <para>It is worth noting that the term "package" can, in general, have subtle
653 meanings. For example, the packages referred to in the
654 "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" section are
655 compiled binaries that when installed add functionality to your Linux
656 distribution.</para>
657 <para>Another point worth noting is that historically within the Yocto Project,
658 recipes were referred to as packages - thus, the existence of several BitBake
659 variables that are seemingly mis-named,
660 (e.g. <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>,
661 <ulink url='&YOCTO_DOCS_REF_URL;#var-PRINC'><filename>PRINC</filename></ulink>,
662 <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>, and
663 <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>).
664 </para></listitem>
665 <listitem><para id='poky'><emphasis>Poky:</emphasis> The term "poky" can mean several things.
666 In its most general sense, it is an open-source project that was initially developed
667 by OpenedHand. With OpenedHand, poky was developed off of the existing OpenEmbedded
668 build system becoming a build system for embedded images.
669 After Intel Corporation acquired OpenedHand, the project poky became the basis for
670 the Yocto Project's build system.
671 Within the Yocto Project source repositories, <filename>poky</filename>
672 exists as a separate Git repository
673 that can be cloned to yield a local copy on the host system.
674 Thus, "poky" can refer to the local copy of the Source Directory used to develop within
675 the Yocto Project.</para></listitem>
676 <listitem><para><emphasis>Recipe:</emphasis> A set of instructions for building packages.
677 A recipe describes where you get source code and which patches to apply.
678 Recipes describe dependencies for libraries or for other recipes, and they
679 also contain configuration and compilation options.
680 Recipes contain the logical unit of execution, the software/images to build, and
681 use the <filename>.bb</filename> file extension.</para></listitem>
682 <listitem>
683 <para id='source-directory'><emphasis>Source Directory:</emphasis>
684 This term refers to the directory structure created as a result of either downloading
685 and unpacking a Yocto Project release tarball or creating a local copy of
686 the <filename>poky</filename> Git repository
687 <filename>git://git.yoctoproject.org/poky</filename>.
688 Sometimes you might hear the term "poky directory" used to refer to this
689 directory structure.
690 <note>
691 The OpenEmbedded build system does not support file or directory names that
692 contain spaces.
693 Be sure that the Source Directory you use does not contain these types
694 of names.
695 </note></para>
696 <para>The Source Directory contains BitBake, Documentation, Metadata and
697 other files that all support the Yocto Project.
698 Consequently, you must have the Source Directory in place on your development
699 system in order to do any development using the Yocto Project.</para>
700
701 <para>For tarball expansion, the name of the top-level directory of the Source Directory
702 is derived from the Yocto Project release tarball.
703 For example, downloading and unpacking <filename>&YOCTO_POKY_TARBALL;</filename>
704 results in a Source Directory whose top-level folder is named
705 <filename>&YOCTO_POKY;</filename>.
706 If you create a local copy of the Git repository, you can name the repository
707 anything you like.
708 Throughout much of the documentation, <filename>poky</filename> is used as the name of
709 the top-level folder of the local copy of the poky Git repository.
710 So, for example, cloning the <filename>poky</filename> Git repository results in a
711 local Git repository whose top-level folder is also named <filename>poky</filename>.</para>
712
713 <para>It is important to understand the differences between the Source Directory created
714 by unpacking a released tarball as compared to cloning
715 <filename>git://git.yoctoproject.org/poky</filename>.
716 When you unpack a tarball, you have an exact copy of the files based on the time of
717 release - a fixed release point.
718 Any changes you make to your local files in the Source Directory are on top of the release.
719 On the other hand, when you clone the <filename>poky</filename> Git repository, you have an
720 active development repository.
721 In this case, any local changes you make to the Source Directory can be later applied
722 to active development branches of the upstream <filename>poky</filename> Git
723 repository.</para>
724
725 <para>Finally, if you want to track a set of local changes while starting from the same point
726 as a release tarball, you can create a local Git branch that
727 reflects the exact copy of the files at the time of their release.
728 You do this by using Git tags that are part of the repository.</para>
729
730 <para>For more information on concepts related to Git repositories, branches, and tags,
731 see the
732 "<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>"
733 section.</para></listitem>
734 <listitem><para><emphasis>Tasks:</emphasis> Arbitrary groups of software Recipes.
735 You use tasks to hold recipes that, when built, usually accomplish a single task.
736 For example, a task could contain the recipes for a company’s proprietary or value-add software.
737 Or, the task could contain the recipes that enable graphics.
738 A task is really just another recipe.
739 Because task files are recipes, they end with the <filename>.bb</filename> filename
740 extension.</para></listitem>
741 <listitem><para><emphasis>Upstream:</emphasis> A reference to source code or repositories
742 that are not local to the development system but located in a master area that is controlled
743 by the maintainer of the source code.
744 For example, in order for a developer to work on a particular piece of code, they need to
745 first get a copy of it from an "upstream" source.</para></listitem>
746 </itemizedlist>
747 </para>
748</section>
749
750<section id='licensing'>
751 <title>Licensing</title>
752
753 <para>
754 Because open source projects are open to the public, they have different licensing structures in place.
755 License evolution for both Open Source and Free Software has an interesting history.
756 If you are interested in this history, you can find basic information here:
757 <itemizedlist>
758 <listitem><para><ulink url='http://en.wikipedia.org/wiki/Open-source_license'>Open source license history</ulink>
759 </para></listitem>
760 <listitem><para><ulink url='http://en.wikipedia.org/wiki/Free_software_license'>Free software license
761 history</ulink></para></listitem>
762 </itemizedlist>
763 </para>
764
765 <para>
766 In general, the Yocto Project is broadly licensed under the Massachusetts Institute of Technology
767 (MIT) License.
768 MIT licensing permits the reuse of software within proprietary software as long as the
769 license is distributed with that software.
770 MIT is also compatible with the GNU General Public License (GPL).
771 Patches to the Yocto Project follow the upstream licensing scheme.
772 You can find information on the MIT license at
773 <ulink url='http://www.opensource.org/licenses/mit-license.php'>here</ulink>.
774 You can find information on the GNU GPL <ulink url='http://www.opensource.org/licenses/LGPL-3.0'>
775 here</ulink>.
776 </para>
777
778 <para>
779 When you build an image using the Yocto Project, the build process uses a
780 known list of licenses to ensure compliance.
781 You can find this list in the
782 <link linkend='source-directory'>Source Directory</link> at
783 <filename>meta/files/common-licenses</filename>.
784 Once the build completes, the list of all licenses found and used during that build are
785 kept in the
786 <link linkend='build-directory'>Build Directory</link> at
787 <filename>tmp/deploy/licenses</filename>.
788 </para>
789
790 <para>
791 If a module requires a license that is not in the base list, the build process
792 generates a warning during the build.
793 These tools make it easier for a developer to be certain of the licenses with which
794 their shipped products must comply.
795 However, even with these tools it is still up to the developer to resolve potential licensing issues.
796 </para>
797
798 <para>
799 The base list of licenses used by the build process is a combination of the Software Package
800 Data Exchange (SPDX) list and the Open Source Initiative (OSI) projects.
801 <ulink url='http://spdx.org'>SPDX Group</ulink> is a working group of the Linux Foundation
802 that maintains a specification
803 for a standard format for communicating the components, licenses, and copyrights
804 associated with a software package.
805 <ulink url='http://opensource.org'>OSI</ulink> is a corporation dedicated to the Open Source
806 Definition and the effort for reviewing and approving licenses that are OSD-conformant.
807 </para>
808
809 <para>
810 You can find a list of the combined SPDX and OSI licenses that the Yocto Project uses
811 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/files/common-licenses'>here</ulink>.
812 </para>
813
814 <para>
815 For information that can help you to maintain compliance with various open source licensing
816 during the lifecycle of a product created using the Yocto Project, see the
817 "<link linkend='maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</link>" section.
818 </para>
819</section>
820
821<section id='git'>
822 <title>Git</title>
823
824 <para>
825 The Yocto Project makes extensive use of Git,
826 which is a free, open source distributed version control system.
827 Git supports distributed development, non-linear development, and can handle large projects.
828 It is best that you have some fundamental understanding of how Git tracks projects and
829 how to work with Git if you are going to use the Yocto Project for development.
830 This section provides a quick overview of how Git works and provides you with a summary
831 of some essential Git commands.
832 </para>
833
834 <para>
835 For more information on Git, see
836 <ulink url='http://git-scm.com/documentation'></ulink>.
837 If you need to download Git, go to <ulink url='http://git-scm.com/download'></ulink>.
838 </para>
839
840 <section id='repositories-tags-and-branches'>
841 <title>Repositories, Tags, and Branches</title>
842
843 <para>
844 As mentioned earlier in the section
845 "<link linkend='yocto-project-repositories'>Yocto Project Source Repositories</link>",
846 the Yocto Project maintains source repositories at
847 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
848 If you look at this web-interface of the repositories, each item is a separate
849 Git repository.
850 </para>
851
852 <para>
853 Git repositories use branching techniques that track content change (not files)
854 within a project (e.g. a new feature or updated documentation).
855 Creating a tree-like structure based on project divergence allows for excellent historical
856 information over the life of a project.
857 This methodology also allows for an environment from which you can do lots of
858 local experimentation on projects as you develop changes or new features.
859 </para>
860
861 <para>
862 A Git repository represents all development efforts for a given project.
863 For example, the Git repository <filename>poky</filename> contains all changes
864 and developments for Poky over the course of its entire life.
865 That means that all changes that make up all releases are captured.
866 The repository maintains a complete history of changes.
867 </para>
868
869 <para>
870 You can create a local copy of any repository by "cloning" it with the Git
871 <filename>clone</filename> command.
872 When you clone a Git repository, you end up with an identical copy of the
873 repository on your development system.
874 Once you have a local copy of a repository, you can take steps to develop locally.
875 For examples on how to clone Git repositories, see the
876 "<link linkend='getting-setup'>Getting Set Up</link>" section.
877 </para>
878
879 <para>
880 It is important to understand that Git tracks content change and not files.
881 Git uses "branches" to organize different development efforts.
882 For example, the <filename>poky</filename> repository has
883 <filename>denzil</filename>, <filename>danny</filename>,
884 <filename>dylan</filename>, <filename>dora</filename>,
885 and <filename>master</filename> branches among others.
886 You can see all the branches by going to
887 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
888 clicking on the
889 <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/heads'>[...]</ulink></filename>
890 link beneath the "Branch" heading.
891 </para>
892
893 <para>
894 Each of these branches represents a specific area of development.
895 The <filename>master</filename> branch represents the current or most recent
896 development.
897 All other branches represent off-shoots of the <filename>master</filename>
898 branch.
899 </para>
900
901 <para>
902 When you create a local copy of a Git repository, the copy has the same set
903 of branches as the original.
904 This means you can use Git to create a local working area (also called a branch)
905 that tracks a specific development branch from the source Git repository.
906 in other words, you can define your local Git environment to work on any development
907 branch in the repository.
908 To help illustrate, here is a set of commands that creates a local copy of the
909 <filename>poky</filename> Git repository and then creates and checks out a local
910 Git branch that tracks the Yocto Project &DISTRO; Release (&DISTRO_NAME;) development:
911 <literallayout class='monospaced'>
912 $ cd ~
913 $ git clone git://git.yoctoproject.org/poky
914 $ cd poky
915 $ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME;
916 </literallayout>
917 In this example, the name of the top-level directory of your local
918 <link linkend='source-directory'>Source Directory</link>
919 is <filename>poky</filename>,
920 and the name of that local working area (local branch) you just
921 created and checked out is <filename>&DISTRO_NAME;</filename>.
922 The files in your local repository now reflect the same files that
923 are in the <filename>&DISTRO_NAME;</filename> development
924 branch of the Yocto Project's <filename>poky</filename>
925 upstream repository.
926 It is important to understand that when you create and checkout a
927 local working branch based on a branch name,
928 your local environment matches the "tip" of that development branch
929 at the time you created your local branch, which could be
930 different from the files at the time of a similarly named release.
931 In other words, creating and checking out a local branch based on the
932 <filename>&DISTRO_NAME;</filename> branch name is not the same as
933 cloning and checking out the <filename>master</filename> branch.
934 Keep reading to see how you create a local snapshot of a Yocto Project Release.
935 </para>
936
937 <para>
938 Git uses "tags" to mark specific changes in a repository.
939 Typically, a tag is used to mark a special point such as the final change
940 before a project is released.
941 You can see the tags used with the <filename>poky</filename> Git repository
942 by going to <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and
943 clicking on the
944 <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/tags'>[...]</ulink></filename>
945 link beneath the "Tag" heading.
946 </para>
947
948 <para>
949 Some key tags are <filename>bernard-5.0</filename>, <filename>denzil-7.0</filename>,
950 and <filename>&DISTRO_NAME;-&POKYVERSION;</filename>.
951 These tags represent Yocto Project releases.
952 </para>
953
954 <para>
955 When you create a local copy of the Git repository, you also have access to all the
956 tags.
957 Similar to branches, you can create and checkout a local working Git branch based
958 on a tag name.
959 When you do this, you get a snapshot of the Git repository that reflects
960 the state of the files when the change was made associated with that tag.
961 The most common use is to checkout a working branch that matches a specific
962 Yocto Project release.
963 Here is an example:
964 <literallayout class='monospaced'>
965 $ cd ~
966 $ git clone git://git.yoctoproject.org/poky
967 $ cd poky
968 $ git checkout -b my-&DISTRO_NAME;-&POKYVERSION; &DISTRO_NAME;-&POKYVERSION;
969 </literallayout>
970 In this example, the name of the top-level directory of your local Yocto Project
971 Files Git repository is <filename>poky</filename>.
972 And, the name of the local branch you have created and checked out is
973 <filename>my-&DISTRO_NAME;-&POKYVERSION;</filename>.
974 The files in your repository now exactly match the Yocto Project &DISTRO;
975 Release tag (<filename>&DISTRO_NAME;-&POKYVERSION;</filename>).
976 It is important to understand that when you create and checkout a local
977 working branch based on a tag, your environment matches a specific point
978 in time and not the entire development branch.
979 </para>
980 </section>
981
982 <section id='basic-commands'>
983 <title>Basic Commands</title>
984
985 <para>
986 Git has an extensive set of commands that lets you manage changes and perform
987 collaboration over the life of a project.
988 Conveniently though, you can manage with a small set of basic operations and workflows
989 once you understand the basic philosophy behind Git.
990 You do not have to be an expert in Git to be functional.
991 A good place to look for instruction on a minimal set of Git commands is
992 <ulink url='http://git-scm.com/documentation'>here</ulink>.
993 If you need to download Git, you can do so
994 <ulink url='http://git-scm.com/download'>here</ulink>.
995 </para>
996
997 <para>
998 If you don’t know much about Git, you should educate
999 yourself by visiting the links previously mentioned.
1000 </para>
1001
1002 <para>
1003 The following list briefly describes some basic Git operations as a way to get started.
1004 As with any set of commands, this list (in most cases) simply shows the base command and
1005 omits the many arguments they support.
1006 See the Git documentation for complete descriptions and strategies on how to use these commands:
1007 <itemizedlist>
1008 <listitem><para><emphasis><filename>git init</filename>:</emphasis> Initializes an empty Git repository.
1009 You cannot use Git commands unless you have a <filename>.git</filename> repository.</para></listitem>
1010 <listitem><para><emphasis><filename>git clone</filename>:</emphasis> Creates a clone of a repository.
1011 During collaboration, this command allows you to create a local repository that is on
1012 equal footing with a fellow developer’s repository.</para></listitem>
1013 <listitem><para><emphasis><filename>git add</filename>:</emphasis> Stages updated file contents
1014 to the index that
1015 Git uses to track changes.
1016 You must stage all files that have changed before you can commit them.</para></listitem>
1017 <listitem><para><emphasis><filename>git commit</filename>:</emphasis> Creates a "commit" that documents
1018 the changes you made.
1019 Commits are used for historical purposes, for determining if a maintainer of a project
1020 will allow the change, and for ultimately pushing the change from your local Git repository
1021 into the project’s upstream (or master) repository.</para></listitem>
1022 <listitem><para><emphasis><filename>git status</filename>:</emphasis> Reports any modified files that
1023 possibly need to be staged and committed.</para></listitem>
1024 <listitem><para><emphasis><filename>git checkout &lt;branch-name&gt;</filename>:</emphasis> Changes
1025 your working branch.
1026 This command is analogous to "cd".</para></listitem>
1027 <listitem><para><emphasis><filename>git checkout –b &lt;working-branch&gt;</filename>:</emphasis> Creates
1028 a working branch on your local machine where you can isolate work.
1029 It is a good idea to use local branches when adding specific features or changes.
1030 This way if you do not like what you have done you can easily get rid of the work.</para></listitem>
1031 <listitem><para><emphasis><filename>git branch</filename>:</emphasis> Reports
1032 existing local branches and
1033 tells you the branch in which you are currently working.</para></listitem>
1034 <listitem><para><emphasis><filename>git branch -D &lt;branch-name&gt;</filename>:</emphasis>
1035 Deletes an existing local branch.
1036 You need to be in a local branch other than the one you are deleting
1037 in order to delete <filename>&lt;branch-name&gt;</filename>.</para></listitem>
1038 <listitem><para><emphasis><filename>git pull</filename>:</emphasis> Retrieves information
1039 from an upstream Git
1040 repository and places it in your local Git repository.
1041 You use this command to make sure you are synchronized with the repository
1042 from which you are basing changes (.e.g. the master branch).</para></listitem>
1043 <listitem><para><emphasis><filename>git push</filename>:</emphasis>
1044 Sends all your committed local changes to an upstream Git
1045 repository (e.g. a contribution repository).
1046 The maintainer of the project draws from these repositories
1047 when adding changes to the project’s master repository or
1048 other development branch.
1049 </para></listitem>
1050 <listitem><para><emphasis><filename>git merge</filename>:</emphasis> Combines or adds changes from one
1051 local branch of your repository with another branch.
1052 When you create a local Git repository, the default branch is named "master".
1053 A typical workflow is to create a temporary branch for isolated work, make and commit your
1054 changes, switch to your local master branch, merge the changes from the temporary branch into the
1055 local master branch, and then delete the temporary branch.</para></listitem>
1056 <listitem><para><emphasis><filename>git cherry-pick</filename>:</emphasis> Choose and apply specific
1057 commits from one branch into another branch.
1058 There are times when you might not be able to merge all the changes in one branch with
1059 another but need to pick out certain ones.</para></listitem>
1060 <listitem><para><emphasis><filename>gitk</filename>:</emphasis> Provides a GUI view of the branches
1061 and changes in your local Git repository.
1062 This command is a good way to graphically see where things have diverged in your
1063 local repository.</para></listitem>
1064 <listitem><para><emphasis><filename>git log</filename>:</emphasis> Reports a history of your changes to the
1065 repository.</para></listitem>
1066 <listitem><para><emphasis><filename>git diff</filename>:</emphasis> Displays line-by-line differences
1067 between your local working files and the same files in the upstream Git repository that your
1068 branch currently tracks.</para></listitem>
1069 </itemizedlist>
1070 </para>
1071 </section>
1072</section>
1073
1074<section id='workflows'>
1075 <title>Workflows</title>
1076
1077 <para>
1078 This section provides some overview on workflows using Git.
1079 In particular, the information covers basic practices that describe roles and actions in a
1080 collaborative development environment.
1081 Again, if you are familiar with this type of development environment, you might want to just
1082 skip this section.
1083 </para>
1084
1085 <para>
1086 The Yocto Project files are maintained using Git in a "master" branch whose Git history
1087 tracks every change and whose structure provides branches for all diverging functionality.
1088 Although there is no need to use Git, many open source projects do so.
1089 For the Yocto Project, a key individual called the "maintainer" is responsible for the "master"
1090 branch of a given Git repository.
1091 The "master" branch is the “upstream” repository where the final builds of the project occur.
1092 The maintainer is responsible for allowing changes in from other developers and for
1093 organizing the underlying branch structure to reflect release strategies and so forth.
1094 <note>For information on finding out who is responsible (maintains)
1095 for a particular area of code, see the
1096 "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
1097 section.
1098 </note>
1099 </para>
1100
1101 <para>
1102 The project also has contribution repositories known as "contrib" areas.
1103 These areas temporarily hold changes to the project that have been submitted or committed
1104 by the Yocto Project development team and by community members that contribute to the project.
1105 The maintainer determines if the changes are qualified to be moved from the "contrib" areas
1106 into the "master" branch of the Git repository.
1107 </para>
1108
1109 <para>
1110 Developers (including contributing community members) create and maintain cloned repositories
1111 of the upstream "master" branch.
1112 These repositories are local to their development platforms and are used to develop changes.
1113 When a developer is satisfied with a particular feature or change, they "push" the changes
1114 to the appropriate "contrib" repository.
1115 </para>
1116
1117 <para>
1118 Developers are responsible for keeping their local repository up-to-date with "master".
1119 They are also responsible for straightening out any conflicts that might arise within files
1120 that are being worked on simultaneously by more than one person.
1121 All this work is done locally on the developer’s machines before anything is pushed to a
1122 "contrib" area and examined at the maintainer’s level.
1123 </para>
1124
1125 <para>
1126 A somewhat formal method exists by which developers commit changes and push them into the
1127 "contrib" area and subsequently request that the maintainer include them into "master"
1128 This process is called “submitting a patch” or "submitting a change."
1129 For information on submitting patches and changes, see the
1130 "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>" section.
1131 </para>
1132
1133 <para>
1134 To summarize the environment: we have a single point of entry for changes into the project’s
1135 "master" branch of the Git repository, which is controlled by the project’s maintainer.
1136 And, we have a set of developers who independently develop, test, and submit changes
1137 to "contrib" areas for the maintainer to examine.
1138 The maintainer then chooses which changes are going to become a permanent part of the project.
1139 </para>
1140
1141 <para>
1142 <imagedata fileref="figures/git-workflow.png" width="6in" depth="3in" align="left" scalefit="1" />
1143 </para>
1144
1145 <para>
1146 While each development environment is unique, there are some best practices or methods
1147 that help development run smoothly.
1148 The following list describes some of these practices.
1149 For more information about Git workflows, see the workflow topics in the
1150 <ulink url='http://book.git-scm.com'>Git Community Book</ulink>.
1151 <itemizedlist>
1152 <listitem><para><emphasis>Make Small Changes:</emphasis> It is best to keep the changes you commit
1153 small as compared to bundling many disparate changes into a single commit.
1154 This practice not only keeps things manageable but also allows the maintainer
1155 to more easily include or refuse changes.</para>
1156 <para>It is also good practice to leave the repository in a state that allows you to
1157 still successfully build your project. In other words, do not commit half of a feature,
1158 then add the other half as a separate, later commit.
1159 Each commit should take you from one buildable project state to another
1160 buildable state.</para></listitem>
1161 <listitem><para><emphasis>Use Branches Liberally:</emphasis> It is very easy to create, use, and
1162 delete local branches in your working Git repository.
1163 You can name these branches anything you like.
1164 It is helpful to give them names associated with the particular feature or change
1165 on which you are working.
1166 Once you are done with a feature or change and have merged it
1167 into your local master branch, simply discard the temporary
1168 branch.</para></listitem>
1169 <listitem><para><emphasis>Merge Changes:</emphasis> The <filename>git merge</filename>
1170 command allows you to take the
1171 changes from one branch and fold them into another branch.
1172 This process is especially helpful when more than a single developer might be working
1173 on different parts of the same feature.
1174 Merging changes also automatically identifies any collisions or "conflicts"
1175 that might happen as a result of the same lines of code being altered by two different
1176 developers.</para></listitem>
1177 <listitem><para><emphasis>Manage Branches:</emphasis> Because branches are easy to use, you should
1178 use a system where branches indicate varying levels of code readiness.
1179 For example, you can have a "work" branch to develop in, a "test" branch where the code or
1180 change is tested, a "stage" branch where changes are ready to be committed, and so forth.
1181 As your project develops, you can merge code across the branches to reflect ever-increasing
1182 stable states of the development.</para></listitem>
1183 <listitem><para><emphasis>Use Push and Pull:</emphasis> The push-pull workflow is based on the
1184 concept of developers "pushing" local commits to a remote repository, which is
1185 usually a contribution repository.
1186 This workflow is also based on developers "pulling" known states of the project down into their
1187 local development repositories.
1188 The workflow easily allows you to pull changes submitted by other developers from the
1189 upstream repository into your work area ensuring that you have the most recent software
1190 on which to develop.
1191 The Yocto Project has two scripts named <filename>create-pull-request</filename> and
1192 <filename>send-pull-request</filename> that ship with the release to facilitate this
1193 workflow.
1194 You can find these scripts in the <filename>scripts</filename>
1195 folder of the
1196 <link linkend='source-directory'>Source Directory</link>.
1197 For information on how to use these scripts, see the
1198 "<link linkend='pushing-a-change-upstream'>Using Scripts to Push a Change Upstream and Request a Pull</link>" section.
1199 </para></listitem>
1200 <listitem><para><emphasis>Patch Workflow:</emphasis> This workflow allows you to notify the
1201 maintainer through an email that you have a change (or patch) you would like considered
1202 for the "master" branch of the Git repository.
1203 To send this type of change, you format the patch and then send the email using the Git commands
1204 <filename>git format-patch</filename> and <filename>git send-email</filename>.
1205 For information on how to use these scripts, see the
1206 "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
1207 section.
1208 </para></listitem>
1209 </itemizedlist>
1210 </para>
1211</section>
1212
1213<section id='tracking-bugs'>
1214 <title>Tracking Bugs</title>
1215
1216 <para>
1217 The Yocto Project uses its own implementation of
1218 <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink> to track bugs.
1219 Implementations of Bugzilla work well for group development because they track bugs and code
1220 changes, can be used to communicate changes and problems with developers, can be used to
1221 submit and review patches, and can be used to manage quality assurance.
1222 The home page for the Yocto Project implementation of Bugzilla is
1223 <ulink url='&YOCTO_BUGZILLA_URL;'>&YOCTO_BUGZILLA_URL;</ulink>.
1224 </para>
1225
1226 <para>
1227 Sometimes it is helpful to submit, investigate, or track a bug against the Yocto Project itself
1228 such as when discovering an issue with some component of the build system that acts contrary
1229 to the documentation or your expectations.
1230 Following is the general procedure for submitting a new bug using the Yocto Project
1231 Bugzilla.
1232 You can find more information on defect management, bug tracking, and feature request
1233 processes all accomplished through the Yocto Project Bugzilla on the wiki page
1234 <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>here</ulink>.
1235 <orderedlist>
1236 <listitem><para>Always use the Yocto Project implementation of Bugzilla to submit
1237 a bug.</para></listitem>
1238 <listitem><para>When submitting a new bug, be sure to choose the appropriate
1239 Classification, Product, and Component for which the issue was found.
1240 Defects for the Yocto Project fall into one of six classifications: Yocto Project
1241 Components, Infrastructure, Build System &amp; Metadata, Documentation,
1242 QA/Testing, and Runtime.
1243 Each of these Classifications break down into multiple Products and, in some
1244 cases, multiple Components.</para></listitem>
1245 <listitem><para>Use the bug form to choose the correct Hardware and Architecture
1246 for which the bug applies.</para></listitem>
1247 <listitem><para>Indicate the Yocto Project version you were using when the issue
1248 occurred.</para></listitem>
1249 <listitem><para>Be sure to indicate the Severity of the bug.
1250 Severity communicates how the bug impacted your work.</para></listitem>
1251 <listitem><para>Select the appropriate "Documentation change" item
1252 for the bug.
1253 Fixing a bug may or may not affect the Yocto Project
1254 documentation.</para></listitem>
1255 <listitem><para>Provide a brief summary of the issue.
1256 Try to limit your summary to just a line or two and be sure to capture the
1257 essence of the issue.</para></listitem>
1258 <listitem><para>Provide a detailed description of the issue.
1259 You should provide as much detail as you can about the context, behavior, output,
1260 and so forth that surrounds the issue.
1261 You can even attach supporting files for output from logs by
1262 using the "Add an attachment" button.</para></listitem>
1263 <listitem><para>Be sure to copy the appropriate people in the
1264 "CC List" for the bug.
1265 See the "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
1266 section for information about finding out who is responsible
1267 for code.</para></listitem>
1268 <listitem><para>Submit the bug by clicking the "Submit Bug" button.</para></listitem>
1269 </orderedlist>
1270 </para>
1271</section>
1272
1273<section id='how-to-submit-a-change'>
1274 <title>How to Submit a Change</title>
1275
1276 <para>
1277 Contributions to the Yocto Project and OpenEmbedded are very welcome.
1278 Because the system is extremely configurable and flexible, we recognize that developers
1279 will want to extend, configure or optimize it for their specific uses.
1280 You should send patches to the appropriate mailing list so that they
1281 can be reviewed and merged by the appropriate maintainer.
1282 </para>
1283
1284 <para>
1285 Before submitting any change, be sure to find out who you should be
1286 notifying.
1287 Several methods exist through which you find out who you should be copying
1288 or notifying:
1289 <itemizedlist>
1290 <listitem><para><emphasis>Maintenance File:</emphasis>
1291 Examine the <filename>maintainers.inc</filename> file, which is
1292 located in the
1293 <link linkend='source-directory'>Source Directory</link>
1294 at <filename>meta-yocto/conf/distro/include</filename>, to
1295 see who is responsible for code.
1296 </para></listitem>
1297 <listitem><para><emphasis>Board Support Package (BSP) README Files:</emphasis>
1298 For BSP maintainers of supported BSPs, you can examine
1299 individual BSP <filename>README</filename> files.
1300 In addition, some layers (such as the <filename>meta-intel</filename> layer),
1301 include a <filename>MAINTAINERS</filename> file which contains
1302 a list of all supported BSP maintainers for that layer.
1303 </para></listitem>
1304 <listitem><para><emphasis>Search by File:</emphasis>
1305 Using <link linkend='git'>Git</link>, you can enter the
1306 following command to bring up a short list of all commits
1307 against a specific file:
1308 <literallayout class='monospaced'>
1309 git shortlog -- &lt;filename&gt;
1310 </literallayout>
1311 Just provide the name of the file for which you are interested.
1312 The information returned is not ordered by history but does
1313 include a list of all committers grouped by name.
1314 From the list, you can see who is responsible for the bulk of
1315 the changes against the file.
1316 </para></listitem>
1317 </itemizedlist>
1318 </para>
1319
1320 <para>
1321 For a list of the Yocto Project and related mailing lists, see the
1322 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing lists</ulink>" section in
1323 the Yocto Project Reference Manual.
1324 </para>
1325
1326 <para>
1327 Here is some guidance on which mailing list to use for what type of change:
1328 <itemizedlist>
1329 <listitem><para>For changes to the core
1330 <link linkend='metadata'>Metadata</link>, send your patch to the
1331 <ulink url='&OE_LISTS_URL;/listinfo/openembedded-core'>openembedded-core</ulink> mailing list.
1332 For example, a change to anything under the <filename>meta</filename> or
1333 <filename>scripts</filename> directories
1334 should be sent to this mailing list.</para></listitem>
1335 <listitem><para>For changes to BitBake (anything under the <filename>bitbake</filename>
1336 directory), send your patch to the
1337 <ulink url='&OE_LISTS_URL;/listinfo/bitbake-devel'>bitbake-devel</ulink> mailing list.</para></listitem>
1338 <listitem><para>For changes to <filename>meta-yocto</filename>, send your patch to the
1339 <ulink url='&YOCTO_LISTS_URL;/listinfo/poky'>poky</ulink> mailing list.</para></listitem>
1340 <listitem><para>For changes to other layers hosted on
1341 <filename>yoctoproject.org</filename> (unless the
1342 layer's documentation specifies otherwise), tools, and Yocto Project
1343 documentation, use the
1344 <ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'>yocto</ulink> mailing list.</para></listitem>
1345 <listitem><para>For additional recipes that do not fit into the core Metadata,
1346 you should determine which layer the recipe should go into and submit the
1347 change in the manner recommended by the documentation (e.g. README) supplied
1348 with the layer. If in doubt, please ask on the
1349 <ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'>yocto</ulink> or
1350 <ulink url='&OE_LISTS_URL;/listinfo/openembedded-devel'>openembedded-devel</ulink>
1351 mailing lists.</para></listitem>
1352 </itemizedlist>
1353 </para>
1354
1355 <para>
1356 When you send a patch, be sure to include a "Signed-off-by:"
1357 line in the same style as required by the Linux kernel.
1358 Adding this line signifies that you, the submitter, have agreed to the Developer's Certificate of Origin 1.1
1359 as follows:
1360 <literallayout class='monospaced'>
1361 Developer's Certificate of Origin 1.1
1362
1363 By making a contribution to this project, I certify that:
1364
1365 (a) The contribution was created in whole or in part by me and I
1366 have the right to submit it under the open source license
1367 indicated in the file; or
1368
1369 (b) The contribution is based upon previous work that, to the best
1370 of my knowledge, is covered under an appropriate open source
1371 license and I have the right under that license to submit that
1372 work with modifications, whether created in whole or in part
1373 by me, under the same open source license (unless I am
1374 permitted to submit under a different license), as indicated
1375 in the file; or
1376
1377 (c) The contribution was provided directly to me by some other
1378 person who certified (a), (b) or (c) and I have not modified
1379 it.
1380
1381 (d) I understand and agree that this project and the contribution
1382 are public and that a record of the contribution (including all
1383 personal information I submit with it, including my sign-off) is
1384 maintained indefinitely and may be redistributed consistent with
1385 this project or the open source license(s) involved.
1386 </literallayout>
1387 </para>
1388
1389 <para>
1390 In a collaborative environment, it is necessary to have some sort of standard
1391 or method through which you submit changes.
1392 Otherwise, things could get quite chaotic.
1393 One general practice to follow is to make small, controlled changes.
1394 Keeping changes small and isolated aids review, makes merging/rebasing easier
1395 and keeps the change history clean when anyone needs to refer to it in future.
1396 </para>
1397
1398 <para>
1399 When you make a commit, you must follow certain standards established by the
1400 OpenEmbedded and Yocto Project development teams.
1401 For each commit, you must provide a single-line summary of the change and you
1402 should almost always provide a more detailed description of what you did (i.e.
1403 the body of the commit message).
1404 The only exceptions for not providing a detailed description would be if your
1405 change is a simple, self-explanatory change that needs no further description
1406 beyond the summary.
1407 Here are the guidelines for composing a commit message:
1408 <itemizedlist>
1409 <listitem><para>Provide a single-line, short summary of the change.
1410 This summary is typically viewable in the "shortlist" of changes.
1411 Thus, providing something short and descriptive that gives the reader
1412 a summary of the change is useful when viewing a list of many commits.
1413 This short description should be prefixed by the recipe name (if changing a recipe), or
1414 else the short form path to the file being changed.
1415 </para></listitem>
1416 <listitem><para>For the body of the commit message, provide detailed information
1417 that describes what you changed, why you made the change, and the approach
1418 you used. It may also be helpful if you mention how you tested the change.
1419 Provide as much detail as you can in the body of the commit message.
1420 </para></listitem>
1421 <listitem><para>If the change addresses a specific bug or issue that is
1422 associated with a bug-tracking ID, include a reference to that ID in
1423 your detailed description.
1424 For example, the Yocto Project uses a specific convention for bug
1425 references - any commit that addresses a specific bug should include the
1426 bug ID in the description (typically at the beginning) as follows:
1427 <literallayout class='monospaced'>
1428 [YOCTO #&lt;bug-id&gt;]
1429
1430 &lt;detailed description of change&gt;
1431 </literallayout></para></listitem>
1432 Where &lt;bug-id&gt; is replaced with the specific bug ID from the
1433 Yocto Project Bugzilla instance.
1434 </itemizedlist>
1435 </para>
1436
1437 <para>
1438 You can find more guidance on creating well-formed commit messages at this OpenEmbedded
1439 wiki page:
1440 <ulink url='&OE_HOME_URL;/wiki/Commit_Patch_Message_Guidelines'></ulink>.
1441 </para>
1442
1443 <para>
1444 The next two sections describe general instructions for both pushing
1445 changes upstream and for submitting changes as patches.
1446 </para>
1447
1448 <section id='pushing-a-change-upstream'>
1449 <title>Using Scripts to Push a Change Upstream and Request a Pull</title>
1450
1451 <para>
1452 The basic flow for pushing a change to an upstream "contrib" Git repository is as follows:
1453 <itemizedlist>
1454 <listitem><para>Make your changes in your local Git repository.</para></listitem>
1455 <listitem><para>Stage your changes by using the <filename>git add</filename>
1456 command on each file you changed.</para></listitem>
1457 <listitem><para>Commit the change by using the <filename>git commit</filename>
1458 command and push it to the "contrib" repository.
1459 Be sure to provide a commit message that follows the project’s commit message standards
1460 as described earlier.</para></listitem>
1461 <listitem><para>Notify the maintainer that you have pushed a change by making a pull
1462 request.
1463 The Yocto Project provides two scripts that conveniently let you generate and send
1464 pull requests to the Yocto Project.
1465 These scripts are <filename>create-pull-request</filename> and
1466 <filename>send-pull-request</filename>.
1467 You can find these scripts in the <filename>scripts</filename> directory
1468 within the <link linkend='source-directory'>Source Directory</link>.</para>
1469 <para>Using these scripts correctly formats the requests without introducing any
1470 whitespace or HTML formatting.
1471 The maintainer that receives your patches needs to be able to save and apply them
1472 directly from your emails.
1473 Using these scripts is the preferred method for sending patches.</para>
1474 <para>For help on using these scripts, simply provide the
1475 <filename>-h</filename> argument as follows:
1476 <literallayout class='monospaced'>
1477 $ poky/scripts/create-pull-request -h
1478 $ poky/scripts/send-pull-request -h
1479 </literallayout></para></listitem>
1480 </itemizedlist>
1481 </para>
1482
1483 <para>
1484 You can find general Git information on how to push a change upstream in the
1485 <ulink url='http://book.git-scm.com/3_distributed_workflows.html'>Git Community Book</ulink>.
1486 </para>
1487 </section>
1488
1489 <section id='submitting-a-patch'>
1490 <title>Using Email to Submit a Patch</title>
1491
1492 <para>
1493 You can submit patches without using the <filename>create-pull-request</filename> and
1494 <filename>send-pull-request</filename> scripts described in the previous section.
1495 However, keep in mind, the preferred method is to use the scripts.
1496 </para>
1497
1498 <para>
1499 Depending on the components changed, you need to submit the email to a specific
1500 mailing list.
1501 For some guidance on which mailing list to use, see the list in the
1502 "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
1503 section.
1504 For a description of the available mailing lists, see the
1505 "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>"
1506 section in the Yocto Project Reference Manual.
1507 </para>
1508
1509 <para>
1510 Here is the general procedure on how to submit a patch through email without using the
1511 scripts:
1512 <itemizedlist>
1513 <listitem><para>Make your changes in your local Git repository.</para></listitem>
1514 <listitem><para>Stage your changes by using the <filename>git add</filename>
1515 command on each file you changed.</para></listitem>
1516 <listitem><para>Commit the change by using the
1517 <filename>git commit --signoff</filename> command.
1518 Using the <filename>--signoff</filename> option identifies you as the person
1519 making the change and also satisfies the Developer's Certificate of
1520 Origin (DCO) shown earlier.</para>
1521 <para>When you form a commit, you must follow certain standards established by the
1522 Yocto Project development team.
1523 See the earlier section
1524 "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>"
1525 for Yocto Project commit message standards.</para></listitem>
1526 <listitem><para>Format the commit into an email message.
1527 To format commits, use the <filename>git format-patch</filename> command.
1528 When you provide the command, you must include a revision list or a number of patches
1529 as part of the command.
1530 For example, either of these two commands takes your most
1531 recent single commit and formats it as an email message in
1532 the current directory:
1533 <literallayout class='monospaced'>
1534 $ git format-patch -1
1535 </literallayout>
1536 or
1537 <literallayout class='monospaced'>
1538 $ git format-patch HEAD~
1539 </literallayout></para>
1540 <para>After the command is run, the current directory contains a
1541 numbered <filename>.patch</filename> file for the commit.</para>
1542 <para>If you provide several commits as part of the command,
1543 the <filename>git format-patch</filename> command produces a
1544 series of numbered files in the current directory – one for each commit.
1545 If you have more than one patch, you should also use the
1546 <filename>--cover</filename> option with the command, which generates a
1547 cover letter as the first "patch" in the series.
1548 You can then edit the cover letter to provide a description for
1549 the series of patches.
1550 For information on the <filename>git format-patch</filename> command,
1551 see <filename>GIT_FORMAT_PATCH(1)</filename> displayed using the
1552 <filename>man git-format-patch</filename> command.</para>
1553 <note>If you are or will be a frequent contributor to the Yocto Project
1554 or to OpenEmbedded, you might consider requesting a contrib area and the
1555 necessary associated rights.</note></listitem>
1556 <listitem><para>Import the files into your mail client by using the
1557 <filename>git send-email</filename> command.
1558 <note>In order to use <filename>git send-email</filename>, you must have the
1559 the proper Git packages installed.
1560 For Ubuntu, Debian, and Fedora the package is <filename>git-email</filename>.</note></para>
1561 <para>The <filename>git send-email</filename> command sends email by using a local
1562 or remote Mail Transport Agent (MTA) such as
1563 <filename>msmtp</filename>, <filename>sendmail</filename>, or through a direct
1564 <filename>smtp</filename> configuration in your Git <filename>config</filename>
1565 file.
1566 If you are submitting patches through email only, it is very important
1567 that you submit them without any whitespace or HTML formatting that
1568 either you or your mailer introduces.
1569 The maintainer that receives your patches needs to be able to save and
1570 apply them directly from your emails.
1571 A good way to verify that what you are sending will be applicable by the
1572 maintainer is to do a dry run and send them to yourself and then
1573 save and apply them as the maintainer would.</para>
1574 <para>The <filename>git send-email</filename> command is the preferred method
1575 for sending your patches since there is no risk of compromising whitespace
1576 in the body of the message, which can occur when you use your own mail client.
1577 The command also has several options that let you
1578 specify recipients and perform further editing of the email message.
1579 For information on how to use the <filename>git send-email</filename> command,
1580 see <filename>GIT-SEND-EMAIL(1)</filename> displayed using
1581 the <filename>man git-send-email</filename> command.
1582 </para></listitem>
1583 </itemizedlist>
1584 </para>
1585 </section>
1586</section>
1587</chapter>
1588<!--
1589vim: expandtab tw=80 ts=4
1590-->
diff --git a/documentation/dev-manual/dev-manual-start.xml b/documentation/dev-manual/dev-manual-start.xml
new file mode 100644
index 0000000..c1d89bc
--- /dev/null
+++ b/documentation/dev-manual/dev-manual-start.xml
@@ -0,0 +1,445 @@
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='dev-manual-start'>
6
7<title>Getting Started with the Yocto Project</title>
8
9<para>
10 This chapter introduces the Yocto Project and gives you an idea of what you need to get started.
11 You can find enough information to set up your development host and build or use images for
12 hardware supported by the Yocto Project by reading the
13 <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
14</para>
15
16<para>
17 The remainder of this chapter summarizes what is in the Yocto Project Quick Start and provides
18 some higher-level concepts you might want to consider.
19</para>
20
21<section id='introducing-the-yocto-project'>
22 <title>Introducing the Yocto Project</title>
23
24 <para>
25 The Yocto Project is an open-source collaboration project focused on embedded Linux development.
26 The project currently provides a build system that is
27 referred to as the OpenEmbedded build system in the Yocto Project documentation.
28 The Yocto Project provides various ancillary tools for the embedded developer
29 and also features the Sato reference User Interface, which is optimized for
30 stylus driven, low-resolution screens.
31 </para>
32
33 <para>
34 You can use the OpenEmbedded build system, which uses
35 BitBake, to develop complete Linux
36 images and associated user-space applications for architectures based
37 on ARM, MIPS, PowerPC, x86 and x86-64.
38 <note>
39 By default, using the Yocto Project creates a Poky distribution.
40 However, you can create your own distribution by providing key
41 <link linkend='metadata'>Metadata</link>.
42 See the "<link linkend='creating-your-own-distribution'>Creating Your Own Distribution</link>"
43 section for more information.
44 </note>
45 While the Yocto Project does not provide a strict testing framework,
46 it does provide or generate for you artifacts that let you perform target-level and
47 emulated testing and debugging.
48 Additionally, if you are an <trademark class='trade'>Eclipse</trademark>
49 IDE user, you can install an Eclipse Yocto Plug-in to allow you to
50 develop within that familiar environment.
51 </para>
52</section>
53
54<section id='getting-setup'>
55 <title>Getting Set Up</title>
56
57 <para>
58 Here is what you need to use the Yocto Project:
59 <itemizedlist>
60 <listitem><para><emphasis>Host System:</emphasis>
61 You should have a reasonably current Linux-based host system.
62 You will have the best results with a recent release of Fedora,
63 openSUSE, Debian, Ubuntu, or CentOS as these releases are frequently tested against the Yocto Project
64 and officially supported.
65 For a list of the distributions under validation and their status, see the
66 "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>" section
67 in the Yocto Project Reference Manual and the wiki page at
68 <ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink>.</para>
69 <para>
70 You should also have about 100 gigabytes of free disk space for building images.
71 </para></listitem>
72 <listitem><para><emphasis>Packages:</emphasis>
73 The OpenEmbedded build system requires that certain packages
74 exist on your development system (e.g. Python 2.6 or 2.7).
75 See "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>"
76 section in the Yocto Project Quick Start and the
77 "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
78 section in the Yocto Project Reference Manual for the exact
79 package requirements and the installation commands to install
80 them for the supported distributions.</para></listitem>
81 <listitem id='local-yp-release'><para><emphasis>Yocto Project Release:</emphasis>
82 You need a release of the Yocto Project installed locally on
83 your development system.
84 This local area is referred to as the
85 <link linkend='source-directory'>Source Directory</link>
86 and is created when you use
87 <link linkend='git'>Git</link> to clone a local copy
88 of the upstream <filename>poky</filename> repository,
89 or when you download an official release of the corresponding
90 tarball.</para>
91 <para>Working from a copy of the upstream repository allows you
92 to contribute back into the Yocto Project or simply work with
93 the latest software on a development branch.
94 Because Git maintains and creates an upstream repository with
95 a complete history of changes and you are working with a local
96 clone of that repository, you have access to all the Yocto
97 Project development branches and tag names used in the upstream
98 repository.
99 <note>You can view the Yocto Project Source Repositories at
100 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>
101 </note>
102 <itemizedlist>
103 <listitem><para><emphasis>Tarball Extraction:</emphasis>
104 If you are not going to contribute back into the Yocto
105 Project, you can simply go to the
106 <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>,
107 select the "Downloads" tab, and choose what you want.
108 Once you have the tarball, just extract it into a
109 directory of your choice.</para>
110 <para>For example, the following command extracts the
111 Yocto Project &DISTRO; release tarball
112 into the current working directory and sets up the local
113 Source Directory
114 with a top-level folder named
115 <filename>&YOCTO_POKY;</filename>:
116 <literallayout class='monospaced'>
117 $ tar xfj &YOCTO_POKY_TARBALL;
118 </literallayout></para>
119 <para>This method does not produce a local Git
120 repository.
121 Instead, you simply end up with a snapshot of the
122 release.</para></listitem>
123 <listitem><para><emphasis>Git Repository Method:</emphasis>
124 If you are going to be contributing back into the Yocto
125 Project or you simply want to keep up with the latest
126 developments, you should use Git commands to set up a
127 local Git repository of the upstream
128 <filename>poky</filename> source repository.
129 Doing so creates a repository with a complete history
130 of changes and allows you to easily submit your changes
131 upstream to the project.
132 Because you clone the repository, you have access to all
133 the Yocto Project development branches and tag names
134 used in the upstream repository.
135 <note>You can view the Yocto Project Source Repositories
136 at
137 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>
138 </note></para>
139 <para>The following transcript shows how to clone the
140 <filename>poky</filename> Git repository into the
141 current working directory.
142 The command creates the local repository in a directory
143 named <filename>poky</filename>.
144 For information on Git used within the Yocto Project,
145 see the
146 "<link linkend='git'>Git</link>" section.
147 <literallayout class='monospaced'>
148 $ git clone git://git.yoctoproject.org/poky
149 Cloning into 'poky'...
150 remote: Counting objects: 203728, done.
151 remote: Compressing objects: 100% (52371/52371), done.
152 remote: Total 203728 (delta 147444), reused 202891 (delta 146614)
153 Receiving objects: 100% (203728/203728), 95.54 MiB | 308 KiB/s, done.
154 Resolving deltas: 100% (147444/147444), done.
155 </literallayout>
156 For another example of how to set up your own local
157 Git repositories, see this
158 <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>wiki page</ulink>,
159 which describes how to create both
160 <filename>poky</filename> and
161 <filename>meta-intel</filename> Git repositories.
162 </para></listitem>
163 </itemizedlist></para></listitem>
164 <listitem id='local-kernel-files'><para><emphasis>Yocto Project Kernel:</emphasis>
165 If you are going to be making modifications to a supported Yocto Project kernel, you
166 need to establish local copies of the source.
167 You can find Git repositories of supported Yocto Project kernels organized under
168 "Yocto Linux Kernel" in the Yocto Project Source Repositories at
169 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para>
170 <para>This setup can involve creating a bare clone of the Yocto Project kernel and then
171 copying that cloned repository.
172 You can create the bare clone and the copy of the bare clone anywhere you like.
173 For simplicity, it is recommended that you create these structures outside of the
174 Source Directory (usually <filename>poky</filename>).</para>
175 <para>As an example, the following transcript shows how to create the bare clone
176 of the <filename>linux-yocto-3.10</filename> kernel and then create a copy of
177 that clone.
178 <note>When you have a local Yocto Project kernel Git repository, you can
179 reference that repository rather than the upstream Git repository as
180 part of the <filename>clone</filename> command.
181 Doing so can speed up the process.</note></para>
182 <para>In the following example, the bare clone is named
183 <filename>linux-yocto-3.10.git</filename>, while the
184 copy is named <filename>my-linux-yocto-3.10-work</filename>:
185 <literallayout class='monospaced'>
186 $ git clone &dash;&dash;bare git://git.yoctoproject.org/linux-yocto-3.10 linux-yocto-3.10.git
187 Cloning into bare repository 'linux-yocto-3.10.git'...
188 remote: Counting objects: 3364487, done.
189 remote: Compressing objects: 100% (507178/507178), done.
190 remote: Total 3364487 (delta 2827715), reused 3364481 (delta 2827709)
191 Receiving objects: 100% (3364487/3364487), 722.95 MiB | 423 KiB/s, done.
192 Resolving deltas: 100% (2827715/2827715), done.
193 </literallayout></para>
194 <para>Now create a clone of the bare clone just created:
195 <literallayout class='monospaced'>
196 $ git clone linux-yocto-3.10.git my-linux-yocto-3.10-work
197 Cloning into 'my-linux-yocto-3.10-work'...
198 done.
199 </literallayout></para></listitem>
200 <listitem id='meta-yocto-kernel-extras-repo'><para><emphasis>
201 The <filename>meta-yocto-kernel-extras</filename> Git Repository</emphasis>:
202 The <filename>meta-yocto-kernel-extras</filename> Git repository contains Metadata needed
203 only if you are modifying and building the kernel image.
204 In particular, it contains the kernel BitBake append (<filename>.bbappend</filename>)
205 files that you
206 edit to point to your locally modified kernel source files and to build the kernel
207 image.
208 Pointing to these local files is much more efficient than requiring a download of the
209 kernel's source files from upstream each time you make changes to the kernel.</para>
210 <para>You can find the <filename>meta-yocto-kernel-extras</filename> Git Repository in the
211 "Yocto Metadata Layers" area of the Yocto Project Source Repositories at
212 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.
213 It is good practice to create this Git repository inside the Source Directory.</para>
214 <para>Following is an example that creates the <filename>meta-yocto-kernel-extras</filename> Git
215 repository inside the Source Directory, which is named <filename>poky</filename>
216 in this case:
217 <literallayout class='monospaced'>
218 $ cd ~/poky
219 $ git clone git://git.yoctoproject.org/meta-yocto-kernel-extras meta-yocto-kernel-extras
220 Cloning into 'meta-yocto-kernel-extras'...
221 remote: Counting objects: 727, done.
222 remote: Compressing objects: 100% (452/452), done.
223 remote: Total 727 (delta 260), reused 719 (delta 252)
224 Receiving objects: 100% (727/727), 536.36 KiB | 102 KiB/s, done.
225 Resolving deltas: 100% (260/260), done.
226 </literallayout></para></listitem>
227 <listitem><para id='supported-board-support-packages-(bsps)'><emphasis>Supported Board
228 Support Packages (BSPs):</emphasis>
229 The Yocto Project provides a layer called <filename>meta-intel</filename> and
230 it is maintained in its own separate Git repository.
231 The <filename>meta-intel</filename> layer contains many supported
232 <ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>.</para>
233 <para>Similar considerations exist for setting up the <filename>meta-intel</filename>
234 layer.
235 You can get set up for BSP development one of two ways: tarball extraction or
236 with a local Git repository.
237 It is a good idea to use the same method that you used to set up the Source Directory.
238 Regardless of the method you use, the Yocto Project uses the following BSP layer
239 naming scheme:
240 <literallayout class='monospaced'>
241 meta-&lt;BSP_name&gt;
242 </literallayout>
243 where <filename>&lt;BSP_name&gt;</filename> is the recognized BSP name.
244 Here are some examples:
245 <literallayout class='monospaced'>
246 meta-crownbay
247 meta-emenlow
248 meta-n450
249 </literallayout>
250 See the
251 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>"
252 section in the Yocto Project Board Support Package (BSP)
253 Developer's Guide for more information on BSP Layers.
254 <itemizedlist>
255 <listitem><para><emphasis>Tarball Extraction:</emphasis>
256 You can download any released BSP tarball from the same
257 "Downloads" page of the Yocto Project
258 <ulink url='https://www.yoctoproject.org/downloads'>Website</ulink>
259 to get the Yocto Project release.
260 Once on the "Download" page, look to the right of the
261 page and scroll down to find the BSP tarballs.</para>
262 <para>Once you have the tarball, just extract it into a
263 directory of your choice.
264 Again, this method just produces a snapshot of the BSP
265 layer in the form of a hierarchical directory
266 structure.</para></listitem>
267 <listitem><para><emphasis>Git Repository Method:</emphasis>
268 If you are working with a local Git repository for your
269 Source Directory, you should also use this method to
270 set up the <filename>meta-intel</filename> Git
271 repository.
272 You can locate the <filename>meta-intel</filename> Git
273 repository in the "Yocto Metadata Layers" area of the
274 Yocto Project Source Repositories at
275 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>.</para>
276 <para>Using
277 <link linkend='git'>Git</link> to create a local clone
278 of the upstream repository can be helpful if you are
279 working with BSPs.
280 Typically, you set up the
281 <filename>meta-intel</filename> Git repository inside
282 the Source Directory.
283 For example, the following transcript shows the steps
284 to clone <filename>meta-intel</filename>.
285 <literallayout class='monospaced'>
286 $ cd ~/poky
287 $ git clone git://git.yoctoproject.org/meta-intel.git
288 Cloning into 'meta-intel'...
289 remote: Counting objects: 7366, done.
290 remote: Compressing objects: 100% (2491/2491), done.
291 remote: Total 7366 (delta 3997), reused 7299 (delta 3930)
292 Receiving objects: 100% (7366/7366), 2.31 MiB | 95 KiB/s, done.
293 Resolving deltas: 100% (3997/3997), done.
294 </literallayout>
295 The same
296 <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_from_git_checkout_to_meta-intel_BSP'>wiki page</ulink>
297 referenced earlier covers how to
298 set up the <filename>meta-intel</filename> Git
299 repository.</para></listitem>
300 </itemizedlist></para></listitem>
301 <listitem><para><emphasis>Eclipse Yocto Plug-in:</emphasis> If you are developing
302 applications using the Eclipse Integrated Development Environment (IDE),
303 you will need this plug-in.
304 See the
305 "<link linkend='setting-up-the-eclipse-ide'>Setting up the Eclipse IDE</link>"
306 section for more information.</para></listitem>
307 </itemizedlist>
308 </para>
309</section>
310
311<section id='building-images'>
312 <title>Building Images</title>
313
314 <para>
315 The build process creates an entire Linux distribution, including the toolchain, from source.
316 For more information on this topic, see the
317 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
318 section in the Yocto Project Quick Start.
319 </para>
320
321 <para>
322 The build process is as follows:
323 <orderedlist>
324 <listitem><para>Make sure you have set up the Source Directory described in the
325 previous section.</para></listitem>
326 <listitem><para>Initialize the build environment by sourcing a build environment
327 script.</para></listitem>
328 <listitem><para>Optionally ensure the <filename>conf/local.conf</filename> configuration file,
329 which is found in the
330 <link linkend='build-directory'>Build Directory</link>,
331 is set up how you want it.
332 This file defines many aspects of the build environment including
333 the target machine architecture through the
334 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'>MACHINE</ulink></filename> variable,
335 the development machine's processor use through the
336 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</ulink></filename> and
337 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'>PARALLEL_MAKE</ulink></filename> variables, and
338 a centralized tarball download directory through the
339 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'>DL_DIR</ulink></filename> variable.</para></listitem>
340 <listitem><para>Build the image using the <filename>bitbake</filename> command.
341 If you want information on BitBake, see the user manual included in the
342 <filename>bitbake/doc/manual</filename> directory of the
343 <link linkend='source-directory'>Source Directory</link>.</para></listitem>
344 <listitem><para>Run the image either on the actual hardware or using the QEMU
345 emulator.</para></listitem>
346 </orderedlist>
347 </para>
348</section>
349
350<section id='using-pre-built-binaries-and-qemu'>
351 <title>Using Pre-Built Binaries and QEMU</title>
352
353 <para>
354 Another option you have to get started is to use pre-built binaries.
355 The Yocto Project provides many types of binaries with each release.
356 See the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>"
357 chapter in the Yocto Project Reference Manual
358 for descriptions of the types of binaries that ship with a Yocto Project
359 release.
360 </para>
361
362 <para>
363 Using a pre-built binary is ideal for developing software applications to run on your
364 target hardware.
365 To do this, you need to be able to access the appropriate cross-toolchain tarball for
366 the architecture on which you are developing.
367 If you are using an SDK type image, the image ships with the complete toolchain native to
368 the architecture.
369 If you are not using an SDK type image, you need to separately download and
370 install the stand-alone Yocto Project cross-toolchain tarball.
371 </para>
372
373 <para>
374 Regardless of the type of image you are using, you need to download the pre-built kernel
375 that you will boot in the QEMU emulator and then download and extract the target root
376 filesystem for your target machine’s architecture.
377 You can get architecture-specific binaries and file systems from
378 <ulink url='&YOCTO_MACHINES_DL_URL;'>machines</ulink>.
379 You can get installation scripts for stand-alone toolchains from
380 <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'>toolchains</ulink>.
381 Once you have all your files, you set up the environment to emulate the hardware
382 by sourcing an environment setup script.
383 Finally, you start the QEMU emulator.
384 You can find details on all these steps in the
385 "<ulink url='&YOCTO_DOCS_QS_URL;#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
386 section of the Yocto Project Quick Start.
387 </para>
388
389 <para>
390 Using QEMU to emulate your hardware can result in speed issues
391 depending on the target and host architecture mix.
392 For example, using the <filename>qemux86</filename> image in the emulator
393 on an Intel-based 32-bit (x86) host machine is fast because the target and
394 host architectures match.
395 On the other hand, using the <filename>qemuarm</filename> image on the same Intel-based
396 host can be slower.
397 But, you still achieve faithful emulation of ARM-specific issues.
398 </para>
399
400 <para>
401 To speed things up, the QEMU images support using <filename>distcc</filename>
402 to call a cross-compiler outside the emulated system.
403 If you used <filename>runqemu</filename> to start QEMU, and the
404 <filename>distccd</filename> application is present on the host system, any
405 BitBake cross-compiling toolchain available from the build system is automatically
406 used from within QEMU simply by calling <filename>distcc</filename>.
407 You can accomplish this by defining the cross-compiler variable
408 (e.g. <filename>export CC="distcc"</filename>).
409 Alternatively, if you are using a suitable SDK image or the appropriate
410 stand-alone toolchain is present,
411 the toolchain is also automatically used.
412 </para>
413
414 <note>
415 Several mechanisms exist that let you connect to the system running on the
416 QEMU emulator:
417 <itemizedlist>
418 <listitem><para>QEMU provides a framebuffer interface that makes standard
419 consoles available.</para></listitem>
420 <listitem><para>Generally, headless embedded devices have a serial port.
421 If so, you can configure the operating system of the running image
422 to use that port to run a console.
423 The connection uses standard IP networking.</para></listitem>
424 <listitem><para>SSH servers exist in some QEMU images.
425 The <filename>core-image-sato</filename> QEMU image has a Dropbear secure
426 shell (SSH) server that runs with the root password disabled.
427 The <filename>core-image-basic</filename> and <filename>core-image-lsb</filename> QEMU images
428 have OpenSSH instead of Dropbear.
429 Including these SSH servers allow you to use standard <filename>ssh</filename> and
430 <filename>scp</filename> commands.
431 The <filename>core-image-minimal</filename> QEMU image, however, contains no SSH
432 server.</para></listitem>
433 <listitem><para>You can use a provided, user-space NFS server to boot the QEMU session
434 using a local copy of the root filesystem on the host.
435 In order to make this connection, you must extract a root filesystem tarball by using the
436 <filename>runqemu-extract-sdk</filename> command.
437 After running the command, you must then point the <filename>runqemu</filename>
438 script to the extracted directory instead of a root filesystem image file.</para></listitem>
439 </itemizedlist>
440 </note>
441</section>
442</chapter>
443<!--
444vim: expandtab tw=80 ts=4
445-->
diff --git a/documentation/dev-manual/dev-manual.xml b/documentation/dev-manual/dev-manual.xml
new file mode 100644
index 0000000..ca400fb
--- /dev/null
+++ b/documentation/dev-manual/dev-manual.xml
@@ -0,0 +1,102 @@
1<!DOCTYPE book 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<book id='dev-manual' lang='en'
6 xmlns:xi="http://www.w3.org/2003/XInclude"
7 xmlns="http://docbook.org/ns/docbook"
8 >
9 <bookinfo>
10
11 <mediaobject>
12 <imageobject>
13 <imagedata fileref='figures/dev-title.png'
14 format='SVG'
15 align='left' scalefit='1' width='100%'/>
16 </imageobject>
17 </mediaobject>
18
19 <title>
20 Yocto Project Development Manual
21 </title>
22
23 <authorgroup>
24 <author>
25 <firstname>Scott</firstname> <surname>Rifenbark</surname>
26 <affiliation>
27 <orgname>Intel Corporation</orgname>
28 </affiliation>
29 <email>scott.m.rifenbark@intel.com</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>1.1</revnumber>
36 <date>6 October 2011</date>
37 <revremark>The initial document released with the Yocto Project 1.1 Release.</revremark>
38 </revision>
39 <revision>
40 <revnumber>1.2</revnumber>
41 <date>April 2012</date>
42 <revremark>Released with the Yocto Project 1.2 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>1.3</revnumber>
46 <date>October 2012</date>
47 <revremark>Released with the Yocto Project 1.3 Release.</revremark>
48 </revision>
49 <revision>
50 <revnumber>1.4</revnumber>
51 <date>April 2013</date>
52 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
53 </revision>
54 <revision>
55 <revnumber>1.5</revnumber>
56 <date>October 2013</date>
57 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
58 </revision>
59 <revision>
60 <revnumber>1.5.1</revnumber>
61 <date>Sometime in 2013</date>
62 <revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
63 </revision>
64 </revhistory>
65
66 <copyright>
67 <year>&COPYRIGHT_YEAR;</year>
68 <holder>Linux Foundation</holder>
69 </copyright>
70
71 <legalnotice>
72 <para>
73 Permission is granted to copy, distribute and/or modify this document under
74 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">
75 Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by
76 Creative Commons.
77 </para>
78
79 <note>
80 For the latest version of this manual associated with this
81 Yocto Project release, see the
82 <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Manual</ulink>
83 from the Yocto Project website.
84 </note>
85 </legalnotice>
86
87 </bookinfo>
88
89 <xi:include href="dev-manual-intro.xml"/>
90
91 <xi:include href="dev-manual-start.xml"/>
92
93 <xi:include href="dev-manual-newbie.xml"/>
94
95 <xi:include href="dev-manual-model.xml"/>
96
97 <xi:include href="dev-manual-common-tasks.xml"/>
98
99</book>
100<!--
101vim: expandtab tw=80 ts=4
102-->
diff --git a/documentation/dev-manual/dev-style.css b/documentation/dev-manual/dev-style.css
new file mode 100644
index 0000000..23c8e74
--- /dev/null
+++ b/documentation/dev-manual/dev-style.css
@@ -0,0 +1,979 @@
1/*
2 Generic XHTML / DocBook XHTML CSS Stylesheet.
3
4 Browser wrangling and typographic design by
5 Oyvind Kolas / pippin@gimp.org
6
7 Customised for Poky by
8 Matthew Allum / mallum@o-hand.com
9
10 Thanks to:
11 Liam R. E. Quin
12 William Skaggs
13 Jakub Steiner
14
15 Structure
16 ---------
17
18 The stylesheet is divided into the following sections:
19
20 Positioning
21 Margins, paddings, width, font-size, clearing.
22 Decorations
23 Borders, style
24 Colors
25 Colors
26 Graphics
27 Graphical backgrounds
28 Nasty IE tweaks
29 Workarounds needed to make it work in internet explorer,
30 currently makes the stylesheet non validating, but up until
31 this point it is validating.
32 Mozilla extensions
33 Transparency for footer
34 Rounded corners on boxes
35
36*/
37
38
39 /*************** /
40 / Positioning /
41/ ***************/
42
43body {
44 font-family: Verdana, Sans, sans-serif;
45
46 min-width: 640px;
47 width: 80%;
48 margin: 0em auto;
49 padding: 2em 5em 5em 5em;
50 color: #333;
51}
52
53h1,h2,h3,h4,h5,h6,h7 {
54 font-family: Arial, Sans;
55 color: #00557D;
56 clear: both;
57}
58
59h1 {
60 font-size: 2em;
61 text-align: left;
62 padding: 0em 0em 0em 0em;
63 margin: 2em 0em 0em 0em;
64}
65
66h2.subtitle {
67 margin: 0.10em 0em 3.0em 0em;
68 padding: 0em 0em 0em 0em;
69 font-size: 1.8em;
70 padding-left: 20%;
71 font-weight: normal;
72 font-style: italic;
73}
74
75h2 {
76 margin: 2em 0em 0.66em 0em;
77 padding: 0.5em 0em 0em 0em;
78 font-size: 1.5em;
79 font-weight: bold;
80}
81
82h3.subtitle {
83 margin: 0em 0em 1em 0em;
84 padding: 0em 0em 0em 0em;
85 font-size: 142.14%;
86 text-align: right;
87}
88
89h3 {
90 margin: 1em 0em 0.5em 0em;
91 padding: 1em 0em 0em 0em;
92 font-size: 140%;
93 font-weight: bold;
94}
95
96h4 {
97 margin: 1em 0em 0.5em 0em;
98 padding: 1em 0em 0em 0em;
99 font-size: 120%;
100 font-weight: bold;
101}
102
103h5 {
104 margin: 1em 0em 0.5em 0em;
105 padding: 1em 0em 0em 0em;
106 font-size: 110%;
107 font-weight: bold;
108}
109
110h6 {
111 margin: 1em 0em 0em 0em;
112 padding: 1em 0em 0em 0em;
113 font-size: 110%;
114 font-weight: bold;
115}
116
117.authorgroup {
118 background-color: transparent;
119 background-repeat: no-repeat;
120 padding-top: 256px;
121 background-image: url("figures/dev-title.png");
122 background-position: left top;
123 margin-top: -256px;
124 padding-right: 50px;
125 margin-left: 0px;
126 text-align: right;
127 width: 740px;
128}
129
130h3.author {
131 margin: 0em 0me 0em 0em;
132 padding: 0em 0em 0em 0em;
133 font-weight: normal;
134 font-size: 100%;
135 color: #333;
136 clear: both;
137}
138
139.author tt.email {
140 font-size: 66%;
141}
142
143.titlepage hr {
144 width: 0em;
145 clear: both;
146}
147
148.revhistory {
149 padding-top: 2em;
150 clear: both;
151}
152
153.toc,
154.list-of-tables,
155.list-of-examples,
156.list-of-figures {
157 padding: 1.33em 0em 2.5em 0em;
158 color: #00557D;
159}
160
161.toc p,
162.list-of-tables p,
163.list-of-figures p,
164.list-of-examples p {
165 padding: 0em 0em 0em 0em;
166 padding: 0em 0em 0.3em;
167 margin: 1.5em 0em 0em 0em;
168}
169
170.toc p b,
171.list-of-tables p b,
172.list-of-figures p b,
173.list-of-examples p b{
174 font-size: 100.0%;
175 font-weight: bold;
176}
177
178.toc dl,
179.list-of-tables dl,
180.list-of-figures dl,
181.list-of-examples dl {
182 margin: 0em 0em 0.5em 0em;
183 padding: 0em 0em 0em 0em;
184}
185
186.toc dt {
187 margin: 0em 0em 0em 0em;
188 padding: 0em 0em 0em 0em;
189}
190
191.toc dd {
192 margin: 0em 0em 0em 2.6em;
193 padding: 0em 0em 0em 0em;
194}
195
196div.glossary dl,
197div.variablelist dl {
198}
199
200.glossary dl dt,
201.variablelist dl dt,
202.variablelist dl dt span.term {
203 font-weight: normal;
204 width: 20em;
205 text-align: right;
206}
207
208.variablelist dl dt {
209 margin-top: 0.5em;
210}
211
212.glossary dl dd,
213.variablelist dl dd {
214 margin-top: -1em;
215 margin-left: 25.5em;
216}
217
218.glossary dd p,
219.variablelist dd p {
220 margin-top: 0em;
221 margin-bottom: 1em;
222}
223
224
225div.calloutlist table td {
226 padding: 0em 0em 0em 0em;
227 margin: 0em 0em 0em 0em;
228}
229
230div.calloutlist table td p {
231 margin-top: 0em;
232 margin-bottom: 1em;
233}
234
235div p.copyright {
236 text-align: left;
237}
238
239div.legalnotice p.legalnotice-title {
240 margin-bottom: 0em;
241}
242
243p {
244 line-height: 1.5em;
245 margin-top: 0em;
246
247}
248
249dl {
250 padding-top: 0em;
251}
252
253hr {
254 border: solid 1px;
255}
256
257
258.mediaobject,
259.mediaobjectco {
260 text-align: center;
261}
262
263img {
264 border: none;
265}
266
267ul {
268 padding: 0em 0em 0em 1.5em;
269}
270
271ul li {
272 padding: 0em 0em 0em 0em;
273}
274
275ul li p {
276 text-align: left;
277}
278
279table {
280 width :100%;
281}
282
283th {
284 padding: 0.25em;
285 text-align: left;
286 font-weight: normal;
287 vertical-align: top;
288}
289
290td {
291 padding: 0.25em;
292 vertical-align: top;
293}
294
295p a[id] {
296 margin: 0px;
297 padding: 0px;
298 display: inline;
299 background-image: none;
300}
301
302a {
303 text-decoration: underline;
304 color: #444;
305}
306
307pre {
308 overflow: auto;
309}
310
311a:hover {
312 text-decoration: underline;
313 /*font-weight: bold;*/
314}
315
316
317div.informalfigure,
318div.informalexample,
319div.informaltable,
320div.figure,
321div.table,
322div.example {
323 margin: 1em 0em;
324 padding: 1em;
325 page-break-inside: avoid;
326}
327
328
329div.informalfigure p.title b,
330div.informalexample p.title b,
331div.informaltable p.title b,
332div.figure p.title b,
333div.example p.title b,
334div.table p.title b{
335 padding-top: 0em;
336 margin-top: 0em;
337 font-size: 100%;
338 font-weight: normal;
339}
340
341.mediaobject .caption,
342.mediaobject .caption p {
343 text-align: center;
344 font-size: 80%;
345 padding-top: 0.5em;
346 padding-bottom: 0.5em;
347}
348
349.epigraph {
350 padding-left: 55%;
351 margin-bottom: 1em;
352}
353
354.epigraph p {
355 text-align: left;
356}
357
358.epigraph .quote {
359 font-style: italic;
360}
361.epigraph .attribution {
362 font-style: normal;
363 text-align: right;
364}
365
366span.application {
367 font-style: italic;
368}
369
370.programlisting {
371 font-family: monospace;
372 font-size: 80%;
373 white-space: pre;
374 margin: 1.33em 0em;
375 padding: 1.33em;
376}
377
378.tip,
379.warning,
380.caution,
381.note {
382 margin-top: 1em;
383 margin-bottom: 1em;
384
385}
386
387/* force full width of table within div */
388.tip table,
389.warning table,
390.caution table,
391.note table {
392 border: none;
393 width: 100%;
394}
395
396
397.tip table th,
398.warning table th,
399.caution table th,
400.note table th {
401 padding: 0.8em 0.0em 0.0em 0.0em;
402 margin : 0em 0em 0em 0em;
403}
404
405.tip p,
406.warning p,
407.caution p,
408.note p {
409 margin-top: 0.5em;
410 margin-bottom: 0.5em;
411 padding-right: 1em;
412 text-align: left;
413}
414
415.acronym {
416 text-transform: uppercase;
417}
418
419b.keycap,
420.keycap {
421 padding: 0.09em 0.3em;
422 margin: 0em;
423}
424
425.itemizedlist li {
426 clear: none;
427}
428
429.filename {
430 font-size: medium;
431 font-family: Courier, monospace;
432}
433
434
435div.navheader, div.heading{
436 position: absolute;
437 left: 0em;
438 top: 0em;
439 width: 100%;
440 background-color: #cdf;
441 width: 100%;
442}
443
444div.navfooter, div.footing{
445 position: fixed;
446 left: 0em;
447 bottom: 0em;
448 background-color: #eee;
449 width: 100%;
450}
451
452
453div.navheader td,
454div.navfooter td {
455 font-size: 66%;
456}
457
458div.navheader table th {
459 /*font-family: Georgia, Times, serif;*/
460 /*font-size: x-large;*/
461 font-size: 80%;
462}
463
464div.navheader table {
465 border-left: 0em;
466 border-right: 0em;
467 border-top: 0em;
468 width: 100%;
469}
470
471div.navfooter table {
472 border-left: 0em;
473 border-right: 0em;
474 border-bottom: 0em;
475 width: 100%;
476}
477
478div.navheader table td a,
479div.navfooter table td a {
480 color: #777;
481 text-decoration: none;
482}
483
484/* normal text in the footer */
485div.navfooter table td {
486 color: black;
487}
488
489div.navheader table td a:visited,
490div.navfooter table td a:visited {
491 color: #444;
492}
493
494
495/* links in header and footer */
496div.navheader table td a:hover,
497div.navfooter table td a:hover {
498 text-decoration: underline;
499 background-color: transparent;
500 color: #33a;
501}
502
503div.navheader hr,
504div.navfooter hr {
505 display: none;
506}
507
508
509.qandaset tr.question td p {
510 margin: 0em 0em 1em 0em;
511 padding: 0em 0em 0em 0em;
512}
513
514.qandaset tr.answer td p {
515 margin: 0em 0em 1em 0em;
516 padding: 0em 0em 0em 0em;
517}
518.answer td {
519 padding-bottom: 1.5em;
520}
521
522.emphasis {
523 font-weight: bold;
524}
525
526
527 /************* /
528 / decorations /
529/ *************/
530
531.titlepage {
532}
533
534.part .title {
535}
536
537.subtitle {
538 border: none;
539}
540
541/*
542h1 {
543 border: none;
544}
545
546h2 {
547 border-top: solid 0.2em;
548 border-bottom: solid 0.06em;
549}
550
551h3 {
552 border-top: 0em;
553 border-bottom: solid 0.06em;
554}
555
556h4 {
557 border: 0em;
558 border-bottom: solid 0.06em;
559}
560
561h5 {
562 border: 0em;
563}
564*/
565
566.programlisting {
567 border: solid 1px;
568}
569
570div.figure,
571div.table,
572div.informalfigure,
573div.informaltable,
574div.informalexample,
575div.example {
576 border: 1px solid;
577}
578
579
580
581.tip,
582.warning,
583.caution,
584.note {
585 border: 1px solid;
586}
587
588.tip table th,
589.warning table th,
590.caution table th,
591.note table th {
592 border-bottom: 1px solid;
593}
594
595.question td {
596 border-top: 1px solid black;
597}
598
599.answer {
600}
601
602
603b.keycap,
604.keycap {
605 border: 1px solid;
606}
607
608
609div.navheader, div.heading{
610 border-bottom: 1px solid;
611}
612
613
614div.navfooter, div.footing{
615 border-top: 1px solid;
616}
617
618 /********* /
619 / colors /
620/ *********/
621
622body {
623 color: #333;
624 background: white;
625}
626
627a {
628 background: transparent;
629}
630
631a:hover {
632 background-color: #dedede;
633}
634
635
636h1,
637h2,
638h3,
639h4,
640h5,
641h6,
642h7,
643h8 {
644 background-color: transparent;
645}
646
647hr {
648 border-color: #aaa;
649}
650
651
652.tip, .warning, .caution, .note {
653 border-color: #fff;
654}
655
656
657.tip table th,
658.warning table th,
659.caution table th,
660.note table th {
661 border-bottom-color: #fff;
662}
663
664
665.warning {
666 background-color: #f0f0f2;
667}
668
669.caution {
670 background-color: #f0f0f2;
671}
672
673.tip {
674 background-color: #f0f0f2;
675}
676
677.note {
678 background-color: #f0f0f2;
679}
680
681.glossary dl dt,
682.variablelist dl dt,
683.variablelist dl dt span.term {
684 color: #044;
685}
686
687div.figure,
688div.table,
689div.example,
690div.informalfigure,
691div.informaltable,
692div.informalexample {
693 border-color: #aaa;
694}
695
696pre.programlisting {
697 color: black;
698 background-color: #fff;
699 border-color: #aaa;
700 border-width: 2px;
701}
702
703.guimenu,
704.guilabel,
705.guimenuitem {
706 background-color: #eee;
707}
708
709
710b.keycap,
711.keycap {
712 background-color: #eee;
713 border-color: #999;
714}
715
716
717div.navheader {
718 border-color: black;
719}
720
721
722div.navfooter {
723 border-color: black;
724}
725
726
727 /*********** /
728 / graphics /
729/ ***********/
730
731/*
732body {
733 background-image: url("images/body_bg.jpg");
734 background-attachment: fixed;
735}
736
737.navheader,
738.note,
739.tip {
740 background-image: url("images/note_bg.jpg");
741 background-attachment: fixed;
742}
743
744.warning,
745.caution {
746 background-image: url("images/warning_bg.jpg");
747 background-attachment: fixed;
748}
749
750.figure,
751.informalfigure,
752.example,
753.informalexample,
754.table,
755.informaltable {
756 background-image: url("images/figure_bg.jpg");
757 background-attachment: fixed;
758}
759
760*/
761h1,
762h2,
763h3,
764h4,
765h5,
766h6,
767h7{
768}
769
770/*
771Example of how to stick an image as part of the title.
772
773div.article .titlepage .title
774{
775 background-image: url("figures/white-on-black.png");
776 background-position: center;
777 background-repeat: repeat-x;
778}
779*/
780
781div.preface .titlepage .title,
782div.colophon .title,
783div.chapter .titlepage .title,
784div.article .titlepage .title
785{
786}
787
788div.section div.section .titlepage .title,
789div.sect2 .titlepage .title {
790 background: none;
791}
792
793
794h1.title {
795 background-color: transparent;
796 background-image: url("figures/yocto-project-bw.png");
797 background-repeat: no-repeat;
798 height: 256px;
799 text-indent: -9000px;
800 overflow:hidden;
801}
802
803h2.subtitle {
804 background-color: transparent;
805 text-indent: -9000px;
806 overflow:hidden;
807 width: 0px;
808 display: none;
809}
810
811 /*************************************** /
812 / pippin.gimp.org specific alterations /
813/ ***************************************/
814
815/*
816div.heading, div.navheader {
817 color: #777;
818 font-size: 80%;
819 padding: 0;
820 margin: 0;
821 text-align: left;
822 position: absolute;
823 top: 0px;
824 left: 0px;
825 width: 100%;
826 height: 50px;
827 background: url('/gfx/heading_bg.png') transparent;
828 background-repeat: repeat-x;
829 background-attachment: fixed;
830 border: none;
831}
832
833div.heading a {
834 color: #444;
835}
836
837div.footing, div.navfooter {
838 border: none;
839 color: #ddd;
840 font-size: 80%;
841 text-align:right;
842
843 width: 100%;
844 padding-top: 10px;
845 position: absolute;
846 bottom: 0px;
847 left: 0px;
848
849 background: url('/gfx/footing_bg.png') transparent;
850}
851*/
852
853
854
855 /****************** /
856 / nasty ie tweaks /
857/ ******************/
858
859/*
860div.heading, div.navheader {
861 width:expression(document.body.clientWidth + "px");
862}
863
864div.footing, div.navfooter {
865 width:expression(document.body.clientWidth + "px");
866 margin-left:expression("-5em");
867}
868body {
869 padding:expression("4em 5em 0em 5em");
870}
871*/
872
873 /**************************************** /
874 / mozilla vendor specific css extensions /
875/ ****************************************/
876/*
877div.navfooter, div.footing{
878 -moz-opacity: 0.8em;
879}
880
881div.figure,
882div.table,
883div.informalfigure,
884div.informaltable,
885div.informalexample,
886div.example,
887.tip,
888.warning,
889.caution,
890.note {
891 -moz-border-radius: 0.5em;
892}
893
894b.keycap,
895.keycap {
896 -moz-border-radius: 0.3em;
897}
898*/
899
900table tr td table tr td {
901 display: none;
902}
903
904
905hr {
906 display: none;
907}
908
909table {
910 border: 0em;
911}
912
913 .photo {
914 float: right;
915 margin-left: 1.5em;
916 margin-bottom: 1.5em;
917 margin-top: 0em;
918 max-width: 17em;
919 border: 1px solid gray;
920 padding: 3px;
921 background: white;
922}
923 .seperator {
924 padding-top: 2em;
925 clear: both;
926 }
927
928 #validators {
929 margin-top: 5em;
930 text-align: right;
931 color: #777;
932 }
933 @media print {
934 body {
935 font-size: 8pt;
936 }
937 .noprint {
938 display: none;
939 }
940 }
941
942
943.tip,
944.note {
945 background: #f0f0f2;
946 color: #333;
947 padding: 20px;
948 margin: 20px;
949}
950
951.tip h3,
952.note h3 {
953 padding: 0em;
954 margin: 0em;
955 font-size: 2em;
956 font-weight: bold;
957 color: #333;
958}
959
960.tip a,
961.note a {
962 color: #333;
963 text-decoration: underline;
964}
965
966.footnote {
967 font-size: small;
968 color: #333;
969}
970
971/* Changes the announcement text */
972.tip h3,
973.warning h3,
974.caution h3,
975.note h3 {
976 font-size:large;
977 color: #00557D;
978}
979
diff --git a/documentation/dev-manual/figures/app-dev-flow.png b/documentation/dev-manual/figures/app-dev-flow.png
new file mode 100644
index 0000000..ec93374
--- /dev/null
+++ b/documentation/dev-manual/figures/app-dev-flow.png
Binary files differ
diff --git a/documentation/dev-manual/figures/bsp-dev-flow.png b/documentation/dev-manual/figures/bsp-dev-flow.png
new file mode 100644
index 0000000..1ccd9c3
--- /dev/null
+++ b/documentation/dev-manual/figures/bsp-dev-flow.png
Binary files differ
diff --git a/documentation/dev-manual/figures/dev-title.png b/documentation/dev-manual/figures/dev-title.png
new file mode 100644
index 0000000..d3cac4a
--- /dev/null
+++ b/documentation/dev-manual/figures/dev-title.png
Binary files differ
diff --git a/documentation/dev-manual/figures/git-workflow.png b/documentation/dev-manual/figures/git-workflow.png
new file mode 100644
index 0000000..4fdf42f
--- /dev/null
+++ b/documentation/dev-manual/figures/git-workflow.png
Binary files differ
diff --git a/documentation/dev-manual/figures/index-downloads.png b/documentation/dev-manual/figures/index-downloads.png
new file mode 100644
index 0000000..41251d5
--- /dev/null
+++ b/documentation/dev-manual/figures/index-downloads.png
Binary files differ
diff --git a/documentation/dev-manual/figures/kernel-dev-flow.png b/documentation/dev-manual/figures/kernel-dev-flow.png
new file mode 100644
index 0000000..edd9e82
--- /dev/null
+++ b/documentation/dev-manual/figures/kernel-dev-flow.png
Binary files differ
diff --git a/documentation/dev-manual/figures/kernel-overview-1.png b/documentation/dev-manual/figures/kernel-overview-1.png
new file mode 100644
index 0000000..116c0b9
--- /dev/null
+++ b/documentation/dev-manual/figures/kernel-overview-1.png
Binary files differ
diff --git a/documentation/dev-manual/figures/kernel-overview-2-generic.png b/documentation/dev-manual/figures/kernel-overview-2-generic.png
new file mode 100644
index 0000000..889ff1b
--- /dev/null
+++ b/documentation/dev-manual/figures/kernel-overview-2-generic.png
Binary files differ
diff --git a/documentation/dev-manual/figures/source-repos.png b/documentation/dev-manual/figures/source-repos.png
new file mode 100644
index 0000000..65c5f29
--- /dev/null
+++ b/documentation/dev-manual/figures/source-repos.png
Binary files differ
diff --git a/documentation/dev-manual/figures/yp-download.png b/documentation/dev-manual/figures/yp-download.png
new file mode 100644
index 0000000..7f1e5ca
--- /dev/null
+++ b/documentation/dev-manual/figures/yp-download.png
Binary files differ
diff --git a/documentation/kernel-dev/figures/kernel-architecture-overview.png b/documentation/kernel-dev/figures/kernel-architecture-overview.png
new file mode 100755
index 0000000..2aad172
--- /dev/null
+++ b/documentation/kernel-dev/figures/kernel-architecture-overview.png
Binary files differ
diff --git a/documentation/kernel-dev/figures/kernel-dev-title.png b/documentation/kernel-dev/figures/kernel-dev-title.png
new file mode 100644
index 0000000..7a8dd54
--- /dev/null
+++ b/documentation/kernel-dev/figures/kernel-dev-title.png
Binary files differ
diff --git a/documentation/kernel-dev/kernel-dev-advanced.xml b/documentation/kernel-dev/kernel-dev-advanced.xml
new file mode 100644
index 0000000..4589e4b
--- /dev/null
+++ b/documentation/kernel-dev/kernel-dev-advanced.xml
@@ -0,0 +1,1071 @@
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='kernel-dev-advanced'>
6<title>Working with Advanced Metadata</title>
7
8<section id='kernel-dev-advanced-overview'>
9 <title>Overview</title>
10
11 <para>
12 In addition to supporting configuration fragments and patches, the
13 Yocto Project kernel tools also support rich
14 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> that you can
15 use to define complex policies and Board Support Package (BSP) support.
16 The purpose of the Metadata and the tools that manage it, known as
17 the kern-tools (<filename>kern-tools-native_git.bb</filename>), is
18 to help you manage the complexity of the configuration and sources
19 used to support multiple BSPs and Linux kernel types.
20 </para>
21</section>
22
23<section id='using-kernel-metadata-in-a-recipe'>
24 <title>Using Kernel Metadata in a Recipe</title>
25
26 <para>
27 The kernel sources in the Yocto Project contain kernel Metadata, which is
28 located in the <filename>meta</filename> branches of the kernel source
29 Git repositories.
30 This Metadata defines Board Support Packages (BSPs) that
31 correspond to definitions in linux-yocto recipes for the same BSPs.
32 A BSP consists of an aggregation of kernel policy and hardware-specific
33 feature enablements.
34 The BSP can be influenced from within the linux-yocto recipe.
35 <note>
36 Linux kernel source that contains kernel Metadata is said to be
37 "linux-yocto style" kernel source.
38 A Linux kernel recipe that inherits from the
39 <filename>linux-yocto.inc</filename> include file is said to be a
40 "linux-yocto style" recipe.
41 </note>
42 </para>
43
44 <para>
45 Every linux-yocto style recipe must define the
46 <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>
47 variable.
48 This variable is typically set to the same value as the
49 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
50 variable, which is used by BitBake (e.g. "routerstationpro" or "fri2").
51 Multiple BSPs can reuse the same <filename>KMACHINE</filename>
52 name if they are built using the same BSP description.
53 The "fri2" and "fri2-noemgd" BSP combination
54 in the <filename>meta-intel</filename>
55 layer is a good example of two BSPs using the same
56 <filename>KMACHINE</filename> value (i.e. "fri2").
57 See the <link linkend='bsp-descriptions'>BSP Descriptions</link> section
58 for more information.
59 </para>
60
61 <para>
62 The linux-yocto style recipes can optionally define the following
63 variables:
64 <literallayout class='monospaced'>
65 <ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH'>KBRANCH</ulink>
66 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'>KERNEL_FEATURES</ulink>
67 <ulink url='&YOCTO_DOCS_REF_URL;#var-KBRANCH_DEFAULT'>KBRANCH_DEFAULT</ulink>
68 <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'>LINUX_KERNEL_TYPE</ulink>
69 </literallayout>
70 <filename>KBRANCH_DEFAULT</filename> defines the Linux kernel source
71 repository's default branch to use to build the Linux kernel.
72 The value is used as the default for <filename>KBRANCH</filename>, which
73 can define an alternate branch typically with a machine override as
74 follows:
75 <literallayout class='monospaced'>
76 KBRANCH_fri2 = "standard/fri2"
77 </literallayout>
78 Unless you specify otherwise, <filename>KBRANCH_DEFAULT</filename>
79 initializes to "master".
80 </para>
81
82 <para>
83 <filename>LINUX_KERNEL_TYPE</filename> defines the kernel type to be
84 used in assembling the configuration.
85 If you do not specify a <filename>LINUX_KERNEL_TYPE</filename>,
86 it defaults to "standard".
87 Together with
88 <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>,
89 <filename>LINUX_KERNEL_TYPE</filename> defines the search
90 arguments used by the kernel tools to find the
91 appropriate description within the kernel Metadata with which to
92 build out the sources and configuration.
93 The linux-yocto recipes define "standard", "tiny", and "preempt-rt"
94 kernel types.
95 See the <link linkend='kernel-types'>Kernel Types</link> section
96 for more information on kernel types.
97 </para>
98
99 <para>
100 During the build, the kern-tools search for the BSP description
101 file that most closely matches the <filename>KMACHINE</filename>
102 and <filename>LINUX_KERNEL_TYPE</filename> variables passed in from the
103 recipe.
104 The tools use the first BSP description it finds that match
105 both variables.
106 If the tools cannot find a match, they issue a warning such as
107 the following:
108 <literallayout class='monospaced'>
109 WARNING: Can't find any BSP hardware or required configuration fragments.
110 WARNING: Looked at meta/cfg/broken/fri2-broken/hdw_frags.txt and
111 meta/cfg/broken/fri2-broken/required_frags.txt in directory:
112 meta/cfg/broken/fri2-broken
113 </literallayout>
114 In this example, <filename>KMACHINE</filename> was set to "fri2-broken"
115 and <filename>LINUX_KERNEL_TYPE</filename> was set to "broken".
116 </para>
117
118 <para>
119 The tools first search for the <filename>KMACHINE</filename> and
120 then for the <filename>LINUX_KERNEL_TYPE</filename>.
121 If the tools cannot find a partial match, they will use the
122 sources from the <filename>KBRANCH</filename> and any configuration
123 specified in the
124 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>.
125 </para>
126
127 <para>
128 You can use the <filename>KERNEL_FEATURES</filename> variable
129 to include features (configuration fragments, patches, or both) that
130 are not already included by the <filename>KMACHINE</filename> and
131 <filename>LINUX_KERNEL_TYPE</filename> variable combination.
132 For example, to include a feature specified as "features/netfilter.scc",
133 specify:
134 <literallayout class='monospaced'>
135 KERNEL_FEATURES += "features/netfilter.scc"
136 </literallayout>
137 To include a feature called "cfg/sound.scc" just for the
138 <filename>qemux86</filename> machine, specify:
139 <literallayout class='monospaced'>
140 KERNEL_FEATURES_append_qemux86 = "cfg/sound.scc"
141 </literallayout>
142 The value of the entries in <filename>KERNEL_FEATURES</filename>
143 are dependent on their location within the kernel Metadata itself.
144 The examples here are taken from the
145 <filename>linux-yocto-3.4</filename> repository where "features"
146 and "cfg" are subdirectories within the
147 <filename>meta/cfg/kernel-cache</filename> directory.
148 For more information, see the
149 "<link linkend='kernel-metadata-syntax'>Kernel Metadata Syntax</link>" section.
150 <note>
151 The processing of the these variables has evolved some between the
152 0.9 and 1.3 releases of the Yocto Project and associated
153 kern-tools sources.
154 The descriptions in this section are accurate for 1.3 and later
155 releases of the Yocto Project.
156 </note>
157 </para>
158</section>
159
160<section id='kernel-metadata-location'>
161 <title>Kernel Metadata Location</title>
162
163 <para>
164 Kernel Metadata can be defined in either the kernel recipe
165 (recipe-space) or in the kernel tree (in-tree).
166 Where you choose to define the Metadata depends on what you want
167 to do and how you intend to work.
168 Regardless of where you define the kernel Metadata, the syntax used
169 applies equally.
170 </para>
171
172 <para>
173 If you are unfamiliar with the Linux kernel and only wish
174 to apply a configuration and possibly a couple of patches provided to
175 you by others, the recipe-space method is recommended.
176 This method is also a good approach if you are working with Linux kernel
177 sources you do not control or if you just do not want to maintain a
178 Linux kernel Git repository on your own.
179 For partial information on how you can define kernel Metadata in
180 the recipe-space, see the
181 "<link linkend='modifying-an-existing-recipe'>Modifying an Existing Recipe</link>"
182 section.
183 </para>
184
185 <para>
186 Conversely, if you are actively developing a kernel and are already
187 maintaining a Linux kernel Git repository of your own, you might find
188 it more convenient to work with the kernel Metadata in the same
189 repository as the Linux kernel sources.
190 This method can make iterative development of the Linux kernel
191 more efficient outside of the BitBake environment.
192 </para>
193
194 <section id='recipe-space-metadata'>
195 <title>Recipe-Space Metadata</title>
196
197 <para>
198 When stored in recipe-space, the kernel Metadata files reside in a
199 directory hierarchy below
200 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>.
201 For a linux-yocto recipe or for a Linux kernel recipe derived
202 by copying and modifying
203 <filename>oe-core/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb</filename>
204 to a recipe in your layer, <filename>FILESEXTRAPATHS</filename>
205 is typically set to
206 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-THISDIR'><filename>THISDIR</filename></ulink><filename>}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>.
207 See the "<link linkend='modifying-an-existing-recipe'>Modifying an Existing Recipe</link>"
208 section for more information.
209 </para>
210
211 <para>
212 Here is an example that shows a trivial tree of kernel Metadata
213 stored in recipe-space within a BSP layer:
214 <literallayout class='monospaced'>
215 meta-my_bsp_layer/
216 `-- recipes-kernel
217 `-- linux
218 `-- linux-yocto
219 |-- bsp-standard.scc
220 |-- bsp.cfg
221 `-- standard.cfg
222 </literallayout>
223 </para>
224
225 <para>
226 When the Metadata is stored in recipe-space, you must take
227 steps to ensure BitBake has the necessary information to decide
228 what files to fetch and when they need to be fetched again.
229 It is only necessary to specify the <filename>.scc</filename>
230 files on the
231 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>.
232 BitBake parses them and fetches any files referenced in the
233 <filename>.scc</filename> files by the <filename>include</filename>,
234 <filename>patch</filename>, or <filename>kconf</filename> commands.
235 Because of this, it is necessary to bump the recipe
236 <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>
237 value when changing the content of files not explicitly listed
238 in the <filename>SRC_URI</filename>.
239 </para>
240 </section>
241
242 <section id='in-tree-metadata'>
243 <title>In-Tree Metadata</title>
244
245 <para>
246 When stored in-tree, the kernel Metadata files reside in the
247 <filename>meta</filename> directory of the Linux kernel sources.
248 The <filename>meta</filename> directory can be present in the
249 same repository branch as the sources,
250 such as "master", or <filename>meta</filename> can be its own
251 orphan branch.
252 <note>
253 An orphan branch in Git is a branch with unique history and
254 content to the other branches in the repository.
255 Orphan branches are useful to track Metadata changes
256 independently from the sources of the Linux kernel, while
257 still keeping them together in the same repository.
258 </note>
259 For the purposes of this document, we will discuss all
260 in-tree Metadata as residing below the
261 <filename>meta/cfg/kernel-cache</filename> directory.
262 </para>
263
264 <para>
265 Following is an example that shows how a trivial tree of Metadata
266 is stored in a custom Linux kernel Git repository:
267 <literallayout class='monospaced'>
268 meta/
269 `-- cfg
270 `-- kernel-cache
271 |-- bsp-standard.scc
272 |-- bsp.cfg
273 `-- standard.cfg
274 </literallayout>
275 </para>
276
277 <para>
278 To use a branch different from where the sources reside,
279 specify the branch in the <filename>KMETA</filename> variable
280 in your Linux kernel recipe.
281 Here is an example:
282 <literallayout class='monospaced'>
283 KMETA = "meta"
284 </literallayout>
285 To use the same branch as the sources, set
286 <filename>KMETA</filename> to an empty string:
287 <literallayout class='monospaced'>
288 KMETA = ""
289 </literallayout>
290 If you are working with your own sources and want to create an
291 orphan <filename>meta</filename> branch, use these commands
292 from within your Linux kernel Git repository:
293 <literallayout class='monospaced'>
294 $ git checkout --orphan meta
295 $ git rm -rf .
296 $ git commit --allow-empty -m "Create orphan meta branch"
297 </literallayout>
298 </para>
299
300 <para>
301 If you modify the Metadata in the linux-yocto
302 <filename>meta</filename> branch, you must not forget to update
303 the
304 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>
305 statements in the kernel's recipe.
306 In particular, you need to update the
307 <filename>SRCREV_meta</filename> variable to match the commit in
308 the <filename>KMETA</filename> branch you wish to use.
309 Changing the data in these branches and not updating the
310 <filename>SRCREV</filename> statements to match will cause the
311 build to fetch an older commit.
312 </para>
313 </section>
314</section>
315
316<section id='kernel-metadata-syntax'>
317 <title>Kernel Metadata Syntax</title>
318
319 <para>
320 The kernel Metadata consists of three primary types of files:
321 <filename>scc</filename>
322 <footnote>
323 <para>
324 <filename>scc</filename> stands for Series Configuration
325 Control, but the naming has less significance in the
326 current implementation of the tooling than it had in the
327 past.
328 Consider <filename>scc</filename> files to be description files.
329 </para>
330 </footnote>
331 description files, configuration fragments, and patches.
332 The <filename>scc</filename> files define variables and include or
333 otherwise reference any of the three file types.
334 The description files are used to aggregate all types of kernel
335 Metadata into
336 what ultimately describes the sources and the configuration required
337 to build a Linux kernel tailored to a specific machine.
338 </para>
339
340 <para>
341 The <filename>scc</filename> description files are used to define two
342 fundamental types of kernel Metadata:
343 <itemizedlist>
344 <listitem><para>Features</para></listitem>
345 <listitem><para>Board Support Packages (BSPs)</para></listitem>
346 </itemizedlist>
347 </para>
348
349 <para>
350 Features aggregate sources in the form of patches and configuration
351 fragments into a modular reusable unit.
352 You can use features to implement conceptually separate kernel
353 Metadata descriptions such as pure configuration fragments,
354 simple patches, complex features, and kernel types.
355 <link linkend='kernel-types'>Kernel types</link> define general
356 kernel features and policy to be reused in the BSPs.
357 </para>
358
359 <para>
360 BSPs define hardware-specific features and aggregate them with kernel
361 types to form the final description of what will be assembled and built.
362 </para>
363
364 <para>
365 While the kernel Metadata syntax does not enforce any logical
366 separation of configuration fragments, patches, features or kernel
367 types, best practices dictate a logical separation of these types
368 of Metadata.
369 The following Metadata file hierarchy is recommended:
370 <literallayout class='monospaced'>
371 &lt;base&gt;/
372 bsp/
373 cfg/
374 features/
375 ktypes/
376 patches/
377 </literallayout>
378 </para>
379
380 <para>
381 The <filename>bsp</filename> directory contains the
382 <link linkend='bsp-descriptions'>BSP descriptions</link>.
383 The remaining directories all contain "features".
384 Separating <filename>bsp</filename> from the rest of the structure
385 aids conceptualizing intended usage.
386 </para>
387
388 <para>
389 Use these guidelines to help place your <filename>scc</filename>
390 description files within the structure:
391 <itemizedlist>
392 <listitem><para>If your file contains
393 only configuration fragments, place the file in the
394 <filename>cfg</filename> directory.</para></listitem>
395 <listitem><para>If your file contains
396 only source-code fixes, place the file in the
397 <filename>patches</filename> directory.</para></listitem>
398 <listitem><para>If your file encapsulates
399 a major feature, often combining sources and configurations,
400 place the file in <filename>features</filename> directory.
401 </para></listitem>
402 <listitem><para>If your file aggregates
403 non-hardware configuration and patches in order to define a
404 base kernel policy or major kernel type to be reused across
405 multiple BSPs, place the file in <filename>ktypes</filename>
406 directory.
407 </para></listitem>
408 </itemizedlist>
409 </para>
410
411 <para>
412 These distinctions can easily become blurred - especially as
413 out-of-tree features slowly merge upstream over time.
414 Also, remember that how the description files are placed is
415 a purely logical organization and has no impact on the functionality
416 of the kernel Metadata.
417 There is no impact because all of <filename>cfg</filename>,
418 <filename>features</filename>, <filename>patches</filename>, and
419 <filename>ktypes</filename>, contain "features" as far as the kernel
420 tools are concerned.
421 </para>
422
423 <para>
424 Paths used in kernel Metadata files are relative to
425 <filename>&lt;base&gt;</filename>, which is either
426 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
427 if you are creating Metadata in
428 <link linkend='recipe-space-metadata'>recipe-space</link>,
429 or <filename>meta/cfg/kernel-cache/</filename> if you are creating
430 Metadata <link linkend='in-tree-metadata'>in-tree</link>.
431 </para>
432
433 <section id='configuration'>
434 <title>Configuration</title>
435
436 <para>
437 The simplest unit of kernel Metadata is the configuration-only
438 feature.
439 This feature consists of one or more Linux kernel configuration
440 parameters in a configuration fragment file
441 (<filename>.cfg</filename>) and an <filename>.scc</filename> file
442 that describes the fragment.
443 </para>
444
445 <para>
446 The Symmetric Multi-Processing (SMP) fragment included in the
447 <filename>linux-yocto-3.4</filename> Git repository
448 consists of the following two files:
449 <literallayout class='monospaced'>
450 cfg/smp.scc:
451 define KFEATURE_DESCRIPTION "Enable SMP"
452 kconf hardware smp.cfg
453
454 cfg/smp.cfg:
455 CONFIG_SMP=y
456 CONFIG_SCHED_SMT=y
457 </literallayout>
458 You can find information on configuration fragment files in the
459 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-config-fragments'>Creating Configuration Fragments</ulink>"
460 section of the Yocto Project Development Manual and in
461 the "<link linkend='generating-configuration-files'>Generating Configuration Files</link>"
462 section earlier in this manual.
463 </para>
464
465 <para>
466 <ulink url='&YOCTO_DOCS_REF_URL;#var-KFEATURE_DESCRIPTION'><filename>KFEATURE_DESCRIPTION</filename></ulink>
467 provides a short description of the fragment.
468 Higher level kernel tools use this description.
469 </para>
470
471 <para>
472 The <filename>kconf</filename> command is used to include the
473 actual configuration fragment in an <filename>.scc</filename>
474 file, and the "hardware" keyword identifies the fragment as
475 being hardware enabling, as opposed to general policy,
476 which would use the "non-hardware" keyword.
477 The distinction is made for the benefit of the configuration
478 validation tools, which warn you if a hardware fragment
479 overrides a policy set by a non-hardware fragment.
480 <note>
481 The description file can include multiple
482 <filename>kconf</filename> statements, one per fragment.
483 </note>
484 </para>
485
486 <para>
487 As described in the
488 "<link linkend='generating-configuration-files'>Generating Configuration Files</link>"
489 section, you can use the following BitBake command to audit your
490 configuration:
491 <literallayout class='monospaced'>
492 $ bitbake linux-yocto -c kernel_configcheck -f
493 </literallayout>
494 </para>
495 </section>
496
497 <section id='patches'>
498 <title>Patches</title>
499
500 <para>
501 Patch descriptions are very similar to configuration fragment
502 descriptions, which are described in the previous section.
503 However, instead of a <filename>.cfg</filename> file, these
504 descriptions work with source patches.
505 </para>
506
507 <para>
508 A typical patch includes a description file and the patch itself:
509 <literallayout class='monospaced'>
510 patches/mypatch.scc:
511 patch mypatch.patch
512
513 patches/mypatch.patch:
514 &lt;typical-patch&gt;
515 </literallayout>
516 You can create the typical <filename>.patch</filename>
517 file using <filename>diff -Nurp</filename> or
518 <filename>git format-patch</filename>.
519 </para>
520
521 <para>
522 The description file can include multiple patch statements,
523 one per patch.
524 </para>
525 </section>
526
527 <section id='features'>
528 <title>Features</title>
529
530 <para>
531 Features are complex kernel Metadata types that consist
532 of configuration fragments (<filename>kconf</filename>), patches
533 (<filename>patch</filename>), and possibly other feature
534 description files (<filename>include</filename>).
535 </para>
536
537 <para>
538 Here is an example that shows a feature description file:
539 <literallayout class='monospaced'>
540 features/myfeature.scc
541 define KFEATURE_DESCRIPTION "Enable myfeature"
542
543 patch 0001-myfeature-core.patch
544 patch 0002-myfeature-interface.patch
545
546 include cfg/myfeature_dependency.scc
547 kconf non-hardware myfeature.cfg
548 </literallayout>
549 This example shows how the <filename>patch</filename> and
550 <filename>kconf</filename> commands are used as well as
551 how an additional feature description file is included.
552 </para>
553
554 <para>
555 Typically, features are less granular than configuration
556 fragments and are more likely than configuration fragments
557 and patches to be the types of things you want to specify
558 in the <filename>KERNEL_FEATURES</filename> variable of the
559 Linux kernel recipe.
560 See the "<link linkend='using-kernel-metadata-in-a-recipe'>Using Kernel Metadata in a Recipe</link>"
561 section earlier in the manual.
562 </para>
563 </section>
564
565 <section id='kernel-types'>
566 <title>Kernel Types</title>
567
568 <para>
569 A kernel type defines a high-level kernel policy by
570 aggregating non-hardware configuration fragments with
571 patches you want to use when building a Linux kernels of a
572 specific type.
573 Syntactically, kernel types are no different than features
574 as described in the "<link linkend='features'>Features</link>"
575 section.
576 The <filename>LINUX_KERNEL_TYPE</filename> variable in the kernel
577 recipe selects the kernel type.
578 See the "<link linkend='using-kernel-metadata-in-a-recipe'>Using Kernel Metadata in a Recipe</link>"
579 section for more information.
580 </para>
581
582 <para>
583 As an example, the <filename>linux-yocto-3.4</filename>
584 tree defines three kernel types: "standard",
585 "tiny", and "preempt-rt":
586 <itemizedlist>
587 <listitem><para>"standard":
588 Includes the generic Linux kernel policy of the Yocto
589 Project linux-yocto kernel recipes.
590 This policy includes, among other things, which file
591 systems, networking options, core kernel features, and
592 debugging and tracing options are supported.
593 </para></listitem>
594 <listitem><para>"preempt-rt":
595 Applies the <filename>PREEMPT_RT</filename>
596 patches and the configuration options required to
597 build a real-time Linux kernel.
598 This kernel type inherits from the "standard" kernel type.
599 </para></listitem>
600 <listitem><para>"tiny":
601 Defines a bare minimum configuration meant to serve as a
602 base for very small Linux kernels.
603 The "tiny" kernel type is independent from the "standard"
604 configuration.
605 Although the "tiny" kernel type does not currently include
606 any source changes, it might in the future.
607 </para></listitem>
608 </itemizedlist>
609 </para>
610
611 <para>
612 The "standard" kernel type is defined by
613 <filename>standard.scc</filename>:
614 <literallayout class='monospaced'>
615 # Include this kernel type fragment to get the standard features and
616 # configuration values.
617
618 # Include all standard features
619 include standard-nocfg.scc
620
621 kconf non-hardware standard.cfg
622
623 # individual cfg block section
624 include cfg/fs/devtmpfs.scc
625 include cfg/fs/debugfs.scc
626 include cfg/fs/btrfs.scc
627 include cfg/fs/ext2.scc
628 include cfg/fs/ext3.scc
629 include cfg/fs/ext4.scc
630
631 include cfg/net/ipv6.scc
632 include cfg/net/ip_nf.scc
633 include cfg/net/ip6_nf.scc
634 include cfg/net/bridge.scc
635 </literallayout>
636 </para>
637
638 <para>
639 As with any <filename>.scc</filename> file, a
640 kernel type definition can aggregate other
641 <filename>.scc</filename> files with
642 <filename>include</filename> commands.
643 These definitions can also directly pull in
644 configuration fragments and patches with the
645 <filename>kconf</filename> and <filename>patch</filename>
646 commands, respectively.
647 </para>
648
649 <note>
650 It is not strictly necessary to create a kernel type
651 <filename>.scc</filename> file.
652 The Board Support Package (BSP) file can implicitly define
653 the kernel type using a <filename>define
654 <ulink url='&YOCTO_DOCS_REF_URL;#var-KTYPE'>KTYPE</ulink> myktype</filename>
655 line.
656 See the "<link linkend='bsp-descriptions'>BSP Descriptions</link>"
657 section for more information.
658 </note>
659 </section>
660
661 <section id='bsp-descriptions'>
662 <title>BSP Descriptions</title>
663
664 <para>
665 BSP descriptions combine kernel types with hardware-specific
666 features.
667 The hardware-specific portion is typically defined
668 independently, and then aggregated with each supported kernel
669 type.
670 Consider this simple BSP description that supports the "mybsp"
671 machine:
672 <literallayout class='monospaced'>
673 mybsp.scc:
674 define KMACHINE mybsp
675 define KTYPE standard
676 define KARCH i386
677
678 kconf mybsp.cfg
679 </literallayout>
680 Every BSP description should define the
681 <ulink url='&YOCTO_DOCS_REF_URL;#var-KMACHINE'><filename>KMACHINE</filename></ulink>,
682 <ulink url='&YOCTO_DOCS_REF_URL;#var-KTYPE'><filename>KTYPE</filename></ulink>,
683 and <ulink url='&YOCTO_DOCS_REF_URL;#var-KARCH'><filename>KARCH</filename></ulink>
684 variables.
685 These variables allow the OpenEmbedded build system to identify
686 the description as meeting the criteria set by the recipe being
687 built.
688 This simple example supports the "mybsp" machine for the "standard"
689 kernel and the "i386" architecture.
690 </para>
691
692 <para>
693 Be aware that a hard link between the
694 <filename>KTYPE</filename> variable and a kernel type
695 description file does not exist.
696 Thus, if you do not have kernel types defined in your kernel
697 Metadata, you only need to ensure that the kernel recipe's
698 <ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></ulink>
699 variable and the <filename>KTYPE</filename> variable in the
700 BSP description file match.
701 <note>
702 Future versions of the tooling make the specification of
703 <filename>KTYPE</filename> in the BSP optional.
704 </note>
705 </para>
706
707 <para>
708 If you did want to separate your kernel policy from your
709 hardware configuration, you could do so by specifying a kernel
710 type, such as "standard" and including that description file
711 in the BSP description file.
712 See the "<link linkend='kernel-types'>Kernel Types</link>" section
713 for more information.
714 </para>
715
716 <para>
717 You might also have multiple hardware configurations that you
718 aggregate into a single hardware description file that you
719 could include in the BSP description file, rather than referencing
720 a single <filename>.cfg</filename> file.
721 Consider the following:
722 <literallayout class='monospaced'>
723 mybsp.scc:
724 define KMACHINE mybsp
725 define KTYPE standard
726 define KARCH i386
727
728 include standard.scc
729 include mybsp-hw.scc
730 </literallayout>
731 </para>
732
733 <para>
734 In the above example, <filename>standard.scc</filename>
735 aggregates all the configuration fragments, patches, and
736 features that make up your standard kernel policy whereas
737 <filename>mybsp-hw.scc</filename> aggregates all those necessary
738 to support the hardware available on the "mybsp" machine.
739 For information on how to break a complete
740 <filename>.config</filename> file into the various
741 configuration fragments, see the
742 "<link linkend='generating-configuration-files'>Generating Configuration Files</link>"
743 section.
744 </para>
745
746 <para>
747 Many real-world examples are more complex.
748 Like any other <filename>.scc</filename> file, BSP
749 descriptions can aggregate features.
750 Consider the Fish River Island 2 (fri2)
751 BSP definition from the <filename>linux-yocto-3.4</filename>
752 Git repository:
753 <literallayout class='monospaced'>
754 fri2.scc:
755 kconf hardware fri2.cfg
756
757 include cfg/x86.scc
758 include features/eg20t/eg20t.scc
759 include cfg/dmaengine.scc
760 include features/ericsson-3g/f5521gw.scc
761 include features/power/intel.scc
762 include cfg/efi.scc
763 include features/usb/ehci-hcd.scc
764 include features/usb/ohci-hcd.scc
765 include features/iwlwifi/iwlwifi.scc
766 </literallayout>
767 </para>
768
769 <para>
770 The <filename>fri2.scc</filename> description file includes
771 a hardware configuration fragment
772 (<filename>fri2.cfg</filename>) specific to the Fish River
773 Island 2 BSP as well as several more general configuration
774 fragments and features enabling hardware found on the
775 machine.
776 This description file is then included in each of the three
777 "fri2" description files for the supported kernel types
778 (i.e. "standard", "preempt-rt", and "tiny").
779 Consider the "fri2" description for the "standard" kernel
780 type:
781 <literallayout class='monospaced'>
782 fri2-standard.scc:
783 define KMACHINE fri2
784 define KTYPE standard
785 define KARCH i386
786
787 include ktypes/standard/standard.scc
788 branch fri2
789
790 git merge emgd-1.14
791
792 include fri2.scc
793
794 # Extra fri2 configs above the minimal defined in fri2.scc
795 include cfg/efi-ext.scc
796 include features/drm-emgd/drm-emgd.scc
797 include cfg/vesafb.scc
798
799 # default policy for standard kernels
800 include cfg/usb-mass-storage.scc
801 </literallayout>
802 The <filename>include</filename> command midway through the file
803 includes the <filename>fri2.scc</filename> description that
804 defines all hardware enablements for the BSP that is common to all
805 kernel types.
806 Using this command significantly reduces duplication.
807 </para>
808
809 <para>
810 This "fri2" standard description introduces a few more variables
811 and commands that are worth further discussion.
812 Notice the <filename>branch fri2</filename> command, which creates
813 a machine-specific branch into which source changes are applied.
814 With this branch set up, the <filename>git merge</filename> command
815 uses Git to merge in a feature branch named "emgd-1.14".
816 You could also handle this with the <filename>patch</filename>
817 command.
818 However, for commonly used features such as this, feature branches
819 are a convenient mechanism.
820 See the "<link linkend='feature-branches'>Feature Branches</link>"
821 section for more information.
822 </para>
823
824 <para>
825 Now consider the "fri2" description for the "tiny" kernel type:
826 <literallayout class='monospaced'>
827 fri2-tiny.scc:
828 define KMACHINE fri2
829 define KTYPE tiny
830 define KARCH i386
831
832 include ktypes/tiny/tiny.scc
833 branch fri2
834
835 include fri2.scc
836 </literallayout>
837 As you might expect, the "tiny" description includes quite a
838 bit less.
839 In fact, it includes only the minimal policy defined by the
840 "tiny" kernel type and the hardware-specific configuration required
841 for booting the machine along with the most basic functionality of
842 the system as defined in the base "fri2" description file.
843 </para>
844
845 <para>
846 Notice again the three critical variables:
847 <filename>KMACHINE</filename>, <filename>KTYPE</filename>,
848 and <filename>KARCH</filename>.
849 Of these variables, only the <filename>KTYPE</filename> has changed.
850 It is now set to "tiny".
851 </para>
852 </section>
853</section>
854
855<section id='organizing-your-source'>
856 <title>Organizing Your Source</title>
857
858 <para>
859 Many recipes based on the <filename>linux-yocto-custom.bb</filename>
860 recipe use Linux kernel sources that have only a single
861 branch - "master".
862 This type of repository structure is fine for linear development
863 supporting a single machine and architecture.
864 However, if you work with multiple boards and architectures,
865 a kernel source repository with multiple branches is more
866 efficient.
867 For example, suppose you need a series of patches for one board to boot.
868 Sometimes, these patches are works-in-progress or fundamentally wrong,
869 yet they are still necessary for specific boards.
870 In these situations, you most likely do not want to include these
871 patches in every kernel you build (i.e. have the patches as part of
872 the lone "master" branch).
873 It is situations like these that give rise to multiple branches used
874 within a Linux kernel sources Git repository.
875 </para>
876
877 <para>
878 Repository organization strategies exist that maximize source reuse,
879 remove redundancy, and logically order your changes.
880 This section presents strategies for the following cases:
881 <itemizedlist>
882 <listitem><para>Encapsulating patches in a feature description
883 and only including the patches in the BSP descriptions of
884 the applicable boards.</para></listitem>
885 <listitem><para>Creating a machine branch in your
886 kernel source repository and applying the patches on that
887 branch only.</para></listitem>
888 <listitem><para>Creating a feature branch in your
889 kernel source repository and merging that branch into your
890 BSP when needed.</para></listitem>
891 </itemizedlist>
892 </para>
893
894 <para>
895 The approach you take is entirely up to you
896 and depends on what works best for your development model.
897 </para>
898
899 <section id='encapsulating-patches'>
900 <title>Encapsulating Patches</title>
901
902 <para>
903 if you are reusing patches from an external tree and are not
904 working on the patches, you might find the encapsulated feature
905 to be appropriate.
906 Given this scenario, you do not need to create any branches in the
907 source repository.
908 Rather, you just take the static patches you need and encapsulate
909 them within a feature description.
910 Once you have the feature description, you simply include that into
911 the BSP description as described in the
912 "<link linkend='bsp-descriptions'>BSP Descriptions</link>"
913 section.
914 </para>
915
916 <para>
917 You can find information on how to create patches and BSP
918 descriptions in the "<link linkend='patches'>Patches</link>" and
919 "<link linkend='bsp-descriptions'>BSP Descriptions</link>"
920 sections.
921 </para>
922 </section>
923
924 <section id='machine-branches'>
925 <title>Machine Branches</title>
926
927 <para>
928 When you have multiple machines and architectures to support,
929 or you are actively working on board support, it is more
930 efficient to create branches in the repository based on
931 individual machines.
932 Having machine branches allows common source to remain in the
933 "master" branch with any features specific to a machine stored
934 in the appropriate machine branch.
935 This organization method frees you from continually reintegrating
936 your patches into a feature.
937 </para>
938
939 <para>
940 Once you have a new branch, you can set up your kernel Metadata
941 to use the branch a couple different ways.
942 In the recipe, you can specify the new branch as the
943 <filename>KBRANCH</filename> to use for the board as
944 follows:
945 <literallayout class='monospaced'>
946 KBRANCH = "mynewbranch"
947 </literallayout>
948 Another method is to use the <filename>branch</filename> command
949 in the BSP description:
950 <literallayout class='monospaced'>
951 mybsp.scc:
952 define KMACHINE mybsp
953 define KTYPE standard
954 define KARCH i386
955 include standard.scc
956
957 branch mynewbranch
958
959 include mybsp-hw.scc
960 </literallayout>
961 </para>
962
963 <para>
964 If you find
965 yourself with numerous branches, you might consider using a
966 hierarchical branching system similar to what the linux-yocto Linux
967 kernel repositories use:
968 <literallayout class='monospaced'>
969 &lt;common&gt;/&lt;kernel_type&gt;/&lt;machine&gt;
970 </literallayout>
971 </para>
972
973 <para>
974 If you had two kernel types, "standard" and "small" for
975 instance, and three machines, the branches in your
976 Git repository might look like this:
977 <literallayout class='monospaced'>
978 common/base
979 common/standard/base
980 common/standard/machine_a
981 common/standard/machine_b
982 common/standard/machine_c
983 common/small/base
984 common/small/machine_a
985 </literallayout>
986 </para>
987
988 <para>
989 This organization can help clarify the branch relationships.
990 In this case, <filename>common/standard/machine_a</filename>
991 includes everything in <filename>common/base</filename> and
992 <filename>common/standard/base</filename>.
993 The "standard" and "small" branches add sources specific to those
994 kernel types that for whatever reason are not appropriate for the
995 other branches.
996 <note>The "base" branches are an artifact of the way Git manages
997 its data internally on the filesystem: Git will not allow you
998 to use <filename>common/standard</filename> and
999 <filename>common/standard/machine_a</filename> because it
1000 would have to create a file and a directory named "standard".
1001 </note>
1002 </para>
1003 </section>
1004
1005 <section id='feature-branches'>
1006 <title>Feature Branches</title>
1007
1008 <para>
1009 When you are actively developing new features, it can be more
1010 efficient to work with that feature as a branch, rather than
1011 as a set of patches that have to be regularly updated.
1012 The Yocto Project Linux kernel tools provide for this with
1013 the <filename>git merge</filename> command.
1014 </para>
1015
1016 <para>
1017 To merge a feature branch into a BSP, insert the
1018 <filename>git merge</filename> command after any
1019 <filename>branch</filename> commands:
1020 <literallayout class='monospaced'>
1021 mybsp.scc:
1022 define KMACHINE mybsp
1023 define KTYPE standard
1024 define KARCH i386
1025 include standard.scc
1026
1027 branch mynewbranch
1028 git merge myfeature
1029
1030 include mybsp-hw.scc
1031 </literallayout>
1032 </para>
1033 </section>
1034</section>
1035
1036<section id='scc-reference'>
1037 <title>SCC Description File Reference</title>
1038
1039 <para>
1040 This section provides a brief reference for the commands you can use
1041 within an SCC description file (<filename>.scc</filename>):
1042 <itemizedlist>
1043 <listitem><para><filename>branch [ref]</filename>:
1044 Creates a new branch relative to the current branch
1045 (typically <filename>${KTYPE}</filename>) using
1046 the currently checked-out branch, or "ref" if specified.
1047 </para></listitem>
1048 <listitem><para><filename>define</filename>:
1049 Defines variables, such as <filename>KMACHINE</filename>,
1050 <filename>KTYPE</filename>, <filename>KARCH</filename>,
1051 and <filename>KFEATURE_DESCRIPTION</filename>.</para></listitem>
1052 <listitem><para><filename>include SCC_FILE</filename>:
1053 Includes an SCC file in the current file.
1054 The file is parsed as if you had inserted it inline.
1055 </para></listitem>
1056 <listitem><para><filename>kconf [hardware|non-hardware] CFG_FILE</filename>:
1057 Queues a configuration fragment for merging into the final
1058 Linux <filename>.config</filename> file.</para></listitem>
1059 <listitem><para><filename>git merge GIT_BRANCH</filename>:
1060 Merges the feature branch into the current branch.
1061 </para></listitem>
1062 <listitem><para><filename>patch PATCH_FILE</filename>:
1063 Applies the patch to the current Git branch.</para></listitem>
1064 </itemizedlist>
1065 </para>
1066</section>
1067
1068</chapter>
1069<!--
1070vim: expandtab tw=80 ts=4
1071-->
diff --git a/documentation/kernel-dev/kernel-dev-common.xml b/documentation/kernel-dev/kernel-dev-common.xml
new file mode 100644
index 0000000..a152f9f
--- /dev/null
+++ b/documentation/kernel-dev/kernel-dev-common.xml
@@ -0,0 +1,863 @@
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='kernel-dev-common'>
6
7<title>Common Tasks</title>
8
9<para>
10 This chapter presents several common tasks you perform when you
11 work with the Yocto Project Linux kernel.
12 These tasks include preparing a layer, modifying an existing recipe,
13 iterative development, working with your own sources, and incorporating
14 out-of-tree modules.
15 <note>
16 The examples presented in this chapter work with the Yocto Project
17 1.2.2 Release and forward.
18 </note>
19</para>
20
21 <section id='creating-and-preparing-a-layer'>
22 <title>Creating and Preparing a Layer</title>
23
24 <para>
25 If you are going to be modifying kernel recipes, it is recommended
26 that you create and prepare your own layer in which to do your
27 work.
28 Your layer contains its own BitBake append files
29 (<filename>.bbappend</filename>) and provides a convenient
30 mechanism to create your own recipe files
31 (<filename>.bb</filename>).
32 For details on how to create and work with layers, see the following
33 sections in the Yocto Project Development Manual:
34 <itemizedlist>
35 <listitem><para>"<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>" for
36 general information on layers and how to create layers.</para></listitem>
37 <listitem><para>"<ulink url='&YOCTO_DOCS_DEV_URL;#set-up-your-layer-for-the-build'>Set Up Your Layer for the Build</ulink>" for
38 specific instructions on setting up a layer for kernel
39 development.</para></listitem>
40 </itemizedlist>
41 </para>
42 </section>
43
44 <section id='modifying-an-existing-recipe'>
45 <title>Modifying an Existing Recipe</title>
46
47 <para>
48 In many cases, you can customize an existing linux-yocto recipe to
49 meet the needs of your project.
50 Each release of the Yocto Project provides a few Linux
51 kernel recipes from which you can choose.
52 These are located in the
53 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
54 in <filename>meta/recipes-kernel/linux</filename>.
55 </para>
56
57 <para>
58 Modifying an existing recipe can consist of the following:
59 <itemizedlist>
60 <listitem><para>Creating the append file</para></listitem>
61 <listitem><para>Applying patches</para></listitem>
62 <listitem><para>Changing the configuration</para></listitem>
63 </itemizedlist>
64 </para>
65
66 <para>
67 Before modifying an existing recipe, be sure that you have created
68 a minimal, custom layer from which you can work.
69 See the "<link linkend='creating-and-preparing-a-layer'>Creating and Preparing a Layer</link>"
70 section for some general resources.
71 You can also see the
72 "<ulink url='&YOCTO_DOCS_DEV_URL;#set-up-your-layer-for-the-build'>Set Up Your Layer for the Build</ulink>" section
73 of the Yocto Project Development Manual for a detailed
74 example.
75 </para>
76
77 <section id='creating-the-append-file'>
78 <title>Creating the Append File</title>
79
80 <para>
81 You create this file in your custom layer.
82 You also name it accordingly based on the linux-yocto recipe
83 you are using.
84 For example, if you are modifying the
85 <filename>meta/recipes-kernel/linux/linux-yocto_3.4.bb</filename>
86 recipe, the append file will typical be located as follows
87 within your custom layer:
88 <literallayout class='monospaced'>
89 &lt;your-layer&gt;/recipes-kernel/linux/linux-yocto_3.4.bbappend
90 </literallayout>
91 The append file should initially extend the
92 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
93 search path by prepending the directory that contains your
94 files to the
95 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
96 variable as follows:
97 <literallayout class='monospaced'>
98 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
99 </literallayout>
100 The path <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-THISDIR'><filename>THISDIR</filename></ulink><filename>}/${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PN'><filename>PN</filename></ulink><filename>}</filename>
101 expands to "linux-yocto" in the current directory for this
102 example.
103 If you add any new files that modify the kernel recipe and you
104 have extended <filename>FILESPATH</filename> as
105 described above, you must place the files in your layer in the
106 following area:
107 <literallayout class='monospaced'>
108 &lt;your-layer&gt;/recipes-kernel/linux/linux-yocto/
109 </literallayout>
110 <note>If you are working on a new machine Board Support Package
111 (BSP), be sure to refer to the
112 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
113 </note>
114 </para>
115 </section>
116
117 <section id='applying-patches'>
118 <title>Applying Patches</title>
119
120 <para>
121 If you have a single patch or a small series of patches
122 that you want to apply to the Linux kernel source, you
123 can do so just as you would with any other recipe.
124 You first copy the patches to the path added to
125 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
126 in your <filename>.bbappend</filename> file as described in
127 the previous section, and then reference them in
128 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
129 statements.
130 </para>
131
132 <para>
133 For example, you can apply a three-patch series by adding the
134 following lines to your linux-yocto <filename>.bbappend</filename>
135 file in your layer:
136 <literallayout class='monospaced'>
137 SRC_URI += "file://0001-first-change.patch"
138 SRC_URI += "file://0002-first-change.patch"
139 SRC_URI += "file://0003-first-change.patch"
140 </literallayout>
141 The next time you run BitBake to build the Linux kernel, BitBake
142 detects the change in the recipe and fetches and applies the patches
143 before building the kernel.
144 </para>
145
146 <para>
147 For a detailed example showing how to patch the kernel, see the
148 "<ulink url='&YOCTO_DOCS_DEV_URL;#patching-the-kernel'>Patching the Kernel</ulink>"
149 section in the Yocto Project Development Manual.
150 </para>
151 </section>
152
153 <section id='changing-the-configuration'>
154 <title>Changing the Configuration</title>
155
156 <para>
157 You can make wholesale or incremental changes to the Linux
158 kernel <filename>.config</filename> file by including a
159 <filename>defconfig</filename> and by specifying
160 configuration fragments in the
161 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>.
162 </para>
163
164 <para>
165 If you have a final Linux kernel <filename>.config</filename>
166 file you want to use, copy it to a directory named
167 <filename>files</filename>, which must be in
168 your layer's <filename>recipes-kernel/linux</filename>
169 directory, and name the file "defconfig".
170 Then, add the following lines to your linux-yocto
171 <filename>.bbappend</filename> file in your layer:
172 <literallayout class='monospaced'>
173 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
174 SRC_URI += "file://defconfig"
175 </literallayout>
176 The <filename>SRC_URI</filename> tells the build system how to
177 search for the file, while the
178 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></ulink>
179 extends the
180 <ulink url='&YOCTO_DOCS_REF_URL;#var-FILESPATH'><filename>FILESPATH</filename></ulink>
181 variable (search directories) to include the
182 <filename>files</filename> directory you created for the
183 configuration changes.
184 </para>
185
186 <note>
187 The build system applies the configurations from the
188 <filename>.config</filename> file before applying any
189 subsequent configuration fragments.
190 The final kernel configuration is a combination of the
191 configurations in the <filename>.config</filename> file and
192 any configuration fragments you provide.
193 You need to realize that if you have any configuration
194 fragments, the build system applies these on top of and
195 after applying the existing <filename>.config</filename>
196 file configurations.
197 </note>
198
199 <para>
200 Generally speaking, the preferred approach is to determine the
201 incremental change you want to make and add that as a
202 configuration fragment.
203 For example, if you want to add support for a basic serial
204 console, create a file named <filename>8250.cfg</filename> in
205 the <filename>files</filename> directory with the following
206 content (without indentation):
207 <literallayout class='monospaced'>
208 CONFIG_SERIAL_8250=y
209 CONFIG_SERIAL_8250_CONSOLE=y
210 CONFIG_SERIAL_8250_PCI=y
211 CONFIG_SERIAL_8250_NR_UARTS=4
212 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
213 CONFIG_SERIAL_CORE=y
214 CONFIG_SERIAL_CORE_CONSOLE=y
215 </literallayout>
216 Next, include this configuration fragment and extend the
217 <filename>FILESPATH</filename> variable in your
218 <filename>.bbappend</filename> file:
219 <literallayout class='monospaced'>
220 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
221 SRC_URI += "file://8250.cfg"
222 </literallayout>
223 The next time you run BitBake to build the Linux kernel, BitBake
224 detects the change in the recipe and fetches and applies the
225 new configuration before building the kernel.
226 </para>
227
228 <para>
229 For a detailed example showing how to configure the kernel,
230 see the
231 "<ulink url='&YOCTO_DOCS_DEV_URL;#configuring-the-kernel'>Configuring the Kernel</ulink>"
232 section in the Yocto Project Development Manual.
233 </para>
234 </section>
235 </section>
236
237 <section id='using-an-iterative-development-process'>
238 <title>Using an Iterative Development Process</title>
239
240 <para>
241 If you do not have existing patches or configuration files,
242 you can iteratively generate them from within the BitBake build
243 environment as described within this section.
244 During an iterative workflow, running a previously completed BitBake
245 task causes BitBake to invalidate the tasks that follow the
246 completed task in the build sequence.
247 Invalidated tasks rebuild the next time you run the build using
248 BitBake.
249 </para>
250
251 <para>
252 As you read this section, be sure to substitute the name
253 of your Linux kernel recipe for the term
254 "linux-yocto".
255 </para>
256
257 <section id='tip-dirty-string'>
258 <title>"-dirty" String</title>
259
260<!--
261 <para>
262 <emphasis>AR - Darrren Hart:</emphasis> This section
263 originated from the old Yocto Project Kernel Architecture
264 and Use Manual.
265 It was decided we need to put it in this section here.
266 Darren needs to figure out where we want it and what part
267 of it we want (all, revision???)
268 </para>
269-->
270
271 <para>
272 If kernel images are being built with "-dirty" on the
273 end of the version string, this simply means that
274 modifications in the source directory have not been committed.
275 <literallayout class='monospaced'>
276 $ git status
277 </literallayout>
278 </para>
279
280 <para>
281 You can use the above Git command to report modified,
282 removed, or added files.
283 You should commit those changes to the tree regardless of
284 whether they will be saved, exported, or used.
285 Once you commit the changes, you need to rebuild the kernel.
286 </para>
287
288 <para>
289 To force a pickup and commit of all such pending changes,
290 enter the following:
291 <literallayout class='monospaced'>
292 $ git add .
293 $ git commit -s -a -m "getting rid of -dirty"
294 </literallayout>
295 </para>
296
297 <para>
298 Next, rebuild the kernel.
299 </para>
300 </section>
301
302 <section id='generating-configuration-files'>
303 <title>Generating Configuration Files</title>
304
305 <para>
306 You can manipulate the <filename>.config</filename> file
307 used to build a linux-yocto recipe with the
308 <filename>menuconfig</filename> command as follows:
309 <literallayout class='monospaced'>
310 $ bitbake linux-yocto -c menuconfig
311 </literallayout>
312 This command starts the Linux kernel configuration tool,
313 which allows you to prepare a new
314 <filename>.config</filename> file for the build.
315 When you exit the tool, be sure to save your changes
316 at the prompt.
317 </para>
318
319 <para>
320 The resulting <filename>.config</filename> file is
321 located in
322 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}</filename> under the
323 <filename>linux-${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink><filename>}-${<ulink url='&YOCTO_DOCS_REF_URL;#var-KTYPE'><filename>KTYPE</filename></ulink>}-build</filename> directory.
324 You can use the entire <filename>.config</filename> file as the
325 <filename>defconfig</filename> file as described in the
326 "<link linkend='changing-the-configuration'>Changing the Configuration</link>" section.
327 </para>
328
329 <para>
330 A better method is to create a configuration fragment using the
331 differences between two configuration files: one previously
332 created and saved, and one freshly created using the
333 <filename>menuconfig</filename> tool.
334 </para>
335
336 <para>
337 To create a configuration fragment using this method, follow
338 these steps:
339 <orderedlist>
340 <listitem><para>Complete a build at least through the kernel
341 configuration task as follows:
342 <literallayout class='monospaced'>
343 $ bitbake linux-yocto -c kernel_configme -f
344 </literallayout></para></listitem>
345 <listitem><para>Copy and rename the resulting
346 <filename>.config</filename> file (e.g.
347 <filename>config.orig</filename>).
348 </para></listitem>
349 <listitem><para>Run the <filename>menuconfig</filename>
350 command:
351 <literallayout class='monospaced'>
352 $ bitbake linux-yocto -c menuconfig
353 </literallayout></para></listitem>
354 <listitem><para>Prepare a configuration fragment based on
355 the differences between the two files.
356 </para></listitem>
357 </orderedlist>
358 </para>
359
360 <para>
361 Ultimately, the configuration fragment file needs to be a
362 list of Linux kernel <filename>CONFIG_</filename> assignments.
363 It cannot be in <filename>diff</filename> format.
364 Here is an example of a command that creates your
365 configuration fragment file.
366 Regardless of the exact command you use, plan on reviewing
367 the output as you can usually remove some of the defaults:
368 <literallayout class='monospaced'>
369 $ diff -Nurp config.orig .config | sed -n "s/^\+//p" > frag.cfg
370 </literallayout>
371 See the "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
372 section for information on how to use the output as a
373 configuration fragment.
374 <note>
375 You can also use this method to create configuration
376 fragments for a BSP.
377 See the "<link linkend='bsp-descriptions'>BSP Descriptions</link>"
378 section for more information.
379 </note>
380 </para>
381
382 <para>
383 The kernel tools also provide configuration validation.
384 You can use these tools to produce warnings for when a
385 requested configuration does not appear in the final
386 <filename>.config</filename> file or when you override a
387 policy configuration in a hardware configuration fragment.
388 Here is an example with some sample output of the command
389 that runs these tools:
390 <literallayout class='monospaced'>
391 $ bitbake linux-yocto -c kernel_configcheck -f
392
393 ...
394
395 NOTE: validating kernel configuration
396 This BSP sets 3 invalid/obsolete kernel options.
397 These config options are not offered anywhere within this kernel.
398 The full list can be found in your kernel src dir at:
399 meta/cfg/standard/mybsp/invalid.cfg
400
401 This BSP sets 21 kernel options that are possibly non-hardware related.
402 The full list can be found in your kernel src dir at:
403 meta/cfg/standard/mybsp/specified_non_hdw.cfg
404
405 WARNING: There were 2 hardware options requested that do not
406 have a corresponding value present in the final ".config" file.
407 This probably means you are not't getting the config you wanted.
408 The full list can be found in your kernel src dir at:
409 meta/cfg/standard/mybsp/mismatch.cfg
410 </literallayout>
411 </para>
412
413 <para>
414 The output describes the various problems that you can
415 encounter along with where to find the offending configuration
416 items.
417 You can use the information in the logs to adjust your
418 configuration files and then repeat the
419 <filename>kernel_configme</filename> and
420 <filename>kernel_configcheck</filename> commands until
421 they produce no warnings.
422 </para>
423
424 <para>
425 For more information on how to use the
426 <filename>menuconfig</filename> tool, see the
427 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-menuconfig'>Using <filename>menuconfig</filename></ulink>"
428 section in the Yocto Project Development Manual.
429 </para>
430 </section>
431
432 <section id='modifying-source-code'>
433 <title>Modifying Source Code</title>
434
435 <para>
436 You can experiment with source code changes and create a
437 simple patch without leaving the BitBake environment.
438 To get started, be sure to complete a build at
439 least through the kernel configuration task:
440 <literallayout class='monospaced'>
441 $ bitbake linux-yocto -c kernel_configme -f
442 </literallayout>
443 Taking this step ensures you have the sources prepared
444 and the configuration completed.
445 You can find the sources in the
446 <filename>${</filename><ulink url='&YOCTO_DOCS_REF_URL;#var-WORKDIR'><filename>WORKDIR</filename></ulink><filename>}/linux</filename> directory.
447 </para>
448
449 <para>
450 You can edit the sources as you would any other Linux source
451 tree.
452 However, keep in mind that you will lose changes if you
453 trigger the <filename>fetch</filename> task for the recipe.
454 You can avoid triggering this task by not issuing BitBake's
455 <filename>cleanall</filename>, <filename>cleansstate</filename>,
456 or forced <filename>fetch</filename> commands.
457 Also, do not modify the recipe itself while working
458 with temporary changes or BitBake might run the
459 <filename>fetch</filename> command depending on the
460 changes to the recipe.
461 </para>
462
463 <para>
464 To test your temporary changes, instruct BitBake to run the
465 <filename>compile</filename> again.
466 The <filename>-f</filename> option forces the command to run
467 even though BitBake might think it has already done so:
468 <literallayout class='monospaced'>
469 $ bitbake linux-yocto -c compile -f
470 </literallayout>
471 If the compile fails, you can update the sources and repeat
472 the <filename>compile</filename>.
473 Once compilation is successful, you can inspect and test
474 the resulting build (i.e. kernel, modules, and so forth) from
475 the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
476 <literallayout class='monospaced'>
477 ${WORKDIR}/linux-${MACHINE}-${KTYPE}-build
478 </literallayout>
479 Alternatively, you can run the <filename>deploy</filename>
480 command to place the kernel image in the
481 <filename>tmp/deploy/images</filename> directory:
482 <literallayout class='monospaced'>
483 $ bitbake linux-yocto -c deploy
484 </literallayout>
485 And, of course, you can perform the remaining installation and
486 packaging steps by issuing:
487 <literallayout class='monospaced'>
488 $ bitbake linux-yocto
489 </literallayout>
490 </para>
491
492 <para>
493 For rapid iterative development, the edit-compile-repeat loop
494 described in this section is preferable to rebuilding the
495 entire recipe because the installation and packaging tasks
496 are very time consuming.
497 </para>
498
499 <para>
500 Once you are satisfied with your source code modifications,
501 you can make them permanent by generating patches and
502 applying them to the
503 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
504 statement as described in section
505 "<link linkend='applying-patches'>Applying Patches</link>" section.
506 If you are not familiar with generating patches, refer to the
507 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-the-patch'>Creating the Patch</ulink>"
508 section in the Yocto Project Development Manual.
509 </para>
510 </section>
511 </section>
512
513 <section id='working-with-your-own-sources'>
514 <title>Working With Your Own Sources</title>
515
516 <para>
517 If you cannot work with one of the Linux kernel
518 versions supported by existing linux-yocto recipes, you can
519 still make use of the Yocto Project Linux kernel tooling by
520 working with your own sources.
521 When you use your own sources, you will not be able to
522 leverage the existing kernel
523 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> and
524 stabilization work of the linux-yocto sources.
525 However, you will be able to manage your own Metadata in the same
526 format as the linux-yocto sources.
527 Maintaining format compatibility facilitates converging with
528 linux-yocto on a future, mutually-supported kernel version.
529 </para>
530
531 <para>
532 To help you use your own sources, the Yocto Project provides a
533 linux-yocto custom recipe
534 (<filename>linux-yocto-custom.bb</filename>) that uses
535 <filename>kernel.org</filename> sources
536 and the Yocto Project Linux kernel tools for managing
537 kernel Metadata.
538 You can find this recipe in the
539 <filename>poky</filename> Git repository of the
540 Yocto Project <ulink url='&YOCTO_GIT_URL;'>Source Repository</ulink>
541 at:
542 <literallayout class="monospaced">
543 poky/meta-skeleton/recipes-kernel/linux/linux-yocto-custom.bb
544 </literallayout>
545 </para>
546
547 <para>
548 Here are some basic steps you can use to work with your own sources:
549 <orderedlist>
550 <listitem><para>Copy the <filename>linux-yocto-custom.bb</filename>
551 recipe to your layer and give it a meaningful name.
552 The name should include the version of the Linux kernel you
553 are using (e.g. <filename>linux-yocto-myproject_3.5.bb</filename>,
554 where "3.5" is the base version of the Linux kernel
555 with which you would be working).</para></listitem>
556 <listitem><para>In the same directory inside your layer,
557 create a matching directory
558 to store your patches and configuration files (e.g.
559 <filename>linux-yocto-myproject</filename>).
560 </para></listitem>
561 <listitem><para>Edit the following variables in your recipe
562 as appropriate for your project:
563 <itemizedlist>
564 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>:
565 The <filename>SRC_URI</filename> should be a Git
566 repository that uses one of the supported Git fetcher
567 protocols (i.e. <filename>file</filename>,
568 <filename>git</filename>, <filename>http</filename>,
569 and so forth).
570 The skeleton recipe provides an example
571 <filename>SRC_URI</filename> as a syntax reference.
572 </para></listitem>
573 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION'><filename>LINUX_VERSION</filename></ulink>:
574 The Linux kernel version you are using (e.g.
575 "3.4").</para></listitem>
576 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-LINUX_VERSION_EXTENSION'><filename>LINUX_VERSION_EXTENSION</filename></ulink>:
577 The Linux kernel <filename>CONFIG_LOCALVERSION</filename>
578 that is compiled into the resulting kernel and visible
579 through the <filename>uname</filename> command.
580 </para></listitem>
581 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-SRCREV'><filename>SRCREV</filename></ulink>:
582 The commit ID from which you want to build.
583 </para></listitem>
584 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>:
585 Treat this variable the same as you would in any other
586 recipe.
587 Increment the variable to indicate to the OpenEmbedded
588 build system that the recipe has changed.
589 </para></listitem>
590 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>:
591 The default <filename>PV</filename> assignment is
592 typically adequate.
593 It combines the <filename>LINUX_VERSION</filename>
594 with the Source Control Manager (SCM) revision
595 as derived from the
596 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRCPV'><filename>SRCPV</filename></ulink>
597 variable.
598 The combined results are a string with
599 the following form:
600 <literallayout class='monospaced'>
601 3.4.11+git1+68a635bf8dfb64b02263c1ac80c948647cc76d5f_1+218bd8d2022b9852c60d32f0d770931e3cf343e2
602 </literallayout>
603 While lengthy, the extra verbosity in <filename>PV</filename>
604 helps ensure you are using the exact
605 sources from which you intend to build.
606 </para></listitem>
607 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-COMPATIBLE_MACHINE'><filename>COMPATIBLE_MACHINE</filename></ulink>:
608 A list of the machines supported by your new recipe.
609 This variable in the example recipe is set
610 by default to a regular expression that matches
611 only the empty string, "(^$)".
612 This default setting triggers an explicit build
613 failure.
614 You must change it to match a list of the machines
615 that your new recipe supports.
616 For example, to support the <filename>qemux86</filename>
617 and <filename>qemux86-64</filename> machines, use
618 the following form:
619 <literallayout class='monospaced'>
620 COMPATIBLE_MACHINE = "qemux86|qemux86-64"
621 </literallayout></para></listitem>
622 </itemizedlist></para></listitem>
623 <listitem><para>Provide further customizations to your recipe
624 as needed just as you would customize an existing
625 linux-yocto recipe.
626 See the "<link linkend='modifying-an-existing-recipe'>Modifying
627 an Existing Recipe</link>" section for information.
628 </para></listitem>
629 </orderedlist>
630 </para>
631 </section>
632
633 <section id='incorporating-out-of-tree-modules'>
634 <title>Incorporating Out-of-Tree Modules</title>
635
636 <para>
637 While it is always preferable to work with sources integrated
638 into the Linux kernel sources, if you need an external kernel
639 module, the <filename>hello-mod.bb</filename> recipe is available
640 as a template from which you can create your own out-of-tree
641 Linux kernel module recipe.
642 </para>
643
644 <para>
645 This template recipe is located in the
646 <filename>poky</filename> Git repository of the
647 Yocto Project <ulink url='&YOCTO_GIT_URL;'>Source Repository</ulink>
648 at:
649 <literallayout class="monospaced">
650 poky/meta-skeleton/recipes-kernel/hello-mod/hello-mod_0.1.bb
651 </literallayout>
652 </para>
653
654 <para>
655 To get started, copy this recipe to your layer and give it a
656 meaningful name (e.g. <filename>mymodule_1.0.bb</filename>).
657 In the same directory, create a directory named
658 <filename>files</filename> where you can store any source files,
659 patches, or other files necessary for building
660 the module that do not come with the sources.
661 Finally, update the recipe as appropriate for the module.
662 Typically you will need to set the following variables:
663 <itemizedlist>
664 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-DESCRIPTION'><filename>DESCRIPTION</filename></ulink>
665 </para></listitem>
666 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-LICENSE'><filename>LICENSE*</filename></ulink>
667 </para></listitem>
668 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink>
669 </para></listitem>
670 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>
671 </para></listitem>
672 </itemizedlist>
673 </para>
674
675 <para>
676 Depending on the build system used by the module sources, you might
677 need to make some adjustments.
678 For example, a typical module <filename>Makefile</filename> looks
679 much like the one provided with the <filename>hello-mod</filename>
680 template:
681 <literallayout class='monospaced'>
682 obj-m := hello.o
683
684 SRC := $(shell pwd)
685
686 all:
687 $(MAKE) -C $(KERNEL_SRC) M=$(SRC)
688
689 modules_install:
690 $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install
691 ...
692 </literallayout>
693 </para>
694
695 <para>
696 The important point to note here is the
697 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_SRC'><filename>KERNEL_SRC</filename></ulink>
698 variable.
699 The class <filename>module.bbclass</filename> sets this variable,
700 as well as the
701 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_PATH'><filename>KERNEL_PATH</filename></ulink>
702 variable to
703 <filename>${<ulink url='&YOCTO_DOCS_REF_URL;#var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></ulink>}</filename>
704 with the necessary Linux kernel build information to build modules.
705 If your module <filename>Makefile</filename> uses a different
706 variable, you might want to override the
707 <filename>do_compile()</filename> step, or create a patch to
708 the <filename>Makefile</filename> to work with the more typical
709 <filename>KERNEL_SRC</filename> or <filename>KERNEL_PATH</filename>
710 variables.
711 </para>
712
713 <para>
714 After you have prepared your recipe, you will likely want to
715 include the module in your images.
716 To do this, see the documentation for the following variables in
717 the Yocto Project Reference Manual and set one of them as
718 appropriate in your machine configuration file:
719 <itemizedlist>
720 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</filename></ulink>
721 </para></listitem>
722 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</filename></ulink>
723 </para></listitem>
724 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RDEPENDS'><filename>MACHINE_EXTRA_RDEPENDS</filename></ulink>
725 </para></listitem>
726 <listitem><para><ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RRECOMMENDS'><filename>MACHINE_EXTRA_RRECOMMENDS</filename></ulink>
727 </para></listitem>
728 </itemizedlist>
729 </para>
730
731 <para>
732 modules are often not required for boot and can be excluded from
733 certain build configurations.
734 The following allows for the most flexibility:
735 <literallayout class='monospaced'>
736 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-mymodule"
737 </literallayout>
738 Where the value is derived by appending the module filename without
739 the <filename>.ko</filename> extension to the string
740 "kernel-module-".
741 </para>
742
743 <para>
744 Because the variable is
745 <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>
746 and not a
747 <ulink url='&YOCTO_DOCS_REF_URL;#var-RDEPENDS'><filename>RDEPENDS</filename></ulink>
748 variable, the build will not fail if this module is not available
749 to include in the image.
750 </para>
751 </section>
752
753 <section id='inspecting-changes-and-commits'>
754 <title>Inspecting Changes and Commits</title>
755
756 <para>
757 A common question when working with a kernel is:
758 "What changes have been applied to this tree?"
759 Rather than using "grep" across directories to see what has
760 changed, you can use Git to inspect or search the kernel tree.
761 Using Git is an efficient way to see what has changed in the tree.
762 </para>
763
764 <section id='what-changed-in-a-kernel'>
765 <title>What Changed in a Kernel?</title>
766
767 <para>
768 Following are a few examples that show how to use Git
769 commands to examine changes.
770 These examples are by no means the only way to see changes.
771 <note>
772 In the following examples, unless you provide a commit
773 range, <filename>kernel.org</filename> history is blended
774 with Yocto Project kernel changes.
775 You can form ranges by using branch names from the
776 kernel tree as the upper and lower commit markers with
777 the Git commands.
778 You can see the branch names through the web interface
779 to the Yocto Project source repositories at
780 <ulink url='http://git.yoctoproject.org/cgit.cgi'></ulink>.
781 </note>
782 To see a full range of the changes, use the
783 <filename>git whatchanged</filename> command and specify a
784 commit range for the branch
785 (<filename>&lt;commit&gt;..&lt;commit&gt;</filename>).
786 </para>
787
788 <para>
789 Here is an example that looks at what has changed in the
790 <filename>emenlow</filename> branch of the
791 <filename>linux-yocto-3.4</filename> kernel.
792 The lower commit range is the commit associated with the
793 <filename>standard/base</filename> branch, while
794 the upper commit range is the commit associated with the
795 <filename>standard/emenlow</filename> branch.
796 <literallayout class='monospaced'>
797 $ git whatchanged origin/standard/base..origin/standard/emenlow
798 </literallayout>
799 </para>
800
801 <para>
802 To see short, one line summaries of changes use the
803 <filename>git log</filename> command:
804 <literallayout class='monospaced'>
805 $ git log --oneline origin/standard/base..origin/standard/emenlow
806 </literallayout>
807 </para>
808
809 <para>
810 Use this command to see code differences for the changes:
811 <literallayout class='monospaced'>
812 $ git diff origin/standard/base..origin/standard/emenlow
813 </literallayout>
814 </para>
815
816 <para>
817 Use this command to see the commit log messages and the
818 text differences:
819 <literallayout class='monospaced'>
820 $ git show origin/standard/base..origin/standard/emenlow
821 </literallayout>
822 </para>
823
824 <para>
825 Use this command to create individual patches for
826 each change.
827 Here is an example that that creates patch files for each
828 commit and places them in your <filename>Documents</filename>
829 directory:
830 <literallayout class='monospaced'>
831 $ git format-patch -o $HOME/Documents origin/standard/base..origin/standard/emenlow
832 </literallayout>
833 </para>
834 </section>
835
836 <section id='showing-a-particular-feature-or-branch-change'>
837 <title>Showing a Particular Feature or Branch Change</title>
838
839 <para>
840 Tags in the Yocto Project kernel tree divide changes for
841 significant features or branches.
842 The <filename>git show &lt;tag&gt;</filename> command shows
843 changes based on a tag.
844 Here is an example that shows <filename>systemtap</filename>
845 changes:
846 <literallayout class='monospaced'>
847 $ git show systemtap
848 </literallayout>
849 You can use the
850 <filename>git branch --contains &lt;tag&gt;</filename> command
851 to show the branches that contain a particular feature.
852 This command shows the branches that contain the
853 <filename>systemtap</filename> feature:
854 <literallayout class='monospaced'>
855 $ git branch --contains systemtap
856 </literallayout>
857 </para>
858 </section>
859 </section>
860</chapter>
861<!--
862vim: expandtab tw=80 ts=4
863-->
diff --git a/documentation/kernel-dev/kernel-dev-concepts-appx.xml b/documentation/kernel-dev/kernel-dev-concepts-appx.xml
new file mode 100644
index 0000000..ac91749
--- /dev/null
+++ b/documentation/kernel-dev/kernel-dev-concepts-appx.xml
@@ -0,0 +1,253 @@
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<appendix id='kernel-dev-concepts-appx'>
6<title>Advanced Kernel Concepts</title>
7
8 <section id='kernel-big-picture'>
9 <title>Yocto Project Kernel Development and Maintenance</title>
10 <para>
11 Kernels available through the Yocto Project, like other kernels, are based off the Linux
12 kernel releases from <ulink url='http://www.kernel.org'></ulink>.
13 At the beginning of a major development cycle, the Yocto Project team
14 chooses its kernel based on factors such as release timing, the anticipated release
15 timing of final upstream <filename>kernel.org</filename> versions, and Yocto Project
16 feature requirements.
17 Typically, the kernel chosen is in the
18 final stages of development by the community.
19 In other words, the kernel is in the release
20 candidate or "rc" phase and not yet a final release.
21 But, by being in the final stages of external development, the team knows that the
22 <filename>kernel.org</filename> final release will clearly be within the early stages of
23 the Yocto Project development window.
24 </para>
25 <para>
26 This balance allows the team to deliver the most up-to-date kernel
27 possible, while still ensuring that the team has a stable official release for
28 the baseline Linux kernel version.
29 </para>
30 <para>
31 The ultimate source for kernels available through the Yocto Project are released kernels
32 from <filename>kernel.org</filename>.
33 In addition to a foundational kernel from <filename>kernel.org</filename>, the
34 kernels available contain a mix of important new mainline
35 developments, non-mainline developments (when there is no alternative),
36 Board Support Package (BSP) developments,
37 and custom features.
38 These additions result in a commercially released Yocto Project Linux kernel that caters
39 to specific embedded designer needs for targeted hardware.
40 </para>
41 <para>
42 Once a kernel is officially released, the Yocto Project team goes into
43 their next development cycle, or upward revision (uprev) cycle, while still
44 continuing maintenance on the released kernel.
45 It is important to note that the most sustainable and stable way
46 to include feature development upstream is through a kernel uprev process.
47 Back-porting hundreds of individual fixes and minor features from various
48 kernel versions is not sustainable and can easily compromise quality.
49 </para>
50 <para>
51 During the uprev cycle, the Yocto Project team uses an ongoing analysis of
52 kernel development, BSP support, and release timing to select the best
53 possible <filename>kernel.org</filename> version.
54 The team continually monitors community kernel
55 development to look for significant features of interest.
56 The team does consider back-porting large features if they have a significant advantage.
57 User or community demand can also trigger a back-port or creation of new
58 functionality in the Yocto Project baseline kernel during the uprev cycle.
59 </para>
60 <para>
61 Generally speaking, every new kernel both adds features and introduces new bugs.
62 These consequences are the basic properties of upstream kernel development and are
63 managed by the Yocto Project team's kernel strategy.
64 It is the Yocto Project team's policy to not back-port minor features to the released kernel.
65 They only consider back-porting significant technological jumps - and, that is done
66 after a complete gap analysis.
67 The reason for this policy is that back-porting any small to medium sized change
68 from an evolving kernel can easily create mismatches, incompatibilities and very
69 subtle errors.
70 </para>
71 <para>
72 These policies result in both a stable and a cutting
73 edge kernel that mixes forward ports of existing features and significant and critical
74 new functionality.
75 Forward porting functionality in the kernels available through the Yocto Project kernel
76 can be thought of as a "micro uprev."
77 The many “micro uprevs” produce a kernel version with a mix of
78 important new mainline, non-mainline, BSP developments and feature integrations.
79 This kernel gives insight into new features and allows focused
80 amounts of testing to be done on the kernel, which prevents
81 surprises when selecting the next major uprev.
82 The quality of these cutting edge kernels is evolving and the kernels are used in leading edge
83 feature and BSP development.
84 </para>
85 </section>
86
87 <section id='kernel-architecture'>
88 <title>Kernel Architecture</title>
89 <para>
90 This section describes the architecture of the kernels available through the
91 Yocto Project and provides information
92 on the mechanisms used to achieve that architecture.
93 </para>
94
95 <section id='architecture-overview'>
96 <title>Overview</title>
97 <para>
98 As mentioned earlier, a key goal of the Yocto Project is to present the
99 developer with
100 a kernel that has a clear and continuous history that is visible to the user.
101 The architecture and mechanisms used achieve that goal in a manner similar to the
102 upstream <filename>kernel.org</filename>.
103 </para>
104 <para>
105 You can think of a Yocto Project kernel as consisting of a baseline Linux kernel with
106 added features logically structured on top of the baseline.
107 The features are tagged and organized by way of a branching strategy implemented by the
108 source code manager (SCM) Git.
109 For information on Git as applied to the Yocto Project, see the
110 "<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>" section in the
111 Yocto Project Development Manual.
112 </para>
113 <para>
114 The result is that the user has the ability to see the added features and
115 the commits that make up those features.
116 In addition to being able to see added features, the user can also view the history of what
117 made up the baseline kernel.
118 </para>
119 <para>
120 The following illustration shows the conceptual Yocto Project kernel.
121 </para>
122 <para>
123 <imagedata fileref="figures/kernel-architecture-overview.png" width="6in" depth="7in" align="center" scale="100" />
124 </para>
125 <para>
126 In the illustration, the "Kernel.org Branch Point"
127 marks the specific spot (or release) from
128 which the Yocto Project kernel is created.
129 From this point "up" in the tree, features and differences are organized and tagged.
130 </para>
131 <para>
132 The "Yocto Project Baseline Kernel" contains functionality that is common to every kernel
133 type and BSP that is organized further up the tree.
134 Placing these common features in the
135 tree this way means features do not have to be duplicated along individual branches of the
136 structure.
137 </para>
138 <para>
139 From the Yocto Project Baseline Kernel, branch points represent specific functionality
140 for individual BSPs as well as real-time kernels.
141 The illustration represents this through three BSP-specific branches and a real-time
142 kernel branch.
143 Each branch represents some unique functionality for the BSP or a real-time kernel.
144 </para>
145 <para>
146 In this example structure, the real-time kernel branch has common features for all
147 real-time kernels and contains
148 more branches for individual BSP-specific real-time kernels.
149 The illustration shows three branches as an example.
150 Each branch points the way to specific, unique features for a respective real-time
151 kernel as they apply to a given BSP.
152 </para>
153 <para>
154 The resulting tree structure presents a clear path of markers (or branches) to the
155 developer that, for all practical purposes, is the kernel needed for any given set
156 of requirements.
157 </para>
158 </section>
159
160 <section id='branching-and-workflow'>
161 <title>Branching Strategy and Workflow</title>
162 <para>
163 The Yocto Project team creates kernel branches at points where functionality is
164 no longer shared and thus, needs to be isolated.
165 For example, board-specific incompatibilities would require different functionality
166 and would require a branch to separate the features.
167 Likewise, for specific kernel features, the same branching strategy is used.
168 </para>
169 <para>
170 This branching strategy results in a tree that has features organized to be specific
171 for particular functionality, single kernel types, or a subset of kernel types.
172 This strategy also results in not having to store the same feature twice
173 internally in the tree.
174 Rather, the kernel team stores the unique differences required to apply the
175 feature onto the kernel type in question.
176 <note>
177 The Yocto Project team strives to place features in the tree such that they can be
178 shared by all boards and kernel types where possible.
179 However, during development cycles or when large features are merged,
180 the team cannot always follow this practice.
181 In those cases, the team uses isolated branches to merge features.
182 </note>
183 </para>
184 <para>
185 BSP-specific code additions are handled in a similar manner to kernel-specific additions.
186 Some BSPs only make sense given certain kernel types.
187 So, for these types, the team creates branches off the end of that kernel type for all
188 of the BSPs that are supported on that kernel type.
189 From the perspective of the tools that create the BSP branch, the BSP is really no
190 different than a feature.
191 Consequently, the same branching strategy applies to BSPs as it does to features.
192 So again, rather than store the BSP twice, the team only stores the unique
193 differences for the BSP across the supported multiple kernels.
194 </para>
195 <para>
196 While this strategy can result in a tree with a significant number of branches, it is
197 important to realize that from the developer's point of view, there is a linear
198 path that travels from the baseline <filename>kernel.org</filename>, through a select
199 group of features and ends with their BSP-specific commits.
200 In other words, the divisions of the kernel are transparent and are not relevant
201 to the developer on a day-to-day basis.
202 From the developer's perspective, this path is the "master" branch.
203 The developer does not need to be aware of the existence of any other branches at all.
204 Of course, there is value in the existence of these branches
205 in the tree, should a person decide to explore them.
206 For example, a comparison between two BSPs at either the commit level or at the line-by-line
207 code <filename>diff</filename> level is now a trivial operation.
208 </para>
209 <para>
210 Working with the kernel as a structured tree follows recognized community best practices.
211 In particular, the kernel as shipped with the product, should be
212 considered an "upstream source" and viewed as a series of
213 historical and documented modifications (commits).
214 These modifications represent the development and stabilization done
215 by the Yocto Project kernel development team.
216 </para>
217 <para>
218 Because commits only change at significant release points in the product life cycle,
219 developers can work on a branch created
220 from the last relevant commit in the shipped Yocto Project kernel.
221 As mentioned previously, the structure is transparent to the developer
222 because the kernel tree is left in this state after cloning and building the kernel.
223 </para>
224 </section>
225
226 <section id='source-code-manager-git'>
227 <title>Source Code Manager - Git</title>
228 <para>
229 The Source Code Manager (SCM) is Git.
230 This SCM is the obvious mechanism for meeting the previously mentioned goals.
231 Not only is it the SCM for <filename>kernel.org</filename> but,
232 Git continues to grow in popularity and supports many different work flows,
233 front-ends and management techniques.
234 </para>
235 <para>
236 You can find documentation on Git at <ulink url='http://git-scm.com/documentation'></ulink>.
237 You can also get an introduction to Git as it applies to the Yocto Project in the
238 "<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>"
239 section in the Yocto Project Development Manual.
240 These referenced sections overview Git and describe a minimal set of
241 commands that allows you to be functional using Git.
242 <note>
243 You can use as much, or as little, of what Git has to offer to accomplish what
244 you need for your project.
245 You do not have to be a "Git Master" in order to use it with the Yocto Project.
246 </note>
247 </para>
248 </section>
249 </section>
250</appendix>
251<!--
252vim: expandtab tw=80 ts=4
253-->
diff --git a/documentation/kernel-dev/kernel-dev-customization.xsl b/documentation/kernel-dev/kernel-dev-customization.xsl
new file mode 100644
index 0000000..43e9dad
--- /dev/null
+++ b/documentation/kernel-dev/kernel-dev-customization.xsl
@@ -0,0 +1,11 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
5
6 <xsl:param name="html.stylesheet" select="'kernel-dev-style.css'" />
7 <xsl:param name="chapter.autolabel" select="1" />
8 <xsl:param name="appendix.autolabel">A</xsl:param>
9 <xsl:param name="section.autolabel" select="1" />
10 <xsl:param name="section.label.includes.component.label" select="1" />
11</xsl:stylesheet>
diff --git a/documentation/kernel-dev/kernel-dev-eclipse-customization.xsl b/documentation/kernel-dev/kernel-dev-eclipse-customization.xsl
new file mode 100644
index 0000000..7d1bb8d
--- /dev/null
+++ b/documentation/kernel-dev/kernel-dev-eclipse-customization.xsl
@@ -0,0 +1,27 @@
1<?xml version='1.0'?>
2<xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 version="1.0">
7
8 <xsl:import
9 href="http://docbook.sourceforge.net/release/xsl/current/eclipse/eclipse3.xsl" />
10
11 <xsl:param name="chunker.output.indent" select="'yes'"/>
12 <xsl:param name="chunk.quietly" select="1"/>
13 <xsl:param name="chunk.first.sections" select="1"/>
14 <xsl:param name="chunk.section.depth" select="10"/>
15 <xsl:param name="use.id.as.filename" select="1"/>
16 <xsl:param name="ulink.target" select="'_self'" />
17 <xsl:param name="base.dir" select="'html/kernel-dev/'"/>
18 <xsl:param name="html.stylesheet" select="'../book.css'"/>
19 <xsl:param name="eclipse.manifest" select="0"/>
20 <xsl:param name="create.plugin.xml" select="0"/>
21 <xsl:param name="suppress.navigation" select="1"/>
22 <xsl:param name="generate.index" select="0"/>
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel">A</xsl:param>
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27</xsl:stylesheet>
diff --git a/documentation/kernel-dev/kernel-dev-examples.xml b/documentation/kernel-dev/kernel-dev-examples.xml
new file mode 100644
index 0000000..9d9aef6
--- /dev/null
+++ b/documentation/kernel-dev/kernel-dev-examples.xml
@@ -0,0 +1,918 @@
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='kernel-how-to'>
6
7<title>Working with the Yocto Project Kernel</title>
8
9
10<section id='actions-org'>
11 <title>Introduction</title>
12 <para>
13 This chapter describes how to accomplish tasks involving a kernel's tree structure.
14 The information is designed to help the developer that wants to modify the Yocto
15 Project kernel and contribute changes upstream to the Yocto Project.
16 The information covers the following:
17 <itemizedlist>
18 <listitem><para>Tree construction</para></listitem>
19 <listitem><para>Build strategies</para></listitem>
20 <listitem><para>Workflow examples</para></listitem>
21 </itemizedlist>
22 </para>
23</section>
24
25 <section id='tree-construction'>
26 <title>Tree Construction</title>
27 <para>
28 This section describes construction of the Yocto Project kernel source repositories
29 as accomplished by the Yocto Project team to create kernel repositories.
30 These kernel repositories are found under the heading "Yocto Linux Kernel" at
31 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>&YOCTO_GIT_URL;/cgit.cgi</ulink>
32 and can be shipped as part of a Yocto Project release.
33 The team creates these repositories by
34 compiling and executing the set of feature descriptions for every BSP/feature
35 in the product.
36 Those feature descriptions list all necessary patches,
37 configuration, branching, tagging and feature divisions found in a kernel.
38 Thus, the Yocto Project kernel repository (or tree) is built.
39 </para>
40 <para>
41 The existence of this tree allows you to access and clone a particular
42 Yocto Project kernel repository and use it to build images based on their configurations
43 and features.
44 </para>
45 <para>
46 You can find the files used to describe all the valid features and BSPs
47 in the Yocto Project kernel in any clone of the Yocto Project kernel source repository
48 Git tree.
49 For example, the following command clones the Yocto Project baseline kernel that
50 branched off of <filename>linux.org</filename> version 3.4:
51 <literallayout class='monospaced'>
52 $ git clone git://git.yoctoproject.org/linux-yocto-3.4
53 </literallayout>
54 For another example of how to set up a local Git repository of the Yocto Project
55 kernel files, see the
56 "<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Yocto Project Kernel</ulink>" bulleted
57 item in the Yocto Project Development Manual.
58 </para>
59 <para>
60 Once you have cloned the kernel Git repository on your local machine, you can
61 switch to the <filename>meta</filename> branch within the repository.
62 Here is an example that assumes the local Git repository for the kernel is in
63 a top-level directory named <filename>linux-yocto-3.4</filename>:
64 <literallayout class='monospaced'>
65 $ cd ~/linux-yocto-3.4
66 $ git checkout -b meta origin/meta
67 </literallayout>
68 Once you have checked out and switched to the <filename>meta</filename> branch,
69 you can see a snapshot of all the kernel configuration and feature descriptions that are
70 used to build that particular kernel repository.
71 These descriptions are in the form of <filename>.scc</filename> files.
72 </para>
73 <para>
74 You should realize, however, that browsing your local kernel repository
75 for feature descriptions and patches is not an effective way to determine what is in a
76 particular kernel branch.
77 Instead, you should use Git directly to discover the changes in a branch.
78 Using Git is an efficient and flexible way to inspect changes to the kernel.
79 For examples showing how to use Git to inspect kernel commits, see the following sections
80 in this chapter.
81 <note>
82 Ground up reconstruction of the complete kernel tree is an action only taken by the
83 Yocto Project team during an active development cycle.
84 When you create a clone of the kernel Git repository, you are simply making it
85 efficiently available for building and development.
86 </note>
87 </para>
88 <para>
89 The following steps describe what happens when the Yocto Project Team constructs
90 the Yocto Project kernel source Git repository (or tree) found at
91 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink> given the
92 introduction of a new top-level kernel feature or BSP.
93 These are the actions that effectively create the tree
94 that includes the new feature, patch or BSP:
95 <orderedlist>
96 <listitem><para>A top-level kernel feature is passed to the kernel build subsystem.
97 Normally, this feature is a BSP for a particular kernel type.</para></listitem>
98 <listitem><para>The file that describes the top-level feature is located by searching
99 these system directories:
100 <itemizedlist>
101 <listitem><para>The in-tree kernel-cache directories, which are located
102 in <filename>meta/cfg/kernel-cache</filename></para></listitem>
103 <listitem><para>Areas pointed to by <filename>SRC_URI</filename> statements
104 found in recipes</para></listitem>
105 </itemizedlist>
106 For a typical build, the target of the search is a
107 feature description in an <filename>.scc</filename> file
108 whose name follows this format:
109 <literallayout class='monospaced'>
110 &lt;bsp_name&gt;-&lt;kernel_type&gt;.scc
111 </literallayout>
112 </para></listitem>
113 <listitem><para>Once located, the feature description is either compiled into a simple script
114 of actions, or into an existing equivalent script that is already part of the
115 shipped kernel.</para></listitem>
116 <listitem><para>Extra features are appended to the top-level feature description.
117 These features can come from the
118 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
119 variable in recipes.</para></listitem>
120 <listitem><para>Each extra feature is located, compiled and appended to the script
121 as described in step three.</para></listitem>
122 <listitem><para>The script is executed to produce a series of <filename>meta-*</filename>
123 directories.
124 These directories are descriptions of all the branches, tags, patches and configurations that
125 need to be applied to the base Git repository to completely create the
126 source (build) branch for the new BSP or feature.</para></listitem>
127 <listitem><para>The base repository is cloned, and the actions
128 listed in the <filename>meta-*</filename> directories are applied to the
129 tree.</para></listitem>
130 <listitem><para>The Git repository is left with the desired branch checked out and any
131 required branching, patching and tagging has been performed.</para></listitem>
132 </orderedlist>
133 </para>
134 <para>
135 The kernel tree is now ready for developer consumption to be locally cloned,
136 configured, and built into a Yocto Project kernel specific to some target hardware.
137 <note><para>The generated <filename>meta-*</filename> directories add to the kernel
138 as shipped with the Yocto Project release.
139 Any add-ons and configuration data are applied to the end of an existing branch.
140 The full repository generation that is found in the
141 official Yocto Project kernel repositories at
142 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>http://git.yoctoproject.org/cgit.cgi</ulink>
143 is the combination of all supported boards and configurations.</para>
144 <para>The technique the Yocto Project team uses is flexible and allows for seamless
145 blending of an immutable history with additional patches specific to a
146 deployment.
147 Any additions to the kernel become an integrated part of the branches.</para>
148 </note>
149 </para>
150 </section>
151
152 <section id='build-strategy'>
153 <title>Build Strategy</title>
154 <para>
155 Once a local Git repository of the Yocto Project kernel exists on a development system,
156 you can consider the compilation phase of kernel development - building a kernel image.
157 Some prerequisites exist that are validated by the build process before compilation
158 starts:
159 </para>
160
161 <itemizedlist>
162 <listitem><para>The
163 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> points
164 to the kernel Git repository.</para></listitem>
165 <listitem><para>A BSP build branch exists.
166 This branch has the following form:
167 <literallayout class='monospaced'>
168 &lt;kernel_type&gt;/&lt;bsp_name&gt;
169 </literallayout></para></listitem>
170 </itemizedlist>
171
172 <para>
173 The OpenEmbedded build system makes sure these conditions exist before attempting compilation.
174 Other means, however, do exist, such as as bootstrapping a BSP, see
175 the "<link linkend='workflow-examples'>Workflow Examples</link>".
176 </para>
177
178 <para>
179 Before building a kernel, the build process verifies the tree
180 and configures the kernel by processing all of the
181 configuration "fragments" specified by feature descriptions in the <filename>.scc</filename>
182 files.
183 As the features are compiled, associated kernel configuration fragments are noted
184 and recorded in the <filename>meta-*</filename> series of directories in their compilation order.
185 The fragments are migrated, pre-processed and passed to the Linux Kernel
186 Configuration subsystem (<filename>lkc</filename>) as raw input in the form
187 of a <filename>.config</filename> file.
188 The <filename>lkc</filename> uses its own internal dependency constraints to do the final
189 processing of that information and generates the final <filename>.config</filename> file
190 that is used during compilation.
191 </para>
192
193 <para>
194 Using the board's architecture and other relevant values from the board's template,
195 kernel compilation is started and a kernel image is produced.
196 </para>
197
198 <para>
199 The other thing that you notice once you configure a kernel is that
200 the build process generates a build tree that is separate from your kernel's local Git
201 source repository tree.
202 This build tree has a name that uses the following form, where
203 <filename>${MACHINE}</filename> is the metadata name of the machine (BSP) and "kernel_type" is one
204 of the Yocto Project supported kernel types (e.g. "standard"):
205 <literallayout class='monospaced'>
206 linux-${MACHINE}-&lt;kernel_type&gt;-build
207 </literallayout>
208 </para>
209
210 <para>
211 The existing support in the <filename>kernel.org</filename> tree achieves this
212 default functionality.
213 </para>
214
215 <para>
216 This behavior means that all the generated files for a particular machine or BSP are now in
217 the build tree directory.
218 The files include the final <filename>.config</filename> file, all the <filename>.o</filename>
219 files, the <filename>.a</filename> files, and so forth.
220 Since each machine or BSP has its own separate build directory in its own separate branch
221 of the Git repository, you can easily switch between different builds.
222 </para>
223 </section>
224
225 <section id='workflow-examples'>
226 <title>Workflow Examples</title>
227
228 <para>
229 As previously noted, the Yocto Project kernel has built-in Git integration.
230 However, these utilities are not the only way to work with the kernel repository.
231 The Yocto Project has not made changes to Git or to other tools that
232 would invalidate alternate workflows.
233 Additionally, the way the kernel repository is constructed results in using
234 only core Git functionality, thus allowing any number of tools or front ends to use the
235 resulting tree.
236 </para>
237
238 <para>
239 This section contains several workflow examples.
240 Many of the examples use Git commands.
241 You can find Git documentation at
242 <ulink url='http://git-scm.com/documentation'></ulink>.
243 You can find a simple overview of using Git with the Yocto Project in the
244 "<ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink>"
245 section of the Yocto Project Development Manual.
246 </para>
247
248 <section id='change-inspection-kernel-changes-commits'>
249 <title>Change Inspection: Changes/Commits</title>
250
251 <para>
252 A common question when working with a kernel is:
253 "What changes have been applied to this tree?"
254 </para>
255
256 <para>
257 In projects that have a collection of directories that
258 contain patches to the kernel, it is possible to inspect or "grep" the contents
259 of the directories to get a general feel for the changes.
260 This sort of patch inspection is not an efficient way to determine what has been
261 done to the kernel.
262 The reason it is inefficient is because there are many optional patches that are
263 selected based on the kernel type and the feature description.
264 Additionally, patches could exist in directories that are not included in the search.
265 </para>
266
267 <para>
268 A more efficient way to determine what has changed in the branch is to use
269 Git and inspect or search the kernel tree.
270 This method gives you a full view of not only the source code modifications,
271 but also provides the reasons for the changes.
272 </para>
273
274 <section id='what-changed-in-a-kernel'>
275 <title>What Changed in a Kernel?</title>
276
277 <para>
278 Following are a few examples that show how to use Git commands to examine changes.
279 Because Git repositories in the Yocto Project do not break existing Git
280 functionality, and because there exists many permutations of these types of
281 Git commands, many methods exist by which you can discover changes.
282 <note>
283 In the following examples, unless you provide a commit range,
284 <filename>kernel.org</filename> history is blended with Yocto Project
285 kernel changes.
286 You can form ranges by using branch names from the kernel tree as the
287 upper and lower commit markers with the Git commands.
288 You can see the branch names through the web interface to the
289 Yocto Project source repositories at
290 <ulink url='http://git.yoctoproject.org/cgit.cgi'></ulink>.
291 For example, the branch names for the <filename>linux-yocto-3.4</filename>
292 kernel repository can be seen at
293 <ulink url='http://git.yoctoproject.org/cgit.cgi/linux-yocto-3.4/refs/heads'></ulink>.
294 </note>
295 To see a full range of the changes, use the
296 <filename>git whatchanged</filename> command and specify a commit range
297 for the branch (<filename>&lt;commit&gt;..&lt;commit&gt;</filename>).
298 </para>
299
300 <para>
301 Here is an example that looks at what has changed in the
302 <filename>emenlow</filename> branch of the
303 <filename>linux-yocto-3.4</filename> kernel.
304 The lower commit range is the commit associated with the
305 <filename>standard/base</filename> branch, while
306 the upper commit range is the commit associated with the
307 <filename>standard/emenlow</filename> branch.
308 <literallayout class='monospaced'>
309 $ git whatchanged origin/standard/base..origin/standard/emenlow
310 </literallayout>
311 </para>
312
313 <para>
314 To see a summary of changes use the <filename>git log</filename> command.
315 Here is an example using the same branches:
316 <literallayout class='monospaced'>
317 $ git log --oneline origin/standard/base..origin/standard/emenlow
318 </literallayout>
319 The <filename>git log</filename> output might be more useful than
320 the <filename>git whatchanged</filename> as you get
321 a short, one-line summary of each change and not the entire commit.
322 </para>
323
324 <para>
325 If you want to see code differences associated with all the changes, use
326 the <filename>git diff</filename> command.
327 Here is an example:
328 <literallayout class='monospaced'>
329 $ git diff origin/standard/base..origin/standard/emenlow
330 </literallayout>
331 </para>
332
333 <para>
334 You can see the commit log messages and the text differences using the
335 <filename>git show</filename> command:
336 Here is an example:
337 <literallayout class='monospaced'>
338 $ git show origin/standard/base..origin/standard/emenlow
339 </literallayout>
340 </para>
341
342 <para>
343 You can create individual patches for each change by using the
344 <filename>git format-patch</filename> command.
345 Here is an example that that creates patch files for each commit and
346 places them in your <filename>Documents</filename> directory:
347 <literallayout class='monospaced'>
348 $ git format-patch -o $HOME/Documents origin/standard/base..origin/standard/emenlow
349 </literallayout>
350 </para>
351 </section>
352
353 <section id='show-a-particular-feature-or-branch-change'>
354 <title>Show a Particular Feature or Branch Change</title>
355
356 <para>
357 Developers use tags in the Yocto Project kernel tree to divide changes for significant
358 features or branches.
359 Once you know a particular tag, you can use Git commands
360 to show changes associated with the tag and find the branches that contain
361 the feature.
362 <note>
363 Because BSP branch, <filename>kernel.org</filename>, and feature tags are all
364 present, there could be many tags.
365 </note>
366 The <filename>git show &lt;tag&gt;</filename> command shows changes that are tagged by
367 a feature.
368 Here is an example that shows changes tagged by the <filename>systemtap</filename>
369 feature:
370 <literallayout class='monospaced'>
371 $ git show systemtap
372 </literallayout>
373 You can use the <filename>git branch --contains &lt;tag&gt;</filename> command
374 to show the branches that contain a particular feature.
375 This command shows the branches that contain the <filename>systemtap</filename>
376 feature:
377 <literallayout class='monospaced'>
378 $ git branch --contains systemtap
379 </literallayout>
380 </para>
381
382 <para>
383 You can use many other comparisons to isolate BSP and kernel changes.
384 For example, you can compare against <filename>kernel.org</filename> tags
385 such as the <filename>v3.4</filename> tag.
386 </para>
387 </section>
388 </section>
389
390 <section id='development-saving-kernel-modifications'>
391 <title>Development: Saving Kernel Modifications</title>
392
393 <para>
394 Another common operation is to build a BSP supplied by the Yocto Project, make some
395 changes, rebuild, and then test.
396 Those local changes often need to be exported, shared or otherwise maintained.
397 </para>
398
399 <para>
400 Since the Yocto Project kernel source tree is backed by Git, this activity is
401 much easier as compared to with previous releases.
402 Because Git tracks file modifications, additions and deletions, it is easy
403 to modify the code and later realize that you need to save the changes.
404 It is also easy to determine what has changed.
405 This method also provides many tools to commit, undo and export those modifications.
406 </para>
407
408 <para>
409 This section and its sub-sections, describe general application of Git's
410 <filename>push</filename> and <filename>pull</filename> commands, which are used to
411 get your changes upstream or source your code from an upstream repository.
412 The Yocto Project provides scripts that help you work in a collaborative development
413 environment.
414 For information on these scripts, see the
415 "<ulink url='&YOCTO_DOCS_DEV_URL;#pushing-a-change-upstream'>Using Scripts to Push a Change
416 Upstream and Request a Pull</ulink>" and
417 "<ulink url='&YOCTO_DOCS_DEV_URL;#submitting-a-patch'>Using Email to Submit a Patch</ulink>"
418 sections in the Yocto Project Development Manual.
419 </para>
420
421 <para>
422 There are many ways to save kernel modifications.
423 The technique employed
424 depends on the destination for the patches:
425
426 <itemizedlist>
427 <listitem><para>Bulk storage</para></listitem>
428 <listitem><para>Internal sharing either through patches or by using Git</para></listitem>
429 <listitem><para>External submissions</para></listitem>
430 <listitem><para>Exporting for integration into another Source Code
431 Manager (SCM)</para></listitem>
432 </itemizedlist>
433 </para>
434
435 <para>
436 Because of the following list of issues, the destination of the patches also influences
437 the method for gathering them:
438
439 <itemizedlist>
440 <listitem><para>Bisectability</para></listitem>
441 <listitem><para>Commit headers</para></listitem>
442 <listitem><para>Division of subsystems for separate submission or review</para></listitem>
443 </itemizedlist>
444 </para>
445
446 <section id='bulk-export'>
447 <title>Bulk Export</title>
448
449 <para>
450 This section describes how you can "bulk" export changes that have not
451 been separated or divided.
452 This situation works well when you are simply storing patches outside of the kernel
453 source repository, either permanently or temporarily, and you are not committing
454 incremental changes during development.
455 <note>
456 This technique is not appropriate for full integration of upstream submission
457 because changes are not properly divided and do not provide an avenue for per-change
458 commit messages.
459 Therefore, this example assumes that changes have not been committed incrementally
460 during development and that you simply must gather and export them.
461 </note>
462 <literallayout class='monospaced'>
463 # bulk export of ALL modifications without separation or division
464 # of the changes
465
466 $ git add .
467 $ git commit -s -a -m &lt;msg&gt;
468 or
469 $ git commit -s -a # and interact with $EDITOR
470 </literallayout>
471 </para>
472
473 <para>
474 The previous operations capture all the local changes in the project source
475 tree in a single Git commit.
476 And, that commit is also stored in the project's source tree.
477 </para>
478
479 <para>
480 Once the changes are exported, you can restore them manually using a template
481 or through integration with the <filename>default_kernel</filename>.
482 </para>
483
484 </section>
485
486 <section id='incremental-planned-sharing'>
487 <title>Incremental/Planned Sharing</title>
488
489 <para>
490 This section describes how to save modifications when you are making incremental
491 commits or practicing planned sharing.
492 The examples in this section assume that you have incrementally committed
493 changes to the tree during development and now need to export them.
494 The sections that follow
495 describe how you can export your changes internally through either patches or by
496 using Git commands.
497 </para>
498
499 <para>
500 During development, the following commands are of interest.
501 For full Git documentation, refer to the Git documentation at
502 <ulink url='http://github.com'></ulink>.
503
504 <literallayout class='monospaced'>
505 # edit a file
506 $ vi &lt;path&gt;/file
507 # stage the change
508 $ git add &lt;path&gt;/file
509 # commit the change
510 $ git commit -s
511 # remove a file
512 $ git rm &lt;path&gt;/file
513 # commit the change
514 $ git commit -s
515
516 ... etc.
517 </literallayout>
518 </para>
519
520 <para>
521 Distributed development with Git is possible when you use a universally
522 agreed-upon unique commit identifier (set by the creator of the commit) that maps to a
523 specific change set with a specific parent.
524 This identifier is created for you when
525 you create a commit, and is re-created when you amend, alter or re-apply
526 a commit.
527 As an individual in isolation, this is of no interest.
528 However, if you
529 intend to share your tree with normal Git <filename>push</filename> and
530 <filename>pull</filename> operations for
531 distributed development, you should consider the ramifications of changing a
532 commit that you have already shared with others.
533 </para>
534
535 <para>
536 Assuming that the changes have not been pushed upstream, or pulled into
537 another repository, you can update both the commit content and commit messages
538 associated with development by using the following commands:
539
540 <literallayout class='monospaced'>
541 $ Git add &lt;path&gt;/file
542 $ Git commit --amend
543 $ Git rebase or Git rebase -i
544 </literallayout>
545 </para>
546
547 <para>
548 Again, assuming that the changes have not been pushed upstream, and that
549 no pending works-in-progress exist (use <filename>git status</filename> to check), then
550 you can revert (undo) commits by using the following commands:
551
552 <literallayout class='monospaced'>
553 # remove the commit, update working tree and remove all
554 # traces of the change
555 $ git reset --hard HEAD^
556 # remove the commit, but leave the files changed and staged for re-commit
557 $ git reset --soft HEAD^
558 # remove the commit, leave file change, but not staged for commit
559 $ git reset --mixed HEAD^
560 </literallayout>
561 </para>
562
563 <para>
564 You can create branches, "cherry-pick" changes, or perform any number of Git
565 operations until the commits are in good order for pushing upstream
566 or for pull requests.
567 After a <filename>push</filename> or <filename>pull</filename> command,
568 commits are normally considered
569 "permanent" and you should not modify them.
570 If the commits need to be changed, you can incrementally do so with new commits.
571 These practices follow standard Git workflow and the <filename>kernel.org</filename> best
572 practices, which is recommended.
573 <note>
574 It is recommended to tag or branch before adding changes to a Yocto Project
575 BSP or before creating a new one.
576 The reason for this recommendation is because the branch or tag provides a
577 reference point to facilitate locating and exporting local changes.
578 </note>
579 </para>
580
581 <section id='export-internally-via-patches'>
582 <title>Exporting Changes Internally by Using Patches</title>
583
584 <para>
585 This section describes how you can extract committed changes from a working directory
586 by exporting them as patches.
587 Once the changes have been extracted, you can use the patches for upstream submission,
588 place them in a Yocto Project template for automatic kernel patching,
589 or apply them in many other common uses.
590 </para>
591
592 <para>
593 This example shows how to create a directory with sequentially numbered patches.
594 Once the directory is created, you can apply it to a repository using the
595 <filename>git am</filename> command to reproduce the original commit and all
596 the related information such as author, date, commit log, and so forth.
597 <note>
598 The new commit identifiers (ID) will be generated upon re-application.
599 This action reflects that the commit is now applied to an underlying commit
600 with a different ID.
601 </note>
602 <literallayout class='monospaced'>
603 # &lt;first-commit&gt; can be a tag if one was created before development
604 # began. It can also be the parent branch if a branch was created
605 # before development began.
606
607 $ git format-patch -o &lt;dir&gt; &lt;first commit&gt;..&lt;last commit&gt;
608 </literallayout>
609 </para>
610
611 <para>
612 In other words:
613 <literallayout class='monospaced'>
614 # Identify commits of interest.
615
616 # If the tree was tagged before development
617 $ git format-patch -o &lt;save dir&gt; &lt;tag&gt;
618
619 # If no tags are available
620 $ git format-patch -o &lt;save dir&gt; HEAD^ # last commit
621 $ git format-patch -o &lt;save dir&gt; HEAD^^ # last 2 commits
622 $ git whatchanged # identify last commit
623 $ git format-patch -o &lt;save dir&gt; &lt;commit id&gt;
624 $ git format-patch -o &lt;save dir&gt; &lt;rev-list&gt;
625 </literallayout>
626 </para>
627 </section>
628
629 <section id='export-internally-via-git'>
630 <title>Exporting Changes Internally by Using Git</title>
631
632 <para>
633 This section describes how you can export changes from a working directory
634 by pushing the changes into a master repository or by making a pull request.
635 Once you have pushed the changes to the master repository, you can then
636 pull those same changes into a new kernel build at a later time.
637 </para>
638
639 <para>
640 Use this command form to push the changes:
641 <literallayout class='monospaced'>
642 $ git push ssh://&lt;master_server&gt;/&lt;path_to_repo&gt;
643 &lt;local_branch&gt;:&lt;remote_branch&gt;
644 </literallayout>
645 </para>
646
647 <para>
648 For example, the following command pushes the changes from your local branch
649 <filename>yocto/standard/common-pc/base</filename> to the remote branch with the same name
650 in the master repository <filename>//git.mycompany.com/pub/git/kernel-3.4</filename>.
651 <literallayout class='monospaced'>
652 $ git push ssh://git.mycompany.com/pub/git/kernel-3.4 \
653 yocto/standard/common-pc/base:yocto/standard/common-pc/base
654 </literallayout>
655 </para>
656
657 <para>
658 A pull request entails using the <filename>git request-pull</filename> command to compose
659 an email to the
660 maintainer requesting that a branch be pulled into the master repository, see
661 <ulink url='http://github.com/guides/pull-requests'></ulink> for an example.
662 <note>
663 Other commands such as <filename>git stash</filename> or branching can also be used to save
664 changes, but are not covered in this document.
665 </note>
666 </para>
667 </section>
668 </section>
669
670 <section id='export-for-external-upstream-submission'>
671 <title>Exporting Changes for External (Upstream) Submission</title>
672
673 <para>
674 This section describes how to export changes for external upstream submission.
675 If the patch series is large or the maintainer prefers to pull
676 changes, you can submit these changes by using a pull request.
677 However, it is common to send patches as an email series.
678 This method allows easy review and integration of the changes.
679 <note>
680 Before sending patches for review be sure you understand the
681 community standards for submitting and documenting changes and follow their best practices.
682 For example, kernel patches should follow standards such as:
683 <itemizedlist>
684 <listitem><para>
685 <ulink url='http://linux.yyz.us/patch-format.html'></ulink></para></listitem>
686 <listitem><para>Documentation/SubmittingPatches (in any linux
687 kernel source tree)</para></listitem>
688 </itemizedlist>
689 </note>
690 </para>
691
692 <para>
693 The messages used to commit changes are a large part of these standards.
694 Consequently, be sure that the headers for each commit have the required information.
695 For information on how to follow the Yocto Project commit message standards, see the
696 "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a
697 Change</ulink>" section in the Yocto Project Development Manual.
698 </para>
699
700 <para>
701 If the initial commits were not properly documented or do not meet those standards,
702 you can re-base by using the <filename>git rebase -i</filename> command to
703 manipulate the commits and
704 get them into the required format.
705 Other techniques such as branching and cherry-picking commits are also viable options.
706 </para>
707
708 <para>
709 Once you complete the commits, you can generate the email that sends the patches
710 to the maintainer(s) or lists that review and integrate changes.
711 The command <filename>git send-email</filename> is commonly used to ensure
712 that patches are properly
713 formatted for easy application and avoid mailer-induced patch damage.
714 </para>
715
716 <para>
717 The following is an example of dumping patches for external submission:
718 <literallayout class='monospaced'>
719 # dump the last 4 commits
720 $ git format-patch --thread -n -o ~/rr/ HEAD^^^^
721 $ git send-email --compose --subject '[RFC 0/N] &lt;patch series summary&gt;' \
722 --to foo@yoctoproject.org --to bar@yoctoproject.org \
723 --cc list@yoctoproject.org ~/rr
724 # the editor is invoked for the 0/N patch, and when complete the entire
725 # series is sent via email for review
726 </literallayout>
727 </para>
728 </section>
729
730 <section id='export-for-import-into-other-scm'>
731 <title>Exporting Changes for Import into Another SCM</title>
732
733 <para>
734 When you want to export changes for import into another
735 Source Code Manager (SCM), you can use any of the previously discussed
736 techniques.
737 However, if the patches are manually applied to a secondary tree and then
738 that tree is checked into the SCM, you can lose change information such as
739 commit logs.
740 This process is not recommended.
741 </para>
742
743 <para>
744 Many SCMs can directly import Git commits, or can translate Git patches so that
745 information is not lost.
746 Those facilities are SCM-dependent and you should use them whenever possible.
747 </para>
748 </section>
749 </section>
750
751 <section id='scm-working-with-the-yocto-project-kernel-in-another-scm'>
752 <title>Working with the Yocto Project Kernel in Another SCM</title>
753
754 <para>
755 This section describes kernel development in an SCM other than Git,
756 which is not the same as exporting changes to another SCM described earlier.
757 For this scenario, you use the OpenEmbedded build system to
758 develop the kernel in a different SCM.
759 The following must be true for you to accomplish this:
760 <itemizedlist>
761 <listitem><para>The delivered Yocto Project kernel must be exported into the second
762 SCM.</para></listitem>
763 <listitem><para>Development must be exported from that secondary SCM into a
764 format that can be used by the OpenEmbedded build system.</para></listitem>
765 </itemizedlist>
766 </para>
767
768 <section id='exporting-delivered-kernel-to-scm'>
769 <title>Exporting the Delivered Kernel to the SCM</title>
770
771 <para>
772 Depending on the SCM, it might be possible to export the entire Yocto Project
773 kernel Git repository, branches and all, into a new environment.
774 This method is preferred because it has the most flexibility and potential to maintain
775 the meta data associated with each commit.
776 </para>
777
778 <para>
779 When a direct import mechanism is not available, it is still possible to
780 export a branch (or series of branches) and check them into a new repository.
781 </para>
782
783 <para>
784 The following commands illustrate some of the steps you could use to
785 import the <filename>yocto/standard/common-pc/base</filename>
786 kernel into a secondary SCM:
787 <literallayout class='monospaced'>
788 $ git checkout yocto/standard/common-pc/base
789 $ cd .. ; echo linux/.git &gt; .cvsignore
790 $ cvs import -m "initial import" linux MY_COMPANY start
791 </literallayout>
792 </para>
793
794 <para>
795 You could now relocate the CVS repository and use it in a centralized manner.
796 </para>
797
798 <para>
799 The following commands illustrate how you can condense and merge two BSPs into a
800 second SCM:
801 <literallayout class='monospaced'>
802 $ git checkout yocto/standard/common-pc/base
803 $ git merge yocto/standard/common-pc-64/base
804 # resolve any conflicts and commit them
805 $ cd .. ; echo linux/.git &gt; .cvsignore
806 $ cvs import -m "initial import" linux MY_COMPANY start
807 </literallayout>
808 </para>
809 </section>
810
811 <section id='importing-changes-for-build'>
812 <title>Importing Changes for the Build</title>
813
814 <para>
815 Once development has reached a suitable point in the second development
816 environment, you need to export the changes as patches.
817 To export them, place the changes in a recipe and
818 automatically apply them to the kernel during patching.
819 </para>
820 </section>
821 </section>
822
823 <section id='bsp-creating'>
824 <title>Creating a BSP Based on an Existing Similar BSP</title>
825
826 <para>
827 This section overviews the process of creating a BSP based on an
828 existing similar BSP.
829 The information is introductory in nature and does not provide step-by-step examples.
830 For detailed information on how to create a new BSP, see
831 the "<ulink url='&YOCTO_DOCS_BSP_URL;#creating-a-new-bsp-layer-using-the-yocto-bsp-script'>Creating a New BSP Layer Using the yocto-bsp Script</ulink>" section in the
832 Yocto Project Board Support Package (BSP) Developer's Guide, or see the
833 <ulink url='&YOCTO_WIKI_URL;/wiki/Transcript:_creating_one_generic_Atom_BSP_from_another'>Transcript:_creating_one_generic_Atom_BSP_from_another</ulink>
834 wiki page.
835 </para>
836
837 <para>
838 The basic steps you need to follow are:
839 <orderedlist>
840 <listitem><para><emphasis>Make sure you have set up a local Source Directory:</emphasis>
841 You must create a local
842 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
843 by either creating a Git repository (recommended) or
844 extracting a Yocto Project release tarball.</para></listitem>
845 <listitem><para><emphasis>Choose an existing BSP available with the Yocto Project:</emphasis>
846 Try to map your board features as closely to the features of a BSP that is
847 already supported and exists in the Yocto Project.
848 Starting with something as close as possible to your board makes developing
849 your BSP easier.
850 You can find all the BSPs that are supported and ship with the Yocto Project
851 on the Yocto Project's Download page at
852 <ulink url='&YOCTO_HOME_URL;/download'></ulink>.</para></listitem>
853 <listitem><para><emphasis>Be sure you have the Base BSP:</emphasis>
854 You need to either have a local Git repository of the base BSP set up or
855 have downloaded and extracted the files from a release BSP tarball.
856 Either method gives you access to the BSP source files.</para></listitem>
857 <listitem><para><emphasis>Make a copy of the existing BSP, thus isolating your new
858 BSP work:</emphasis>
859 Copying the existing BSP file structure gives you a new area in which to work.</para></listitem>
860 <listitem><para><emphasis>Make configuration and recipe changes to your new BSP:</emphasis>
861 Configuration changes involve the files in the BSP's <filename>conf</filename>
862 directory.
863 Changes include creating a machine-specific configuration file and editing the
864 <filename>layer.conf</filename> file.
865 The configuration changes identify the kernel you will be using.
866 Recipe changes include removing, modifying, or adding new recipe files that
867 instruct the build process on what features to include in the image.</para></listitem>
868 <listitem><para><emphasis>Prepare for the build:</emphasis>
869 Before you actually initiate the build, you need to set up the build environment
870 by sourcing the environment initialization script.
871 After setting up the environment, you need to make some build configuration
872 changes to the <filename>local.conf</filename> and <filename>bblayers.conf</filename>
873 files.</para></listitem>
874 <listitem><para><emphasis>Build the image:</emphasis>
875 The OpenEmbedded build system uses BitBake to create the image.
876 You need to decide on the type of image you are going to build (e.g. minimal, base,
877 core, sato, and so forth) and then start the build using the <filename>bitbake</filename>
878 command.</para></listitem>
879 </orderedlist>
880 </para>
881 </section>
882
883 <section id='tip-dirty-string'>
884 <title>"-dirty" String</title>
885
886 <para>
887 If kernel images are being built with "-dirty" on the end of the version
888 string, this simply means that modifications in the source
889 directory have not been committed.
890 <literallayout class='monospaced'>
891 $ git status
892 </literallayout>
893 </para>
894
895 <para>
896 You can use the above Git command to report modified, removed, or added files.
897 You should commit those changes to the tree regardless of whether they will be saved,
898 exported, or used.
899 Once you commit the changes you need to rebuild the kernel.
900 </para>
901
902 <para>
903 To brute force pickup and commit all such pending changes, enter the following:
904 <literallayout class='monospaced'>
905 $ git add .
906 $ git commit -s -a -m "getting rid of -dirty"
907 </literallayout>
908 </para>
909
910 <para>
911 Next, rebuild the kernel.
912 </para>
913 </section>
914 </section>
915</chapter>
916<!--
917vim: expandtab tw=80 ts=4
918-->
diff --git a/documentation/kernel-dev/kernel-dev-faq.xml b/documentation/kernel-dev/kernel-dev-faq.xml
new file mode 100644
index 0000000..7389c9c
--- /dev/null
+++ b/documentation/kernel-dev/kernel-dev-faq.xml
@@ -0,0 +1,131 @@
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<appendix id='kernel-dev-faq'>
6<title>Kernel Development FAQ</title>
7<qandaset>
8 <qandaentry>
9 <question>
10 <para>
11 How do I use my own Linux kernel <filename>.config</filename>
12 file?
13 </para>
14 </question>
15 <answer>
16 <para>
17 Refer to the "<link linkend='changing-the-configuration'>Changing the Configuration</link>"
18 section for information.
19 </para>
20 </answer>
21 </qandaentry>
22
23 <qandaentry>
24 <question>
25 <para>
26 How do I create configuration fragments?
27 </para>
28 </question>
29 <answer>
30 <para>
31 Refer to the "<link linkend='generating-configuration-files'>Generating Configuration Files</link>"
32 section for information.
33 </para>
34 </answer>
35 </qandaentry>
36
37 <qandaentry>
38 <question>
39 <para>
40 How do I use my own Linux kernel sources?
41 </para>
42 </question>
43 <answer>
44 <para>
45 Refer to the "<link linkend='working-with-your-own-sources'>Working With Your Own Sources</link>"
46 section for information.
47 </para>
48 </answer>
49 </qandaentry>
50
51 <qandaentry>
52 <question>
53 <para>
54 How do I install/not-install the kernel image on the rootfs?
55 </para>
56 </question>
57 <answer>
58 <para>
59 The kernel image (e.g. <filename>vmlinuz</filename>) is provided
60 by the <filename>kernel-image</filename> package.
61 Image recipes depend on <filename>kernel-base</filename>.
62 To specify whether or not the kernel
63 image is installed in the generated root filesystem, override
64 <filename>RDEPENDS_kernel-base</filename> to include or not
65 include "kernel-image".</para>
66 <para>See the
67 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files</ulink>"
68 section in the Yocto Project Development Manual for information on
69 how to use an append file to override metadata.
70 </para>
71 </answer>
72 </qandaentry>
73
74 <qandaentry>
75 <question>
76 <para>
77 How do I install a specific kernel module?
78 </para>
79 </question>
80 <answer>
81 <para>
82 Linux kernel modules are packaged individually.
83 To ensure a specific kernel module is included in an image,
84 include it in the appropriate machine
85 <ulink url='&YOCTO_DOCS_REF_URL;#var-RRECOMMENDS'><filename>RRECOMMENDS</filename></ulink>
86 variable.</para>
87 <para>These other variables are useful for installing specific
88 modules:
89 <literallayout class='monospaced'>
90 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</filename></ulink>
91 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><filename>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</filename></ulink>
92 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RDEPENDS'><filename>MACHINE_EXTRA_RDEPENDS</filename></ulink>
93 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE_EXTRA_RRECOMMENDS'><filename>MACHINE_EXTRA_RRECOMMENDS</filename></ulink>
94 </literallayout>
95 For example, set the following in the <filename>qemux86.conf</filename>
96 file to include the <filename>ab123</filename> kernel modules
97 with images built for the <filename>qemux86</filename> machine:
98 <literallayout class='monospaced'>
99 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-ab123"
100 </literallayout>
101 For more information, see the
102 "<link linkend='incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</link>"
103 section.
104 </para>
105 </answer>
106 </qandaentry>
107
108 <qandaentry>
109 <question>
110 <para>
111 How do I change the Linux kernel command line?
112 </para>
113 </question>
114 <answer>
115 <para>
116 The Linux kernel command line is typically specified in
117 the machine config using the <filename>APPEND</filename> variable.
118 For example, you can add some helpful debug information doing
119 the following:
120 <literallayout class='monospaced'>
121 APPEND += "printk.time=y initcall_debug debug"
122 </literallayout>
123 </para>
124 </answer>
125 </qandaentry>
126
127</qandaset>
128</appendix>
129<!--
130vim: expandtab tw=80 ts=4
131-->
diff --git a/documentation/kernel-dev/kernel-dev-intro.xml b/documentation/kernel-dev/kernel-dev-intro.xml
new file mode 100644
index 0000000..297696c
--- /dev/null
+++ b/documentation/kernel-dev/kernel-dev-intro.xml
@@ -0,0 +1,147 @@
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='kernel-dev-intro'>
6<title>Introduction</title>
7
8<!--
9<para>
10 <emphasis>AR - Darrren Hart:</emphasis> See if the concepts in these
11 three bullets are adequately covered in somewhere in this manual:
12 <itemizedlist>
13 <listitem><para>Do we convey that our kernel Git repositories
14 have a clear and continuous history, similar to the way the
15 kernel Git repositories for <filename>kernel.org</filename>
16 do.
17 </para></listitem>
18 <listitem><para>Does the manual note that Yocto Project delivers
19 a key set of supported kernel types, where
20 each type is tailored to meet a specific use (e.g. networking,
21 consumer, devices, and so forth).</para></listitem>
22 <listitem><para>Do we convey that the Yocto Project uses a
23 Git branching strategy that, from a
24 developer's point of view, results in a linear path from the
25 baseline kernel.org, through a select group of features and
26 ends with their BSP-specific commits.</para></listitem>
27 </itemizedlist>
28</para>
29-->
30
31 <section id='kernel-dev-overview'>
32 <title>Overview</title>
33
34 <para>
35 Regardless of how you intend to make use of the Yocto Project,
36 chances are you will work with the Linux kernel.
37 This manual provides background information on the Yocto Linux kernel
38 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
39 describes common tasks you can perform using the kernel tools,
40 and shows you how to use the kernel Metadata needed to work with
41 the kernel inside the Yocto Project.
42 </para>
43
44 <para>
45 Each Yocto Project release has a set of linux-yocto recipes, whose
46 Git repositories you can view in the Yocto
47 <ulink url='&YOCTO_GIT_URL;'>Source Repositories</ulink> under
48 the "Yocto Linux Kernel" heading.
49 New recipes for the release track the latest upstream developments
50 and introduce newly supported platforms.
51 Previous recipes in the release are refreshed and supported for at
52 least one additional release.
53 As they align, these previous releases are updated to include the
54 latest from the Long Term Support Initiative (LTSI) project.
55 Also included is a linux-yocto development recipe
56 (<filename>linux-yocto-dev.bb</filename>) should you want to work
57 with the very latest in upstream Linux kernel development and
58 kernel Metadata development.
59 </para>
60
61 <para>
62 The Yocto Project also provides a powerful set of kernel
63 tools for managing Linux kernel sources and configuration data.
64 You can use these tools to make a single configuration change,
65 apply multiple patches, or work with your own kernel sources.
66 </para>
67
68 <para>
69 In particular, the kernel tools allow you to generate configuration
70 fragments that specify only what you must, and nothing more.
71 Configuration fragments only need to contain the highest level
72 visible <filename>CONFIG</filename> options as presented by the Linux
73 kernel <filename>menuconfig</filename> system.
74 Contrast this against a complete Linux kernel
75 <filename>.config</filename>, which includes all the automatically
76 selected <filename>CONFIG</filename> options.
77 This efficiency reduces your maintenance effort and allows you
78 to further separate your configuration in ways that make sense for
79 your project.
80 A common split separates policy and hardware.
81 For example, all your kernels might support
82 the <filename>proc</filename> and <filename>sys</filename> filesystems,
83 but only specific boards require sound, USB, or specific drivers.
84 Specifying these configurations individually allows you to aggregate
85 them together as needed, but maintains them in only one place.
86 Similar logic applies to separating source changes.
87 </para>
88
89 <para>
90 If you do not maintain your own kernel sources and need to make
91 only minimal changes to the sources, the released recipes provide a
92 vetted base upon which to layer your changes.
93 Doing so allows you to benefit from the continual kernel
94 integration and testing performed during development of the
95 Yocto Project.
96 </para>
97
98 <para>
99 If, instead, you have a very specific Linux kernel source tree
100 and are unable to align with one of the official linux-yocto
101 recipes, an alternative exists by which you can use the Yocto
102 Project Linux kernel tools with your own kernel sources.
103 </para>
104 </section>
105
106 <section id='kernel-dev-other-resources'>
107 <title>Other Resources</title>
108
109 <para>
110 The sections that follow provide instructions for completing
111 specific Linux kernel development tasks.
112 These instructions assume you are comfortable working with
113 <ulink url='http://developer.berlios.de/projects/bitbake/'>BitBake</ulink>
114 recipes and basic open-source development tools.
115 Understanding these concepts will facilitate the process of working
116 with the kernel recipes.
117 If you find you need some additional background, please be sure to
118 review and understand the following documentation:
119 <itemizedlist>
120 <listitem><para><ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>
121 </para></listitem>
122 <listitem><para>The "<ulink url='&YOCTO_DOCS_DEV_URL;#modifying-temporary-source-code'>Modifying Temporary Source Code</ulink>"
123 section in the Yocto Project Development Manual
124 </para></listitem>
125 <listitem><para>The "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>" section
126 in the Yocto Project Development Manual</para></listitem>
127 <listitem><para>The "<ulink url='&YOCTO_DOCS_DEV_URL;#modifying-the-kernel'>Modifying the Kernel</ulink>" section
128 in the Yocto Project Development Manual.</para></listitem>
129 </itemizedlist>
130 </para>
131
132 <para>
133 Finally, while this document focuses on the manual creation of
134 recipes, patches, and configuration files, the Yocto Project
135 Board Support Package (BSP) tools are available to automate
136 this process with existing content and work well to create the
137 initial framework and boilerplate code.
138 For details on these tools, see the
139 "<ulink url='&YOCTO_DOCS_BSP_URL;#using-the-yocto-projects-bsp-tools'>Using the Yocto Project's BSP Tools</ulink>"
140 section in the Yocto Project Board Support Package (BSP) Developer's
141 Guide.
142 </para>
143 </section>
144</chapter>
145<!--
146vim: expandtab tw=80 ts=4
147-->
diff --git a/documentation/kernel-dev/kernel-dev-maint-appx.xml b/documentation/kernel-dev/kernel-dev-maint-appx.xml
new file mode 100644
index 0000000..a7c144f
--- /dev/null
+++ b/documentation/kernel-dev/kernel-dev-maint-appx.xml
@@ -0,0 +1,220 @@
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<appendix id='kernel-dev-maint-appx'>
6<title>Kernel Maintenance</title>
7
8 <section id='tree-construction'>
9 <title>Tree Construction</title>
10 <para>
11 This section describes construction of the Yocto Project kernel source repositories
12 as accomplished by the Yocto Project team to create kernel repositories.
13 These kernel repositories are found under the heading "Yocto Linux Kernel" at
14 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>&YOCTO_GIT_URL;/cgit.cgi</ulink>
15 and can be shipped as part of a Yocto Project release.
16 The team creates these repositories by
17 compiling and executing the set of feature descriptions for every BSP
18 and feature in the product.
19 Those feature descriptions list all necessary patches,
20 configuration, branching, tagging and feature divisions found in a kernel.
21 Thus, the Yocto Project kernel repository (or tree) is built.
22 </para>
23 <para>
24 The existence of this tree allows you to access and clone a particular
25 Yocto Project kernel repository and use it to build images based on their configurations
26 and features.
27 </para>
28 <para>
29 You can find the files used to describe all the valid features and BSPs
30 in the Yocto Project kernel in any clone of the Yocto Project kernel source repository
31 Git tree.
32 For example, the following command clones the Yocto Project baseline kernel that
33 branched off of <filename>linux.org</filename> version 3.4:
34 <literallayout class='monospaced'>
35 $ git clone git://git.yoctoproject.org/linux-yocto-3.4
36 </literallayout>
37 For another example of how to set up a local Git repository of the Yocto Project
38 kernel files, see the
39 "<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Yocto Project Kernel</ulink>" bulleted
40 item in the Yocto Project Development Manual.
41 </para>
42 <para>
43 Once you have cloned the kernel Git repository on your local machine, you can
44 switch to the <filename>meta</filename> branch within the repository.
45 Here is an example that assumes the local Git repository for the kernel is in
46 a top-level directory named <filename>linux-yocto-3.4</filename>:
47 <literallayout class='monospaced'>
48 $ cd linux-yocto-3.4
49 $ git checkout -b meta origin/meta
50 </literallayout>
51 Once you have checked out and switched to the <filename>meta</filename> branch,
52 you can see a snapshot of all the kernel configuration and feature descriptions that are
53 used to build that particular kernel repository.
54 These descriptions are in the form of <filename>.scc</filename> files.
55 </para>
56 <para>
57 You should realize, however, that browsing your local kernel repository
58 for feature descriptions and patches is not an effective way to determine what is in a
59 particular kernel branch.
60 Instead, you should use Git directly to discover the changes in a branch.
61 Using Git is an efficient and flexible way to inspect changes to the kernel.
62 <note>
63 Ground up reconstruction of the complete kernel tree is an action only taken by the
64 Yocto Project team during an active development cycle.
65 When you create a clone of the kernel Git repository, you are simply making it
66 efficiently available for building and development.
67 </note>
68 </para>
69 <para>
70 The following steps describe what happens when the Yocto Project Team constructs
71 the Yocto Project kernel source Git repository (or tree) found at
72 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink> given the
73 introduction of a new top-level kernel feature or BSP.
74 These are the actions that effectively create the tree
75 that includes the new feature, patch or BSP:
76 <orderedlist>
77 <listitem><para>A top-level kernel feature is passed to the kernel build subsystem.
78 Normally, this feature is a BSP for a particular kernel type.</para></listitem>
79 <listitem><para>The file that describes the top-level feature is located by searching
80 these system directories:
81 <itemizedlist>
82 <listitem><para>The in-tree kernel-cache directories, which are located
83 in <filename>meta/cfg/kernel-cache</filename></para></listitem>
84 <listitem><para>Areas pointed to by <filename>SRC_URI</filename> statements
85 found in recipes</para></listitem>
86 </itemizedlist>
87 For a typical build, the target of the search is a
88 feature description in an <filename>.scc</filename> file
89 whose name follows this format:
90 <literallayout class='monospaced'>
91 &lt;bsp_name&gt;-&lt;kernel_type&gt;.scc
92 </literallayout>
93 </para></listitem>
94 <listitem><para>Once located, the feature description is either compiled into a simple script
95 of actions, or into an existing equivalent script that is already part of the
96 shipped kernel.</para></listitem>
97 <listitem><para>Extra features are appended to the top-level feature description.
98 These features can come from the
99 <ulink url='&YOCTO_DOCS_REF_URL;#var-KERNEL_FEATURES'><filename>KERNEL_FEATURES</filename></ulink>
100 variable in recipes.</para></listitem>
101 <listitem><para>Each extra feature is located, compiled and appended to the script
102 as described in step three.</para></listitem>
103 <listitem><para>The script is executed to produce a series of <filename>meta-*</filename>
104 directories.
105 These directories are descriptions of all the branches, tags, patches and configurations that
106 need to be applied to the base Git repository to completely create the
107 source (build) branch for the new BSP or feature.</para></listitem>
108 <listitem><para>The base repository is cloned, and the actions
109 listed in the <filename>meta-*</filename> directories are applied to the
110 tree.</para></listitem>
111 <listitem><para>The Git repository is left with the desired branch checked out and any
112 required branching, patching and tagging has been performed.</para></listitem>
113 </orderedlist>
114 </para>
115 <para>
116 The kernel tree is now ready for developer consumption to be locally cloned,
117 configured, and built into a Yocto Project kernel specific to some target hardware.
118 <note><para>The generated <filename>meta-*</filename> directories add to the kernel
119 as shipped with the Yocto Project release.
120 Any add-ons and configuration data are applied to the end of an existing branch.
121 The full repository generation that is found in the
122 official Yocto Project kernel repositories at
123 <ulink url='&YOCTO_GIT_URL;/cgit.cgi'>http://git.yoctoproject.org/cgit.cgi</ulink>
124 is the combination of all supported boards and configurations.</para>
125 <para>The technique the Yocto Project team uses is flexible and allows for seamless
126 blending of an immutable history with additional patches specific to a
127 deployment.
128 Any additions to the kernel become an integrated part of the branches.</para>
129 </note>
130 </para>
131 </section>
132
133 <section id='build-strategy'>
134 <title>Build Strategy</title>
135
136<!--
137 <para>
138 <emphasis>AR - Darrren Hart:</emphasis> Some parts of this section
139 need to be in the
140 "<link linkend='using-an-iterative-development-process'>Using an Iterative Development Process</link>"
141 section.
142 Darren needs to figure out which parts and identify them.
143 </para>
144-->
145
146 <para>
147 Once a local Git repository of the Yocto Project kernel exists on a development system,
148 you can consider the compilation phase of kernel development - building a kernel image.
149 Some prerequisites exist that are validated by the build process before compilation
150 starts:
151 </para>
152
153 <itemizedlist>
154 <listitem><para>The
155 <ulink url='&YOCTO_DOCS_REF_URL;#var-SRC_URI'><filename>SRC_URI</filename></ulink> points
156 to the kernel Git repository.</para></listitem>
157 <listitem><para>A BSP build branch exists.
158 This branch has the following form:
159 <literallayout class='monospaced'>
160 &lt;kernel_type&gt;/&lt;bsp_name&gt;
161 </literallayout></para></listitem>
162 </itemizedlist>
163
164 <para>
165 The OpenEmbedded build system makes sure these conditions exist before attempting compilation.
166 Other means, however, do exist, such as as bootstrapping a BSP.
167 </para>
168
169 <para>
170 Before building a kernel, the build process verifies the tree
171 and configures the kernel by processing all of the
172 configuration "fragments" specified by feature descriptions in the <filename>.scc</filename>
173 files.
174 As the features are compiled, associated kernel configuration fragments are noted
175 and recorded in the <filename>meta-*</filename> series of directories in their compilation order.
176 The fragments are migrated, pre-processed and passed to the Linux Kernel
177 Configuration subsystem (<filename>lkc</filename>) as raw input in the form
178 of a <filename>.config</filename> file.
179 The <filename>lkc</filename> uses its own internal dependency constraints to do the final
180 processing of that information and generates the final <filename>.config</filename> file
181 that is used during compilation.
182 </para>
183
184 <para>
185 Using the board's architecture and other relevant values from the board's template,
186 kernel compilation is started and a kernel image is produced.
187 </para>
188
189 <para>
190 The other thing that you notice once you configure a kernel is that
191 the build process generates a build tree that is separate from your kernel's local Git
192 source repository tree.
193 This build tree has a name that uses the following form, where
194 <filename>${MACHINE}</filename> is the metadata name of the machine (BSP) and "kernel_type" is one
195 of the Yocto Project supported kernel types (e.g. "standard"):
196 <literallayout class='monospaced'>
197 linux-${MACHINE}-&lt;kernel_type&gt;-build
198 </literallayout>
199 </para>
200
201 <para>
202 The existing support in the <filename>kernel.org</filename> tree achieves this
203 default functionality.
204 </para>
205
206 <para>
207 This behavior means that all the generated files for a particular machine or BSP are now in
208 the build tree directory.
209 The files include the final <filename>.config</filename> file, all the <filename>.o</filename>
210 files, the <filename>.a</filename> files, and so forth.
211 Since each machine or BSP has its own separate
212 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
213 in its own separate branch
214 of the Git repository, you can easily switch between different builds.
215 </para>
216 </section>
217</appendix>
218<!--
219vim: expandtab tw=80 ts=4
220-->
diff --git a/documentation/kernel-dev/kernel-dev-style.css b/documentation/kernel-dev/kernel-dev-style.css
new file mode 100644
index 0000000..52be143
--- /dev/null
+++ b/documentation/kernel-dev/kernel-dev-style.css
@@ -0,0 +1,978 @@
1/*
2 Generic XHTML / DocBook XHTML CSS Stylesheet.
3
4 Browser wrangling and typographic design by
5 Oyvind Kolas / pippin@gimp.org
6
7 Customised for Poky by
8 Matthew Allum / mallum@o-hand.com
9
10 Thanks to:
11 Liam R. E. Quin
12 William Skaggs
13 Jakub Steiner
14
15 Structure
16 ---------
17
18 The stylesheet is divided into the following sections:
19
20 Positioning
21 Margins, paddings, width, font-size, clearing.
22 Decorations
23 Borders, style
24 Colors
25 Colors
26 Graphics
27 Graphical backgrounds
28 Nasty IE tweaks
29 Workarounds needed to make it work in internet explorer,
30 currently makes the stylesheet non validating, but up until
31 this point it is validating.
32 Mozilla extensions
33 Transparency for footer
34 Rounded corners on boxes
35
36*/
37
38
39 /*************** /
40 / Positioning /
41/ ***************/
42
43body {
44 font-family: Verdana, Sans, sans-serif;
45
46 min-width: 640px;
47 width: 80%;
48 margin: 0em auto;
49 padding: 2em 5em 5em 5em;
50 color: #333;
51}
52
53h1,h2,h3,h4,h5,h6,h7 {
54 font-family: Arial, Sans;
55 color: #00557D;
56 clear: both;
57}
58
59h1 {
60 font-size: 2em;
61 text-align: left;
62 padding: 0em 0em 0em 0em;
63 margin: 2em 0em 0em 0em;
64}
65
66h2.subtitle {
67 margin: 0.10em 0em 3.0em 0em;
68 padding: 0em 0em 0em 0em;
69 font-size: 1.8em;
70 padding-left: 20%;
71 font-weight: normal;
72 font-style: italic;
73}
74
75h2 {
76 margin: 2em 0em 0.66em 0em;
77 padding: 0.5em 0em 0em 0em;
78 font-size: 1.5em;
79 font-weight: bold;
80}
81
82h3.subtitle {
83 margin: 0em 0em 1em 0em;
84 padding: 0em 0em 0em 0em;
85 font-size: 142.14%;
86 text-align: right;
87}
88
89h3 {
90 margin: 1em 0em 0.5em 0em;
91 padding: 1em 0em 0em 0em;
92 font-size: 140%;
93 font-weight: bold;
94}
95
96h4 {
97 margin: 1em 0em 0.5em 0em;
98 padding: 1em 0em 0em 0em;
99 font-size: 120%;
100 font-weight: bold;
101}
102
103h5 {
104 margin: 1em 0em 0.5em 0em;
105 padding: 1em 0em 0em 0em;
106 font-size: 110%;
107 font-weight: bold;
108}
109
110h6 {
111 margin: 1em 0em 0em 0em;
112 padding: 1em 0em 0em 0em;
113 font-size: 110%;
114 font-weight: bold;
115}
116
117.authorgroup {
118 background-color: transparent;
119 background-repeat: no-repeat;
120 padding-top: 256px;
121 background-image: url("figures/kernel-dev-title.png");
122 background-position: left top;
123 margin-top: -256px;
124 padding-right: 50px;
125 margin-left: 0px;
126 text-align: right;
127 width: 740px;
128}
129
130h3.author {
131 margin: 0em 0me 0em 0em;
132 padding: 0em 0em 0em 0em;
133 font-weight: normal;
134 font-size: 100%;
135 color: #333;
136 clear: both;
137}
138
139.author tt.email {
140 font-size: 66%;
141}
142
143.titlepage hr {
144 width: 0em;
145 clear: both;
146}
147
148.revhistory {
149 padding-top: 2em;
150 clear: both;
151}
152
153.toc,
154.list-of-tables,
155.list-of-examples,
156.list-of-figures {
157 padding: 1.33em 0em 2.5em 0em;
158 color: #00557D;
159}
160
161.toc p,
162.list-of-tables p,
163.list-of-figures p,
164.list-of-examples p {
165 padding: 0em 0em 0em 0em;
166 padding: 0em 0em 0.3em;
167 margin: 1.5em 0em 0em 0em;
168}
169
170.toc p b,
171.list-of-tables p b,
172.list-of-figures p b,
173.list-of-examples p b{
174 font-size: 100.0%;
175 font-weight: bold;
176}
177
178.toc dl,
179.list-of-tables dl,
180.list-of-figures dl,
181.list-of-examples dl {
182 margin: 0em 0em 0.5em 0em;
183 padding: 0em 0em 0em 0em;
184}
185
186.toc dt {
187 margin: 0em 0em 0em 0em;
188 padding: 0em 0em 0em 0em;
189}
190
191.toc dd {
192 margin: 0em 0em 0em 2.6em;
193 padding: 0em 0em 0em 0em;
194}
195
196div.glossary dl,
197div.variablelist dl {
198}
199
200.glossary dl dt,
201.variablelist dl dt,
202.variablelist dl dt span.term {
203 font-weight: normal;
204 width: 20em;
205 text-align: right;
206}
207
208.variablelist dl dt {
209 margin-top: 0.5em;
210}
211
212.glossary dl dd,
213.variablelist dl dd {
214 margin-top: -1em;
215 margin-left: 25.5em;
216}
217
218.glossary dd p,
219.variablelist dd p {
220 margin-top: 0em;
221 margin-bottom: 1em;
222}
223
224
225div.calloutlist table td {
226 padding: 0em 0em 0em 0em;
227 margin: 0em 0em 0em 0em;
228}
229
230div.calloutlist table td p {
231 margin-top: 0em;
232 margin-bottom: 1em;
233}
234
235div p.copyright {
236 text-align: left;
237}
238
239div.legalnotice p.legalnotice-title {
240 margin-bottom: 0em;
241}
242
243p {
244 line-height: 1.5em;
245 margin-top: 0em;
246
247}
248
249dl {
250 padding-top: 0em;
251}
252
253hr {
254 border: solid 1px;
255}
256
257
258.mediaobject,
259.mediaobjectco {
260 text-align: center;
261}
262
263img {
264 border: none;
265}
266
267ul {
268 padding: 0em 0em 0em 1.5em;
269}
270
271ul li {
272 padding: 0em 0em 0em 0em;
273}
274
275ul li p {
276 text-align: left;
277}
278
279table {
280 width :100%;
281}
282
283th {
284 padding: 0.25em;
285 text-align: left;
286 font-weight: normal;
287 vertical-align: top;
288}
289
290td {
291 padding: 0.25em;
292 vertical-align: top;
293}
294
295p a[id] {
296 margin: 0px;
297 padding: 0px;
298 display: inline;
299 background-image: none;
300}
301
302a {
303 text-decoration: underline;
304 color: #444;
305}
306
307pre {
308 overflow: auto;
309}
310
311a:hover {
312 text-decoration: underline;
313 /*font-weight: bold;*/
314}
315
316
317div.informalfigure,
318div.informalexample,
319div.informaltable,
320div.figure,
321div.table,
322div.example {
323 margin: 1em 0em;
324 padding: 1em;
325 page-break-inside: avoid;
326}
327
328
329div.informalfigure p.title b,
330div.informalexample p.title b,
331div.informaltable p.title b,
332div.figure p.title b,
333div.example p.title b,
334div.table p.title b{
335 padding-top: 0em;
336 margin-top: 0em;
337 font-size: 100%;
338 font-weight: normal;
339}
340
341.mediaobject .caption,
342.mediaobject .caption p {
343 text-align: center;
344 font-size: 80%;
345 padding-top: 0.5em;
346 padding-bottom: 0.5em;
347}
348
349.epigraph {
350 padding-left: 55%;
351 margin-bottom: 1em;
352}
353
354.epigraph p {
355 text-align: left;
356}
357
358.epigraph .quote {
359 font-style: italic;
360}
361.epigraph .attribution {
362 font-style: normal;
363 text-align: right;
364}
365
366span.application {
367 font-style: italic;
368}
369
370.programlisting {
371 font-family: monospace;
372 font-size: 80%;
373 white-space: pre;
374 margin: 1.33em 0em;
375 padding: 1.33em;
376}
377
378.tip,
379.warning,
380.caution,
381.note {
382 margin-top: 1em;
383 margin-bottom: 1em;
384
385}
386
387/* force full width of table within div */
388.tip table,
389.warning table,
390.caution table,
391.note table {
392 border: none;
393 width: 100%;
394}
395
396
397.tip table th,
398.warning table th,
399.caution table th,
400.note table th {
401 padding: 0.8em 0.0em 0.0em 0.0em;
402 margin : 0em 0em 0em 0em;
403}
404
405.tip p,
406.warning p,
407.caution p,
408.note p {
409 margin-top: 0.5em;
410 margin-bottom: 0.5em;
411 padding-right: 1em;
412 text-align: left;
413}
414
415.acronym {
416 text-transform: uppercase;
417}
418
419b.keycap,
420.keycap {
421 padding: 0.09em 0.3em;
422 margin: 0em;
423}
424
425.itemizedlist li {
426 clear: none;
427}
428
429.filename {
430 font-size: medium;
431 font-family: Courier, monospace;
432}
433
434
435div.navheader, div.heading{
436 position: absolute;
437 left: 0em;
438 top: 0em;
439 width: 100%;
440 background-color: #cdf;
441 width: 100%;
442}
443
444div.navfooter, div.footing{
445 position: fixed;
446 left: 0em;
447 bottom: 0em;
448 background-color: #eee;
449 width: 100%;
450}
451
452
453div.navheader td,
454div.navfooter td {
455 font-size: 66%;
456}
457
458div.navheader table th {
459 /*font-family: Georgia, Times, serif;*/
460 /*font-size: x-large;*/
461 font-size: 80%;
462}
463
464div.navheader table {
465 border-left: 0em;
466 border-right: 0em;
467 border-top: 0em;
468 width: 100%;
469}
470
471div.navfooter table {
472 border-left: 0em;
473 border-right: 0em;
474 border-bottom: 0em;
475 width: 100%;
476}
477
478div.navheader table td a,
479div.navfooter table td a {
480 color: #777;
481 text-decoration: none;
482}
483
484/* normal text in the footer */
485div.navfooter table td {
486 color: black;
487}
488
489div.navheader table td a:visited,
490div.navfooter table td a:visited {
491 color: #444;
492}
493
494
495/* links in header and footer */
496div.navheader table td a:hover,
497div.navfooter table td a:hover {
498 text-decoration: underline;
499 background-color: transparent;
500 color: #33a;
501}
502
503div.navheader hr,
504div.navfooter hr {
505 display: none;
506}
507
508
509.qandaset tr.question td p {
510 margin: 0em 0em 1em 0em;
511 padding: 0em 0em 0em 0em;
512}
513
514.qandaset tr.answer td p {
515 margin: 0em 0em 1em 0em;
516 padding: 0em 0em 0em 0em;
517}
518.answer td {
519 padding-bottom: 1.5em;
520}
521
522.emphasis {
523 font-weight: bold;
524}
525
526
527 /************* /
528 / decorations /
529/ *************/
530
531.titlepage {
532}
533
534.part .title {
535}
536
537.subtitle {
538 border: none;
539}
540
541/*
542h1 {
543 border: none;
544}
545
546h2 {
547 border-top: solid 0.2em;
548 border-bottom: solid 0.06em;
549}
550
551h3 {
552 border-top: 0em;
553 border-bottom: solid 0.06em;
554}
555
556h4 {
557 border: 0em;
558 border-bottom: solid 0.06em;
559}
560
561h5 {
562 border: 0em;
563}
564*/
565
566.programlisting {
567 border: solid 1px;
568}
569
570div.figure,
571div.table,
572div.informalfigure,
573div.informaltable,
574div.informalexample,
575div.example {
576 border: 1px solid;
577}
578
579
580
581.tip,
582.warning,
583.caution,
584.note {
585 border: 1px solid;
586}
587
588.tip table th,
589.warning table th,
590.caution table th,
591.note table th {
592 border-bottom: 1px solid;
593}
594
595.question td {
596 border-top: 1px solid black;
597}
598
599.answer {
600}
601
602
603b.keycap,
604.keycap {
605 border: 1px solid;
606}
607
608
609div.navheader, div.heading{
610 border-bottom: 1px solid;
611}
612
613
614div.navfooter, div.footing{
615 border-top: 1px solid;
616}
617
618 /********* /
619 / colors /
620/ *********/
621
622body {
623 color: #333;
624 background: white;
625}
626
627a {
628 background: transparent;
629}
630
631a:hover {
632 background-color: #dedede;
633}
634
635
636h1,
637h2,
638h3,
639h4,
640h5,
641h6,
642h7,
643h8 {
644 background-color: transparent;
645}
646
647hr {
648 border-color: #aaa;
649}
650
651
652.tip, .warning, .caution, .note {
653 border-color: #fff;
654}
655
656
657.tip table th,
658.warning table th,
659.caution table th,
660.note table th {
661 border-bottom-color: #fff;
662}
663
664
665.warning {
666 background-color: #f0f0f2;
667}
668
669.caution {
670 background-color: #f0f0f2;
671}
672
673.tip {
674 background-color: #f0f0f2;
675}
676
677.note {
678 background-color: #f0f0f2;
679}
680
681.glossary dl dt,
682.variablelist dl dt,
683.variablelist dl dt span.term {
684 color: #044;
685}
686
687div.figure,
688div.table,
689div.example,
690div.informalfigure,
691div.informaltable,
692div.informalexample {
693 border-color: #aaa;
694}
695
696pre.programlisting {
697 color: black;
698 background-color: #fff;
699 border-color: #aaa;
700 border-width: 2px;
701}
702
703.guimenu,
704.guilabel,
705.guimenuitem {
706 background-color: #eee;
707}
708
709
710b.keycap,
711.keycap {
712 background-color: #eee;
713 border-color: #999;
714}
715
716
717div.navheader {
718 border-color: black;
719}
720
721
722div.navfooter {
723 border-color: black;
724}
725
726
727 /*********** /
728 / graphics /
729/ ***********/
730
731/*
732body {
733 background-image: url("images/body_bg.jpg");
734 background-attachment: fixed;
735}
736
737.navheader,
738.note,
739.tip {
740 background-image: url("images/note_bg.jpg");
741 background-attachment: fixed;
742}
743
744.warning,
745.caution {
746 background-image: url("images/warning_bg.jpg");
747 background-attachment: fixed;
748}
749
750.figure,
751.informalfigure,
752.example,
753.informalexample,
754.table,
755.informaltable {
756 background-image: url("images/figure_bg.jpg");
757 background-attachment: fixed;
758}
759
760*/
761h1,
762h2,
763h3,
764h4,
765h5,
766h6,
767h7{
768}
769
770/*
771Example of how to stick an image as part of the title.
772
773div.article .titlepage .title
774{
775 background-image: url("figures/white-on-black.png");
776 background-position: center;
777 background-repeat: repeat-x;
778}
779*/
780
781div.preface .titlepage .title,
782div.colophon .title,
783div.chapter .titlepage .title,
784div.article .titlepage .title
785{
786}
787
788div.section div.section .titlepage .title,
789div.sect2 .titlepage .title {
790 background: none;
791}
792
793
794h1.title {
795 background-color: transparent;
796 background-image: url("figures/yocto-project-bw.png");
797 background-repeat: no-repeat;
798 height: 256px;
799 text-indent: -9000px;
800 overflow:hidden;
801}
802
803h2.subtitle {
804 background-color: transparent;
805 text-indent: -9000px;
806 overflow:hidden;
807 width: 0px;
808 display: none;
809}
810
811 /*************************************** /
812 / pippin.gimp.org specific alterations /
813/ ***************************************/
814
815/*
816div.heading, div.navheader {
817 color: #777;
818 font-size: 80%;
819 padding: 0;
820 margin: 0;
821 text-align: left;
822 position: absolute;
823 top: 0px;
824 left: 0px;
825 width: 100%;
826 height: 50px;
827 background: url('/gfx/heading_bg.png') transparent;
828 background-repeat: repeat-x;
829 background-attachment: fixed;
830 border: none;
831}
832
833div.heading a {
834 color: #444;
835}
836
837div.footing, div.navfooter {
838 border: none;
839 color: #ddd;
840 font-size: 80%;
841 text-align:right;
842
843 width: 100%;
844 padding-top: 10px;
845 position: absolute;
846 bottom: 0px;
847 left: 0px;
848
849 background: url('/gfx/footing_bg.png') transparent;
850}
851*/
852
853
854
855 /****************** /
856 / nasty ie tweaks /
857/ ******************/
858
859/*
860div.heading, div.navheader {
861 width:expression(document.body.clientWidth + "px");
862}
863
864div.footing, div.navfooter {
865 width:expression(document.body.clientWidth + "px");
866 margin-left:expression("-5em");
867}
868body {
869 padding:expression("4em 5em 0em 5em");
870}
871*/
872
873 /**************************************** /
874 / mozilla vendor specific css extensions /
875/ ****************************************/
876/*
877div.navfooter, div.footing{
878 -moz-opacity: 0.8em;
879}
880
881div.figure,
882div.table,
883div.informalfigure,
884div.informaltable,
885div.informalexample,
886div.example,
887.tip,
888.warning,
889.caution,
890.note {
891 -moz-border-radius: 0.5em;
892}
893
894b.keycap,
895.keycap {
896 -moz-border-radius: 0.3em;
897}
898*/
899
900table tr td table tr td {
901 display: none;
902}
903
904
905hr {
906 display: none;
907}
908
909table {
910 border: 0em;
911}
912
913 .photo {
914 float: right;
915 margin-left: 1.5em;
916 margin-bottom: 1.5em;
917 margin-top: 0em;
918 max-width: 17em;
919 border: 1px solid gray;
920 padding: 3px;
921 background: white;
922}
923 .seperator {
924 padding-top: 2em;
925 clear: both;
926 }
927
928 #validators {
929 margin-top: 5em;
930 text-align: right;
931 color: #777;
932 }
933 @media print {
934 body {
935 font-size: 8pt;
936 }
937 .noprint {
938 display: none;
939 }
940 }
941
942
943.tip,
944.note {
945 background: #f0f0f2;
946 color: #333;
947 padding: 20px;
948 margin: 20px;
949}
950
951.tip h3,
952.note h3 {
953 padding: 0em;
954 margin: 0em;
955 font-size: 2em;
956 font-weight: bold;
957 color: #333;
958}
959
960.tip a,
961.note a {
962 color: #333;
963 text-decoration: underline;
964}
965
966.footnote {
967 font-size: small;
968 color: #333;
969}
970
971/* Changes the announcement text */
972.tip h3,
973.warning h3,
974.caution h3,
975.note h3 {
976 font-size:large;
977 color: #00557D;
978}
diff --git a/documentation/kernel-dev/kernel-dev.xml b/documentation/kernel-dev/kernel-dev.xml
new file mode 100644
index 0000000..f4cddba
--- /dev/null
+++ b/documentation/kernel-dev/kernel-dev.xml
@@ -0,0 +1,95 @@
1<!DOCTYPE book 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<book id='kernel-dev' lang='en'
6 xmlns:xi="http://www.w3.org/2003/XInclude"
7 xmlns="http://docbook.org/ns/docbook"
8 >
9 <bookinfo>
10
11 <mediaobject>
12 <imageobject>
13 <imagedata fileref='figures/kernel-dev-title.png'
14 format='SVG'
15 align='left' scalefit='1' width='100%'/>
16 </imageobject>
17 </mediaobject>
18
19 <title>
20 Yocto Project Linux Kernel Development Manual
21 </title>
22
23 <authorgroup>
24 <author>
25 <firstname>Darren</firstname> <surname>Hart</surname>
26 <affiliation>
27 <orgname>Intel Corporation</orgname>
28 </affiliation>
29 <email>darren.hart@intel.com</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>1.4</revnumber>
36 <date>April 2013</date>
37 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
38 </revision>
39 <revision>
40 <revnumber>1.5</revnumber>
41 <date>October 2013</date>
42 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>1.5.1</revnumber>
46 <date>Sometime in 2013</date>
47 <revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
48 </revision>
49 </revhistory>
50
51 <copyright>
52 <year>&COPYRIGHT_YEAR;</year>
53 <holder>Linux Foundation</holder>
54 </copyright>
55
56 <legalnotice>
57 <para>
58 Permission is granted to copy, distribute and/or modify this document under
59 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
60 </para>
61 <note>
62 For the latest version of this manual associated with this
63 Yocto Project release, see the
64 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>
65 from the Yocto Project website.
66 </note>
67 </legalnotice>
68
69 </bookinfo>
70
71 <xi:include href="kernel-dev-intro.xml"/>
72
73 <xi:include href="kernel-dev-common.xml"/>
74
75 <xi:include href="kernel-dev-advanced.xml"/>
76
77 <xi:include href="kernel-dev-concepts-appx.xml"/>
78
79 <xi:include href="kernel-dev-maint-appx.xml"/>
80
81<!--
82 <xi:include href="kernel-dev-examples.xml"/>
83-->
84
85 <xi:include href="kernel-dev-faq.xml"/>
86
87<!-- <index id='index'>
88 <title>Index</title>
89 </index>
90-->
91
92</book>
93<!--
94vim: expandtab tw=80 ts=4
95-->
diff --git a/documentation/mega-manual/figures/adt-title.png b/documentation/mega-manual/figures/adt-title.png
new file mode 100644
index 0000000..6e71e41
--- /dev/null
+++ b/documentation/mega-manual/figures/adt-title.png
Binary files differ
diff --git a/documentation/mega-manual/figures/analysis-for-package-splitting.png b/documentation/mega-manual/figures/analysis-for-package-splitting.png
new file mode 100644
index 0000000..04f2794
--- /dev/null
+++ b/documentation/mega-manual/figures/analysis-for-package-splitting.png
Binary files differ
diff --git a/documentation/mega-manual/figures/app-dev-flow.png b/documentation/mega-manual/figures/app-dev-flow.png
new file mode 100644
index 0000000..4927b93
--- /dev/null
+++ b/documentation/mega-manual/figures/app-dev-flow.png
Binary files differ
diff --git a/documentation/mega-manual/figures/bsp-dev-flow.png b/documentation/mega-manual/figures/bsp-dev-flow.png
new file mode 100644
index 0000000..b20ee19
--- /dev/null
+++ b/documentation/mega-manual/figures/bsp-dev-flow.png
Binary files differ
diff --git a/documentation/mega-manual/figures/bsp-title.png b/documentation/mega-manual/figures/bsp-title.png
new file mode 100644
index 0000000..f624dd4
--- /dev/null
+++ b/documentation/mega-manual/figures/bsp-title.png
Binary files differ
diff --git a/documentation/mega-manual/figures/buildhistory-web.png b/documentation/mega-manual/figures/buildhistory-web.png
new file mode 100644
index 0000000..f6db86c
--- /dev/null
+++ b/documentation/mega-manual/figures/buildhistory-web.png
Binary files differ
diff --git a/documentation/mega-manual/figures/buildhistory.png b/documentation/mega-manual/figures/buildhistory.png
new file mode 100644
index 0000000..edf98d9
--- /dev/null
+++ b/documentation/mega-manual/figures/buildhistory.png
Binary files differ
diff --git a/documentation/mega-manual/figures/building-an-image.png b/documentation/mega-manual/figures/building-an-image.png
new file mode 100755
index 0000000..1fbea5a
--- /dev/null
+++ b/documentation/mega-manual/figures/building-an-image.png
Binary files differ
diff --git a/documentation/mega-manual/figures/configuration-compile-autoreconf.png b/documentation/mega-manual/figures/configuration-compile-autoreconf.png
new file mode 100644
index 0000000..a07464f
--- /dev/null
+++ b/documentation/mega-manual/figures/configuration-compile-autoreconf.png
Binary files differ
diff --git a/documentation/mega-manual/figures/cross-development-toolchains.png b/documentation/mega-manual/figures/cross-development-toolchains.png
new file mode 100644
index 0000000..d36670a
--- /dev/null
+++ b/documentation/mega-manual/figures/cross-development-toolchains.png
Binary files differ
diff --git a/documentation/mega-manual/figures/dev-title.png b/documentation/mega-manual/figures/dev-title.png
new file mode 100644
index 0000000..d3cac4a
--- /dev/null
+++ b/documentation/mega-manual/figures/dev-title.png
Binary files differ
diff --git a/documentation/mega-manual/figures/git-workflow.png b/documentation/mega-manual/figures/git-workflow.png
new file mode 100644
index 0000000..4fdf42f
--- /dev/null
+++ b/documentation/mega-manual/figures/git-workflow.png
Binary files differ
diff --git a/documentation/mega-manual/figures/image-generation.png b/documentation/mega-manual/figures/image-generation.png
new file mode 100644
index 0000000..5594658
--- /dev/null
+++ b/documentation/mega-manual/figures/image-generation.png
Binary files differ
diff --git a/documentation/mega-manual/figures/images.png b/documentation/mega-manual/figures/images.png
new file mode 100644
index 0000000..d99eac1
--- /dev/null
+++ b/documentation/mega-manual/figures/images.png
Binary files differ
diff --git a/documentation/mega-manual/figures/index-downloads.png b/documentation/mega-manual/figures/index-downloads.png
new file mode 100644
index 0000000..c907997
--- /dev/null
+++ b/documentation/mega-manual/figures/index-downloads.png
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-architecture-overview.png b/documentation/mega-manual/figures/kernel-architecture-overview.png
new file mode 100755
index 0000000..2aad172
--- /dev/null
+++ b/documentation/mega-manual/figures/kernel-architecture-overview.png
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-dev-flow.png b/documentation/mega-manual/figures/kernel-dev-flow.png
new file mode 100644
index 0000000..edd9e82
--- /dev/null
+++ b/documentation/mega-manual/figures/kernel-dev-flow.png
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-dev-title.png b/documentation/mega-manual/figures/kernel-dev-title.png
new file mode 100644
index 0000000..7a8dd54
--- /dev/null
+++ b/documentation/mega-manual/figures/kernel-dev-title.png
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-overview-1.png b/documentation/mega-manual/figures/kernel-overview-1.png
new file mode 100644
index 0000000..116c0b9
--- /dev/null
+++ b/documentation/mega-manual/figures/kernel-overview-1.png
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-overview-2-generic.png b/documentation/mega-manual/figures/kernel-overview-2-generic.png
new file mode 100644
index 0000000..889ff1b
--- /dev/null
+++ b/documentation/mega-manual/figures/kernel-overview-2-generic.png
Binary files differ
diff --git a/documentation/mega-manual/figures/kernel-title.png b/documentation/mega-manual/figures/kernel-title.png
new file mode 100644
index 0000000..59d86c0
--- /dev/null
+++ b/documentation/mega-manual/figures/kernel-title.png
Binary files differ
diff --git a/documentation/mega-manual/figures/kernelshark-all.png b/documentation/mega-manual/figures/kernelshark-all.png
new file mode 100644
index 0000000..99b40ba
--- /dev/null
+++ b/documentation/mega-manual/figures/kernelshark-all.png
Binary files differ
diff --git a/documentation/mega-manual/figures/kernelshark-choose-events.png b/documentation/mega-manual/figures/kernelshark-choose-events.png
new file mode 100644
index 0000000..e8dd62a
--- /dev/null
+++ b/documentation/mega-manual/figures/kernelshark-choose-events.png
Binary files differ
diff --git a/documentation/mega-manual/figures/kernelshark-i915-display.png b/documentation/mega-manual/figures/kernelshark-i915-display.png
new file mode 100644
index 0000000..bb0edfb
--- /dev/null
+++ b/documentation/mega-manual/figures/kernelshark-i915-display.png
Binary files differ
diff --git a/documentation/mega-manual/figures/kernelshark-output-display.png b/documentation/mega-manual/figures/kernelshark-output-display.png
new file mode 100644
index 0000000..ae2d0e5
--- /dev/null
+++ b/documentation/mega-manual/figures/kernelshark-output-display.png
Binary files differ
diff --git a/documentation/mega-manual/figures/layer-input.png b/documentation/mega-manual/figures/layer-input.png
new file mode 100644
index 0000000..0a4f2e7
--- /dev/null
+++ b/documentation/mega-manual/figures/layer-input.png
Binary files differ
diff --git a/documentation/mega-manual/figures/lttngmain0.png b/documentation/mega-manual/figures/lttngmain0.png
new file mode 100644
index 0000000..5f60113
--- /dev/null
+++ b/documentation/mega-manual/figures/lttngmain0.png
Binary files differ
diff --git a/documentation/mega-manual/figures/oprofileui-busybox.png b/documentation/mega-manual/figures/oprofileui-busybox.png
new file mode 100644
index 0000000..a8275c6
--- /dev/null
+++ b/documentation/mega-manual/figures/oprofileui-busybox.png
Binary files differ
diff --git a/documentation/mega-manual/figures/oprofileui-copy-to-user.png b/documentation/mega-manual/figures/oprofileui-copy-to-user.png
new file mode 100644
index 0000000..deb6470
--- /dev/null
+++ b/documentation/mega-manual/figures/oprofileui-copy-to-user.png
Binary files differ
diff --git a/documentation/mega-manual/figures/oprofileui-downloading.png b/documentation/mega-manual/figures/oprofileui-downloading.png
new file mode 100644
index 0000000..57742d6
--- /dev/null
+++ b/documentation/mega-manual/figures/oprofileui-downloading.png
Binary files differ
diff --git a/documentation/mega-manual/figures/oprofileui-processes.png b/documentation/mega-manual/figures/oprofileui-processes.png
new file mode 100644
index 0000000..ae54702
--- /dev/null
+++ b/documentation/mega-manual/figures/oprofileui-processes.png
Binary files differ
diff --git a/documentation/mega-manual/figures/package-feeds.png b/documentation/mega-manual/figures/package-feeds.png
new file mode 100644
index 0000000..4bc311f
--- /dev/null
+++ b/documentation/mega-manual/figures/package-feeds.png
Binary files differ
diff --git a/documentation/mega-manual/figures/patching.png b/documentation/mega-manual/figures/patching.png
new file mode 100644
index 0000000..8ecd018
--- /dev/null
+++ b/documentation/mega-manual/figures/patching.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-probe-do_fork-profile.png b/documentation/mega-manual/figures/perf-probe-do_fork-profile.png
new file mode 100644
index 0000000..1a1070d
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-probe-do_fork-profile.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-report-cycles-u.png b/documentation/mega-manual/figures/perf-report-cycles-u.png
new file mode 100644
index 0000000..68ec6af
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-report-cycles-u.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-systemwide-libc.png b/documentation/mega-manual/figures/perf-systemwide-libc.png
new file mode 100644
index 0000000..2b72869
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-systemwide-libc.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-systemwide.png b/documentation/mega-manual/figures/perf-systemwide.png
new file mode 100644
index 0000000..12ce244
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-systemwide.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-annotate-menu.png b/documentation/mega-manual/figures/perf-wget-busybox-annotate-menu.png
new file mode 100644
index 0000000..ceb34ea
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-wget-busybox-annotate-menu.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-annotate-udhcpc.png b/documentation/mega-manual/figures/perf-wget-busybox-annotate-udhcpc.png
new file mode 100644
index 0000000..3581e9d
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-wget-busybox-annotate-udhcpc.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-debuginfo.png b/documentation/mega-manual/figures/perf-wget-busybox-debuginfo.png
new file mode 100644
index 0000000..c317b49
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-wget-busybox-debuginfo.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom-menu.png b/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom-menu.png
new file mode 100644
index 0000000..1913c86
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom-menu.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom.png b/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom.png
new file mode 100644
index 0000000..a1962c4
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-wget-busybox-dso-zoom.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-busybox-expanded-stripped.png b/documentation/mega-manual/figures/perf-wget-busybox-expanded-stripped.png
new file mode 100644
index 0000000..b642d06
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-wget-busybox-expanded-stripped.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-flat-stripped.png b/documentation/mega-manual/figures/perf-wget-flat-stripped.png
new file mode 100644
index 0000000..c8f395a
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-wget-flat-stripped.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.png b/documentation/mega-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.png
new file mode 100644
index 0000000..bb7c764
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.png b/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.png
new file mode 100644
index 0000000..a799af5
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png b/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png
new file mode 100644
index 0000000..e91808a
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png
Binary files differ
diff --git a/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.png b/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.png
new file mode 100644
index 0000000..812302d
--- /dev/null
+++ b/documentation/mega-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.png
Binary files differ
diff --git a/documentation/mega-manual/figures/poky-title.png b/documentation/mega-manual/figures/poky-title.png
new file mode 100644
index 0000000..2893d84
--- /dev/null
+++ b/documentation/mega-manual/figures/poky-title.png
Binary files differ
diff --git a/documentation/mega-manual/figures/profile-title.png b/documentation/mega-manual/figures/profile-title.png
new file mode 100644
index 0000000..ce5c682
--- /dev/null
+++ b/documentation/mega-manual/figures/profile-title.png
Binary files differ
diff --git a/documentation/mega-manual/figures/pybootchartgui-linux-yocto.png b/documentation/mega-manual/figures/pybootchartgui-linux-yocto.png
new file mode 100644
index 0000000..2b6bfda
--- /dev/null
+++ b/documentation/mega-manual/figures/pybootchartgui-linux-yocto.png
Binary files differ
diff --git a/documentation/mega-manual/figures/pychart-linux-yocto-rpm-nostrip.png b/documentation/mega-manual/figures/pychart-linux-yocto-rpm-nostrip.png
new file mode 100644
index 0000000..444675c
--- /dev/null
+++ b/documentation/mega-manual/figures/pychart-linux-yocto-rpm-nostrip.png
Binary files differ
diff --git a/documentation/mega-manual/figures/pychart-linux-yocto-rpm.png b/documentation/mega-manual/figures/pychart-linux-yocto-rpm.png
new file mode 100644
index 0000000..8ee3535
--- /dev/null
+++ b/documentation/mega-manual/figures/pychart-linux-yocto-rpm.png
Binary files differ
diff --git a/documentation/mega-manual/figures/sched-wakeup-profile.png b/documentation/mega-manual/figures/sched-wakeup-profile.png
new file mode 100644
index 0000000..2f25811
--- /dev/null
+++ b/documentation/mega-manual/figures/sched-wakeup-profile.png
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk-generation.png b/documentation/mega-manual/figures/sdk-generation.png
new file mode 100644
index 0000000..c37e274
--- /dev/null
+++ b/documentation/mega-manual/figures/sdk-generation.png
Binary files differ
diff --git a/documentation/mega-manual/figures/sdk.png b/documentation/mega-manual/figures/sdk.png
new file mode 100644
index 0000000..a539cc5
--- /dev/null
+++ b/documentation/mega-manual/figures/sdk.png
Binary files differ
diff --git a/documentation/mega-manual/figures/source-fetching.png b/documentation/mega-manual/figures/source-fetching.png
new file mode 100644
index 0000000..26aefb5
--- /dev/null
+++ b/documentation/mega-manual/figures/source-fetching.png
Binary files differ
diff --git a/documentation/mega-manual/figures/source-input.png b/documentation/mega-manual/figures/source-input.png
new file mode 100644
index 0000000..f751505
--- /dev/null
+++ b/documentation/mega-manual/figures/source-input.png
Binary files differ
diff --git a/documentation/mega-manual/figures/source-repos.png b/documentation/mega-manual/figures/source-repos.png
new file mode 100644
index 0000000..65c5f29
--- /dev/null
+++ b/documentation/mega-manual/figures/source-repos.png
Binary files differ
diff --git a/documentation/mega-manual/figures/sysprof-callers.png b/documentation/mega-manual/figures/sysprof-callers.png
new file mode 100644
index 0000000..640c8d9
--- /dev/null
+++ b/documentation/mega-manual/figures/sysprof-callers.png
Binary files differ
diff --git a/documentation/mega-manual/figures/sysprof-copy-from-user.png b/documentation/mega-manual/figures/sysprof-copy-from-user.png
new file mode 100644
index 0000000..8d31427
--- /dev/null
+++ b/documentation/mega-manual/figures/sysprof-copy-from-user.png
Binary files differ
diff --git a/documentation/mega-manual/figures/sysprof-copy-to-user.png b/documentation/mega-manual/figures/sysprof-copy-to-user.png
new file mode 100644
index 0000000..7a5bab7
--- /dev/null
+++ b/documentation/mega-manual/figures/sysprof-copy-to-user.png
Binary files differ
diff --git a/documentation/mega-manual/figures/user-configuration.png b/documentation/mega-manual/figures/user-configuration.png
new file mode 100644
index 0000000..f2b3f8e
--- /dev/null
+++ b/documentation/mega-manual/figures/user-configuration.png
Binary files differ
diff --git a/documentation/mega-manual/figures/using-a-pre-built-image.png b/documentation/mega-manual/figures/using-a-pre-built-image.png
new file mode 100644
index 0000000..b03130d
--- /dev/null
+++ b/documentation/mega-manual/figures/using-a-pre-built-image.png
Binary files differ
diff --git a/documentation/mega-manual/figures/yocto-environment-ref.png b/documentation/mega-manual/figures/yocto-environment-ref.png
new file mode 100644
index 0000000..650c6c8
--- /dev/null
+++ b/documentation/mega-manual/figures/yocto-environment-ref.png
Binary files differ
diff --git a/documentation/mega-manual/figures/yocto-environment.png b/documentation/mega-manual/figures/yocto-environment.png
new file mode 100644
index 0000000..82b7a55
--- /dev/null
+++ b/documentation/mega-manual/figures/yocto-environment.png
Binary files differ
diff --git a/documentation/mega-manual/figures/yocto-project-transp.png b/documentation/mega-manual/figures/yocto-project-transp.png
new file mode 100755
index 0000000..31d2b14
--- /dev/null
+++ b/documentation/mega-manual/figures/yocto-project-transp.png
Binary files differ
diff --git a/documentation/mega-manual/figures/yp-download.png b/documentation/mega-manual/figures/yp-download.png
new file mode 100644
index 0000000..7f1e5ca
--- /dev/null
+++ b/documentation/mega-manual/figures/yp-download.png
Binary files differ
diff --git a/documentation/mega-manual/mega-manual-customization.xsl b/documentation/mega-manual/mega-manual-customization.xsl
new file mode 100644
index 0000000..3be182d
--- /dev/null
+++ b/documentation/mega-manual/mega-manual-customization.xsl
@@ -0,0 +1,8 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
5
6 <xsl:param name="generate.toc" select="'chapter toc'"></xsl:param>
7
8</xsl:stylesheet>
diff --git a/documentation/mega-manual/mega-manual.xml b/documentation/mega-manual/mega-manual.xml
new file mode 100644
index 0000000..01af789
--- /dev/null
+++ b/documentation/mega-manual/mega-manual.xml
@@ -0,0 +1,53 @@
1<!DOCTYPE book 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
6<book id='mega-manual' lang='en'
7 xmlns:xi="http://www.w3.org/2003/XInclude"
8 xmlns="http://docbook.org/ns/docbook"
9 >
10
11 <xi:include
12 xmlns:xi="http://www.w3.org/2003/XInclude" href="../yocto-project-qs/yocto-project-qs.xml"/>
13
14<para><imagedata fileref="figures/dev-title.png" width="100%" align="left" scalefit="1" /></para>
15
16 <xi:include
17 xmlns:xi="http://www.w3.org/2003/XInclude" href="../dev-manual/dev-manual.xml"/>
18
19<para><imagedata fileref="figures/adt-title.png" width="100%" align="left" scalefit="1" /></para>
20
21 <xi:include
22 xmlns:xi="http://www.w3.org/2003/XInclude" href="../adt-manual/adt-manual.xml"/>
23
24<para><imagedata fileref="figures/bsp-title.png" width="100%" align="left" scalefit="1" /></para>
25
26 <xi:include
27 xmlns:xi="http://www.w3.org/2003/XInclude" href="../bsp-guide/bsp-guide.xml"/>
28
29<para><imagedata fileref="figures/kernel-dev-title.png" width="100%" align="left" scalefit="1" /></para>
30
31 <xi:include
32 xmlns:xi="http://www.w3.org/2003/XInclude" href="../kernel-dev/kernel-dev.xml"/>
33
34<para><imagedata fileref="figures/profile-title.png" width="100%" align="left" scalefit="1" /></para>
35
36 <xi:include
37 xmlns:xi="http://www.w3.org/2003/XInclude" href="../profile-manual/profile-manual.xml"/>
38
39<para><imagedata fileref="figures/poky-title.png" width="100%" align="left" scalefit="1" /></para>
40
41 <xi:include
42 xmlns:xi="http://www.w3.org/2003/XInclude" href="../ref-manual/ref-manual.xml"/>
43
44<!-- <index id='index'>
45 <title>Index</title>
46 </index>
47-->
48
49</book>
50
51<!--
52vim: expandtab tw=80 ts=4
53-->
diff --git a/documentation/mega-manual/mega-style.css b/documentation/mega-manual/mega-style.css
new file mode 100644
index 0000000..a97d691
--- /dev/null
+++ b/documentation/mega-manual/mega-style.css
@@ -0,0 +1,979 @@
1/*
2 Generic XHTML / DocBook XHTML CSS Stylesheet.
3
4 Browser wrangling and typographic design by
5 Oyvind Kolas / pippin@gimp.org
6
7 Customised for Poky by
8 Matthew Allum / mallum@o-hand.com
9
10 Thanks to:
11 Liam R. E. Quin
12 William Skaggs
13 Jakub Steiner
14
15 Structure
16 ---------
17
18 The stylesheet is divided into the following sections:
19
20 Positioning
21 Margins, paddings, width, font-size, clearing.
22 Decorations
23 Borders, style
24 Colors
25 Colors
26 Graphics
27 Graphical backgrounds
28 Nasty IE tweaks
29 Workarounds needed to make it work in internet explorer,
30 currently makes the stylesheet non validating, but up until
31 this point it is validating.
32 Mozilla extensions
33 Transparency for footer
34 Rounded corners on boxes
35
36*/
37
38
39 /*************** /
40 / Positioning /
41/ ***************/
42
43body {
44 font-family: Verdana, Sans, sans-serif;
45
46 min-width: 640px;
47 width: 80%;
48 margin: 0em auto;
49 padding: 2em 5em 5em 5em;
50 color: #333;
51}
52
53h1,h2,h3,h4,h5,h6,h7 {
54 font-family: Arial, Sans;
55 color: #00557D;
56 clear: both;
57}
58
59h1 {
60 font-size: 2em;
61 text-align: left;
62 padding: 0em 0em 0em 0em;
63 margin: 2em 0em 0em 0em;
64}
65
66h2.subtitle {
67 margin: 0.10em 0em 3.0em 0em;
68 padding: 0em 0em 0em 0em;
69 font-size: 1.8em;
70 padding-left: 20%;
71 font-weight: normal;
72 font-style: italic;
73}
74
75h2 {
76 margin: 2em 0em 0.66em 0em;
77 padding: 0.5em 0em 0em 0em;
78 font-size: 1.5em;
79 font-weight: bold;
80}
81
82h3.subtitle {
83 margin: 0em 0em 1em 0em;
84 padding: 0em 0em 0em 0em;
85 font-size: 142.14%;
86 text-align: right;
87}
88
89h3 {
90 margin: 1em 0em 0.5em 0em;
91 padding: 1em 0em 0em 0em;
92 font-size: 140%;
93 font-weight: bold;
94}
95
96h4 {
97 margin: 1em 0em 0.5em 0em;
98 padding: 1em 0em 0em 0em;
99 font-size: 120%;
100 font-weight: bold;
101}
102
103h5 {
104 margin: 1em 0em 0.5em 0em;
105 padding: 1em 0em 0em 0em;
106 font-size: 110%;
107 font-weight: bold;
108}
109
110h6 {
111 margin: 1em 0em 0em 0em;
112 padding: 1em 0em 0em 0em;
113 font-size: 110%;
114 font-weight: bold;
115}
116
117.authorgroup {
118 background-color: transparent;
119 background-repeat: no-repeat;
120 padding-top: 256px;
121 background-image: url("../figures/yocto-project-bw.png");
122 background-position: top;
123 margin-top: -256px;
124 padding-right: 50px;
125 margin-left: 50px;
126 text-align: center;
127 width: 600px;
128}
129
130h3.author {
131 margin: 0em 0em 0em 0em;
132 padding: 0em 0em 0em 0em;
133 font-weight: normal;
134 font-size: 100%;
135 color: #333;
136 clear: both;
137}
138
139.author tt.email {
140 font-size: 66%;
141}
142
143.titlepage hr {
144 width: 0em;
145 clear: both;
146}
147
148.revhistory {
149 padding-top: 2em;
150 clear: both;
151}
152
153.toc,
154.list-of-tables,
155.list-of-examples,
156.list-of-figures {
157 padding: 1.33em 0em 2.5em 0em;
158 color: #00557D;
159}
160
161.toc p,
162.list-of-tables p,
163.list-of-figures p,
164.list-of-examples p {
165 padding: 0em 0em 0em 0em;
166 padding: 0em 0em 0.3em;
167 margin: 1.5em 0em 0em 0em;
168}
169
170.toc p b,
171.list-of-tables p b,
172.list-of-figures p b,
173.list-of-examples p b{
174 font-size: 100.0%;
175 font-weight: bold;
176}
177
178.toc dl,
179.list-of-tables dl,
180.list-of-figures dl,
181.list-of-examples dl {
182 margin: 0em 0em 0.5em 0em;
183 padding: 0em 0em 0em 0em;
184}
185
186.toc dt {
187 margin: 0em 0em 0em 0em;
188 padding: 0em 0em 0em 0em;
189}
190
191.toc dd {
192 margin: 0em 0em 0em 2.6em;
193 padding: 0em 0em 0em 0em;
194}
195
196div.glossary dl,
197div.variablelist dl {
198}
199
200.glossary dl dt,
201.variablelist dl dt,
202.variablelist dl dt span.term {
203 font-weight: normal;
204 width: 20em;
205 text-align: right;
206}
207
208.variablelist dl dt {
209 margin-top: 0.5em;
210}
211
212.glossary dl dd,
213.variablelist dl dd {
214 margin-top: -1em;
215 margin-left: 25.5em;
216}
217
218.glossary dd p,
219.variablelist dd p {
220 margin-top: 0em;
221 margin-bottom: 1em;
222}
223
224
225div.calloutlist table td {
226 padding: 0em 0em 0em 0em;
227 margin: 0em 0em 0em 0em;
228}
229
230div.calloutlist table td p {
231 margin-top: 0em;
232 margin-bottom: 1em;
233}
234
235div p.copyright {
236 text-align: left;
237}
238
239div.legalnotice p.legalnotice-title {
240 margin-bottom: 0em;
241}
242
243p {
244 line-height: 1.5em;
245 margin-top: 0em;
246
247}
248
249dl {
250 padding-top: 0em;
251}
252
253hr {
254 border: solid 1px;
255}
256
257
258.mediaobject,
259.mediaobjectco {
260 text-align: center;
261}
262
263img {
264 border: none;
265}
266
267ul {
268 padding: 0em 0em 0em 1.5em;
269}
270
271ul li {
272 padding: 0em 0em 0em 0em;
273}
274
275ul li p {
276 text-align: left;
277}
278
279table {
280 width :100%;
281}
282
283th {
284 padding: 0.25em;
285 text-align: left;
286 font-weight: normal;
287 vertical-align: top;
288}
289
290td {
291 padding: 0.25em;
292 vertical-align: top;
293}
294
295p a[id] {
296 margin: 0px;
297 padding: 0px;
298 display: inline;
299 background-image: none;
300}
301
302a {
303 text-decoration: underline;
304 color: #444;
305}
306
307pre {
308 overflow: auto;
309}
310
311a:hover {
312 text-decoration: underline;
313 /*font-weight: bold;*/
314}
315
316
317div.informalfigure,
318div.informalexample,
319div.informaltable,
320div.figure,
321div.table,
322div.example {
323 margin: 1em 0em;
324 padding: 1em;
325 page-break-inside: avoid;
326}
327
328
329div.informalfigure p.title b,
330div.informalexample p.title b,
331div.informaltable p.title b,
332div.figure p.title b,
333div.example p.title b,
334div.table p.title b{
335 padding-top: 0em;
336 margin-top: 0em;
337 font-size: 100%;
338 font-weight: normal;
339}
340
341.mediaobject .caption,
342.mediaobject .caption p {
343 text-align: center;
344 font-size: 80%;
345 padding-top: 0.5em;
346 padding-bottom: 0.5em;
347}
348
349.epigraph {
350 padding-left: 55%;
351 margin-bottom: 1em;
352}
353
354.epigraph p {
355 text-align: left;
356}
357
358.epigraph .quote {
359 font-style: italic;
360}
361.epigraph .attribution {
362 font-style: normal;
363 text-align: right;
364}
365
366span.application {
367 font-style: italic;
368}
369
370.programlisting {
371 font-family: monospace;
372 font-size: 80%;
373 white-space: pre;
374 margin: 1.33em 0em;
375 padding: 1.33em;
376}
377
378.tip,
379.warning,
380.caution,
381.note {
382 margin-top: 1em;
383 margin-bottom: 1em;
384
385}
386
387/* force full width of table within div */
388.tip table,
389.warning table,
390.caution table,
391.note table {
392 border: none;
393 width: 100%;
394}
395
396
397.tip table th,
398.warning table th,
399.caution table th,
400.note table th {
401 padding: 0.8em 0.0em 0.0em 0.0em;
402 margin : 0em 0em 0em 0em;
403}
404
405.tip p,
406.warning p,
407.caution p,
408.note p {
409 margin-top: 0.5em;
410 margin-bottom: 0.5em;
411 padding-right: 1em;
412 text-align: left;
413}
414
415.acronym {
416 text-transform: uppercase;
417}
418
419b.keycap,
420.keycap {
421 padding: 0.09em 0.3em;
422 margin: 0em;
423}
424
425.itemizedlist li {
426 clear: none;
427}
428
429.filename {
430 font-size: medium;
431 font-family: Courier, monospace;
432}
433
434
435div.navheader, div.heading{
436 position: absolute;
437 left: 0em;
438 top: 0em;
439 width: 100%;
440 background-color: #cdf;
441 width: 100%;
442}
443
444div.navfooter, div.footing{
445 position: fixed;
446 left: 0em;
447 bottom: 0em;
448 background-color: #eee;
449 width: 100%;
450}
451
452
453div.navheader td,
454div.navfooter td {
455 font-size: 66%;
456}
457
458div.navheader table th {
459 /*font-family: Georgia, Times, serif;*/
460 /*font-size: x-large;*/
461 font-size: 80%;
462}
463
464div.navheader table {
465 border-left: 0em;
466 border-right: 0em;
467 border-top: 0em;
468 width: 100%;
469}
470
471div.navfooter table {
472 border-left: 0em;
473 border-right: 0em;
474 border-bottom: 0em;
475 width: 100%;
476}
477
478div.navheader table td a,
479div.navfooter table td a {
480 color: #777;
481 text-decoration: none;
482}
483
484/* normal text in the footer */
485div.navfooter table td {
486 color: black;
487}
488
489div.navheader table td a:visited,
490div.navfooter table td a:visited {
491 color: #444;
492}
493
494
495/* links in header and footer */
496div.navheader table td a:hover,
497div.navfooter table td a:hover {
498 text-decoration: underline;
499 background-color: transparent;
500 color: #33a;
501}
502
503div.navheader hr,
504div.navfooter hr {
505 display: none;
506}
507
508
509.qandaset tr.question td p {
510 margin: 0em 0em 1em 0em;
511 padding: 0em 0em 0em 0em;
512}
513
514.qandaset tr.answer td p {
515 margin: 0em 0em 1em 0em;
516 padding: 0em 0em 0em 0em;
517}
518.answer td {
519 padding-bottom: 1.5em;
520}
521
522.emphasis {
523 font-weight: bold;
524}
525
526
527 /************* /
528 / decorations /
529/ *************/
530
531.titlepage {
532}
533
534.part .title {
535}
536
537.subtitle {
538 border: none;
539}
540
541/*
542h1 {
543 border: none;
544}
545
546h2 {
547 border-top: solid 0.2em;
548 border-bottom: solid 0.06em;
549}
550
551h3 {
552 border-top: 0em;
553 border-bottom: solid 0.06em;
554}
555
556h4 {
557 border: 0em;
558 border-bottom: solid 0.06em;
559}
560
561h5 {
562 border: 0em;
563}
564*/
565
566.programlisting {
567 border: solid 1px;
568}
569
570div.figure,
571div.table,
572div.informalfigure,
573div.informaltable,
574div.informalexample,
575div.example {
576 border: 1px solid;
577}
578
579
580
581.tip,
582.warning,
583.caution,
584.note {
585 border: 1px solid;
586}
587
588.tip table th,
589.warning table th,
590.caution table th,
591.note table th {
592 border-bottom: 1px solid;
593}
594
595.question td {
596 border-top: 1px solid black;
597}
598
599.answer {
600}
601
602
603b.keycap,
604.keycap {
605 border: 1px solid;
606}
607
608
609div.navheader, div.heading{
610 border-bottom: 1px solid;
611}
612
613
614div.navfooter, div.footing{
615 border-top: 1px solid;
616}
617
618 /********* /
619 / colors /
620/ *********/
621
622body {
623 color: #333;
624 background: white;
625}
626
627a {
628 background: transparent;
629}
630
631a:hover {
632 background-color: #dedede;
633}
634
635
636h1,
637h2,
638h3,
639h4,
640h5,
641h6,
642h7,
643h8 {
644 background-color: transparent;
645}
646
647hr {
648 border-color: #aaa;
649}
650
651
652.tip, .warning, .caution, .note {
653 border-color: #fff;
654}
655
656
657.tip table th,
658.warning table th,
659.caution table th,
660.note table th {
661 border-bottom-color: #fff;
662}
663
664
665.warning {
666 background-color: #f0f0f2;
667}
668
669.caution {
670 background-color: #f0f0f2;
671}
672
673.tip {
674 background-color: #f0f0f2;
675}
676
677.note {
678 background-color: #f0f0f2;
679}
680
681.glossary dl dt,
682.variablelist dl dt,
683.variablelist dl dt span.term {
684 color: #044;
685}
686
687div.figure,
688div.table,
689div.example,
690div.informalfigure,
691div.informaltable,
692div.informalexample {
693 border-color: #aaa;
694}
695
696pre.programlisting {
697 color: black;
698 background-color: #fff;
699 border-color: #aaa;
700 border-width: 2px;
701}
702
703.guimenu,
704.guilabel,
705.guimenuitem {
706 background-color: #eee;
707}
708
709
710b.keycap,
711.keycap {
712 background-color: #eee;
713 border-color: #999;
714}
715
716
717div.navheader {
718 border-color: black;
719}
720
721
722div.navfooter {
723 border-color: black;
724}
725
726
727 /*********** /
728 / graphics /
729/ ***********/
730
731/*
732body {
733 background-image: url("images/body_bg.jpg");
734 background-attachment: fixed;
735}
736
737.navheader,
738.note,
739.tip {
740 background-image: url("images/note_bg.jpg");
741 background-attachment: fixed;
742}
743
744.warning,
745.caution {
746 background-image: url("images/warning_bg.jpg");
747 background-attachment: fixed;
748}
749
750.figure,
751.informalfigure,
752.example,
753.informalexample,
754.table,
755.informaltable {
756 background-image: url("images/figure_bg.jpg");
757 background-attachment: fixed;
758}
759
760*/
761h1,
762h2,
763h3,
764h4,
765h5,
766h6,
767h7{
768}
769
770/*
771Example of how to stick an image as part of the title.
772
773div.article .titlepage .title
774{
775 background-image: url("figures/white-on-black.png");
776 background-position: center;
777 background-repeat: repeat-x;
778}
779*/
780
781div.preface .titlepage .title,
782div.colophon .title,
783div.chapter .titlepage .title,
784div.article .titlepage .title
785{
786}
787
788div.section div.section .titlepage .title,
789div.sect2 .titlepage .title {
790 background: none;
791}
792
793
794h1.title {
795 background-color: transparent;
796 background-image: url("figures/yocto-project-bw.png");
797 background-repeat: no-repeat;
798 height: 256px;
799 text-indent: -9000px;
800 overflow:hidden;
801}
802
803h2.subtitle {
804 background-color: transparent;
805 text-indent: -9000px;
806 overflow:hidden;
807 width: 0px;
808 display: none;
809}
810
811 /*************************************** /
812 / pippin.gimp.org specific alterations /
813/ ***************************************/
814
815/*
816div.heading, div.navheader {
817 color: #777;
818 font-size: 80%;
819 padding: 0;
820 margin: 0;
821 text-align: left;
822 position: absolute;
823 top: 0px;
824 left: 0px;
825 width: 100%;
826 height: 50px;
827 background: url('/gfx/heading_bg.png') transparent;
828 background-repeat: repeat-x;
829 background-attachment: fixed;
830 border: none;
831}
832
833div.heading a {
834 color: #444;
835}
836
837div.footing, div.navfooter {
838 border: none;
839 color: #ddd;
840 font-size: 80%;
841 text-align:right;
842
843 width: 100%;
844 padding-top: 10px;
845 position: absolute;
846 bottom: 0px;
847 left: 0px;
848
849 background: url('/gfx/footing_bg.png') transparent;
850}
851*/
852
853
854
855 /****************** /
856 / nasty ie tweaks /
857/ ******************/
858
859/*
860div.heading, div.navheader {
861 width:expression(document.body.clientWidth + "px");
862}
863
864div.footing, div.navfooter {
865 width:expression(document.body.clientWidth + "px");
866 margin-left:expression("-5em");
867}
868body {
869 padding:expression("4em 5em 0em 5em");
870}
871*/
872
873 /**************************************** /
874 / mozilla vendor specific css extensions /
875/ ****************************************/
876/*
877div.navfooter, div.footing{
878 -moz-opacity: 0.8em;
879}
880
881div.figure,
882div.table,
883div.informalfigure,
884div.informaltable,
885div.informalexample,
886div.example,
887.tip,
888.warning,
889.caution,
890.note {
891 -moz-border-radius: 0.5em;
892}
893
894b.keycap,
895.keycap {
896 -moz-border-radius: 0.3em;
897}
898*/
899
900table tr td table tr td {
901 display: none;
902}
903
904
905hr {
906 display: none;
907}
908
909table {
910 border: 0em;
911}
912
913 .photo {
914 float: right;
915 margin-left: 1.5em;
916 margin-bottom: 1.5em;
917 margin-top: 0em;
918 max-width: 17em;
919 border: 1px solid gray;
920 padding: 3px;
921 background: white;
922}
923 .seperator {
924 padding-top: 2em;
925 clear: both;
926 }
927
928 #validators {
929 margin-top: 5em;
930 text-align: right;
931 color: #777;
932 }
933 @media print {
934 body {
935 font-size: 8pt;
936 }
937 .noprint {
938 display: none;
939 }
940 }
941
942
943.tip,
944.note {
945 background: #f0f0f2;
946 color: #333;
947 padding: 20px;
948 margin: 20px;
949}
950
951.tip h3,
952.note h3 {
953 padding: 0em;
954 margin: 0em;
955 font-size: 2em;
956 font-weight: bold;
957 color: #333;
958}
959
960.tip a,
961.note a {
962 color: #333;
963 text-decoration: underline;
964}
965
966.footnote {
967 font-size: small;
968 color: #333;
969}
970
971/* Changes the announcement text */
972.tip h3,
973.warning h3,
974.caution h3,
975.note h3 {
976 font-size:large;
977 color: #00557D;
978}
979
diff --git a/documentation/poky.ent b/documentation/poky.ent
new file mode 100644
index 0000000..3ce13dd
--- /dev/null
+++ b/documentation/poky.ent
@@ -0,0 +1,65 @@
1<!ENTITY DISTRO "1.5.1">
2<!ENTITY DISTRO_COMPRESSED "151">
3<!ENTITY DISTRO_NAME "dora">
4<!ENTITY YOCTO_DOC_VERSION "1.5.1">
5<!ENTITY POKYVERSION "10.0.1">
6<!ENTITY POKYVERSION_COMPRESSED "1001">
7<!ENTITY YOCTO_POKY "poky-&DISTRO_NAME;-&POKYVERSION;">
8<!ENTITY COPYRIGHT_YEAR "2010-2014">
9<!ENTITY YOCTO_DL_URL "http://downloads.yoctoproject.org">
10<!ENTITY YOCTO_HOME_URL "http://www.yoctoproject.org">
11<!ENTITY YOCTO_LISTS_URL "http://lists.yoctoproject.org">
12<!ENTITY YOCTO_BUGZILLA_URL "http://bugzilla.yoctoproject.org">
13<!ENTITY YOCTO_WIKI_URL "https://wiki.yoctoproject.org">
14<!ENTITY YOCTO_AB_URL "http://autobuilder.yoctoproject.org">
15<!ENTITY YOCTO_GIT_URL "http://git.yoctoproject.org">
16<!ENTITY YOCTO_ADTREPO_URL "http://adtrepo.yoctoproject.org">
17<!ENTITY YOCTO_RELEASE_NOTES "&YOCTO_HOME_URL;/download/yocto-project-&DISTRO_COMPRESSED;-poky-&POKYVERSION_COMPRESSED;">
18<!ENTITY OE_HOME_URL "http://www.openembedded.org">
19<!ENTITY OE_LISTS_URL "http://lists.linuxtogo.org/cgi-bin/mailman">
20<!ENTITY OE_DOCS_URL "http://docs.openembedded.org">
21<!ENTITY OH_HOME_URL "http://o-hand.com">
22<!ENTITY BITBAKE_HOME_URL "http://developer.berlios.de/projects/bitbake/">
23<!ENTITY ECLIPSE_MAIN_URL "http://www.eclipse.org/downloads">
24<!ENTITY ECLIPSE_DL_URL "http://download.eclipse.org">
25<!ENTITY ECLIPSE_DL_PLUGIN_URL "&YOCTO_DL_URL;/releases/eclipse-plugin/&DISTRO;">
26<!ENTITY ECLIPSE_UPDATES_URL "&ECLIPSE_DL_URL;/tm/updates/3.3">
27<!ENTITY ECLIPSE_INDIGO_URL "&ECLIPSE_DL_URL;/releases/indigo">
28<!ENTITY ECLIPSE_JUNO_URL "&ECLIPSE_DL_URL;/releases/juno">
29<!ENTITY ECLIPSE_KEPLER_URL "&ECLIPSE_DL_URL;/releases/kepler">
30<!ENTITY ECLIPSE_INDIGO_CDT_URL "&ECLIPSE_DL_URL;tools/cdt/releases/indigo">
31<!ENTITY YOCTO_DOCS_URL "&YOCTO_HOME_URL;/docs">
32<!ENTITY YOCTO_SOURCES_URL "&YOCTO_HOME_URL;/sources/">
33<!ENTITY YOCTO_AB_PORT_URL "&YOCTO_AB_URL;:8010">
34<!ENTITY YOCTO_AB_NIGHTLY_URL "&YOCTO_AB_URL;/nightly/">
35<!ENTITY YOCTO_POKY_URL "&YOCTO_DL_URL;/releases/poky/">
36<!ENTITY YOCTO_RELEASE_DL_URL "&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;">
37<!ENTITY YOCTO_TOOLCHAIN_DL_URL "&YOCTO_RELEASE_DL_URL;/toolchain/">
38<!ENTITY YOCTO_ECLIPSE_DL_URL "&YOCTO_RELEASE_DL_URL;/eclipse-plugin/indigo;">
39<!ENTITY YOCTO_ADTINSTALLER_DL_URL "&YOCTO_RELEASE_DL_URL;/adt-installer">
40<!ENTITY YOCTO_POKY_DL_URL "&YOCTO_RELEASE_DL_URL;/&YOCTO_POKY;.tar.bz2">
41<!ENTITY YOCTO_MACHINES_DL_URL "&YOCTO_RELEASE_DL_URL;/machines">
42<!ENTITY YOCTO_QEMU_DL_URL "&YOCTO_MACHINES_DL_URL;/qemu">
43<!ENTITY YOCTO_PYTHON-i686_DL_URL "&YOCTO_DL_URL;/releases/miscsupport/python-nativesdk-standalone-i686.tar.bz2">
44<!ENTITY YOCTO_PYTHON-x86_64_DL_URL "&YOCTO_DL_URL;/releases/miscsupport/python-nativesdk-standalone-x86_64.tar.bz2">
45<!ENTITY YOCTO_DOCS_QS_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/yocto-project-qs/yocto-project-qs.html">
46<!ENTITY YOCTO_DOCS_ADT_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/adt-manual/adt-manual.html">
47<!ENTITY YOCTO_DOCS_REF_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/ref-manual/ref-manual.html">
48<!ENTITY YOCTO_DOCS_BSP_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/bsp-guide/bsp-guide.html">
49<!ENTITY YOCTO_DOCS_DEV_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/dev-manual/dev-manual.html">
50<!ENTITY YOCTO_DOCS_KERNEL_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/kernel-manual/kernel-manual.html">
51<!ENTITY YOCTO_DOCS_KERNEL_DEV_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/kernel-dev/kernel-dev.html">
52<!ENTITY YOCTO_DOCS_PROF_URL "&YOCTO_DOCS_URL;/&YOCTO_DOC_VERSION;/profile-manual/profile-manual.html">
53<!ENTITY YOCTO_ADTPATH_DIR "/opt/poky/&DISTRO;">
54<!ENTITY YOCTO_POKY_TARBALL "&YOCTO_POKY;.tar.bz2">
55<!ENTITY OE_INIT_PATH "&YOCTO_POKY;/oe-init-build-env">
56<!ENTITY OE_INIT_FILE "oe-init-build-env">
57<!ENTITY UBUNTU_HOST_PACKAGES_ESSENTIAL "gawk wget git-core diffstat unzip texinfo gcc-multilib \
58 build-essential chrpath">
59<!ENTITY FEDORA_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python unzip perl patch \
60 diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
61 ccache perl-Data-Dumper perl-Text-ParseWords">
62<!ENTITY OPENSUSE_HOST_PACKAGES_ESSENTIAL "python gcc gcc-c++ git chrpath make wget python-xml \
63 diffstat texinfo python-curses patch">
64<!ENTITY CENTOS_HOST_PACKAGES_ESSENTIAL "gawk make wget tar bzip2 gzip python unzip perl patch \
65 diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath">
diff --git a/documentation/profile-manual/figures/kernelshark-all.png b/documentation/profile-manual/figures/kernelshark-all.png
new file mode 100644
index 0000000..99b40ba
--- /dev/null
+++ b/documentation/profile-manual/figures/kernelshark-all.png
Binary files differ
diff --git a/documentation/profile-manual/figures/kernelshark-choose-events.png b/documentation/profile-manual/figures/kernelshark-choose-events.png
new file mode 100644
index 0000000..e8dd62a
--- /dev/null
+++ b/documentation/profile-manual/figures/kernelshark-choose-events.png
Binary files differ
diff --git a/documentation/profile-manual/figures/kernelshark-i915-display.png b/documentation/profile-manual/figures/kernelshark-i915-display.png
new file mode 100644
index 0000000..bb0edfb
--- /dev/null
+++ b/documentation/profile-manual/figures/kernelshark-i915-display.png
Binary files differ
diff --git a/documentation/profile-manual/figures/kernelshark-output-display.png b/documentation/profile-manual/figures/kernelshark-output-display.png
new file mode 100644
index 0000000..ae2d0e5
--- /dev/null
+++ b/documentation/profile-manual/figures/kernelshark-output-display.png
Binary files differ
diff --git a/documentation/profile-manual/figures/lttngmain0.png b/documentation/profile-manual/figures/lttngmain0.png
new file mode 100644
index 0000000..5f60113
--- /dev/null
+++ b/documentation/profile-manual/figures/lttngmain0.png
Binary files differ
diff --git a/documentation/profile-manual/figures/oprofileui-busybox.png b/documentation/profile-manual/figures/oprofileui-busybox.png
new file mode 100644
index 0000000..a8275c6
--- /dev/null
+++ b/documentation/profile-manual/figures/oprofileui-busybox.png
Binary files differ
diff --git a/documentation/profile-manual/figures/oprofileui-copy-to-user.png b/documentation/profile-manual/figures/oprofileui-copy-to-user.png
new file mode 100644
index 0000000..deb6470
--- /dev/null
+++ b/documentation/profile-manual/figures/oprofileui-copy-to-user.png
Binary files differ
diff --git a/documentation/profile-manual/figures/oprofileui-downloading.png b/documentation/profile-manual/figures/oprofileui-downloading.png
new file mode 100644
index 0000000..57742d6
--- /dev/null
+++ b/documentation/profile-manual/figures/oprofileui-downloading.png
Binary files differ
diff --git a/documentation/profile-manual/figures/oprofileui-processes.png b/documentation/profile-manual/figures/oprofileui-processes.png
new file mode 100644
index 0000000..ae54702
--- /dev/null
+++ b/documentation/profile-manual/figures/oprofileui-processes.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-probe-do_fork-profile.png b/documentation/profile-manual/figures/perf-probe-do_fork-profile.png
new file mode 100644
index 0000000..1a1070d
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-probe-do_fork-profile.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-report-cycles-u.png b/documentation/profile-manual/figures/perf-report-cycles-u.png
new file mode 100644
index 0000000..68ec6af
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-report-cycles-u.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-systemwide-libc.png b/documentation/profile-manual/figures/perf-systemwide-libc.png
new file mode 100644
index 0000000..2b72869
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-systemwide-libc.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-systemwide.png b/documentation/profile-manual/figures/perf-systemwide.png
new file mode 100644
index 0000000..12ce244
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-systemwide.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-wget-busybox-annotate-menu.png b/documentation/profile-manual/figures/perf-wget-busybox-annotate-menu.png
new file mode 100644
index 0000000..ceb34ea
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-wget-busybox-annotate-menu.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-wget-busybox-annotate-udhcpc.png b/documentation/profile-manual/figures/perf-wget-busybox-annotate-udhcpc.png
new file mode 100644
index 0000000..3581e9d
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-wget-busybox-annotate-udhcpc.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-wget-busybox-debuginfo.png b/documentation/profile-manual/figures/perf-wget-busybox-debuginfo.png
new file mode 100644
index 0000000..c317b49
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-wget-busybox-debuginfo.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-wget-busybox-dso-zoom-menu.png b/documentation/profile-manual/figures/perf-wget-busybox-dso-zoom-menu.png
new file mode 100644
index 0000000..1913c86
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-wget-busybox-dso-zoom-menu.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-wget-busybox-dso-zoom.png b/documentation/profile-manual/figures/perf-wget-busybox-dso-zoom.png
new file mode 100644
index 0000000..a1962c4
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-wget-busybox-dso-zoom.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-wget-busybox-expanded-stripped.png b/documentation/profile-manual/figures/perf-wget-busybox-expanded-stripped.png
new file mode 100644
index 0000000..b642d06
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-wget-busybox-expanded-stripped.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-wget-flat-stripped.png b/documentation/profile-manual/figures/perf-wget-flat-stripped.png
new file mode 100644
index 0000000..c8f395a
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-wget-flat-stripped.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.png b/documentation/profile-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.png
new file mode 100644
index 0000000..bb7c764
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-wget-g-copy-from-user-expanded-stripped.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.png b/documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.png
new file mode 100644
index 0000000..a799af5
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-debuginfo.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png b/documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png
new file mode 100644
index 0000000..e91808a
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-stripped-unresolved-hidden.png
Binary files differ
diff --git a/documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.png b/documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.png
new file mode 100644
index 0000000..812302d
--- /dev/null
+++ b/documentation/profile-manual/figures/perf-wget-g-copy-to-user-expanded-stripped.png
Binary files differ
diff --git a/documentation/profile-manual/figures/profile-title.png b/documentation/profile-manual/figures/profile-title.png
new file mode 100644
index 0000000..ce5c682
--- /dev/null
+++ b/documentation/profile-manual/figures/profile-title.png
Binary files differ
diff --git a/documentation/profile-manual/figures/pybootchartgui-linux-yocto.png b/documentation/profile-manual/figures/pybootchartgui-linux-yocto.png
new file mode 100644
index 0000000..2b6bfda
--- /dev/null
+++ b/documentation/profile-manual/figures/pybootchartgui-linux-yocto.png
Binary files differ
diff --git a/documentation/profile-manual/figures/pychart-linux-yocto-rpm-nostrip.png b/documentation/profile-manual/figures/pychart-linux-yocto-rpm-nostrip.png
new file mode 100644
index 0000000..444675c
--- /dev/null
+++ b/documentation/profile-manual/figures/pychart-linux-yocto-rpm-nostrip.png
Binary files differ
diff --git a/documentation/profile-manual/figures/pychart-linux-yocto-rpm.png b/documentation/profile-manual/figures/pychart-linux-yocto-rpm.png
new file mode 100644
index 0000000..8ee3535
--- /dev/null
+++ b/documentation/profile-manual/figures/pychart-linux-yocto-rpm.png
Binary files differ
diff --git a/documentation/profile-manual/figures/sched-wakeup-profile.png b/documentation/profile-manual/figures/sched-wakeup-profile.png
new file mode 100644
index 0000000..2f25811
--- /dev/null
+++ b/documentation/profile-manual/figures/sched-wakeup-profile.png
Binary files differ
diff --git a/documentation/profile-manual/figures/sysprof-callers.png b/documentation/profile-manual/figures/sysprof-callers.png
new file mode 100644
index 0000000..640c8d9
--- /dev/null
+++ b/documentation/profile-manual/figures/sysprof-callers.png
Binary files differ
diff --git a/documentation/profile-manual/figures/sysprof-copy-from-user.png b/documentation/profile-manual/figures/sysprof-copy-from-user.png
new file mode 100644
index 0000000..8d31427
--- /dev/null
+++ b/documentation/profile-manual/figures/sysprof-copy-from-user.png
Binary files differ
diff --git a/documentation/profile-manual/figures/sysprof-copy-to-user.png b/documentation/profile-manual/figures/sysprof-copy-to-user.png
new file mode 100644
index 0000000..7a5bab7
--- /dev/null
+++ b/documentation/profile-manual/figures/sysprof-copy-to-user.png
Binary files differ
diff --git a/documentation/profile-manual/profile-manual-arch.xml b/documentation/profile-manual/profile-manual-arch.xml
new file mode 100644
index 0000000..19d1155
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-arch.xml
@@ -0,0 +1,45 @@
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='profile-manual-arch'>
6
7<title>Overall Architecture of the Linux Tracing and Profiling Tools</title>
8
9<section id='architecture-of-the-tracing-and-profiling-tools'>
10 <title>Architecture of the Tracing and Profiling Tools</title>
11
12 <para>
13 It may seem surprising to see a section covering an 'overall architecture'
14 for what seems to be a random collection of tracing tools that together
15 make up the Linux tracing and profiling space.
16 The fact is, however, that in recent years this seemingly disparate
17 set of tools has started to converge on a 'core' set of underlying
18 mechanisms:
19 </para>
20
21 <para>
22 <itemizedlist>
23 <listitem>static tracepoints</listitem>
24 <listitem>dynamic tracepoints
25 <itemizedlist>
26 <listitem>kprobes</listitem>
27 <listitem>uprobes</listitem>
28 </itemizedlist>
29 </listitem>
30 <listitem>the perf_events subsystem</listitem>
31 <listitem>debugfs</listitem>
32 </itemizedlist>
33 </para>
34
35 <informalexample>
36 <emphasis>Tying it Together:</emphasis> Rather than enumerating here how each tool makes use of
37 these common mechanisms, textboxes like this will make note of the
38 specific usages in each tool as they come up in the course
39 of the text.
40 </informalexample>
41</section>
42</chapter>
43<!--
44vim: expandtab tw=80 ts=4
45-->
diff --git a/documentation/profile-manual/profile-manual-customization.xsl b/documentation/profile-manual/profile-manual-customization.xsl
new file mode 100644
index 0000000..ead52ee
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-customization.xsl
@@ -0,0 +1,11 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
5
6 <xsl:param name="html.stylesheet" select="'profile-manual-style.css'" />
7 <xsl:param name="chapter.autolabel" select="1" />
8 <xsl:param name="appendix.autolabel">A</xsl:param>
9 <xsl:param name="section.autolabel" select="1" />
10 <xsl:param name="section.label.includes.component.label" select="1" />
11</xsl:stylesheet>
diff --git a/documentation/profile-manual/profile-manual-eclipse-customization.xsl b/documentation/profile-manual/profile-manual-eclipse-customization.xsl
new file mode 100644
index 0000000..e4ff6e9
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-eclipse-customization.xsl
@@ -0,0 +1,27 @@
1<?xml version='1.0'?>
2<xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 version="1.0">
7
8 <xsl:import
9 href="http://docbook.sourceforge.net/release/xsl/current/eclipse/eclipse3.xsl" />
10
11 <xsl:param name="chunker.output.indent" select="'yes'"/>
12 <xsl:param name="chunk.quietly" select="1"/>
13 <xsl:param name="chunk.first.sections" select="1"/>
14 <xsl:param name="chunk.section.depth" select="10"/>
15 <xsl:param name="use.id.as.filename" select="1"/>
16 <xsl:param name="ulink.target" select="'_self'" />
17 <xsl:param name="base.dir" select="'html/profile-manual/'"/>
18 <xsl:param name="html.stylesheet" select="'../book.css'"/>
19 <xsl:param name="eclipse.manifest" select="0"/>
20 <xsl:param name="create.plugin.xml" select="0"/>
21 <xsl:param name="suppress.navigation" select="1"/>
22 <xsl:param name="generate.index" select="0"/>
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel">A</xsl:param>
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27</xsl:stylesheet>
diff --git a/documentation/profile-manual/profile-manual-examples.xml b/documentation/profile-manual/profile-manual-examples.xml
new file mode 100644
index 0000000..9630c6c
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-examples.xml
@@ -0,0 +1,39 @@
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='profile-manual-examples'>
6
7<title>Real-World Examples</title>
8
9<para>
10 This chapter contains real-world examples.
11</para>
12
13<section id='slow-write-speed-on-live-images'>
14 <title>Slow Write Speed on Live Images</title>
15
16 <para>
17 In one of our previous releases (denzil), users noticed that booting
18 off of a live image and writing to disk was noticeably slower.
19 This included the boot itself, especially the first one, since first
20 boots tend to do a significant amount of writing due to certain
21 post-install scripts.
22 </para>
23
24 <para>
25 The problem (and solution) was discovered by using the Yocto tracing
26 tools, in this case 'perf stat', 'perf script', 'perf record'
27 and 'perf report'.
28 </para>
29
30 <para>
31 See all the unvarnished details of how this bug was diagnosed and
32 solved here: Yocto Bug #3049
33 </para>
34</section>
35
36</chapter>
37<!--
38vim: expandtab tw=80 ts=4
39-->
diff --git a/documentation/profile-manual/profile-manual-intro.xml b/documentation/profile-manual/profile-manual-intro.xml
new file mode 100644
index 0000000..9ed807f
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-intro.xml
@@ -0,0 +1,102 @@
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='profile-manual-intro'>
6
7<title>Yocto Project Tracing and Profiling Manual</title>
8 <section id='intro'>
9 <title>Introduction</title>
10
11 <para>
12 Yocto bundles a number of tracing and profiling tools - this 'HOWTO'
13 describes their basic usage and shows by example how to make use
14 of them to examine application and system behavior.
15 </para>
16
17 <para>
18 The tools presented are for the most part completely open-ended and
19 have quite good and/or extensive documentation of their own which
20 can be used to solve just about any problem you might come across
21 in Linux.
22 Each section that describes a particular tool has links to that
23 tool's documentation and website.
24 </para>
25
26 <para>
27 The purpose of this 'HOWTO' is to present a set of common and
28 generally useful tracing and profiling idioms along with their
29 application (as appropriate) to each tool, in the context of a
30 general-purpose 'drill-down' methodology that can be applied
31 to solving a large number (90%?) of problems.
32 For help with more advanced usages and problems, please see
33 the documentation and/or websites listed for each tool.
34 </para>
35
36 <para>
37 The final section of this 'HOWTO' is a collection of real-world
38 examples which we'll be continually adding to as we solve more
39 problems using the tools - feel free to add your own examples
40 to the list!
41 </para>
42 </section>
43
44 <section id='profile-manual-general-setup'>
45 <title>General Setup</title>
46
47 <para>
48 Most of the tools are available only in 'sdk' images or in images
49 built after adding 'tools-profile' to your local.conf.
50 So, in order to be able to access all of the tools described here,
51 please first build and boot an 'sdk' image e.g.
52 <literallayout class='monospaced'>
53 $ bitbake core-image-sato-sdk
54 </literallayout>
55 or alternatively by adding 'tools-profile' to the
56 EXTRA_IMAGE_FEATURES line in your local.conf:
57 <literallayout class='monospaced'>
58 EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile"
59 </literallayout>
60 If you use the 'tools-profile' method, you don't need to build an
61 sdk image - the tracing and profiling tools will be included in
62 non-sdk images as well e.g.:
63 <literallayout class='monospaced'>
64 $ bitbake core-image-sato
65 </literallayout>
66 <note><para>
67 By default, the Yocto build system strips symbols from the
68 binaries it packages, which makes it difficult to use some
69 of the tools.
70 </para><para>You can prevent that by putting the following
71 in your local.conf when you build the image:
72 </para>
73 </note>
74 <literallayout class='monospaced'>
75 INHIBIT_PACKAGE_STRIP = "1"
76 </literallayout>
77 The above setting will noticeably increase the size of your image.
78 </para>
79
80 <para>
81 If you've already build a stripped image, you can generate
82 debug packages (xxx-dbg) which you can manually install as
83 needed.
84 </para>
85
86 <para>
87 To generate debug info for packages, you can add dbg-pkgs to
88 EXTRA_IMAGE_FEATURES in local.conf. For example:
89 <literallayout class='monospaced'>
90 EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs"
91 </literallayout>
92 Additionally, in order to generate the right type of
93 debuginfo, we also need to add the following to local.conf:
94 <literallayout class='monospaced'>
95 PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
96 </literallayout>
97 </para>
98 </section>
99</chapter>
100<!--
101vim: expandtab tw=80 ts=4
102-->
diff --git a/documentation/profile-manual/profile-manual-style.css b/documentation/profile-manual/profile-manual-style.css
new file mode 100644
index 0000000..7b1b342
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-style.css
@@ -0,0 +1,978 @@
1/*
2 Generic XHTML / DocBook XHTML CSS Stylesheet.
3
4 Browser wrangling and typographic design by
5 Oyvind Kolas / pippin@gimp.org
6
7 Customised for Poky by
8 Matthew Allum / mallum@o-hand.com
9
10 Thanks to:
11 Liam R. E. Quin
12 William Skaggs
13 Jakub Steiner
14
15 Structure
16 ---------
17
18 The stylesheet is divided into the following sections:
19
20 Positioning
21 Margins, paddings, width, font-size, clearing.
22 Decorations
23 Borders, style
24 Colors
25 Colors
26 Graphics
27 Graphical backgrounds
28 Nasty IE tweaks
29 Workarounds needed to make it work in internet explorer,
30 currently makes the stylesheet non validating, but up until
31 this point it is validating.
32 Mozilla extensions
33 Transparency for footer
34 Rounded corners on boxes
35
36*/
37
38
39 /*************** /
40 / Positioning /
41/ ***************/
42
43body {
44 font-family: Verdana, Sans, sans-serif;
45
46 min-width: 640px;
47 width: 80%;
48 margin: 0em auto;
49 padding: 2em 5em 5em 5em;
50 color: #333;
51}
52
53h1,h2,h3,h4,h5,h6,h7 {
54 font-family: Arial, Sans;
55 color: #00557D;
56 clear: both;
57}
58
59h1 {
60 font-size: 2em;
61 text-align: left;
62 padding: 0em 0em 0em 0em;
63 margin: 2em 0em 0em 0em;
64}
65
66h2.subtitle {
67 margin: 0.10em 0em 3.0em 0em;
68 padding: 0em 0em 0em 0em;
69 font-size: 1.8em;
70 padding-left: 20%;
71 font-weight: normal;
72 font-style: italic;
73}
74
75h2 {
76 margin: 2em 0em 0.66em 0em;
77 padding: 0.5em 0em 0em 0em;
78 font-size: 1.5em;
79 font-weight: bold;
80}
81
82h3.subtitle {
83 margin: 0em 0em 1em 0em;
84 padding: 0em 0em 0em 0em;
85 font-size: 142.14%;
86 text-align: right;
87}
88
89h3 {
90 margin: 1em 0em 0.5em 0em;
91 padding: 1em 0em 0em 0em;
92 font-size: 140%;
93 font-weight: bold;
94}
95
96h4 {
97 margin: 1em 0em 0.5em 0em;
98 padding: 1em 0em 0em 0em;
99 font-size: 120%;
100 font-weight: bold;
101}
102
103h5 {
104 margin: 1em 0em 0.5em 0em;
105 padding: 1em 0em 0em 0em;
106 font-size: 110%;
107 font-weight: bold;
108}
109
110h6 {
111 margin: 1em 0em 0em 0em;
112 padding: 1em 0em 0em 0em;
113 font-size: 110%;
114 font-weight: bold;
115}
116
117.authorgroup {
118 background-color: transparent;
119 background-repeat: no-repeat;
120 padding-top: 256px;
121 background-image: url("figures/profile-title.png");
122 background-position: left top;
123 margin-top: -256px;
124 padding-right: 50px;
125 margin-left: 0px;
126 text-align: right;
127 width: 740px;
128}
129
130h3.author {
131 margin: 0em 0me 0em 0em;
132 padding: 0em 0em 0em 0em;
133 font-weight: normal;
134 font-size: 100%;
135 color: #333;
136 clear: both;
137}
138
139.author tt.email {
140 font-size: 66%;
141}
142
143.titlepage hr {
144 width: 0em;
145 clear: both;
146}
147
148.revhistory {
149 padding-top: 2em;
150 clear: both;
151}
152
153.toc,
154.list-of-tables,
155.list-of-examples,
156.list-of-figures {
157 padding: 1.33em 0em 2.5em 0em;
158 color: #00557D;
159}
160
161.toc p,
162.list-of-tables p,
163.list-of-figures p,
164.list-of-examples p {
165 padding: 0em 0em 0em 0em;
166 padding: 0em 0em 0.3em;
167 margin: 1.5em 0em 0em 0em;
168}
169
170.toc p b,
171.list-of-tables p b,
172.list-of-figures p b,
173.list-of-examples p b{
174 font-size: 100.0%;
175 font-weight: bold;
176}
177
178.toc dl,
179.list-of-tables dl,
180.list-of-figures dl,
181.list-of-examples dl {
182 margin: 0em 0em 0.5em 0em;
183 padding: 0em 0em 0em 0em;
184}
185
186.toc dt {
187 margin: 0em 0em 0em 0em;
188 padding: 0em 0em 0em 0em;
189}
190
191.toc dd {
192 margin: 0em 0em 0em 2.6em;
193 padding: 0em 0em 0em 0em;
194}
195
196div.glossary dl,
197div.variablelist dl {
198}
199
200.glossary dl dt,
201.variablelist dl dt,
202.variablelist dl dt span.term {
203 font-weight: normal;
204 width: 20em;
205 text-align: right;
206}
207
208.variablelist dl dt {
209 margin-top: 0.5em;
210}
211
212.glossary dl dd,
213.variablelist dl dd {
214 margin-top: -1em;
215 margin-left: 25.5em;
216}
217
218.glossary dd p,
219.variablelist dd p {
220 margin-top: 0em;
221 margin-bottom: 1em;
222}
223
224
225div.calloutlist table td {
226 padding: 0em 0em 0em 0em;
227 margin: 0em 0em 0em 0em;
228}
229
230div.calloutlist table td p {
231 margin-top: 0em;
232 margin-bottom: 1em;
233}
234
235div p.copyright {
236 text-align: left;
237}
238
239div.legalnotice p.legalnotice-title {
240 margin-bottom: 0em;
241}
242
243p {
244 line-height: 1.5em;
245 margin-top: 0em;
246
247}
248
249dl {
250 padding-top: 0em;
251}
252
253hr {
254 border: solid 1px;
255}
256
257
258.mediaobject,
259.mediaobjectco {
260 text-align: center;
261}
262
263img {
264 border: none;
265}
266
267ul {
268 padding: 0em 0em 0em 1.5em;
269}
270
271ul li {
272 padding: 0em 0em 0em 0em;
273}
274
275ul li p {
276 text-align: left;
277}
278
279table {
280 width :100%;
281}
282
283th {
284 padding: 0.25em;
285 text-align: left;
286 font-weight: normal;
287 vertical-align: top;
288}
289
290td {
291 padding: 0.25em;
292 vertical-align: top;
293}
294
295p a[id] {
296 margin: 0px;
297 padding: 0px;
298 display: inline;
299 background-image: none;
300}
301
302a {
303 text-decoration: underline;
304 color: #444;
305}
306
307pre {
308 overflow: auto;
309}
310
311a:hover {
312 text-decoration: underline;
313 /*font-weight: bold;*/
314}
315
316
317div.informalfigure,
318div.informalexample,
319div.informaltable,
320div.figure,
321div.table,
322div.example {
323 margin: 1em 0em;
324 padding: 1em;
325 page-break-inside: avoid;
326}
327
328
329div.informalfigure p.title b,
330div.informalexample p.title b,
331div.informaltable p.title b,
332div.figure p.title b,
333div.example p.title b,
334div.table p.title b{
335 padding-top: 0em;
336 margin-top: 0em;
337 font-size: 100%;
338 font-weight: normal;
339}
340
341.mediaobject .caption,
342.mediaobject .caption p {
343 text-align: center;
344 font-size: 80%;
345 padding-top: 0.5em;
346 padding-bottom: 0.5em;
347}
348
349.epigraph {
350 padding-left: 55%;
351 margin-bottom: 1em;
352}
353
354.epigraph p {
355 text-align: left;
356}
357
358.epigraph .quote {
359 font-style: italic;
360}
361.epigraph .attribution {
362 font-style: normal;
363 text-align: right;
364}
365
366span.application {
367 font-style: italic;
368}
369
370.programlisting {
371 font-family: monospace;
372 font-size: 80%;
373 white-space: pre;
374 margin: 1.33em 0em;
375 padding: 1.33em;
376}
377
378.tip,
379.warning,
380.caution,
381.note {
382 margin-top: 1em;
383 margin-bottom: 1em;
384
385}
386
387/* force full width of table within div */
388.tip table,
389.warning table,
390.caution table,
391.note table {
392 border: none;
393 width: 100%;
394}
395
396
397.tip table th,
398.warning table th,
399.caution table th,
400.note table th {
401 padding: 0.8em 0.0em 0.0em 0.0em;
402 margin : 0em 0em 0em 0em;
403}
404
405.tip p,
406.warning p,
407.caution p,
408.note p {
409 margin-top: 0.5em;
410 margin-bottom: 0.5em;
411 padding-right: 1em;
412 text-align: left;
413}
414
415.acronym {
416 text-transform: uppercase;
417}
418
419b.keycap,
420.keycap {
421 padding: 0.09em 0.3em;
422 margin: 0em;
423}
424
425.itemizedlist li {
426 clear: none;
427}
428
429.filename {
430 font-size: medium;
431 font-family: Courier, monospace;
432}
433
434
435div.navheader, div.heading{
436 position: absolute;
437 left: 0em;
438 top: 0em;
439 width: 100%;
440 background-color: #cdf;
441 width: 100%;
442}
443
444div.navfooter, div.footing{
445 position: fixed;
446 left: 0em;
447 bottom: 0em;
448 background-color: #eee;
449 width: 100%;
450}
451
452
453div.navheader td,
454div.navfooter td {
455 font-size: 66%;
456}
457
458div.navheader table th {
459 /*font-family: Georgia, Times, serif;*/
460 /*font-size: x-large;*/
461 font-size: 80%;
462}
463
464div.navheader table {
465 border-left: 0em;
466 border-right: 0em;
467 border-top: 0em;
468 width: 100%;
469}
470
471div.navfooter table {
472 border-left: 0em;
473 border-right: 0em;
474 border-bottom: 0em;
475 width: 100%;
476}
477
478div.navheader table td a,
479div.navfooter table td a {
480 color: #777;
481 text-decoration: none;
482}
483
484/* normal text in the footer */
485div.navfooter table td {
486 color: black;
487}
488
489div.navheader table td a:visited,
490div.navfooter table td a:visited {
491 color: #444;
492}
493
494
495/* links in header and footer */
496div.navheader table td a:hover,
497div.navfooter table td a:hover {
498 text-decoration: underline;
499 background-color: transparent;
500 color: #33a;
501}
502
503div.navheader hr,
504div.navfooter hr {
505 display: none;
506}
507
508
509.qandaset tr.question td p {
510 margin: 0em 0em 1em 0em;
511 padding: 0em 0em 0em 0em;
512}
513
514.qandaset tr.answer td p {
515 margin: 0em 0em 1em 0em;
516 padding: 0em 0em 0em 0em;
517}
518.answer td {
519 padding-bottom: 1.5em;
520}
521
522.emphasis {
523 font-weight: bold;
524}
525
526
527 /************* /
528 / decorations /
529/ *************/
530
531.titlepage {
532}
533
534.part .title {
535}
536
537.subtitle {
538 border: none;
539}
540
541/*
542h1 {
543 border: none;
544}
545
546h2 {
547 border-top: solid 0.2em;
548 border-bottom: solid 0.06em;
549}
550
551h3 {
552 border-top: 0em;
553 border-bottom: solid 0.06em;
554}
555
556h4 {
557 border: 0em;
558 border-bottom: solid 0.06em;
559}
560
561h5 {
562 border: 0em;
563}
564*/
565
566.programlisting {
567 border: solid 1px;
568}
569
570div.figure,
571div.table,
572div.informalfigure,
573div.informaltable,
574div.informalexample,
575div.example {
576 border: 1px solid;
577}
578
579
580
581.tip,
582.warning,
583.caution,
584.note {
585 border: 1px solid;
586}
587
588.tip table th,
589.warning table th,
590.caution table th,
591.note table th {
592 border-bottom: 1px solid;
593}
594
595.question td {
596 border-top: 1px solid black;
597}
598
599.answer {
600}
601
602
603b.keycap,
604.keycap {
605 border: 1px solid;
606}
607
608
609div.navheader, div.heading{
610 border-bottom: 1px solid;
611}
612
613
614div.navfooter, div.footing{
615 border-top: 1px solid;
616}
617
618 /********* /
619 / colors /
620/ *********/
621
622body {
623 color: #333;
624 background: white;
625}
626
627a {
628 background: transparent;
629}
630
631a:hover {
632 background-color: #dedede;
633}
634
635
636h1,
637h2,
638h3,
639h4,
640h5,
641h6,
642h7,
643h8 {
644 background-color: transparent;
645}
646
647hr {
648 border-color: #aaa;
649}
650
651
652.tip, .warning, .caution, .note {
653 border-color: #fff;
654}
655
656
657.tip table th,
658.warning table th,
659.caution table th,
660.note table th {
661 border-bottom-color: #fff;
662}
663
664
665.warning {
666 background-color: #f0f0f2;
667}
668
669.caution {
670 background-color: #f0f0f2;
671}
672
673.tip {
674 background-color: #f0f0f2;
675}
676
677.note {
678 background-color: #f0f0f2;
679}
680
681.glossary dl dt,
682.variablelist dl dt,
683.variablelist dl dt span.term {
684 color: #044;
685}
686
687div.figure,
688div.table,
689div.example,
690div.informalfigure,
691div.informaltable,
692div.informalexample {
693 border-color: #aaa;
694}
695
696pre.programlisting {
697 color: black;
698 background-color: #fff;
699 border-color: #aaa;
700 border-width: 2px;
701}
702
703.guimenu,
704.guilabel,
705.guimenuitem {
706 background-color: #eee;
707}
708
709
710b.keycap,
711.keycap {
712 background-color: #eee;
713 border-color: #999;
714}
715
716
717div.navheader {
718 border-color: black;
719}
720
721
722div.navfooter {
723 border-color: black;
724}
725
726
727 /*********** /
728 / graphics /
729/ ***********/
730
731/*
732body {
733 background-image: url("images/body_bg.jpg");
734 background-attachment: fixed;
735}
736
737.navheader,
738.note,
739.tip {
740 background-image: url("images/note_bg.jpg");
741 background-attachment: fixed;
742}
743
744.warning,
745.caution {
746 background-image: url("images/warning_bg.jpg");
747 background-attachment: fixed;
748}
749
750.figure,
751.informalfigure,
752.example,
753.informalexample,
754.table,
755.informaltable {
756 background-image: url("images/figure_bg.jpg");
757 background-attachment: fixed;
758}
759
760*/
761h1,
762h2,
763h3,
764h4,
765h5,
766h6,
767h7{
768}
769
770/*
771Example of how to stick an image as part of the title.
772
773div.article .titlepage .title
774{
775 background-image: url("figures/white-on-black.png");
776 background-position: center;
777 background-repeat: repeat-x;
778}
779*/
780
781div.preface .titlepage .title,
782div.colophon .title,
783div.chapter .titlepage .title,
784div.article .titlepage .title
785{
786}
787
788div.section div.section .titlepage .title,
789div.sect2 .titlepage .title {
790 background: none;
791}
792
793
794h1.title {
795 background-color: transparent;
796 background-image: url("figures/yocto-project-bw.png");
797 background-repeat: no-repeat;
798 height: 256px;
799 text-indent: -9000px;
800 overflow:hidden;
801}
802
803h2.subtitle {
804 background-color: transparent;
805 text-indent: -9000px;
806 overflow:hidden;
807 width: 0px;
808 display: none;
809}
810
811 /*************************************** /
812 / pippin.gimp.org specific alterations /
813/ ***************************************/
814
815/*
816div.heading, div.navheader {
817 color: #777;
818 font-size: 80%;
819 padding: 0;
820 margin: 0;
821 text-align: left;
822 position: absolute;
823 top: 0px;
824 left: 0px;
825 width: 100%;
826 height: 50px;
827 background: url('/gfx/heading_bg.png') transparent;
828 background-repeat: repeat-x;
829 background-attachment: fixed;
830 border: none;
831}
832
833div.heading a {
834 color: #444;
835}
836
837div.footing, div.navfooter {
838 border: none;
839 color: #ddd;
840 font-size: 80%;
841 text-align:right;
842
843 width: 100%;
844 padding-top: 10px;
845 position: absolute;
846 bottom: 0px;
847 left: 0px;
848
849 background: url('/gfx/footing_bg.png') transparent;
850}
851*/
852
853
854
855 /****************** /
856 / nasty ie tweaks /
857/ ******************/
858
859/*
860div.heading, div.navheader {
861 width:expression(document.body.clientWidth + "px");
862}
863
864div.footing, div.navfooter {
865 width:expression(document.body.clientWidth + "px");
866 margin-left:expression("-5em");
867}
868body {
869 padding:expression("4em 5em 0em 5em");
870}
871*/
872
873 /**************************************** /
874 / mozilla vendor specific css extensions /
875/ ****************************************/
876/*
877div.navfooter, div.footing{
878 -moz-opacity: 0.8em;
879}
880
881div.figure,
882div.table,
883div.informalfigure,
884div.informaltable,
885div.informalexample,
886div.example,
887.tip,
888.warning,
889.caution,
890.note {
891 -moz-border-radius: 0.5em;
892}
893
894b.keycap,
895.keycap {
896 -moz-border-radius: 0.3em;
897}
898*/
899
900table tr td table tr td {
901 display: none;
902}
903
904
905hr {
906 display: none;
907}
908
909table {
910 border: 0em;
911}
912
913 .photo {
914 float: right;
915 margin-left: 1.5em;
916 margin-bottom: 1.5em;
917 margin-top: 0em;
918 max-width: 17em;
919 border: 1px solid gray;
920 padding: 3px;
921 background: white;
922}
923 .seperator {
924 padding-top: 2em;
925 clear: both;
926 }
927
928 #validators {
929 margin-top: 5em;
930 text-align: right;
931 color: #777;
932 }
933 @media print {
934 body {
935 font-size: 8pt;
936 }
937 .noprint {
938 display: none;
939 }
940 }
941
942
943.tip,
944.note {
945 background: #f0f0f2;
946 color: #333;
947 padding: 20px;
948 margin: 20px;
949}
950
951.tip h3,
952.note h3 {
953 padding: 0em;
954 margin: 0em;
955 font-size: 2em;
956 font-weight: bold;
957 color: #333;
958}
959
960.tip a,
961.note a {
962 color: #333;
963 text-decoration: underline;
964}
965
966.footnote {
967 font-size: small;
968 color: #333;
969}
970
971/* Changes the announcement text */
972.tip h3,
973.warning h3,
974.caution h3,
975.note h3 {
976 font-size:large;
977 color: #00557D;
978}
diff --git a/documentation/profile-manual/profile-manual-usage.xml b/documentation/profile-manual/profile-manual-usage.xml
new file mode 100644
index 0000000..9116d5b
--- /dev/null
+++ b/documentation/profile-manual/profile-manual-usage.xml
@@ -0,0 +1,3684 @@
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='profile-manual-usage'>
6
7<title>Basic Usage (with examples) for each of the Yocto Tracing Tools</title>
8
9<para>
10 This chapter presents basic usage examples for each of the tracing
11 tools.
12</para>
13
14<section id='profile-manual-perf'>
15 <title>perf</title>
16
17 <para>
18 The 'perf' tool is the profiling and tracing tool that comes
19 bundled with the Linux kernel.
20 </para>
21
22 <para>
23 Don't let the fact that it's part of the kernel fool you into thinking
24 that it's only for tracing and profiling the kernel - you can indeed
25 use it to trace and profile just the kernel , but you can also use it
26 to profile specific applications separately (with or without kernel
27 context), and you can also use it to trace and profile the kernel
28 and all applications on the system simultaneously to gain a system-wide
29 view of what's going on.
30 </para>
31
32 <para>
33 In many ways, it aims to be a superset of all the tracing and profiling
34 tools available in Linux today, including all the other tools covered
35 in this HOWTO. The past couple of years have seen perf subsume a lot
36 of the functionality of those other tools, and at the same time those
37 other tools have removed large portions of their previous functionality
38 and replaced it with calls to the equivalent functionality now
39 implemented by the perf subsystem. Extrapolation suggests that at
40 some point those other tools will simply become completely redundant
41 and go away; until then, we'll cover those other tools in these pages
42 and in many cases show how the same things can be accomplished in
43 perf and the other tools when it seems useful to do so.
44 </para>
45
46 <para>
47 The coverage below details some of the most common ways you'll likely
48 want to apply the tool; full documentation can be found either within
49 the tool itself or in the man pages at
50 <ulink url='http://linux.die.net/man/1/perf'>perf(1)</ulink>.
51 </para>
52
53 <section id='perf-setup'>
54 <title>Setup</title>
55
56 <para>
57 For this section, we'll assume you've already performed the basic
58 setup outlined in the General Setup section.
59 </para>
60
61 <para>
62 In particular, you'll get the most mileage out of perf if you
63 profile an image built with INHIBIT_PACKAGE_STRIP = "1" in your
64 local.conf.
65 </para>
66
67 <para>
68 perf runs on the target system for the most part. You can archive
69 profile data and copy it to the host for analysis, but for the
70 rest of this document we assume you've ssh'ed to the host and
71 will be running the perf commands on the target.
72 </para>
73 </section>
74
75 <section id='perf-basic-usage'>
76 <title>Basic Usage</title>
77
78 <para>
79 The perf tool is pretty much self-documenting. To remind yourself
80 of the available commands, simply type 'perf', which will show you
81 basic usage along with the available perf subcommands:
82 <literallayout class='monospaced'>
83 root@crownbay:~# perf
84
85 usage: perf [--version] [--help] COMMAND [ARGS]
86
87 The most commonly used perf commands are:
88 annotate Read perf.data (created by perf record) and display annotated code
89 archive Create archive with object files with build-ids found in perf.data file
90 bench General framework for benchmark suites
91 buildid-cache Manage build-id cache.
92 buildid-list List the buildids in a perf.data file
93 diff Read two perf.data files and display the differential profile
94 evlist List the event names in a perf.data file
95 inject Filter to augment the events stream with additional information
96 kmem Tool to trace/measure kernel memory(slab) properties
97 kvm Tool to trace/measure kvm guest os
98 list List all symbolic event types
99 lock Analyze lock events
100 probe Define new dynamic tracepoints
101 record Run a command and record its profile into perf.data
102 report Read perf.data (created by perf record) and display the profile
103 sched Tool to trace/measure scheduler properties (latencies)
104 script Read perf.data (created by perf record) and display trace output
105 stat Run a command and gather performance counter statistics
106 test Runs sanity tests.
107 timechart Tool to visualize total system behavior during a workload
108 top System profiling tool.
109
110 See 'perf help COMMAND' for more information on a specific command.
111 </literallayout>
112 </para>
113
114 <section id='using-perf-to-do-basic-profiling'>
115 <title>Using perf to do Basic Profiling</title>
116
117 <para>
118 As a simple test case, we'll profile the 'wget' of a fairly large
119 file, which is a minimally interesting case because it has both
120 file and network I/O aspects, and at least in the case of standard
121 Yocto images, it's implemented as part of busybox, so the methods
122 we use to analyze it can be used in a very similar way to the whole
123 host of supported busybox applets in Yocto.
124 <literallayout class='monospaced'>
125 root@crownbay:~# rm linux-2.6.19.2.tar.bz2; \
126 wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
127 </literallayout>
128 The quickest and easiest way to get some basic overall data about
129 what's going on for a particular workload it to profile it using
130 'perf stat'. 'perf stat' basically profiles using a few default
131 counters and displays the summed counts at the end of the run:
132 <literallayout class='monospaced'>
133 root@crownbay:~# perf stat wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
134 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
135 linux-2.6.19.2.tar.b 100% |***************************************************| 41727k 0:00:00 ETA
136
137 Performance counter stats for 'wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>':
138
139 4597.223902 task-clock # 0.077 CPUs utilized
140 23568 context-switches # 0.005 M/sec
141 68 CPU-migrations # 0.015 K/sec
142 241 page-faults # 0.052 K/sec
143 3045817293 cycles # 0.663 GHz
144 &lt;not supported&gt; stalled-cycles-frontend
145 &lt;not supported&gt; stalled-cycles-backend
146 858909167 instructions # 0.28 insns per cycle
147 165441165 branches # 35.987 M/sec
148 19550329 branch-misses # 11.82% of all branches
149
150 59.836627620 seconds time elapsed
151 </literallayout>
152 Many times such a simple-minded test doesn't yield much of
153 interest, but sometimes it does (see Real-world Yocto bug
154 (slow loop-mounted write speed)).
155 </para>
156
157 <para>
158 Also, note that 'perf stat' isn't restricted to a fixed set of
159 counters - basically any event listed in the output of 'perf list'
160 can be tallied by 'perf stat'. For example, suppose we wanted to
161 see a summary of all the events related to kernel memory
162 allocation/freeing along with cache hits and misses:
163 <literallayout class='monospaced'>
164 root@crownbay:~# perf stat -e kmem:* -e cache-references -e cache-misses wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
165 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
166 linux-2.6.19.2.tar.b 100% |***************************************************| 41727k 0:00:00 ETA
167
168 Performance counter stats for 'wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>':
169
170 5566 kmem:kmalloc
171 125517 kmem:kmem_cache_alloc
172 0 kmem:kmalloc_node
173 0 kmem:kmem_cache_alloc_node
174 34401 kmem:kfree
175 69920 kmem:kmem_cache_free
176 133 kmem:mm_page_free
177 41 kmem:mm_page_free_batched
178 11502 kmem:mm_page_alloc
179 11375 kmem:mm_page_alloc_zone_locked
180 0 kmem:mm_page_pcpu_drain
181 0 kmem:mm_page_alloc_extfrag
182 66848602 cache-references
183 2917740 cache-misses # 4.365 % of all cache refs
184
185 44.831023415 seconds time elapsed
186 </literallayout>
187 So 'perf stat' gives us a nice easy way to get a quick overview of
188 what might be happening for a set of events, but normally we'd
189 need a little more detail in order to understand what's going on
190 in a way that we can act on in a useful way.
191 </para>
192
193 <para>
194 To dive down into a next level of detail, we can use 'perf
195 record'/'perf report' which will collect profiling data and
196 present it to use using an interactive text-based UI (or
197 simply as text if we specify --stdio to 'perf report').
198 </para>
199
200 <para>
201 As our first attempt at profiling this workload, we'll simply
202 run 'perf record', handing it the workload we want to profile
203 (everything after 'perf record' and any perf options we hand
204 it - here none - will be executedin a new shell). perf collects
205 samples until the process exits and records them in a file named
206 'perf.data' in the current working directory.
207 <literallayout class='monospaced'>
208 root@crownbay:~# perf record wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
209
210 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
211 linux-2.6.19.2.tar.b 100% |************************************************| 41727k 0:00:00 ETA
212 [ perf record: Woken up 1 times to write data ]
213 [ perf record: Captured and wrote 0.176 MB perf.data (~7700 samples) ]
214 </literallayout>
215 To see the results in a 'text-based UI' (tui), simply run
216 'perf report', which will read the perf.data file in the current
217 working directory and display the results in an interactive UI:
218 <literallayout class='monospaced'>
219 root@crownbay:~# perf report
220 </literallayout>
221 </para>
222
223 <para>
224 <imagedata fileref="figures/perf-wget-flat-stripped.png" width="6in" depth="7in" align="center" scalefit="1" />
225 </para>
226
227 <para>
228 The above screenshot displays a 'flat' profile, one entry for
229 each 'bucket' corresponding to the functions that were profiled
230 during the profiling run, ordered from the most popular to the
231 least (perf has options to sort in various orders and keys as
232 well as display entries only above a certain threshold and so
233 on - see the perf documentation for details). Note that this
234 includes both userspace functions (entries containing a [.]) and
235 kernel functions accounted to the process (entries containing
236 a [k]). (perf has command-line modifiers that can be used to
237 restrict the profiling to kernel or userspace, among others).
238 </para>
239
240 <para>
241 Notice also that the above report shows an entry for 'busybox',
242 which is the executable that implements 'wget' in Yocto, but that
243 instead of a useful function name in that entry, it displays
244 an not-so-friendly hex value instead. The steps below will show
245 how to fix that problem.
246 </para>
247
248 <para>
249 Before we do that, however, let's try running a different profile,
250 one which shows something a little more interesting. The only
251 difference between the new profile and the previous one is that
252 we'll add the -g option, which will record not just the address
253 of a sampled function, but the entire callchain to the sampled
254 function as well:
255 <literallayout class='monospaced'>
256 root@crownbay:~# perf record -g wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
257 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
258 linux-2.6.19.2.tar.b 100% |************************************************| 41727k 0:00:00 ETA
259 [ perf record: Woken up 3 times to write data ]
260 [ perf record: Captured and wrote 0.652 MB perf.data (~28476 samples) ]
261
262
263 root@crownbay:~# perf report
264 </literallayout>
265 </para>
266
267 <para>
268 <imagedata fileref="figures/perf-wget-g-copy-to-user-expanded-stripped.png" width="6in" depth="7in" align="center" scalefit="1" />
269 </para>
270
271 <para>
272 Using the callgraph view, we can actually see not only which
273 functions took the most time, but we can also see a summary of
274 how those functions were called and learn something about how the
275 program interacts with the kernel in the process.
276 </para>
277
278 <para>
279 Notice that each entry in the above screenshot now contains a '+'
280 on the left-hand side. This means that we can expand the entry and
281 drill down into the callchains that feed into that entry.
282 Pressing 'enter' on any one of them will expand the callchain
283 (you can also press 'E' to expand them all at the same time or 'C'
284 to collapse them all).
285 </para>
286
287 <para>
288 In the screenshot above, we've toggled the __copy_to_user_ll()
289 entry and several subnodes all the way down. This lets us see
290 which callchains contributed to the profiled __copy_to_user_ll()
291 function which contributed 1.77% to the total profile.
292 </para>
293
294 <para>
295 As a bit of background explanation for these callchains, think
296 about what happens at a high level when you run wget to get a file
297 out on the network. Basically what happens is that the data comes
298 into the kernel via the network connection (socket) and is passed
299 to the userspace program 'wget' (which is actually a part of
300 busybox, but that's not important for now), which takes the buffers
301 the kernel passes to it and writes it to a disk file to save it.
302 </para>
303
304 <para>
305 The part of this process that we're looking at in the above call
306 stacks is the part where the kernel passes the data it's read from
307 the socket down to wget i.e. a copy-to-user.
308 </para>
309
310 <para>
311 Notice also that here there's also a case where the a hex value
312 is displayed in the callstack, here in the expanded
313 sys_clock_gettime() function. Later we'll see it resolve to a
314 userspace function call in busybox.
315 </para>
316
317 <para>
318 <imagedata fileref="figures/perf-wget-g-copy-from-user-expanded-stripped.png" width="6in" depth="7in" align="center" scalefit="1" />
319 </para>
320
321 <para>
322 The above screenshot shows the other half of the journey for the
323 data - from the wget program's userspace buffers to disk. To get
324 the buffers to disk, the wget program issues a write(2), which
325 does a copy-from-user to the kernel, which then takes care via
326 some circuitous path (probably also present somewhere in the
327 profile data), to get it safely to disk.
328 </para>
329
330 <para>
331 Now that we've seen the basic layout of the profile data and the
332 basics of how to extract useful information out of it, let's get
333 back to the task at hand and see if we can get some basic idea
334 about where the time is spent in the program we're profiling,
335 wget. Remember that wget is actually implemented as an applet
336 in busybox, so while the process name is 'wget', the executable
337 we're actually interested in is busybox. So let's expand the
338 first entry containing busybox:
339 </para>
340
341 <para>
342 <imagedata fileref="figures/perf-wget-busybox-expanded-stripped.png" width="6in" depth="7in" align="center" scalefit="1" />
343 </para>
344
345 <para>
346 Again, before we expanded we saw that the function was labeled
347 with a hex value instead of a symbol as with most of the kernel
348 entries. Expanding the busybox entry doesn't make it any better.
349 </para>
350
351 <para>
352 The problem is that perf can't find the symbol information for the
353 busybox binary, which is actually stripped out by the Yocto build
354 system.
355 </para>
356
357 <para>
358 One way around that is to put the following in your local.conf
359 when you build the image:
360 <literallayout class='monospaced'>
361 INHIBIT_PACKAGE_STRIP = "1"
362 </literallayout>
363 However, we already have an image with the binaries stripped,
364 so what can we do to get perf to resolve the symbols? Basically
365 we need to install the debuginfo for the busybox package.
366 </para>
367
368 <para>
369 To generate the debug info for the packages in the image, we can
370 to add dbg-pkgs to EXTRA_IMAGE_FEATURES in local.conf. For example:
371 <literallayout class='monospaced'>
372 EXTRA_IMAGE_FEATURES = "debug-tweaks tools-profile dbg-pkgs"
373 </literallayout>
374 Additionally, in order to generate the type of debuginfo that
375 perf understands, we also need to add the following to local.conf:
376 <literallayout class='monospaced'>
377 PACKAGE_DEBUG_SPLIT_STYLE = 'debug-file-directory'
378 </literallayout>
379 Once we've done that, we can install the debuginfo for busybox.
380 The debug packages once built can be found in
381 build/tmp/deploy/rpm/* on the host system. Find the
382 busybox-dbg-...rpm file and copy it to the target. For example:
383 <literallayout class='monospaced'>
384 [trz@empanada core2]$ scp /home/trz/yocto/crownbay-tracing-dbg/build/tmp/deploy/rpm/core2/busybox-dbg-1.20.2-r2.core2.rpm root@192.168.1.31:
385 root@192.168.1.31's password:
386 busybox-dbg-1.20.2-r2.core2.rpm 100% 1826KB 1.8MB/s 00:01
387 </literallayout>
388 Now install the debug rpm on the target:
389 <literallayout class='monospaced'>
390 root@crownbay:~# rpm -i busybox-dbg-1.20.2-r2.core2.rpm
391 </literallayout>
392 Now that the debuginfo is installed, we see that the busybox
393 entries now display their functions symbolically:
394 </para>
395
396 <para>
397 <imagedata fileref="figures/perf-wget-busybox-debuginfo.png" width="6in" depth="7in" align="center" scalefit="1" />
398 </para>
399
400 <para>
401 If we expand one of the entries and press 'enter' on a leaf node,
402 we're presented with a menu of actions we can take to get more
403 information related to that entry:
404 </para>
405
406 <para>
407 <imagedata fileref="figures/perf-wget-busybox-dso-zoom-menu.png" width="6in" depth="2in" align="center" scalefit="1" />
408 </para>
409
410 <para>
411 One of these actions allows us to show a view that displays a
412 busybox-centric view of the profiled functions (in this case we've
413 also expanded all the nodes using the 'E' key):
414 </para>
415
416 <para>
417 <imagedata fileref="figures/perf-wget-busybox-dso-zoom.png" width="6in" depth="7in" align="center" scalefit="1" />
418 </para>
419
420 <para>
421 Finally, we can see that now that the busybox debuginfo is
422 installed, the previously unresolved symbol in the
423 sys_clock_gettime() entry mentioned previously is now resolved,
424 and shows that the sys_clock_gettime system call that was the
425 source of 6.75% of the copy-to-user overhead was initiated by
426 the handle_input() busybox function:
427 </para>
428
429 <para>
430 <imagedata fileref="figures/perf-wget-g-copy-to-user-expanded-debuginfo.png" width="6in" depth="7in" align="center" scalefit="1" />
431 </para>
432
433 <para>
434 At the lowest level of detail, we can dive down to the assembly
435 level and see which instructions caused the most overhead in a
436 function. Pressing 'enter' on the 'udhcpc_main' function, we're
437 again presented with a menu:
438 </para>
439
440 <para>
441 <imagedata fileref="figures/perf-wget-busybox-annotate-menu.png" width="6in" depth="2in" align="center" scalefit="1" />
442 </para>
443
444 <para>
445 Selecting 'Annotate udhcpc_main', we get a detailed listing of
446 percentages by instruction for the udhcpc_main function. From the
447 display, we can see that over 50% of the time spent in this
448 function is taken up by a couple tests and the move of a
449 constant (1) to a register:
450 </para>
451
452 <para>
453 <imagedata fileref="figures/perf-wget-busybox-annotate-udhcpc.png" width="6in" depth="7in" align="center" scalefit="1" />
454 </para>
455
456 <para>
457 As a segue into tracing, let's try another profile using a
458 different counter, something other than the default 'cycles'.
459 </para>
460
461 <para>
462 The tracing and profiling infrastructure in Linux has become
463 unified in a way that allows us to use the same tool with a
464 completely different set of counters, not just the standard
465 hardware counters that traditionally tools have had to restrict
466 themselves to (of course the traditional tools can also make use
467 of the expanded possibilities now available to them, and in some
468 cases have, as mentioned previously).
469 </para>
470
471 <para>
472 We can get a list of the available events that can be used to
473 profile a workload via 'perf list':
474 <literallayout class='monospaced'>
475 root@crownbay:~# perf list
476
477 List of pre-defined events (to be used in -e):
478 cpu-cycles OR cycles [Hardware event]
479 stalled-cycles-frontend OR idle-cycles-frontend [Hardware event]
480 stalled-cycles-backend OR idle-cycles-backend [Hardware event]
481 instructions [Hardware event]
482 cache-references [Hardware event]
483 cache-misses [Hardware event]
484 branch-instructions OR branches [Hardware event]
485 branch-misses [Hardware event]
486 bus-cycles [Hardware event]
487 ref-cycles [Hardware event]
488
489 cpu-clock [Software event]
490 task-clock [Software event]
491 page-faults OR faults [Software event]
492 minor-faults [Software event]
493 major-faults [Software event]
494 context-switches OR cs [Software event]
495 cpu-migrations OR migrations [Software event]
496 alignment-faults [Software event]
497 emulation-faults [Software event]
498
499 L1-dcache-loads [Hardware cache event]
500 L1-dcache-load-misses [Hardware cache event]
501 L1-dcache-prefetch-misses [Hardware cache event]
502 L1-icache-loads [Hardware cache event]
503 L1-icache-load-misses [Hardware cache event]
504 .
505 .
506 .
507 rNNN [Raw hardware event descriptor]
508 cpu/t1=v1[,t2=v2,t3 ...]/modifier [Raw hardware event descriptor]
509 (see 'perf list --help' on how to encode it)
510
511 mem:&lt;addr&gt;[:access] [Hardware breakpoint]
512
513 sunrpc:rpc_call_status [Tracepoint event]
514 sunrpc:rpc_bind_status [Tracepoint event]
515 sunrpc:rpc_connect_status [Tracepoint event]
516 sunrpc:rpc_task_begin [Tracepoint event]
517 skb:kfree_skb [Tracepoint event]
518 skb:consume_skb [Tracepoint event]
519 skb:skb_copy_datagram_iovec [Tracepoint event]
520 net:net_dev_xmit [Tracepoint event]
521 net:net_dev_queue [Tracepoint event]
522 net:netif_receive_skb [Tracepoint event]
523 net:netif_rx [Tracepoint event]
524 napi:napi_poll [Tracepoint event]
525 sock:sock_rcvqueue_full [Tracepoint event]
526 sock:sock_exceed_buf_limit [Tracepoint event]
527 udp:udp_fail_queue_rcv_skb [Tracepoint event]
528 hda:hda_send_cmd [Tracepoint event]
529 hda:hda_get_response [Tracepoint event]
530 hda:hda_bus_reset [Tracepoint event]
531 scsi:scsi_dispatch_cmd_start [Tracepoint event]
532 scsi:scsi_dispatch_cmd_error [Tracepoint event]
533 scsi:scsi_eh_wakeup [Tracepoint event]
534 drm:drm_vblank_event [Tracepoint event]
535 drm:drm_vblank_event_queued [Tracepoint event]
536 drm:drm_vblank_event_delivered [Tracepoint event]
537 random:mix_pool_bytes [Tracepoint event]
538 random:mix_pool_bytes_nolock [Tracepoint event]
539 random:credit_entropy_bits [Tracepoint event]
540 gpio:gpio_direction [Tracepoint event]
541 gpio:gpio_value [Tracepoint event]
542 block:block_rq_abort [Tracepoint event]
543 block:block_rq_requeue [Tracepoint event]
544 block:block_rq_issue [Tracepoint event]
545 block:block_bio_bounce [Tracepoint event]
546 block:block_bio_complete [Tracepoint event]
547 block:block_bio_backmerge [Tracepoint event]
548 .
549 .
550 writeback:writeback_wake_thread [Tracepoint event]
551 writeback:writeback_wake_forker_thread [Tracepoint event]
552 writeback:writeback_bdi_register [Tracepoint event]
553 .
554 .
555 writeback:writeback_single_inode_requeue [Tracepoint event]
556 writeback:writeback_single_inode [Tracepoint event]
557 kmem:kmalloc [Tracepoint event]
558 kmem:kmem_cache_alloc [Tracepoint event]
559 kmem:mm_page_alloc [Tracepoint event]
560 kmem:mm_page_alloc_zone_locked [Tracepoint event]
561 kmem:mm_page_pcpu_drain [Tracepoint event]
562 kmem:mm_page_alloc_extfrag [Tracepoint event]
563 vmscan:mm_vmscan_kswapd_sleep [Tracepoint event]
564 vmscan:mm_vmscan_kswapd_wake [Tracepoint event]
565 vmscan:mm_vmscan_wakeup_kswapd [Tracepoint event]
566 vmscan:mm_vmscan_direct_reclaim_begin [Tracepoint event]
567 .
568 .
569 module:module_get [Tracepoint event]
570 module:module_put [Tracepoint event]
571 module:module_request [Tracepoint event]
572 sched:sched_kthread_stop [Tracepoint event]
573 sched:sched_wakeup [Tracepoint event]
574 sched:sched_wakeup_new [Tracepoint event]
575 sched:sched_process_fork [Tracepoint event]
576 sched:sched_process_exec [Tracepoint event]
577 sched:sched_stat_runtime [Tracepoint event]
578 rcu:rcu_utilization [Tracepoint event]
579 workqueue:workqueue_queue_work [Tracepoint event]
580 workqueue:workqueue_execute_end [Tracepoint event]
581 signal:signal_generate [Tracepoint event]
582 signal:signal_deliver [Tracepoint event]
583 timer:timer_init [Tracepoint event]
584 timer:timer_start [Tracepoint event]
585 timer:hrtimer_cancel [Tracepoint event]
586 timer:itimer_state [Tracepoint event]
587 timer:itimer_expire [Tracepoint event]
588 irq:irq_handler_entry [Tracepoint event]
589 irq:irq_handler_exit [Tracepoint event]
590 irq:softirq_entry [Tracepoint event]
591 irq:softirq_exit [Tracepoint event]
592 irq:softirq_raise [Tracepoint event]
593 printk:console [Tracepoint event]
594 task:task_newtask [Tracepoint event]
595 task:task_rename [Tracepoint event]
596 syscalls:sys_enter_socketcall [Tracepoint event]
597 syscalls:sys_exit_socketcall [Tracepoint event]
598 .
599 .
600 .
601 syscalls:sys_enter_unshare [Tracepoint event]
602 syscalls:sys_exit_unshare [Tracepoint event]
603 raw_syscalls:sys_enter [Tracepoint event]
604 raw_syscalls:sys_exit [Tracepoint event]
605 </literallayout>
606 </para>
607
608 <informalexample>
609 <emphasis>Tying it Together:</emphasis> These are exactly the same set of events defined
610 by the trace event subsystem and exposed by
611 ftrace/tracecmd/kernelshark as files in
612 /sys/kernel/debug/tracing/events, by SystemTap as
613 kernel.trace("tracepoint_name") and (partially) accessed by LTTng.
614 </informalexample>
615
616 <para>
617 Only a subset of these would be of interest to us when looking at
618 this workload, so let's choose the most likely subsystems
619 (identified by the string before the colon in the Tracepoint events)
620 and do a 'perf stat' run using only those wildcarded subsystems:
621 <literallayout class='monospaced'>
622 root@crownbay:~# perf stat -e skb:* -e net:* -e napi:* -e sched:* -e workqueue:* -e irq:* -e syscalls:* wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
623 Performance counter stats for 'wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>':
624
625 23323 skb:kfree_skb
626 0 skb:consume_skb
627 49897 skb:skb_copy_datagram_iovec
628 6217 net:net_dev_xmit
629 6217 net:net_dev_queue
630 7962 net:netif_receive_skb
631 2 net:netif_rx
632 8340 napi:napi_poll
633 0 sched:sched_kthread_stop
634 0 sched:sched_kthread_stop_ret
635 3749 sched:sched_wakeup
636 0 sched:sched_wakeup_new
637 0 sched:sched_switch
638 29 sched:sched_migrate_task
639 0 sched:sched_process_free
640 1 sched:sched_process_exit
641 0 sched:sched_wait_task
642 0 sched:sched_process_wait
643 0 sched:sched_process_fork
644 1 sched:sched_process_exec
645 0 sched:sched_stat_wait
646 2106519415641 sched:sched_stat_sleep
647 0 sched:sched_stat_iowait
648 147453613 sched:sched_stat_blocked
649 12903026955 sched:sched_stat_runtime
650 0 sched:sched_pi_setprio
651 3574 workqueue:workqueue_queue_work
652 3574 workqueue:workqueue_activate_work
653 0 workqueue:workqueue_execute_start
654 0 workqueue:workqueue_execute_end
655 16631 irq:irq_handler_entry
656 16631 irq:irq_handler_exit
657 28521 irq:softirq_entry
658 28521 irq:softirq_exit
659 28728 irq:softirq_raise
660 1 syscalls:sys_enter_sendmmsg
661 1 syscalls:sys_exit_sendmmsg
662 0 syscalls:sys_enter_recvmmsg
663 0 syscalls:sys_exit_recvmmsg
664 14 syscalls:sys_enter_socketcall
665 14 syscalls:sys_exit_socketcall
666 .
667 .
668 .
669 16965 syscalls:sys_enter_read
670 16965 syscalls:sys_exit_read
671 12854 syscalls:sys_enter_write
672 12854 syscalls:sys_exit_write
673 .
674 .
675 .
676
677 58.029710972 seconds time elapsed
678 </literallayout>
679 Let's pick one of these tracepoints and tell perf to do a profile
680 using it as the sampling event:
681 <literallayout class='monospaced'>
682 root@crownbay:~# perf record -g -e sched:sched_wakeup wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
683 </literallayout>
684 </para>
685
686 <para>
687 <imagedata fileref="figures/sched-wakeup-profile.png" width="6in" depth="7in" align="center" scalefit="1" />
688 </para>
689
690 <para>
691 The screenshot above shows the results of running a profile using
692 sched:sched_switch tracepoint, which shows the relative costs of
693 various paths to sched_wakeup (note that sched_wakeup is the
694 name of the tracepoint - it's actually defined just inside
695 ttwu_do_wakeup(), which accounts for the function name actually
696 displayed in the profile:
697 <literallayout class='monospaced'>
698 /*
699 * Mark the task runnable and perform wakeup-preemption.
700 */
701 static void
702 ttwu_do_wakeup(struct rq *rq, struct task_struct *p, int wake_flags)
703 {
704 trace_sched_wakeup(p, true);
705 .
706 .
707 .
708 }
709 </literallayout>
710 A couple of the more interesting callchains are expanded and
711 displayed above, basically some network receive paths that
712 presumably end up waking up wget (busybox) when network data is
713 ready.
714 </para>
715
716 <para>
717 Note that because tracepoints are normally used for tracing,
718 the default sampling period for tracepoints is 1 i.e. for
719 tracepoints perf will sample on every event occurrence (this
720 can be changed using the -c option). This is in contrast to
721 hardware counters such as for example the default 'cycles'
722 hardware counter used for normal profiling, where sampling
723 periods are much higher (in the thousands) because profiling should
724 have as low an overhead as possible and sampling on every cycle
725 would be prohibitively expensive.
726 </para>
727 </section>
728
729 <section id='using-perf-to-do-basic-tracing'>
730 <title>Using perf to do Basic Tracing</title>
731
732 <para>
733 Profiling is a great tool for solving many problems or for
734 getting a high-level view of what's going on with a workload or
735 across the system. It is however by definition an approximation,
736 as suggested by the most prominent word associated with it,
737 'sampling'. On the one hand, it allows a representative picture of
738 what's going on in the system to be cheaply taken, but on the other
739 hand, that cheapness limits its utility when that data suggests a
740 need to 'dive down' more deeply to discover what's really going
741 on. In such cases, the only way to see what's really going on is
742 to be able to look at (or summarize more intelligently) the
743 individual steps that go into the higher-level behavior exposed
744 by the coarse-grained profiling data.
745 </para>
746
747 <para>
748 As a concrete example, we can trace all the events we think might
749 be applicable to our workload:
750 <literallayout class='monospaced'>
751 root@crownbay:~# perf record -g -e skb:* -e net:* -e napi:* -e sched:sched_switch -e sched:sched_wakeup -e irq:*
752 -e syscalls:sys_enter_read -e syscalls:sys_exit_read -e syscalls:sys_enter_write -e syscalls:sys_exit_write
753 wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
754 </literallayout>
755 We can look at the raw trace output using 'perf script' with no
756 arguments:
757 <literallayout class='monospaced'>
758 root@crownbay:~# perf script
759
760 perf 1262 [000] 11624.857082: sys_exit_read: 0x0
761 perf 1262 [000] 11624.857193: sched_wakeup: comm=migration/0 pid=6 prio=0 success=1 target_cpu=000
762 wget 1262 [001] 11624.858021: softirq_raise: vec=1 [action=TIMER]
763 wget 1262 [001] 11624.858074: softirq_entry: vec=1 [action=TIMER]
764 wget 1262 [001] 11624.858081: softirq_exit: vec=1 [action=TIMER]
765 wget 1262 [001] 11624.858166: sys_enter_read: fd: 0x0003, buf: 0xbf82c940, count: 0x0200
766 wget 1262 [001] 11624.858177: sys_exit_read: 0x200
767 wget 1262 [001] 11624.858878: kfree_skb: skbaddr=0xeb248d80 protocol=0 location=0xc15a5308
768 wget 1262 [001] 11624.858945: kfree_skb: skbaddr=0xeb248000 protocol=0 location=0xc15a5308
769 wget 1262 [001] 11624.859020: softirq_raise: vec=1 [action=TIMER]
770 wget 1262 [001] 11624.859076: softirq_entry: vec=1 [action=TIMER]
771 wget 1262 [001] 11624.859083: softirq_exit: vec=1 [action=TIMER]
772 wget 1262 [001] 11624.859167: sys_enter_read: fd: 0x0003, buf: 0xb7720000, count: 0x0400
773 wget 1262 [001] 11624.859192: sys_exit_read: 0x1d7
774 wget 1262 [001] 11624.859228: sys_enter_read: fd: 0x0003, buf: 0xb7720000, count: 0x0400
775 wget 1262 [001] 11624.859233: sys_exit_read: 0x0
776 wget 1262 [001] 11624.859573: sys_enter_read: fd: 0x0003, buf: 0xbf82c580, count: 0x0200
777 wget 1262 [001] 11624.859584: sys_exit_read: 0x200
778 wget 1262 [001] 11624.859864: sys_enter_read: fd: 0x0003, buf: 0xb7720000, count: 0x0400
779 wget 1262 [001] 11624.859888: sys_exit_read: 0x400
780 wget 1262 [001] 11624.859935: sys_enter_read: fd: 0x0003, buf: 0xb7720000, count: 0x0400
781 wget 1262 [001] 11624.859944: sys_exit_read: 0x400
782 </literallayout>
783 This gives us a detailed timestamped sequence of events that
784 occurred within the workload with respect to those events.
785 </para>
786
787 <para>
788 In many ways, profiling can be viewed as a subset of tracing -
789 theoretically, if you have a set of trace events that's sufficient
790 to capture all the important aspects of a workload, you can derive
791 any of the results or views that a profiling run can.
792 </para>
793
794 <para>
795 Another aspect of traditional profiling is that while powerful in
796 many ways, it's limited by the granularity of the underlying data.
797 Profiling tools offer various ways of sorting and presenting the
798 sample data, which make it much more useful and amenable to user
799 experimentation, but in the end it can't be used in an open-ended
800 way to extract data that just isn't present as a consequence of
801 the fact that conceptually, most of it has been thrown away.
802 </para>
803
804 <para>
805 Full-blown detailed tracing data does however offer the opportunity
806 to manipulate and present the information collected during a
807 tracing run in an infinite variety of ways.
808 </para>
809
810 <para>
811 Another way to look at it is that there are only so many ways that
812 the 'primitive' counters can be used on their own to generate
813 interesting output; to get anything more complicated than simple
814 counts requires some amount of additional logic, which is typically
815 very specific to the problem at hand. For example, if we wanted to
816 make use of a 'counter' that maps to the value of the time
817 difference between when a process was scheduled to run on a
818 processor and the time it actually ran, we wouldn't expect such
819 a counter to exist on its own, but we could derive one called say
820 'wakeup_latency' and use it to extract a useful view of that metric
821 from trace data. Likewise, we really can't figure out from standard
822 profiling tools how much data every process on the system reads and
823 writes, along with how many of those reads and writes fail
824 completely. If we have sufficient trace data, however, we could
825 with the right tools easily extract and present that information,
826 but we'd need something other than pre-canned profiling tools to
827 do that.
828 </para>
829
830 <para>
831 Luckily, there is general-purpose way to handle such needs,
832 called 'programming languages'. Making programming languages
833 easily available to apply to such problems given the specific
834 format of data is called a 'programming language binding' for
835 that data and language. Perf supports two programming language
836 bindings, one for Python and one for Perl.
837 </para>
838
839 <informalexample>
840 <emphasis>Tying it Together:</emphasis> Language bindings for manipulating and
841 aggregating trace data are of course not a new
842 idea. One of the first projects to do this was IBM's DProbes
843 dpcc compiler, an ANSI C compiler which targeted a low-level
844 assembly language running on an in-kernel interpreter on the
845 target system. This is exactly analagous to what Sun's DTrace
846 did, except that DTrace invented its own language for the purpose.
847 Systemtap, heavily inspired by DTrace, also created its own
848 one-off language, but rather than running the product on an
849 in-kernel interpreter, created an elaborate compiler-based
850 machinery to translate its language into kernel modules written
851 in C.
852 </informalexample>
853
854 <para>
855 Now that we have the trace data in perf.data, we can use
856 'perf script -g' to generate a skeleton script with handlers
857 for the read/write entry/exit events we recorded:
858 <literallayout class='monospaced'>
859 root@crownbay:~# perf script -g python
860 generated Python script: perf-script.py
861 </literallayout>
862 The skeleton script simply creates a python function for each
863 event type in the perf.data file. The body of each function simply
864 prints the event name along with its parameters. For example:
865 <literallayout class='monospaced'>
866 def net__netif_rx(event_name, context, common_cpu,
867 common_secs, common_nsecs, common_pid, common_comm,
868 skbaddr, len, name):
869 print_header(event_name, common_cpu, common_secs, common_nsecs,
870 common_pid, common_comm)
871
872 print "skbaddr=%u, len=%u, name=%s\n" % (skbaddr, len, name),
873 </literallayout>
874 We can run that script directly to print all of the events
875 contained in the perf.data file:
876 <literallayout class='monospaced'>
877 root@crownbay:~# perf script -s perf-script.py
878
879 in trace_begin
880 syscalls__sys_exit_read 0 11624.857082795 1262 perf nr=3, ret=0
881 sched__sched_wakeup 0 11624.857193498 1262 perf comm=migration/0, pid=6, prio=0, success=1, target_cpu=0
882 irq__softirq_raise 1 11624.858021635 1262 wget vec=TIMER
883 irq__softirq_entry 1 11624.858074075 1262 wget vec=TIMER
884 irq__softirq_exit 1 11624.858081389 1262 wget vec=TIMER
885 syscalls__sys_enter_read 1 11624.858166434 1262 wget nr=3, fd=3, buf=3213019456, count=512
886 syscalls__sys_exit_read 1 11624.858177924 1262 wget nr=3, ret=512
887 skb__kfree_skb 1 11624.858878188 1262 wget skbaddr=3945041280, location=3243922184, protocol=0
888 skb__kfree_skb 1 11624.858945608 1262 wget skbaddr=3945037824, location=3243922184, protocol=0
889 irq__softirq_raise 1 11624.859020942 1262 wget vec=TIMER
890 irq__softirq_entry 1 11624.859076935 1262 wget vec=TIMER
891 irq__softirq_exit 1 11624.859083469 1262 wget vec=TIMER
892 syscalls__sys_enter_read 1 11624.859167565 1262 wget nr=3, fd=3, buf=3077701632, count=1024
893 syscalls__sys_exit_read 1 11624.859192533 1262 wget nr=3, ret=471
894 syscalls__sys_enter_read 1 11624.859228072 1262 wget nr=3, fd=3, buf=3077701632, count=1024
895 syscalls__sys_exit_read 1 11624.859233707 1262 wget nr=3, ret=0
896 syscalls__sys_enter_read 1 11624.859573008 1262 wget nr=3, fd=3, buf=3213018496, count=512
897 syscalls__sys_exit_read 1 11624.859584818 1262 wget nr=3, ret=512
898 syscalls__sys_enter_read 1 11624.859864562 1262 wget nr=3, fd=3, buf=3077701632, count=1024
899 syscalls__sys_exit_read 1 11624.859888770 1262 wget nr=3, ret=1024
900 syscalls__sys_enter_read 1 11624.859935140 1262 wget nr=3, fd=3, buf=3077701632, count=1024
901 syscalls__sys_exit_read 1 11624.859944032 1262 wget nr=3, ret=1024
902 </literallayout>
903 That in itself isn't very useful; after all, we can accomplish
904 pretty much the same thing by simply running 'perf script'
905 without arguments in the same directory as the perf.data file.
906 </para>
907
908 <para>
909 We can however replace the print statements in the generated
910 function bodies with whatever we want, and thereby make it
911 infinitely more useful.
912 </para>
913
914 <para>
915 As a simple example, let's just replace the print statements in
916 the function bodies with a simple function that does nothing but
917 increment a per-event count. When the program is run against a
918 perf.data file, each time a particular event is encountered,
919 a tally is incremented for that event. For example:
920 <literallayout class='monospaced'>
921 def net__netif_rx(event_name, context, common_cpu,
922 common_secs, common_nsecs, common_pid, common_comm,
923 skbaddr, len, name):
924 inc_counts(event_name)
925 </literallayout>
926 Each event handler function in the generated code is modified
927 to do this. For convenience, we define a common function called
928 inc_counts() that each handler calls; inc_counts simply tallies
929 a count for each event using the 'counts' hash, which is a
930 specialized has function that does Perl-like autovivification, a
931 capability that's extremely useful for kinds of multi-level
932 aggregation commonly used in processing traces (see perf's
933 documentation on the Python language binding for details):
934 <literallayout class='monospaced'>
935 counts = autodict()
936
937 def inc_counts(event_name):
938 try:
939 counts[event_name] += 1
940 except TypeError:
941 counts[event_name] = 1
942 </literallayout>
943 Finally, at the end of the trace processing run, we want to
944 print the result of all the per-event tallies. For that, we
945 use the special 'trace_end()' function:
946 <literallayout class='monospaced'>
947 def trace_end():
948 for event_name, count in counts.iteritems():
949 print "%-40s %10s\n" % (event_name, count)
950 </literallayout>
951 The end result is a summary of all the events recorded in the
952 trace:
953 <literallayout class='monospaced'>
954 skb__skb_copy_datagram_iovec 13148
955 irq__softirq_entry 4796
956 irq__irq_handler_exit 3805
957 irq__softirq_exit 4795
958 syscalls__sys_enter_write 8990
959 net__net_dev_xmit 652
960 skb__kfree_skb 4047
961 sched__sched_wakeup 1155
962 irq__irq_handler_entry 3804
963 irq__softirq_raise 4799
964 net__net_dev_queue 652
965 syscalls__sys_enter_read 17599
966 net__netif_receive_skb 1743
967 syscalls__sys_exit_read 17598
968 net__netif_rx 2
969 napi__napi_poll 1877
970 syscalls__sys_exit_write 8990
971 </literallayout>
972 Note that this is pretty much exactly the same information we get
973 from 'perf stat', which goes a little way to support the idea
974 mentioned previously that given the right kind of trace data,
975 higher-level profiling-type summaries can be derived from it.
976 </para>
977
978 <para>
979 Documentation on using the
980 <ulink url='http://linux.die.net/man/1/perf-script-python'>'perf script' python binding</ulink>.
981 </para>
982 </section>
983
984 <section id='system-wide-tracing-and-profiling'>
985 <title>System-Wide Tracing and Profiling</title>
986
987 <para>
988 The examples so far have focused on tracing a particular program or
989 workload - in other words, every profiling run has specified the
990 program to profile in the command-line e.g. 'perf record wget ...'.
991 </para>
992
993 <para>
994 It's also possible, and more interesting in many cases, to run a
995 system-wide profile or trace while running the workload in a
996 separate shell.
997 </para>
998
999 <para>
1000 To do system-wide profiling or tracing, you typically use
1001 the -a flag to 'perf record'.
1002 </para>
1003
1004 <para>
1005 To demonstrate this, open up one window and start the profile
1006 using the -a flag (press Ctrl-C to stop tracing):
1007 <literallayout class='monospaced'>
1008 root@crownbay:~# perf record -g -a
1009 ^C[ perf record: Woken up 6 times to write data ]
1010 [ perf record: Captured and wrote 1.400 MB perf.data (~61172 samples) ]
1011 </literallayout>
1012 In another window, run the wget test:
1013 <literallayout class='monospaced'>
1014 root@crownbay:~# wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>
1015 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
1016 linux-2.6.19.2.tar.b 100% |*******************************| 41727k 0:00:00 ETA
1017 </literallayout>
1018 Here we see entries not only for our wget load, but for other
1019 processes running on the system as well:
1020 </para>
1021
1022 <para>
1023 <imagedata fileref="figures/perf-systemwide.png" width="6in" depth="7in" align="center" scalefit="1" />
1024 </para>
1025
1026 <para>
1027 In the snapshot above, we can see callchains that originate in
1028 libc, and a callchain from Xorg that demonstrates that we're
1029 using a proprietary X driver in userspace (notice the presence
1030 of 'PVR' and some other unresolvable symbols in the expanded
1031 Xorg callchain).
1032 </para>
1033
1034 <para>
1035 Note also that we have both kernel and userspace entries in the
1036 above snapshot. We can also tell perf to focus on userspace but
1037 providing a modifier, in this case 'u', to the 'cycles' hardware
1038 counter when we record a profile:
1039 <literallayout class='monospaced'>
1040 root@crownbay:~# perf record -g -a -e cycles:u
1041 ^C[ perf record: Woken up 2 times to write data ]
1042 [ perf record: Captured and wrote 0.376 MB perf.data (~16443 samples) ]
1043 </literallayout>
1044 </para>
1045
1046 <para>
1047 <imagedata fileref="figures/perf-report-cycles-u.png" width="6in" depth="7in" align="center" scalefit="1" />
1048 </para>
1049
1050 <para>
1051 Notice in the screenshot above, we see only userspace entries ([.])
1052 </para>
1053
1054 <para>
1055 Finally, we can press 'enter' on a leaf node and select the 'Zoom
1056 into DSO' menu item to show only entries associated with a
1057 specific DSO. In the screenshot below, we've zoomed into the
1058 'libc' DSO which shows all the entries associated with the
1059 libc-xxx.so DSO.
1060 </para>
1061
1062 <para>
1063 <imagedata fileref="figures/perf-systemwide-libc.png" width="6in" depth="7in" align="center" scalefit="1" />
1064 </para>
1065
1066 <para>
1067 We can also use the system-wide -a switch to do system-wide
1068 tracing. Here we'll trace a couple of scheduler events:
1069 <literallayout class='monospaced'>
1070 root@crownbay:~# perf record -a -e sched:sched_switch -e sched:sched_wakeup
1071 ^C[ perf record: Woken up 38 times to write data ]
1072 [ perf record: Captured and wrote 9.780 MB perf.data (~427299 samples) ]
1073 </literallayout>
1074 We can look at the raw output using 'perf script' with no
1075 arguments:
1076 <literallayout class='monospaced'>
1077 root@crownbay:~# perf script
1078
1079 perf 1383 [001] 6171.460045: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1080 perf 1383 [001] 6171.460066: sched_switch: prev_comm=perf prev_pid=1383 prev_prio=120 prev_state=R+ ==> next_comm=kworker/1:1 next_pid=21 next_prio=120
1081 kworker/1:1 21 [001] 6171.460093: sched_switch: prev_comm=kworker/1:1 prev_pid=21 prev_prio=120 prev_state=S ==> next_comm=perf next_pid=1383 next_prio=120
1082 swapper 0 [000] 6171.468063: sched_wakeup: comm=kworker/0:3 pid=1209 prio=120 success=1 target_cpu=000
1083 swapper 0 [000] 6171.468107: sched_switch: prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/0:3 next_pid=1209 next_prio=120
1084 kworker/0:3 1209 [000] 6171.468143: sched_switch: prev_comm=kworker/0:3 prev_pid=1209 prev_prio=120 prev_state=S ==> next_comm=swapper/0 next_pid=0 next_prio=120
1085 perf 1383 [001] 6171.470039: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1086 perf 1383 [001] 6171.470058: sched_switch: prev_comm=perf prev_pid=1383 prev_prio=120 prev_state=R+ ==> next_comm=kworker/1:1 next_pid=21 next_prio=120
1087 kworker/1:1 21 [001] 6171.470082: sched_switch: prev_comm=kworker/1:1 prev_pid=21 prev_prio=120 prev_state=S ==> next_comm=perf next_pid=1383 next_prio=120
1088 perf 1383 [001] 6171.480035: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1089 </literallayout>
1090 </para>
1091
1092 <section id='perf-filtering'>
1093 <title>Filtering</title>
1094
1095 <para>
1096 Notice that there are a lot of events that don't really have
1097 anything to do with what we're interested in, namely events
1098 that schedule 'perf' itself in and out or that wake perf up.
1099 We can get rid of those by using the '--filter' option -
1100 for each event we specify using -e, we can add a --filter
1101 after that to filter out trace events that contain fields
1102 with specific values:
1103 <literallayout class='monospaced'>
1104 root@crownbay:~# perf record -a -e sched:sched_switch --filter 'next_comm != perf &amp;&amp; prev_comm != perf' -e sched:sched_wakeup --filter 'comm != perf'
1105 ^C[ perf record: Woken up 38 times to write data ]
1106 [ perf record: Captured and wrote 9.688 MB perf.data (~423279 samples) ]
1107
1108
1109 root@crownbay:~# perf script
1110
1111 swapper 0 [000] 7932.162180: sched_switch: prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/0:3 next_pid=1209 next_prio=120
1112 kworker/0:3 1209 [000] 7932.162236: sched_switch: prev_comm=kworker/0:3 prev_pid=1209 prev_prio=120 prev_state=S ==> next_comm=swapper/0 next_pid=0 next_prio=120
1113 perf 1407 [001] 7932.170048: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1114 perf 1407 [001] 7932.180044: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1115 perf 1407 [001] 7932.190038: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1116 perf 1407 [001] 7932.200044: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1117 perf 1407 [001] 7932.210044: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1118 perf 1407 [001] 7932.220044: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1119 swapper 0 [001] 7932.230111: sched_wakeup: comm=kworker/1:1 pid=21 prio=120 success=1 target_cpu=001
1120 swapper 0 [001] 7932.230146: sched_switch: prev_comm=swapper/1 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/1:1 next_pid=21 next_prio=120
1121 kworker/1:1 21 [001] 7932.230205: sched_switch: prev_comm=kworker/1:1 prev_pid=21 prev_prio=120 prev_state=S ==> next_comm=swapper/1 next_pid=0 next_prio=120
1122 swapper 0 [000] 7932.326109: sched_wakeup: comm=kworker/0:3 pid=1209 prio=120 success=1 target_cpu=000
1123 swapper 0 [000] 7932.326171: sched_switch: prev_comm=swapper/0 prev_pid=0 prev_prio=120 prev_state=R ==> next_comm=kworker/0:3 next_pid=1209 next_prio=120
1124 kworker/0:3 1209 [000] 7932.326214: sched_switch: prev_comm=kworker/0:3 prev_pid=1209 prev_prio=120 prev_state=S ==> next_comm=swapper/0 next_pid=0 next_prio=120
1125 </literallayout>
1126 In this case, we've filtered out all events that have 'perf'
1127 in their 'comm' or 'comm_prev' or 'comm_next' fields. Notice
1128 that there are still events recorded for perf, but notice
1129 that those events don't have values of 'perf' for the filtered
1130 fields. To completely filter out anything from perf will
1131 require a bit more work, but for the purpose of demonstrating
1132 how to use filters, it's close enough.
1133 </para>
1134
1135 <informalexample>
1136 <emphasis>Tying it Together:</emphasis> These are exactly the same set of event
1137 filters defined by the trace event subsystem. See the
1138 ftrace/tracecmd/kernelshark section for more discussion about
1139 these event filters.
1140 </informalexample>
1141
1142 <informalexample>
1143 <emphasis>Tying it Together:</emphasis> These event filters are implemented by a
1144 special-purpose pseudo-interpreter in the kernel and are an
1145 integral and indispensable part of the perf design as it
1146 relates to tracing. kernel-based event filters provide a
1147 mechanism to precisely throttle the event stream that appears
1148 in user space, where it makes sense to provide bindings to real
1149 programming languages for postprocessing the event stream.
1150 This architecture allows for the intelligent and flexible
1151 partitioning of processing between the kernel and user space.
1152 Contrast this with other tools such as SystemTap, which does
1153 all of its processing in the kernel and as such requires a
1154 special project-defined language in order to accommodate that
1155 design, or LTTng, where everything is sent to userspace and
1156 as such requires a super-efficient kernel-to-userspace
1157 transport mechanism in order to function properly. While
1158 perf certainly can benefit from for instance advances in
1159 the design of the transport, it doesn't fundamentally depend
1160 on them. Basically, if you find that your perf tracing
1161 application is causing buffer I/O overruns, it probably
1162 means that you aren't taking enough advantage of the
1163 kernel filtering engine.
1164 </informalexample>
1165 </section>
1166 </section>
1167
1168 <section id='using-dynamic-tracepoints'>
1169 <title>Using Dynamic Tracepoints</title>
1170
1171 <para>
1172 perf isn't restricted to the fixed set of static tracepoints
1173 listed by 'perf list'. Users can also add their own 'dynamic'
1174 tracepoints anywhere in the kernel. For instance, suppose we
1175 want to define our own tracepoint on do_fork(). We can do that
1176 using the 'perf probe' perf subcommand:
1177 <literallayout class='monospaced'>
1178 root@crownbay:~# perf probe do_fork
1179 Added new event:
1180 probe:do_fork (on do_fork)
1181
1182 You can now use it in all perf tools, such as:
1183
1184 perf record -e probe:do_fork -aR sleep 1
1185 </literallayout>
1186 Adding a new tracepoint via 'perf probe' results in an event
1187 with all the expected files and format in
1188 /sys/kernel/debug/tracing/events, just the same as for static
1189 tracepoints (as discussed in more detail in the trace events
1190 subsystem section:
1191 <literallayout class='monospaced'>
1192 root@crownbay:/sys/kernel/debug/tracing/events/probe/do_fork# ls -al
1193 drwxr-xr-x 2 root root 0 Oct 28 11:42 .
1194 drwxr-xr-x 3 root root 0 Oct 28 11:42 ..
1195 -rw-r--r-- 1 root root 0 Oct 28 11:42 enable
1196 -rw-r--r-- 1 root root 0 Oct 28 11:42 filter
1197 -r--r--r-- 1 root root 0 Oct 28 11:42 format
1198 -r--r--r-- 1 root root 0 Oct 28 11:42 id
1199
1200 root@crownbay:/sys/kernel/debug/tracing/events/probe/do_fork# cat format
1201 name: do_fork
1202 ID: 944
1203 format:
1204 field:unsigned short common_type; offset:0; size:2; signed:0;
1205 field:unsigned char common_flags; offset:2; size:1; signed:0;
1206 field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
1207 field:int common_pid; offset:4; size:4; signed:1;
1208 field:int common_padding; offset:8; size:4; signed:1;
1209
1210 field:unsigned long __probe_ip; offset:12; size:4; signed:0;
1211
1212 print fmt: "(%lx)", REC->__probe_ip
1213 </literallayout>
1214 We can list all dynamic tracepoints currently in existence:
1215 <literallayout class='monospaced'>
1216 root@crownbay:~# perf probe -l
1217 probe:do_fork (on do_fork)
1218 probe:schedule (on schedule)
1219 </literallayout>
1220 Let's record system-wide ('sleep 30' is a trick for recording
1221 system-wide but basically do nothing and then wake up after
1222 30 seconds):
1223 <literallayout class='monospaced'>
1224 root@crownbay:~# perf record -g -a -e probe:do_fork sleep 30
1225 [ perf record: Woken up 1 times to write data ]
1226 [ perf record: Captured and wrote 0.087 MB perf.data (~3812 samples) ]
1227 </literallayout>
1228 Using 'perf script' we can see each do_fork event that fired:
1229 <literallayout class='monospaced'>
1230 root@crownbay:~# perf script
1231
1232 # ========
1233 # captured on: Sun Oct 28 11:55:18 2012
1234 # hostname : crownbay
1235 # os release : 3.4.11-yocto-standard
1236 # perf version : 3.4.11
1237 # arch : i686
1238 # nrcpus online : 2
1239 # nrcpus avail : 2
1240 # cpudesc : Intel(R) Atom(TM) CPU E660 @ 1.30GHz
1241 # cpuid : GenuineIntel,6,38,1
1242 # total memory : 1017184 kB
1243 # cmdline : /usr/bin/perf record -g -a -e probe:do_fork sleep 30
1244 # event : name = probe:do_fork, type = 2, config = 0x3b0, config1 = 0x0, config2 = 0x0, excl_usr = 0, excl_kern
1245 = 0, id = { 5, 6 }
1246 # HEADER_CPU_TOPOLOGY info available, use -I to display
1247 # ========
1248 #
1249 matchbox-deskto 1197 [001] 34211.378318: do_fork: (c1028460)
1250 matchbox-deskto 1295 [001] 34211.380388: do_fork: (c1028460)
1251 pcmanfm 1296 [000] 34211.632350: do_fork: (c1028460)
1252 pcmanfm 1296 [000] 34211.639917: do_fork: (c1028460)
1253 matchbox-deskto 1197 [001] 34217.541603: do_fork: (c1028460)
1254 matchbox-deskto 1299 [001] 34217.543584: do_fork: (c1028460)
1255 gthumb 1300 [001] 34217.697451: do_fork: (c1028460)
1256 gthumb 1300 [001] 34219.085734: do_fork: (c1028460)
1257 gthumb 1300 [000] 34219.121351: do_fork: (c1028460)
1258 gthumb 1300 [001] 34219.264551: do_fork: (c1028460)
1259 pcmanfm 1296 [000] 34219.590380: do_fork: (c1028460)
1260 matchbox-deskto 1197 [001] 34224.955965: do_fork: (c1028460)
1261 matchbox-deskto 1306 [001] 34224.957972: do_fork: (c1028460)
1262 matchbox-termin 1307 [000] 34225.038214: do_fork: (c1028460)
1263 matchbox-termin 1307 [001] 34225.044218: do_fork: (c1028460)
1264 matchbox-termin 1307 [000] 34225.046442: do_fork: (c1028460)
1265 matchbox-deskto 1197 [001] 34237.112138: do_fork: (c1028460)
1266 matchbox-deskto 1311 [001] 34237.114106: do_fork: (c1028460)
1267 gaku 1312 [000] 34237.202388: do_fork: (c1028460)
1268 </literallayout>
1269 And using 'perf report' on the same file, we can see the
1270 callgraphs from starting a few programs during those 30 seconds:
1271 </para>
1272
1273 <para>
1274 <imagedata fileref="figures/perf-probe-do_fork-profile.png" width="6in" depth="7in" align="center" scalefit="1" />
1275 </para>
1276
1277 <informalexample>
1278 <emphasis>Tying it Together:</emphasis> The trace events subsystem accomodate static
1279 and dynamic tracepoints in exactly the same way - there's no
1280 difference as far as the infrastructure is concerned. See the
1281 ftrace section for more details on the trace event subsystem.
1282 </informalexample>
1283
1284 <informalexample>
1285 <emphasis>Tying it Together:</emphasis> Dynamic tracepoints are implemented under the
1286 covers by kprobes and uprobes. kprobes and uprobes are also used
1287 by and in fact are the main focus of SystemTap.
1288 </informalexample>
1289 </section>
1290 </section>
1291
1292 <section id='perf-documentation'>
1293 <title>Documentation</title>
1294
1295 <para>
1296 Online versions of the man pages for the commands discussed in this
1297 section can be found here:
1298 <itemizedlist>
1299 <listitem><para>The <ulink url='http://linux.die.net/man/1/perf-stat'>'perf stat' manpage</ulink>.
1300 </para></listitem>
1301 <listitem><para>The <ulink url='http://linux.die.net/man/1/perf-record'>'perf record' manpage</ulink>.
1302 </para></listitem>
1303 <listitem><para>The <ulink url='http://linux.die.net/man/1/perf-report'>'perf report' manpage</ulink>.
1304 </para></listitem>
1305 <listitem><para>The <ulink url='http://linux.die.net/man/1/perf-probe'>'perf probe' manpage</ulink>.
1306 </para></listitem>
1307 <listitem><para>The <ulink url='http://linux.die.net/man/1/perf-script'>'perf script' manpage</ulink>.
1308 </para></listitem>
1309 <listitem><para>Documentation on using the
1310 <ulink url='http://linux.die.net/man/1/perf-script-python'>'perf script' python binding</ulink>.
1311 </para></listitem>
1312 <listitem><para>The top-level
1313 <ulink url='http://linux.die.net/man/1/perf'>perf(1) manpage</ulink>.
1314 </para></listitem>
1315 </itemizedlist>
1316 </para>
1317
1318 <para>
1319 Normally, you should be able to invoke the man pages via perf
1320 itself e.g. 'perf help' or 'perf help record'.
1321 </para>
1322
1323 <para>
1324 However, by default Yocto doesn't install man pages, but perf
1325 invokes the man pages for most help functionality. This is a bug
1326 and is being addressed by a Yocto bug:
1327 <ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=3388'>Bug 3388 - perf: enable man pages for basic 'help' functionality</ulink>.
1328 </para>
1329
1330 <para>
1331 The man pages in text form, along with some other files, such as
1332 a set of examples, can be found in the 'perf' directory of the
1333 kernel tree:
1334 <literallayout class='monospaced'>
1335 tools/perf/Documentation
1336 </literallayout>
1337 There's also a nice perf tutorial on the perf wiki that goes
1338 into more detail than we do here in certain areas:
1339 <ulink url='https://perf.wiki.kernel.org/index.php/Tutorial'>Perf Tutorial</ulink>
1340 </para>
1341 </section>
1342</section>
1343
1344<section id='profile-manual-ftrace'>
1345 <title>ftrace</title>
1346
1347 <para>
1348 'ftrace' literally refers to the 'ftrace function tracer' but in
1349 reality this encompasses a number of related tracers along with
1350 the infrastructure that they all make use of.
1351 </para>
1352
1353 <section id='ftrace-setup'>
1354 <title>Setup</title>
1355
1356 <para>
1357 For this section, we'll assume you've already performed the basic
1358 setup outlined in the General Setup section.
1359 </para>
1360
1361 <para>
1362 ftrace, trace-cmd, and kernelshark run on the target system,
1363 and are ready to go out-of-the-box - no additional setup is
1364 necessary. For the rest of this section we assume you've ssh'ed
1365 to the host and will be running ftrace on the target. kernelshark
1366 is a GUI application and if you use the '-X' option to ssh you
1367 can have the kernelshark GUI run on the target but display
1368 remotely on the host if you want.
1369 </para>
1370 </section>
1371
1372 <section id='basic-ftrace-usage'>
1373 <title>Basic ftrace usage</title>
1374
1375 <para>
1376 'ftrace' essentially refers to everything included in
1377 the /tracing directory of the mounted debugfs filesystem
1378 (Yocto follows the standard convention and mounts it
1379 at /sys/kernel/debug). Here's a listing of all the files
1380 found in /sys/kernel/debug/tracing on a Yocto system.:
1381 <literallayout class='monospaced'>
1382 root@sugarbay:/sys/kernel/debug/tracing# ls
1383 README kprobe_events trace
1384 available_events kprobe_profile trace_clock
1385 available_filter_functions options trace_marker
1386 available_tracers per_cpu trace_options
1387 buffer_size_kb printk_formats trace_pipe
1388 buffer_total_size_kb saved_cmdlines tracing_cpumask
1389 current_tracer set_event tracing_enabled
1390 dyn_ftrace_total_info set_ftrace_filter tracing_on
1391 enabled_functions set_ftrace_notrace tracing_thresh
1392 events set_ftrace_pid
1393 free_buffer set_graph_function
1394 </literallayout>
1395 The files listed above are used for various purposes -
1396 some relate directly to the tracers themselves, others are
1397 used to set tracing options, and yet others actually contain
1398 the tracing output when a tracer is in effect. Some of the
1399 functions can be guessed from their names, others need
1400 explanation; in any case, we'll cover some of the files we
1401 see here below but for an explanation of the others, please
1402 see the ftrace documentation.
1403 </para>
1404
1405 <para>
1406 We'll start by looking at some of the available built-in
1407 tracers.
1408 </para>
1409
1410 <para>
1411 cat'ing the 'available_tracers' file lists the set of
1412 available tracers:
1413 <literallayout class='monospaced'>
1414 root@sugarbay:/sys/kernel/debug/tracing# cat available_tracers
1415 blk function_graph function nop
1416 </literallayout>
1417 The 'current_tracer' file contains the tracer currently in
1418 effect:
1419 <literallayout class='monospaced'>
1420 root@sugarbay:/sys/kernel/debug/tracing# cat current_tracer
1421 nop
1422 </literallayout>
1423 The above listing of current_tracer shows that
1424 the 'nop' tracer is in effect, which is just another
1425 way of saying that there's actually no tracer
1426 currently in effect.
1427 </para>
1428
1429 <para>
1430 echo'ing one of the available_tracers into current_tracer
1431 makes the specified tracer the current tracer:
1432 <literallayout class='monospaced'>
1433 root@sugarbay:/sys/kernel/debug/tracing# echo function > current_tracer
1434 root@sugarbay:/sys/kernel/debug/tracing# cat current_tracer
1435 function
1436 </literallayout>
1437 The above sets the current tracer to be the
1438 'function tracer'. This tracer traces every function
1439 call in the kernel and makes it available as the
1440 contents of the 'trace' file. Reading the 'trace' file
1441 lists the currently buffered function calls that have been
1442 traced by the function tracer:
1443 <literallayout class='monospaced'>
1444 root@sugarbay:/sys/kernel/debug/tracing# cat trace | less
1445
1446 # tracer: function
1447 #
1448 # entries-in-buffer/entries-written: 310629/766471 #P:8
1449 #
1450 # _-----=&gt; irqs-off
1451 # / _----=&gt; need-resched
1452 # | / _---=&gt; hardirq/softirq
1453 # || / _--=&gt; preempt-depth
1454 # ||| / delay
1455 # TASK-PID CPU# |||| TIMESTAMP FUNCTION
1456 # | | | |||| | |
1457 &lt;idle&gt;-0 [004] d..1 470.867169: ktime_get_real &lt;-intel_idle
1458 &lt;idle&gt;-0 [004] d..1 470.867170: getnstimeofday &lt;-ktime_get_real
1459 &lt;idle&gt;-0 [004] d..1 470.867171: ns_to_timeval &lt;-intel_idle
1460 &lt;idle&gt;-0 [004] d..1 470.867171: ns_to_timespec &lt;-ns_to_timeval
1461 &lt;idle&gt;-0 [004] d..1 470.867172: smp_apic_timer_interrupt &lt;-apic_timer_interrupt
1462 &lt;idle&gt;-0 [004] d..1 470.867172: native_apic_mem_write &lt;-smp_apic_timer_interrupt
1463 &lt;idle&gt;-0 [004] d..1 470.867172: irq_enter &lt;-smp_apic_timer_interrupt
1464 &lt;idle&gt;-0 [004] d..1 470.867172: rcu_irq_enter &lt;-irq_enter
1465 &lt;idle&gt;-0 [004] d..1 470.867173: rcu_idle_exit_common.isra.33 &lt;-rcu_irq_enter
1466 &lt;idle&gt;-0 [004] d..1 470.867173: local_bh_disable &lt;-irq_enter
1467 &lt;idle&gt;-0 [004] d..1 470.867173: add_preempt_count &lt;-local_bh_disable
1468 &lt;idle&gt;-0 [004] d.s1 470.867174: tick_check_idle &lt;-irq_enter
1469 &lt;idle&gt;-0 [004] d.s1 470.867174: tick_check_oneshot_broadcast &lt;-tick_check_idle
1470 &lt;idle&gt;-0 [004] d.s1 470.867174: ktime_get &lt;-tick_check_idle
1471 &lt;idle&gt;-0 [004] d.s1 470.867174: tick_nohz_stop_idle &lt;-tick_check_idle
1472 &lt;idle&gt;-0 [004] d.s1 470.867175: update_ts_time_stats &lt;-tick_nohz_stop_idle
1473 &lt;idle&gt;-0 [004] d.s1 470.867175: nr_iowait_cpu &lt;-update_ts_time_stats
1474 &lt;idle&gt;-0 [004] d.s1 470.867175: tick_do_update_jiffies64 &lt;-tick_check_idle
1475 &lt;idle&gt;-0 [004] d.s1 470.867175: _raw_spin_lock &lt;-tick_do_update_jiffies64
1476 &lt;idle&gt;-0 [004] d.s1 470.867176: add_preempt_count &lt;-_raw_spin_lock
1477 &lt;idle&gt;-0 [004] d.s2 470.867176: do_timer &lt;-tick_do_update_jiffies64
1478 &lt;idle&gt;-0 [004] d.s2 470.867176: _raw_spin_lock &lt;-do_timer
1479 &lt;idle&gt;-0 [004] d.s2 470.867176: add_preempt_count &lt;-_raw_spin_lock
1480 &lt;idle&gt;-0 [004] d.s3 470.867177: ntp_tick_length &lt;-do_timer
1481 &lt;idle&gt;-0 [004] d.s3 470.867177: _raw_spin_lock_irqsave &lt;-ntp_tick_length
1482 .
1483 .
1484 .
1485 </literallayout>
1486 Each line in the trace above shows what was happening in
1487 the kernel on a given cpu, to the level of detail of
1488 function calls. Each entry shows the function called,
1489 followed by its caller (after the arrow).
1490 </para>
1491
1492 <para>
1493 The function tracer gives you an extremely detailed idea
1494 of what the kernel was doing at the point in time the trace
1495 was taken, and is a great way to learn about how the kernel
1496 code works in a dynamic sense.
1497 </para>
1498
1499 <informalexample>
1500 <emphasis>Tying it Together:</emphasis> The ftrace function tracer is also
1501 available from within perf, as the ftrace:function tracepoint.
1502 </informalexample>
1503
1504 <para>
1505 It is a little more difficult to follow the call chains than
1506 it needs to be - luckily there's a variant of the function
1507 tracer that displays the callchains explicitly, called the
1508 'function_graph' tracer:
1509 <literallayout class='monospaced'>
1510 root@sugarbay:/sys/kernel/debug/tracing# echo function_graph &gt; current_tracer
1511 root@sugarbay:/sys/kernel/debug/tracing# cat trace | less
1512
1513 tracer: function_graph
1514
1515 CPU DURATION FUNCTION CALLS
1516 | | | | | | |
1517 7) 0.046 us | pick_next_task_fair();
1518 7) 0.043 us | pick_next_task_stop();
1519 7) 0.042 us | pick_next_task_rt();
1520 7) 0.032 us | pick_next_task_fair();
1521 7) 0.030 us | pick_next_task_idle();
1522 7) | _raw_spin_unlock_irq() {
1523 7) 0.033 us | sub_preempt_count();
1524 7) 0.258 us | }
1525 7) 0.032 us | sub_preempt_count();
1526 7) + 13.341 us | } /* __schedule */
1527 7) 0.095 us | } /* sub_preempt_count */
1528 7) | schedule() {
1529 7) | __schedule() {
1530 7) 0.060 us | add_preempt_count();
1531 7) 0.044 us | rcu_note_context_switch();
1532 7) | _raw_spin_lock_irq() {
1533 7) 0.033 us | add_preempt_count();
1534 7) 0.247 us | }
1535 7) | idle_balance() {
1536 7) | _raw_spin_unlock() {
1537 7) 0.031 us | sub_preempt_count();
1538 7) 0.246 us | }
1539 7) | update_shares() {
1540 7) 0.030 us | __rcu_read_lock();
1541 7) 0.029 us | __rcu_read_unlock();
1542 7) 0.484 us | }
1543 7) 0.030 us | __rcu_read_lock();
1544 7) | load_balance() {
1545 7) | find_busiest_group() {
1546 7) 0.031 us | idle_cpu();
1547 7) 0.029 us | idle_cpu();
1548 7) 0.035 us | idle_cpu();
1549 7) 0.906 us | }
1550 7) 1.141 us | }
1551 7) 0.022 us | msecs_to_jiffies();
1552 7) | load_balance() {
1553 7) | find_busiest_group() {
1554 7) 0.031 us | idle_cpu();
1555 .
1556 .
1557 .
1558 4) 0.062 us | msecs_to_jiffies();
1559 4) 0.062 us | __rcu_read_unlock();
1560 4) | _raw_spin_lock() {
1561 4) 0.073 us | add_preempt_count();
1562 4) 0.562 us | }
1563 4) + 17.452 us | }
1564 4) 0.108 us | put_prev_task_fair();
1565 4) 0.102 us | pick_next_task_fair();
1566 4) 0.084 us | pick_next_task_stop();
1567 4) 0.075 us | pick_next_task_rt();
1568 4) 0.062 us | pick_next_task_fair();
1569 4) 0.066 us | pick_next_task_idle();
1570 ------------------------------------------
1571 4) kworker-74 =&gt; &lt;idle&gt;-0
1572 ------------------------------------------
1573
1574 4) | finish_task_switch() {
1575 4) | _raw_spin_unlock_irq() {
1576 4) 0.100 us | sub_preempt_count();
1577 4) 0.582 us | }
1578 4) 1.105 us | }
1579 4) 0.088 us | sub_preempt_count();
1580 4) ! 100.066 us | }
1581 .
1582 .
1583 .
1584 3) | sys_ioctl() {
1585 3) 0.083 us | fget_light();
1586 3) | security_file_ioctl() {
1587 3) 0.066 us | cap_file_ioctl();
1588 3) 0.562 us | }
1589 3) | do_vfs_ioctl() {
1590 3) | drm_ioctl() {
1591 3) 0.075 us | drm_ut_debug_printk();
1592 3) | i915_gem_pwrite_ioctl() {
1593 3) | i915_mutex_lock_interruptible() {
1594 3) 0.070 us | mutex_lock_interruptible();
1595 3) 0.570 us | }
1596 3) | drm_gem_object_lookup() {
1597 3) | _raw_spin_lock() {
1598 3) 0.080 us | add_preempt_count();
1599 3) 0.620 us | }
1600 3) | _raw_spin_unlock() {
1601 3) 0.085 us | sub_preempt_count();
1602 3) 0.562 us | }
1603 3) 2.149 us | }
1604 3) 0.133 us | i915_gem_object_pin();
1605 3) | i915_gem_object_set_to_gtt_domain() {
1606 3) 0.065 us | i915_gem_object_flush_gpu_write_domain();
1607 3) 0.065 us | i915_gem_object_wait_rendering();
1608 3) 0.062 us | i915_gem_object_flush_cpu_write_domain();
1609 3) 1.612 us | }
1610 3) | i915_gem_object_put_fence() {
1611 3) 0.097 us | i915_gem_object_flush_fence.constprop.36();
1612 3) 0.645 us | }
1613 3) 0.070 us | add_preempt_count();
1614 3) 0.070 us | sub_preempt_count();
1615 3) 0.073 us | i915_gem_object_unpin();
1616 3) 0.068 us | mutex_unlock();
1617 3) 9.924 us | }
1618 3) + 11.236 us | }
1619 3) + 11.770 us | }
1620 3) + 13.784 us | }
1621 3) | sys_ioctl() {
1622 </literallayout>
1623 As you can see, the function_graph display is much easier to
1624 follow. Also note that in addition to the function calls and
1625 associated braces, other events such as scheduler events
1626 are displayed in context. In fact, you can freely include
1627 any tracepoint available in the trace events subsystem described
1628 in the next section by simply enabling those events, and they'll
1629 appear in context in the function graph display. Quite a
1630 powerful tool for understanding kernel dynamics.
1631 </para>
1632
1633 <para>
1634 Also notice that there are various annotations on the left
1635 hand side of the display. For example if the total time it
1636 took for a given function to execute is above a certain
1637 threshold, and exclamation point or plus sign appears on the
1638 left hand side. Please see the ftrace documentation for
1639 details on all these fields.
1640 </para>
1641 </section>
1642
1643 <section id='the-trace-events-subsystem'>
1644 <title>The 'trace events' Subsystem</title>
1645
1646 <para>
1647 One especially important directory contained within
1648 the /sys/kernel/debug/tracing directory is the 'events'
1649 subdirectory, which contains representations of every
1650 tracepoint in the system. Listing out the contents of
1651 the 'events' subdirectory, we see mainly another set of
1652 subdirectories:
1653 <literallayout class='monospaced'>
1654 root@sugarbay:/sys/kernel/debug/tracing# cd events
1655 root@sugarbay:/sys/kernel/debug/tracing/events# ls -al
1656 drwxr-xr-x 38 root root 0 Nov 14 23:19 .
1657 drwxr-xr-x 5 root root 0 Nov 14 23:19 ..
1658 drwxr-xr-x 19 root root 0 Nov 14 23:19 block
1659 drwxr-xr-x 32 root root 0 Nov 14 23:19 btrfs
1660 drwxr-xr-x 5 root root 0 Nov 14 23:19 drm
1661 -rw-r--r-- 1 root root 0 Nov 14 23:19 enable
1662 drwxr-xr-x 40 root root 0 Nov 14 23:19 ext3
1663 drwxr-xr-x 79 root root 0 Nov 14 23:19 ext4
1664 drwxr-xr-x 14 root root 0 Nov 14 23:19 ftrace
1665 drwxr-xr-x 8 root root 0 Nov 14 23:19 hda
1666 -r--r--r-- 1 root root 0 Nov 14 23:19 header_event
1667 -r--r--r-- 1 root root 0 Nov 14 23:19 header_page
1668 drwxr-xr-x 25 root root 0 Nov 14 23:19 i915
1669 drwxr-xr-x 7 root root 0 Nov 14 23:19 irq
1670 drwxr-xr-x 12 root root 0 Nov 14 23:19 jbd
1671 drwxr-xr-x 14 root root 0 Nov 14 23:19 jbd2
1672 drwxr-xr-x 14 root root 0 Nov 14 23:19 kmem
1673 drwxr-xr-x 7 root root 0 Nov 14 23:19 module
1674 drwxr-xr-x 3 root root 0 Nov 14 23:19 napi
1675 drwxr-xr-x 6 root root 0 Nov 14 23:19 net
1676 drwxr-xr-x 3 root root 0 Nov 14 23:19 oom
1677 drwxr-xr-x 12 root root 0 Nov 14 23:19 power
1678 drwxr-xr-x 3 root root 0 Nov 14 23:19 printk
1679 drwxr-xr-x 8 root root 0 Nov 14 23:19 random
1680 drwxr-xr-x 4 root root 0 Nov 14 23:19 raw_syscalls
1681 drwxr-xr-x 3 root root 0 Nov 14 23:19 rcu
1682 drwxr-xr-x 6 root root 0 Nov 14 23:19 rpm
1683 drwxr-xr-x 20 root root 0 Nov 14 23:19 sched
1684 drwxr-xr-x 7 root root 0 Nov 14 23:19 scsi
1685 drwxr-xr-x 4 root root 0 Nov 14 23:19 signal
1686 drwxr-xr-x 5 root root 0 Nov 14 23:19 skb
1687 drwxr-xr-x 4 root root 0 Nov 14 23:19 sock
1688 drwxr-xr-x 10 root root 0 Nov 14 23:19 sunrpc
1689 drwxr-xr-x 538 root root 0 Nov 14 23:19 syscalls
1690 drwxr-xr-x 4 root root 0 Nov 14 23:19 task
1691 drwxr-xr-x 14 root root 0 Nov 14 23:19 timer
1692 drwxr-xr-x 3 root root 0 Nov 14 23:19 udp
1693 drwxr-xr-x 21 root root 0 Nov 14 23:19 vmscan
1694 drwxr-xr-x 3 root root 0 Nov 14 23:19 vsyscall
1695 drwxr-xr-x 6 root root 0 Nov 14 23:19 workqueue
1696 drwxr-xr-x 26 root root 0 Nov 14 23:19 writeback
1697 </literallayout>
1698 Each one of these subdirectories corresponds to a
1699 'subsystem' and contains yet again more subdirectories,
1700 each one of those finally corresponding to a tracepoint.
1701 For example, here are the contents of the 'kmem' subsystem:
1702 <literallayout class='monospaced'>
1703 root@sugarbay:/sys/kernel/debug/tracing/events# cd kmem
1704 root@sugarbay:/sys/kernel/debug/tracing/events/kmem# ls -al
1705 drwxr-xr-x 14 root root 0 Nov 14 23:19 .
1706 drwxr-xr-x 38 root root 0 Nov 14 23:19 ..
1707 -rw-r--r-- 1 root root 0 Nov 14 23:19 enable
1708 -rw-r--r-- 1 root root 0 Nov 14 23:19 filter
1709 drwxr-xr-x 2 root root 0 Nov 14 23:19 kfree
1710 drwxr-xr-x 2 root root 0 Nov 14 23:19 kmalloc
1711 drwxr-xr-x 2 root root 0 Nov 14 23:19 kmalloc_node
1712 drwxr-xr-x 2 root root 0 Nov 14 23:19 kmem_cache_alloc
1713 drwxr-xr-x 2 root root 0 Nov 14 23:19 kmem_cache_alloc_node
1714 drwxr-xr-x 2 root root 0 Nov 14 23:19 kmem_cache_free
1715 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_alloc
1716 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_alloc_extfrag
1717 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_alloc_zone_locked
1718 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_free
1719 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_free_batched
1720 drwxr-xr-x 2 root root 0 Nov 14 23:19 mm_page_pcpu_drain
1721 </literallayout>
1722 Let's see what's inside the subdirectory for a specific
1723 tracepoint, in this case the one for kmalloc:
1724 <literallayout class='monospaced'>
1725 root@sugarbay:/sys/kernel/debug/tracing/events/kmem# cd kmalloc
1726 root@sugarbay:/sys/kernel/debug/tracing/events/kmem/kmalloc# ls -al
1727 drwxr-xr-x 2 root root 0 Nov 14 23:19 .
1728 drwxr-xr-x 14 root root 0 Nov 14 23:19 ..
1729 -rw-r--r-- 1 root root 0 Nov 14 23:19 enable
1730 -rw-r--r-- 1 root root 0 Nov 14 23:19 filter
1731 -r--r--r-- 1 root root 0 Nov 14 23:19 format
1732 -r--r--r-- 1 root root 0 Nov 14 23:19 id
1733 </literallayout>
1734 The 'format' file for the tracepoint describes the event
1735 in memory, which is used by the various tracing tools
1736 that now make use of these tracepoint to parse the event
1737 and make sense of it, along with a 'print fmt' field that
1738 allows tools like ftrace to display the event as text.
1739 Here's what the format of the kmalloc event looks like:
1740 <literallayout class='monospaced'>
1741 root@sugarbay:/sys/kernel/debug/tracing/events/kmem/kmalloc# cat format
1742 name: kmalloc
1743 ID: 313
1744 format:
1745 field:unsigned short common_type; offset:0; size:2; signed:0;
1746 field:unsigned char common_flags; offset:2; size:1; signed:0;
1747 field:unsigned char common_preempt_count; offset:3; size:1; signed:0;
1748 field:int common_pid; offset:4; size:4; signed:1;
1749 field:int common_padding; offset:8; size:4; signed:1;
1750
1751 field:unsigned long call_site; offset:16; size:8; signed:0;
1752 field:const void * ptr; offset:24; size:8; signed:0;
1753 field:size_t bytes_req; offset:32; size:8; signed:0;
1754 field:size_t bytes_alloc; offset:40; size:8; signed:0;
1755 field:gfp_t gfp_flags; offset:48; size:4; signed:0;
1756
1757 print fmt: "call_site=%lx ptr=%p bytes_req=%zu bytes_alloc=%zu gfp_flags=%s", REC->call_site, REC->ptr, REC->bytes_req, REC->bytes_alloc,
1758 (REC->gfp_flags) ? __print_flags(REC->gfp_flags, "|", {(unsigned long)(((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | ((
1759 gfp_t)0x20000u) | (( gfp_t)0x02u) | (( gfp_t)0x08u)) | (( gfp_t)0x4000u) | (( gfp_t)0x10000u) | (( gfp_t)0x1000u) | (( gfp_t)0x200u) | ((
1760 gfp_t)0x400000u)), "GFP_TRANSHUGE"}, {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | (( gfp_t)0x20000u) | ((
1761 gfp_t)0x02u) | (( gfp_t)0x08u)), "GFP_HIGHUSER_MOVABLE"}, {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | ((
1762 gfp_t)0x20000u) | (( gfp_t)0x02u)), "GFP_HIGHUSER"}, {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | ((
1763 gfp_t)0x20000u)), "GFP_USER"}, {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u) | (( gfp_t)0x80000u)), GFP_TEMPORARY"},
1764 {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u) | (( gfp_t)0x80u)), "GFP_KERNEL"}, {(unsigned long)((( gfp_t)0x10u) | (( gfp_t)0x40u)),
1765 "GFP_NOFS"}, {(unsigned long)((( gfp_t)0x20u)), "GFP_ATOMIC"}, {(unsigned long)((( gfp_t)0x10u)), "GFP_NOIO"}, {(unsigned long)((
1766 gfp_t)0x20u), "GFP_HIGH"}, {(unsigned long)(( gfp_t)0x10u), "GFP_WAIT"}, {(unsigned long)(( gfp_t)0x40u), "GFP_IO"}, {(unsigned long)((
1767 gfp_t)0x100u), "GFP_COLD"}, {(unsigned long)(( gfp_t)0x200u), "GFP_NOWARN"}, {(unsigned long)(( gfp_t)0x400u), "GFP_REPEAT"}, {(unsigned
1768 long)(( gfp_t)0x800u), "GFP_NOFAIL"}, {(unsigned long)(( gfp_t)0x1000u), "GFP_NORETRY"}, {(unsigned long)(( gfp_t)0x4000u), "GFP_COMP"},
1769 {(unsigned long)(( gfp_t)0x8000u), "GFP_ZERO"}, {(unsigned long)(( gfp_t)0x10000u), "GFP_NOMEMALLOC"}, {(unsigned long)(( gfp_t)0x20000u),
1770 "GFP_HARDWALL"}, {(unsigned long)(( gfp_t)0x40000u), "GFP_THISNODE"}, {(unsigned long)(( gfp_t)0x80000u), "GFP_RECLAIMABLE"}, {(unsigned
1771 long)(( gfp_t)0x08u), "GFP_MOVABLE"}, {(unsigned long)(( gfp_t)0), "GFP_NOTRACK"}, {(unsigned long)(( gfp_t)0x400000u), "GFP_NO_KSWAPD"},
1772 {(unsigned long)(( gfp_t)0x800000u), "GFP_OTHER_NODE"} ) : "GFP_NOWAIT"
1773 </literallayout>
1774 The 'enable' file in the tracepoint directory is what allows
1775 the user (or tools such as trace-cmd) to actually turn the
1776 tracepoint on and off. When enabled, the corresponding
1777 tracepoint will start appearing in the ftrace 'trace'
1778 file described previously. For example, this turns on the
1779 kmalloc tracepoint:
1780 <literallayout class='monospaced'>
1781 root@sugarbay:/sys/kernel/debug/tracing/events/kmem/kmalloc# echo 1 > enable
1782 </literallayout>
1783 At the moment, we're not interested in the function tracer or
1784 some other tracer that might be in effect, so we first turn
1785 it off, but if we do that, we still need to turn tracing on in
1786 order to see the events in the output buffer:
1787 <literallayout class='monospaced'>
1788 root@sugarbay:/sys/kernel/debug/tracing# echo nop > current_tracer
1789 root@sugarbay:/sys/kernel/debug/tracing# echo 1 > tracing_on
1790 </literallayout>
1791 Now, if we look at the the 'trace' file, we see nothing
1792 but the kmalloc events we just turned on:
1793 <literallayout class='monospaced'>
1794 root@sugarbay:/sys/kernel/debug/tracing# cat trace | less
1795 # tracer: nop
1796 #
1797 # entries-in-buffer/entries-written: 1897/1897 #P:8
1798 #
1799 # _-----=&gt; irqs-off
1800 # / _----=&gt; need-resched
1801 # | / _---=&gt; hardirq/softirq
1802 # || / _--=&gt; preempt-depth
1803 # ||| / delay
1804 # TASK-PID CPU# |||| TIMESTAMP FUNCTION
1805 # | | | |||| | |
1806 dropbear-1465 [000] ...1 18154.620753: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1807 &lt;idle&gt;-0 [000] ..s3 18154.621640: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1808 &lt;idle&gt;-0 [000] ..s3 18154.621656: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1809 matchbox-termin-1361 [001] ...1 18154.755472: kmalloc: call_site=ffffffff81614050 ptr=ffff88006d5f0e00 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_KERNEL|GFP_REPEAT
1810 Xorg-1264 [002] ...1 18154.755581: kmalloc: call_site=ffffffff8141abe8 ptr=ffff8800734f4cc0 bytes_req=168 bytes_alloc=192 gfp_flags=GFP_KERNEL|GFP_NOWARN|GFP_NORETRY
1811 Xorg-1264 [002] ...1 18154.755583: kmalloc: call_site=ffffffff814192a3 ptr=ffff88001f822520 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL|GFP_ZERO
1812 Xorg-1264 [002] ...1 18154.755589: kmalloc: call_site=ffffffff81419edb ptr=ffff8800721a2f00 bytes_req=64 bytes_alloc=64 gfp_flags=GFP_KERNEL|GFP_ZERO
1813 matchbox-termin-1361 [001] ...1 18155.354594: kmalloc: call_site=ffffffff81614050 ptr=ffff88006db35400 bytes_req=576 bytes_alloc=1024 gfp_flags=GFP_KERNEL|GFP_REPEAT
1814 Xorg-1264 [002] ...1 18155.354703: kmalloc: call_site=ffffffff8141abe8 ptr=ffff8800734f4cc0 bytes_req=168 bytes_alloc=192 gfp_flags=GFP_KERNEL|GFP_NOWARN|GFP_NORETRY
1815 Xorg-1264 [002] ...1 18155.354705: kmalloc: call_site=ffffffff814192a3 ptr=ffff88001f822520 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL|GFP_ZERO
1816 Xorg-1264 [002] ...1 18155.354711: kmalloc: call_site=ffffffff81419edb ptr=ffff8800721a2f00 bytes_req=64 bytes_alloc=64 gfp_flags=GFP_KERNEL|GFP_ZERO
1817 &lt;idle&gt;-0 [000] ..s3 18155.673319: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1818 dropbear-1465 [000] ...1 18155.673525: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1819 &lt;idle&gt;-0 [000] ..s3 18155.674821: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d554800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1820 &lt;idle&gt;-0 [000] ..s3 18155.793014: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d554800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1821 dropbear-1465 [000] ...1 18155.793219: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1822 &lt;idle&gt;-0 [000] ..s3 18155.794147: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1823 &lt;idle&gt;-0 [000] ..s3 18155.936705: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1824 dropbear-1465 [000] ...1 18155.936910: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1825 &lt;idle&gt;-0 [000] ..s3 18155.937869: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d554800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1826 matchbox-termin-1361 [001] ...1 18155.953667: kmalloc: call_site=ffffffff81614050 ptr=ffff88006d5f2000 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_KERNEL|GFP_REPEAT
1827 Xorg-1264 [002] ...1 18155.953775: kmalloc: call_site=ffffffff8141abe8 ptr=ffff8800734f4cc0 bytes_req=168 bytes_alloc=192 gfp_flags=GFP_KERNEL|GFP_NOWARN|GFP_NORETRY
1828 Xorg-1264 [002] ...1 18155.953777: kmalloc: call_site=ffffffff814192a3 ptr=ffff88001f822520 bytes_req=24 bytes_alloc=32 gfp_flags=GFP_KERNEL|GFP_ZERO
1829 Xorg-1264 [002] ...1 18155.953783: kmalloc: call_site=ffffffff81419edb ptr=ffff8800721a2f00 bytes_req=64 bytes_alloc=64 gfp_flags=GFP_KERNEL|GFP_ZERO
1830 &lt;idle&gt;-0 [000] ..s3 18156.176053: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d554800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1831 dropbear-1465 [000] ...1 18156.176257: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1832 &lt;idle&gt;-0 [000] ..s3 18156.177717: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1833 &lt;idle&gt;-0 [000] ..s3 18156.399229: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d555800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1834 dropbear-1465 [000] ...1 18156.399434: kmalloc: call_site=ffffffff816650d4 ptr=ffff8800729c3000 bytes_http://rostedt.homelinux.com/kernelshark/req=2048 bytes_alloc=2048 gfp_flags=GFP_KERNEL
1835 &lt;idle&gt;-0 [000] ..s3 18156.400660: kmalloc: call_site=ffffffff81619b36 ptr=ffff88006d554800 bytes_req=512 bytes_alloc=512 gfp_flags=GFP_ATOMIC
1836 matchbox-termin-1361 [001] ...1 18156.552800: kmalloc: call_site=ffffffff81614050 ptr=ffff88006db34800 bytes_req=576 bytes_alloc=1024 gfp_flags=GFP_KERNEL|GFP_REPEAT
1837 </literallayout>
1838 To again disable the kmalloc event, we need to send 0 to the
1839 enable file:
1840 <literallayout class='monospaced'>
1841 root@sugarbay:/sys/kernel/debug/tracing/events/kmem/kmalloc# echo 0 > enable
1842 </literallayout>
1843 You can enable any number of events or complete subsystems
1844 (by using the 'enable' file in the subsystem directory) and
1845 get am arbitrarily fine-grained idea of what's going on in the
1846 system by enabling as many of the appropriate tracepoints
1847 as applicable.
1848 </para>
1849
1850 <para>
1851 A number of the tools described in this HOWTO do just that,
1852 including trace-cmd and kernelshark in the next section.
1853 </para>
1854
1855 <informalexample>
1856 <emphasis>Tying it Together:</emphasis> These tracepoints and their representation
1857 are used not only by ftrace, but by many of the other tools
1858 covered in this document and they form a central point of
1859 integration for the various tracers available in Linux.
1860 They form a central part of the instrumentation for the
1861 following tools: perf, lttng, ftrace, blktrace and SystemTap
1862 </informalexample>
1863
1864 <informalexample>
1865 <emphasis>Tying it Together:</emphasis> Eventually all the special-purpose tracers
1866 currently available in /sys/kernel/debug/tracing will be
1867 removed and replaced with equivalent tracers based on the
1868 'trace events' subsystem.
1869 </informalexample>
1870 </section>
1871
1872 <section id='trace-cmd-kernelshark'>
1873 <title>trace-cmd/kernelshark</title>
1874
1875 <para>
1876 trace-cmd is essentially an extensive command-line 'wrapper'
1877 interface that hides the details of all the individual files
1878 in /sys/kernel/debug/tracing, allowing users to specify
1879 specific particular events within the
1880 /sys/kernel/debug/tracing/events/ subdirectory and to collect
1881 traces and avoiding having to deal with those details directly.
1882 </para>
1883
1884 <para>
1885 As yet another layer on top of that, kernelshark provides a GUI
1886 that allows users to start and stop traces and specify sets
1887 of events using an intuitive interface, and view the
1888 output as both trace events and as a per-cpu graphical
1889 display. It directly uses 'trace-cmd' as the plumbing
1890 that accomplishes all that underneath the covers (and
1891 actually displays the trace-cmd command it uses, as we'll see).
1892 </para>
1893
1894 <para>
1895 To start a trace using kernelshark, first start kernelshark:
1896 <literallayout class='monospaced'>
1897 root@sugarbay:~# kernelshark
1898 </literallayout>
1899 The bring up the 'Capture' dialog by choosing from the
1900 kernelshark menu:
1901 <literallayout class='monospaced'>
1902 Capture | Record
1903 </literallayout>
1904 That will display the following dialog, which allows you to
1905 choose on or more events (or even one or more complete
1906 subsystems) to trace:
1907 </para>
1908
1909 <para>
1910 <imagedata fileref="figures/kernelshark-choose-events.png" width="6in" depth="6in" align="center" scalefit="1" />
1911 </para>
1912
1913 <para>
1914 Note that these are exactly the same set of events described
1915 in the previous trace events subsystem section, and in fact
1916 is where trace-cmd gets them for kernelshark.
1917 </para>
1918
1919 <para>
1920 In the above screenshot, we've decided to explore the
1921 graphics subsystem a bit and so have chosen to trace all
1922 the tracepoints contained within the 'i915' and 'drm'
1923 subsystems.
1924 </para>
1925
1926 <para>
1927 After doing that, we can start and stop the trace using
1928 the 'Run' and 'Stop' button on the lower right corner of
1929 the dialog (the same button will turn into the 'Stop'
1930 button after the trace has started):
1931 </para>
1932
1933 <para>
1934 <imagedata fileref="figures/kernelshark-output-display.png" width="6in" depth="6in" align="center" scalefit="1" />
1935 </para>
1936
1937 <para>
1938 Notice that the right-hand pane shows the exact trace-cmd
1939 command-line that's used to run the trace, along with the
1940 results of the trace-cmd run.
1941 </para>
1942
1943 <para>
1944 Once the 'Stop' button is pressed, the graphical view magically
1945 fills up with a colorful per-cpu display of the trace data,
1946 along with the detailed event listing below that:
1947 </para>
1948
1949 <para>
1950 <imagedata fileref="figures/kernelshark-i915-display.png" width="6in" depth="7in" align="center" scalefit="1" />
1951 </para>
1952
1953 <para>
1954 Here's another example, this time a display resulting
1955 from tracing 'all events':
1956 </para>
1957
1958 <para>
1959 <imagedata fileref="figures/kernelshark-all.png" width="6in" depth="7in" align="center" scalefit="1" />
1960 </para>
1961
1962 <para>
1963 The tool is pretty self-explanatory, but for more detailed
1964 information on navigating through the data, see the
1965 <ulink url='http://rostedt.homelinux.com/kernelshark/'>kernelshark website</ulink>.
1966 </para>
1967 </section>
1968
1969 <section id='ftrace-documentation'>
1970 <title>Documentation</title>
1971
1972 <para>
1973 The documentation for ftrace can be found in the kernel
1974 Documentation directory:
1975 <literallayout class='monospaced'>
1976 Documentation/trace/ftrace.txt
1977 </literallayout>
1978 The documentation for the trace event subsystem can also
1979 be found in the kernel Documentation directory:
1980 <literallayout class='monospaced'>
1981 Documentation/trace/events.txt
1982 </literallayout>
1983 There are a nice series of articles on using
1984 ftrace and trace-cmd at LWN:
1985 <itemizedlist>
1986 <listitem><para><ulink url='http://lwn.net/Articles/365835/'>Debugging the kernel using Ftrace - part 1</ulink>
1987 </para></listitem>
1988 <listitem><para><ulink url='http://lwn.net/Articles/366796/'>Debugging the kernel using Ftrace - part 2</ulink>
1989 </para></listitem>
1990 <listitem><para><ulink url='https://lwn.net/Articles/410200/'>trace-cmd: A front-end for Ftrace</ulink>
1991 </para></listitem>
1992 </itemizedlist>
1993 </para>
1994
1995 <para>
1996 There's more detailed documentation kernelshark usage here:
1997 <ulink url='http://rostedt.homelinux.com/kernelshark/'>KernelShark</ulink>
1998 </para>
1999
2000 <para>
2001 An amusing yet useful README (a tracing mini-HOWTO) can be
2002 found in /sys/kernel/debug/tracing/README.
2003 </para>
2004 </section>
2005</section>
2006
2007<section id='profile-manual-systemtap'>
2008 <title>systemtap</title>
2009
2010 <para>
2011 SystemTap is a system-wide script-based tracing and profiling tool.
2012 </para>
2013
2014 <para>
2015 SystemTap scripts are C-like programs that are executed in the
2016 kernel to gather/print/aggregate data extracted from the context
2017 they end up being invoked under.
2018 </para>
2019
2020 <para>
2021 For example, this probe from the
2022 <ulink url='http://sourceware.org/systemtap/tutorial/'>SystemTap tutorial</ulink>
2023 simply prints a line every time any process on the system open()s
2024 a file. For each line, it prints the executable name of the
2025 program that opened the file, along with its pid, and the name
2026 of the file it opened (or tried to open), which it extracts
2027 from the open syscall's argstr.
2028 <literallayout class='monospaced'>
2029 probe syscall.open
2030 {
2031 printf ("%s(%d) open (%s)\n", execname(), pid(), argstr)
2032 }
2033
2034 probe timer.ms(4000) # after 4 seconds
2035 {
2036 exit ()
2037 }
2038 </literallayout>
2039 Normally, to execute this probe, you'd simply install
2040 systemtap on the system you want to probe, and directly run
2041 the probe on that system e.g. assuming the name of the file
2042 containing the above text is trace_open.stp:
2043 <literallayout class='monospaced'>
2044 # stap trace_open.stp
2045 </literallayout>
2046 What systemtap does under the covers to run this probe is 1)
2047 parse and convert the probe to an equivalent 'C' form, 2)
2048 compile the 'C' form into a kernel module, 3) insert the
2049 module into the kernel, which arms it, and 4) collect the data
2050 generated by the probe and display it to the user.
2051 </para>
2052
2053 <para>
2054 In order to accomplish steps 1 and 2, the 'stap' program needs
2055 access to the kernel build system that produced the kernel
2056 that the probed system is running. In the case of a typical
2057 embedded system (the 'target'), the kernel build system
2058 unfortunately isn't typically part of the image running on
2059 the target. It is normally available on the 'host' system
2060 that produced the target image however; in such cases,
2061 steps 1 and 2 are executed on the host system, and steps
2062 3 and 4 are executed on the target system, using only the
2063 systemtap 'runtime'.
2064 </para>
2065
2066 <para>
2067 The systemtap support in Yocto assumes that only steps
2068 3 and 4 are run on the target; it is possible to do
2069 everything on the target, but this section assumes only
2070 the typical embedded use-case.
2071 </para>
2072
2073 <para>
2074 So basically what you need to do in order to run a systemtap
2075 script on the target is to 1) on the host system, compile the
2076 probe into a kernel module that makes sense to the target, 2)
2077 copy the module onto the target system and 3) insert the
2078 module into the target kernel, which arms it, and 4) collect
2079 the data generated by the probe and display it to the user.
2080 </para>
2081
2082 <section id='systemtap-setup'>
2083 <title>Setup</title>
2084
2085 <para>
2086 Those are a lot of steps and a lot of details, but
2087 fortunately Yocto includes a script called 'crosstap'
2088 that will take care of those details, allowing you to
2089 simply execute a systemtap script on the remote target,
2090 with arguments if necessary.
2091 </para>
2092
2093 <para>
2094 In order to do this from a remote host, however, you
2095 need to have access to the build for the image you
2096 booted. The 'crosstap' script provides details on how
2097 to do this if you run the script on the host without having
2098 done a build:
2099 <note>
2100 SystemTap, which uses 'crosstap', assumes you can establish an
2101 ssh connection to the remote target.
2102 Please refer to crosstap wiki page for details on verifying
2103 ssh connections at
2104 <ulink url='https://wiki.yoctoproject.org/wiki/Tracing_and_Profiling#systemtap'></ulink>.
2105 Also, the ability to ssh into the target system is not enabled
2106 by default in -minimal images.
2107 </note>
2108 <literallayout class='monospaced'>
2109 $ crosstap root@192.168.1.88 trace_open.stp
2110
2111 Error: No target kernel build found.
2112 Did you forget to create a local build of your image?
2113
2114 'crosstap' requires a local sdk build of the target system
2115 (or a build that includes 'tools-profile') in order to build
2116 kernel modules that can probe the target system.
2117
2118 Practically speaking, that means you need to do the following:
2119 - If you're running a pre-built image, download the release
2120 and/or BSP tarballs used to build the image.
2121 - If you're working from git sources, just clone the metadata
2122 and BSP layers needed to build the image you'll be booting.
2123 - Make sure you're properly set up to build a new image (see
2124 the BSP README and/or the widely available basic documentation
2125 that discusses how to build images).
2126 - Build an -sdk version of the image e.g.:
2127 $ bitbake core-image-sato-sdk
2128 OR
2129 - Build a non-sdk image but include the profiling tools:
2130 [ edit local.conf and add 'tools-profile' to the end of
2131 the EXTRA_IMAGE_FEATURES variable ]
2132 $ bitbake core-image-sato
2133
2134 Once you've build the image on the host system, you're ready to
2135 boot it (or the equivalent pre-built image) and use 'crosstap'
2136 to probe it (you need to source the environment as usual first):
2137
2138 $ source oe-init-build-env
2139 $ cd ~/my/systemtap/scripts
2140 $ crosstap root@192.168.1.xxx myscript.stp
2141 </literallayout>
2142 So essentially what you need to do is build an SDK image or
2143 image with 'tools-profile' as detailed in the
2144 "<link linkend='profile-manual-general-setup'>General Setup</link>"
2145 section of this manual, and boot the resulting target image.
2146 </para>
2147
2148 <note>
2149 If you have a build directory containing multiple machines,
2150 you need to have the MACHINE you're connecting to selected
2151 in local.conf, and the kernel in that machine's build
2152 directory must match the kernel on the booted system exactly,
2153 or you'll get the above 'crosstap' message when you try to
2154 invoke a script.
2155 </note>
2156 </section>
2157
2158 <section id='running-a-script-on-a-target'>
2159 <title>Running a Script on a Target</title>
2160
2161 <para>
2162 Once you've done that, you should be able to run a systemtap
2163 script on the target:
2164 <literallayout class='monospaced'>
2165 $ cd /path/to/yocto
2166 $ source oe-init-build-env
2167
2168 ### Shell environment set up for builds. ###
2169
2170 You can now run 'bitbake &lt;target&gt;'
2171
2172 Common targets are:
2173 core-image-minimal
2174 core-image-sato
2175 meta-toolchain
2176 meta-toolchain-sdk
2177 adt-installer
2178 meta-ide-support
2179
2180 You can also run generated qemu images with a command like 'runqemu qemux86'
2181 </literallayout>
2182 Once you've done that, you can cd to whatever directory
2183 contains your scripts and use 'crosstap' to run the script:
2184 <literallayout class='monospaced'>
2185 $ cd /path/to/my/systemap/script
2186 $ crosstap root@192.168.7.2 trace_open.stp
2187 </literallayout>
2188 If you get an error connecting to the target e.g.:
2189 <literallayout class='monospaced'>
2190 $ crosstap root@192.168.7.2 trace_open.stp
2191 error establishing ssh connection on remote 'root@192.168.7.2'
2192 </literallayout>
2193 Try ssh'ing to the target and see what happens:
2194 <literallayout class='monospaced'>
2195 $ ssh root@192.168.7.2
2196 </literallayout>
2197 A lot of the time, connection problems are due specifying a
2198 wrong IP address or having a 'host key verification error'.
2199 </para>
2200
2201 <para>
2202 If everything worked as planned, you should see something
2203 like this (enter the password when prompted, or press enter
2204 if its set up to use no password):
2205 <literallayout class='monospaced'>
2206 $ crosstap root@192.168.7.2 trace_open.stp
2207 root@192.168.7.2's password:
2208 matchbox-termin(1036) open ("/tmp/vte3FS2LW", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600)
2209 matchbox-termin(1036) open ("/tmp/vteJMC7LW", O_RDWR|O_CREAT|O_EXCL|O_LARGEFILE, 0600)
2210 </literallayout>
2211 </para>
2212 </section>
2213
2214 <section id='systemtap-documentation'>
2215 <title>Documentation</title>
2216
2217 <para>
2218 The SystemTap language reference can be found here:
2219 <ulink url='http://sourceware.org/systemtap/langref/'>SystemTap Language Reference</ulink>
2220 </para>
2221
2222 <para>
2223 Links to other SystemTap documents, tutorials, and examples can be
2224 found here:
2225 <ulink url='http://sourceware.org/systemtap/documentation.html'>SystemTap documentation page</ulink>
2226 </para>
2227 </section>
2228</section>
2229
2230<section id='profile-manual-oprofile'>
2231 <title>oprofile</title>
2232
2233 <para>
2234 oprofile itself is a command-line application that runs on the
2235 target system.
2236 </para>
2237
2238 <section id='oprofile-setup'>
2239 <title>Setup</title>
2240
2241 <para>
2242 For this section, we'll assume you've already performed the
2243 basic setup outlined in the
2244 "<link linkend='profile-manual-general-setup'>General Setup</link>"
2245 section.
2246 </para>
2247
2248 <para>
2249 For the the section that deals with oprofile from the command-line,
2250 we assume you've ssh'ed to the host and will be running
2251 oprofile on the target.
2252 </para>
2253
2254 <para>
2255 oprofileui (oprofile-viewer) is a GUI-based program that runs
2256 on the host and interacts remotely with the target.
2257 See the oprofileui section for the exact steps needed to
2258 install oprofileui on the host.
2259 </para>
2260 </section>
2261
2262 <section id='oprofile-basic-usage'>
2263 <title>Basic Usage</title>
2264
2265 <para>
2266 Oprofile as configured in Yocto is a system-wide profiler
2267 (i.e. the version in Yocto doesn't yet make use of the
2268 perf_events interface which would allow it to profile
2269 specific processes and workloads). It's relies on hardware
2270 counter support in the hardware (but can fall back to a
2271 timer-based mode), which means that it doesn't take
2272 advantage of tracepoints or other event sources for example.
2273 </para>
2274
2275 <para>
2276 It consists of a kernel module that collects samples and a
2277 userspace daemon that writes the sample data to disk.
2278 </para>
2279
2280 <para>
2281 The 'opcontrol' shell script is used for transparently
2282 managing these components and starting and stopping
2283 profiles, and the 'opreport' command is used to
2284 display the results.
2285 </para>
2286
2287 <para>
2288 The oprofile daemon should already be running, but before
2289 you start profiling, you may need to change some settings
2290 and some of these settings may require the daemon not
2291 be running. One of these settings is the path the the
2292 vmlinux file, which you'll want to set using the --vmlinux
2293 option if you want the kernel profiled:
2294 <literallayout class='monospaced'>
2295 root@crownbay:~# opcontrol --vmlinux=/boot/vmlinux-`uname -r`
2296 The profiling daemon is currently active, so changes to the configuration
2297 will be used the next time you restart oprofile after a --shutdown or --deinit.
2298 </literallayout>
2299 You can check if vmlinux file: is set using opcontrol --status:
2300 <literallayout class='monospaced'>
2301 root@crownbay:~# opcontrol --status
2302 Daemon paused: pid 1334
2303 Separate options: library
2304 vmlinux file: none
2305 Image filter: none
2306 Call-graph depth: 6
2307 </literallayout>
2308 If it's not, you need to shutdown the daemon, add the setting
2309 and restart the daemon:
2310 <literallayout class='monospaced'>
2311 root@crownbay:~# opcontrol --shutdown
2312 Killing daemon.
2313
2314 root@crownbay:~# opcontrol --vmlinux=/boot/vmlinux-`uname -r`
2315 root@crownbay:~# opcontrol --start-daemon
2316 Using default event: CPU_CLK_UNHALTED:100000:0:1:1
2317 Using 2.6+ OProfile kernel interface.
2318 Reading module info.
2319 Using log file /var/lib/oprofile/samples/oprofiled.log
2320 Daemon started.
2321 </literallayout>
2322 If we get the status again we now see our updated settings:
2323 <literallayout class='monospaced'>
2324 root@crownbay:~# opcontrol --status
2325 Daemon paused: pid 1649
2326 Separate options: library
2327 vmlinux file: /boot/vmlinux-3.4.11-yocto-standard
2328 Image filter: none
2329 Call-graph depth: 6
2330 </literallayout>
2331 We're now in a position to run a profile. For that we used
2332 'opcontrol --start':
2333 <literallayout class='monospaced'>
2334 root@crownbay:~# opcontrol --start
2335 Profiler running.
2336 </literallayout>
2337 In another window, run our wget workload:
2338 <literallayout class='monospaced'>
2339 root@crownbay:~# rm linux-2.6.19.2.tar.bz2; wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>; sync
2340 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
2341 linux-2.6.19.2.tar.b 100% |*******************************| 41727k 0:00:00 ETA
2342 </literallayout>
2343 To stop the profile we use 'opcontrol --shudown', which not
2344 only stops the profile but shuts down the daemon as well:
2345 <literallayout class='monospaced'>
2346 root@crownbay:~# opcontrol --start
2347 Stopping profiling.
2348 Killing daemon.
2349 </literallayout>
2350 Oprofile writes sample data to /var/lib/oprofile/samples,
2351 which you can look at if you're interested in seeing how the
2352 samples are structured. This is also interesting because
2353 it's related to how you dive down to get further details
2354 about specific executables in OProfile.
2355 </para>
2356
2357 <para>
2358 To see the default display output for a profile, simply type
2359 'opreport', which will show the results using the data in
2360 /var/lib/oprofile/samples:
2361 <literallayout class='monospaced'>
2362 root@crownbay:~# opreport
2363
2364 WARNING! The OProfile kernel driver reports sample buffer overflows.
2365 Such overflows can result in incorrect sample attribution, invalid sample
2366 files and other symptoms. See the oprofiled.log for details.
2367 You should adjust your sampling frequency to eliminate (or at least minimize)
2368 these overflows.
2369 CPU: Intel Architectural Perfmon, speed 1.3e+06 MHz (estimated)
2370 Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
2371 CPU_CLK_UNHALT...|
2372 samples| %|
2373 ------------------
2374 464365 79.8156 vmlinux-3.4.11-yocto-standard
2375 65108 11.1908 oprofiled
2376 CPU_CLK_UNHALT...|
2377 samples| %|
2378 ------------------
2379 64416 98.9372 oprofiled
2380 692 1.0628 libc-2.16.so
2381 36959 6.3526 no-vmlinux
2382 4378 0.7525 busybox
2383 CPU_CLK_UNHALT...|
2384 samples| %|
2385 ------------------
2386 2844 64.9612 libc-2.16.so
2387 1337 30.5391 busybox
2388 193 4.4084 ld-2.16.so
2389 2 0.0457 libnss_compat-2.16.so
2390 1 0.0228 libnsl-2.16.so
2391 1 0.0228 libnss_files-2.16.so
2392 4344 0.7467 bash
2393 CPU_CLK_UNHALT...|
2394 samples| %|
2395 ------------------
2396 2657 61.1648 bash
2397 1665 38.3287 libc-2.16.so
2398 18 0.4144 ld-2.16.so
2399 3 0.0691 libtinfo.so.5.9
2400 1 0.0230 libdl-2.16.so
2401 3118 0.5359 nf_conntrack
2402 686 0.1179 matchbox-terminal
2403 CPU_CLK_UNHALT...|
2404 samples| %|
2405 ------------------
2406 214 31.1953 libglib-2.0.so.0.3200.4
2407 114 16.6181 libc-2.16.so
2408 79 11.5160 libcairo.so.2.11200.2
2409 78 11.3703 libgdk-x11-2.0.so.0.2400.8
2410 51 7.4344 libpthread-2.16.so
2411 45 6.5598 libgobject-2.0.so.0.3200.4
2412 29 4.2274 libvte.so.9.2800.2
2413 25 3.6443 libX11.so.6.3.0
2414 19 2.7697 libxcb.so.1.1.0
2415 17 2.4781 libgtk-x11-2.0.so.0.2400.8
2416 12 1.7493 librt-2.16.so
2417 3 0.4373 libXrender.so.1.3.0
2418 671 0.1153 emgd
2419 411 0.0706 nf_conntrack_ipv4
2420 391 0.0672 iptable_nat
2421 378 0.0650 nf_nat
2422 263 0.0452 Xorg
2423 CPU_CLK_UNHALT...|
2424 samples| %|
2425 ------------------
2426 106 40.3042 Xorg
2427 53 20.1521 libc-2.16.so
2428 31 11.7871 libpixman-1.so.0.27.2
2429 26 9.8859 emgd_drv.so
2430 16 6.0837 libemgdsrv_um.so.1.5.15.3226
2431 11 4.1825 libEMGD2d.so.1.5.15.3226
2432 9 3.4221 libfb.so
2433 7 2.6616 libpthread-2.16.so
2434 1 0.3802 libudev.so.0.9.3
2435 1 0.3802 libdrm.so.2.4.0
2436 1 0.3802 libextmod.so
2437 1 0.3802 mouse_drv.so
2438 .
2439 .
2440 .
2441 9 0.0015 connmand
2442 CPU_CLK_UNHALT...|
2443 samples| %|
2444 ------------------
2445 4 44.4444 libglib-2.0.so.0.3200.4
2446 2 22.2222 libpthread-2.16.so
2447 1 11.1111 connmand
2448 1 11.1111 libc-2.16.so
2449 1 11.1111 librt-2.16.so
2450 6 0.0010 oprofile-server
2451 CPU_CLK_UNHALT...|
2452 samples| %|
2453 ------------------
2454 3 50.0000 libc-2.16.so
2455 1 16.6667 oprofile-server
2456 1 16.6667 libpthread-2.16.so
2457 1 16.6667 libglib-2.0.so.0.3200.4
2458 5 8.6e-04 gconfd-2
2459 CPU_CLK_UNHALT...|
2460 samples| %|
2461 ------------------
2462 2 40.0000 libdbus-1.so.3.7.2
2463 2 40.0000 libglib-2.0.so.0.3200.4
2464 1 20.0000 libc-2.16.so
2465 </literallayout>
2466 The output above shows the breakdown or samples by both
2467 number of samples and percentage for each executable.
2468 Within an executable, the sample counts are broken down
2469 further into executable and shared libraries (DSOs) used
2470 by the executable.
2471 </para>
2472
2473 <para>
2474 To get even more detailed breakdowns by function, we need to
2475 have the full paths to the DSOs, which we can get by
2476 using -f with opreport:
2477 <literallayout class='monospaced'>
2478 root@crownbay:~# opreport -f
2479
2480 CPU: Intel Architectural Perfmon, speed 1.3e+06 MHz (estimated)
2481 Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
2482 CPU_CLK_UNHALT...|
2483 samples| %|
2484
2485 464365 79.8156 /boot/vmlinux-3.4.11-yocto-standard
2486 65108 11.1908 /usr/bin/oprofiled
2487 CPU_CLK_UNHALT...|
2488 samples| %|
2489 ------------------
2490 64416 98.9372 /usr/bin/oprofiled
2491 692 1.0628 /lib/libc-2.16.so
2492 36959 6.3526 /no-vmlinux
2493 4378 0.7525 /bin/busybox
2494 CPU_CLK_UNHALT...|
2495 samples| %|
2496 ------------------
2497 2844 64.9612 /lib/libc-2.16.so
2498 1337 30.5391 /bin/busybox
2499 193 4.4084 /lib/ld-2.16.so
2500 2 0.0457 /lib/libnss_compat-2.16.so
2501 1 0.0228 /lib/libnsl-2.16.so
2502 1 0.0228 /lib/libnss_files-2.16.so
2503 4344 0.7467 /bin/bash
2504 CPU_CLK_UNHALT...|
2505 samples| %|
2506 ------------------
2507 2657 61.1648 /bin/bash
2508 1665 38.3287 /lib/libc-2.16.so
2509 18 0.4144 /lib/ld-2.16.so
2510 3 0.0691 /lib/libtinfo.so.5.9
2511 1 0.0230 /lib/libdl-2.16.so
2512 .
2513 .
2514 .
2515 </literallayout>
2516 Using the paths shown in the above output and the -l option to
2517 opreport, we can see all the functions that have hits in the
2518 profile and their sample counts and percentages. Here's a
2519 portion of what we get for the kernel:
2520 <literallayout class='monospaced'>
2521 root@crownbay:~# opreport -l /boot/vmlinux-3.4.11-yocto-standard
2522
2523 CPU: Intel Architectural Perfmon, speed 1.3e+06 MHz (estimated)
2524 Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
2525 samples % symbol name
2526 233981 50.3873 intel_idle
2527 15437 3.3243 rb_get_reader_page
2528 14503 3.1232 ring_buffer_consume
2529 14092 3.0347 mutex_spin_on_owner
2530 13024 2.8047 read_hpet
2531 8039 1.7312 sub_preempt_count
2532 7096 1.5281 ioread32
2533 6997 1.5068 add_preempt_count
2534 3985 0.8582 rb_advance_reader
2535 3488 0.7511 add_event_entry
2536 3303 0.7113 get_parent_ip
2537 3104 0.6684 rb_buffer_peek
2538 2960 0.6374 op_cpu_buffer_read_entry
2539 2614 0.5629 sync_buffer
2540 2545 0.5481 debug_smp_processor_id
2541 2456 0.5289 ohci_irq
2542 2397 0.5162 memset
2543 2349 0.5059 __copy_to_user_ll
2544 2185 0.4705 ring_buffer_event_length
2545 1918 0.4130 in_lock_functions
2546 1850 0.3984 __schedule
2547 1767 0.3805 __copy_from_user_ll_nozero
2548 1575 0.3392 rb_event_data_length
2549 1256 0.2705 memcpy
2550 1233 0.2655 system_call
2551 1213 0.2612 menu_select
2552 </literallayout>
2553 Notice that above we see an entry for the __copy_to_user_ll()
2554 function that we've looked at with other profilers as well.
2555 </para>
2556
2557 <para>
2558 Here's what we get when we do the same thing for the
2559 busybox executable:
2560 <literallayout class='monospaced'>
2561 CPU: Intel Architectural Perfmon, speed 1.3e+06 MHz (estimated)
2562 Counted CPU_CLK_UNHALTED events (Clock cycles when not halted) with a unit mask of 0x00 (No unit mask) count 100000
2563 samples % image name symbol name
2564 349 8.4198 busybox retrieve_file_data
2565 308 7.4306 libc-2.16.so _IO_file_xsgetn
2566 283 6.8275 libc-2.16.so __read_nocancel
2567 235 5.6695 libc-2.16.so syscall
2568 233 5.6212 libc-2.16.so clearerr
2569 215 5.1870 libc-2.16.so fread
2570 181 4.3667 libc-2.16.so __write_nocancel
2571 158 3.8118 libc-2.16.so __underflow
2572 151 3.6429 libc-2.16.so _dl_addr
2573 150 3.6188 busybox progress_meter
2574 150 3.6188 libc-2.16.so __poll_nocancel
2575 148 3.5706 libc-2.16.so _IO_file_underflow@@GLIBC_2.1
2576 137 3.3052 busybox safe_poll
2577 125 3.0157 busybox bb_progress_update
2578 122 2.9433 libc-2.16.so __x86.get_pc_thunk.bx
2579 95 2.2919 busybox full_write
2580 81 1.9542 busybox safe_write
2581 77 1.8577 busybox xwrite
2582 72 1.7370 libc-2.16.so _IO_file_read
2583 71 1.7129 libc-2.16.so _IO_sgetn
2584 67 1.6164 libc-2.16.so poll
2585 52 1.2545 libc-2.16.so _IO_switch_to_get_mode
2586 45 1.0856 libc-2.16.so read
2587 34 0.8203 libc-2.16.so write
2588 32 0.7720 busybox monotonic_sec
2589 25 0.6031 libc-2.16.so vfprintf
2590 22 0.5308 busybox get_mono
2591 14 0.3378 ld-2.16.so strcmp
2592 14 0.3378 libc-2.16.so __x86.get_pc_thunk.cx
2593 .
2594 .
2595 .
2596 </literallayout>
2597 Since we recorded the profile with a callchain depth of 6, we
2598 should be able to see our __copy_to_user_ll() callchains in
2599 the output, and indeed we can if we search around a bit in
2600 the 'opreport --callgraph' output:
2601 <literallayout class='monospaced'>
2602 root@crownbay:~# opreport --callgraph /boot/vmlinux-3.4.11-yocto-standard
2603
2604 392 6.9639 vmlinux-3.4.11-yocto-standard sock_aio_read
2605 736 13.0751 vmlinux-3.4.11-yocto-standard __generic_file_aio_write
2606 3255 57.8255 vmlinux-3.4.11-yocto-standard inet_recvmsg
2607 785 0.1690 vmlinux-3.4.11-yocto-standard tcp_recvmsg
2608 1790 31.7940 vmlinux-3.4.11-yocto-standard local_bh_enable
2609 1238 21.9893 vmlinux-3.4.11-yocto-standard __kfree_skb
2610 992 17.6199 vmlinux-3.4.11-yocto-standard lock_sock_nested
2611 785 13.9432 vmlinux-3.4.11-yocto-standard tcp_recvmsg [self]
2612 525 9.3250 vmlinux-3.4.11-yocto-standard release_sock
2613 112 1.9893 vmlinux-3.4.11-yocto-standard tcp_cleanup_rbuf
2614 72 1.2789 vmlinux-3.4.11-yocto-standard skb_copy_datagram_iovec
2615
2616 170 0.0366 vmlinux-3.4.11-yocto-standard skb_copy_datagram_iovec
2617 1491 73.3038 vmlinux-3.4.11-yocto-standard memcpy_toiovec
2618 327 16.0767 vmlinux-3.4.11-yocto-standard skb_copy_datagram_iovec
2619 170 8.3579 vmlinux-3.4.11-yocto-standard skb_copy_datagram_iovec [self]
2620 20 0.9833 vmlinux-3.4.11-yocto-standard copy_to_user
2621
2622 2588 98.2909 vmlinux-3.4.11-yocto-standard copy_to_user
2623 2349 0.5059 vmlinux-3.4.11-yocto-standard __copy_to_user_ll
2624 2349 89.2138 vmlinux-3.4.11-yocto-standard __copy_to_user_ll [self]
2625 166 6.3046 vmlinux-3.4.11-yocto-standard do_page_fault
2626 </literallayout>
2627 Remember that by default OProfile sessions are cumulative
2628 i.e. if you start and stop a profiling session, then start a
2629 new one, the new one will not erase the previous run(s) but
2630 will build on it. If you want to restart a profile from scratch,
2631 you need to reset:
2632 <literallayout class='monospaced'>
2633 root@crownbay:~# opcontrol --reset
2634 </literallayout>
2635 </para>
2636 </section>
2637
2638 <section id='oprofileui-a-gui-for-oprofile'>
2639 <title>OProfileUI - A GUI for OProfile</title>
2640
2641 <para>
2642 Yocto also supports a graphical UI for controlling and viewing
2643 OProfile traces, called OProfileUI. To use it, you first need
2644 to clone the oprofileui git repo, then configure, build, and
2645 install it:
2646 <literallayout class='monospaced'>
2647 [trz@empanada tmp]$ git clone git://git.yoctoproject.org/oprofileui
2648 [trz@empanada tmp]$ cd oprofileui
2649 [trz@empanada oprofileui]$ ./autogen.sh
2650 [trz@empanada oprofileui]$ sudo make install
2651 </literallayout>
2652 OprofileUI replaces the 'opreport' functionality with a GUI,
2653 and normally doesn't require the user to use 'opcontrol' either.
2654 If you want to profile the kernel, however, you need to either
2655 use the UI to specify a vmlinux or use 'opcontrol' to specify
2656 it on the target:
2657 </para>
2658
2659 <para>
2660 First, on the target, check if vmlinux file: is set:
2661 <literallayout class='monospaced'>
2662 root@crownbay:~# opcontrol --status
2663 </literallayout>
2664 If not:
2665 <literallayout class='monospaced'>
2666 root@crownbay:~# opcontrol --shutdown
2667 root@crownbay:~# opcontrol --vmlinux=/boot/vmlinux-`uname -r`
2668 root@crownbay:~# opcontrol --start-daemon
2669 </literallayout>
2670 Now, start the oprofile UI on the host system:
2671 <literallayout class='monospaced'>
2672 [trz@empanada oprofileui]$ oprofile-viewer
2673 </literallayout>
2674 To run a profile on the remote system, first connect to the
2675 remote system by pressing the 'Connect' button and supplying
2676 the IP address and port of the remote system (the default
2677 port is 4224).
2678 </para>
2679
2680 <para>
2681 The oprofile server should automatically be started already.
2682 If not, the connection will fail and you either typed in the
2683 wrong IP address and port (see below), or you need to start
2684 the server yourself:
2685 <literallayout class='monospaced'>
2686 root@crownbay:~# oprofile-server
2687 </literallayout>
2688 Or, to specify a specific port:
2689 <literallayout class='monospaced'>
2690 root@crownbay:~# oprofile-server --port 8888
2691 </literallayout>
2692 Once connected, press the 'Start' button and then run the
2693 wget workload on the remote system:
2694 <literallayout class='monospaced'>
2695 root@crownbay:~# rm linux-2.6.19.2.tar.bz2; wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>; sync
2696 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
2697 linux-2.6.19.2.tar.b 100% |*******************************| 41727k 0:00:00 ETA
2698 </literallayout>
2699 Once the workload completes, press the 'Stop' button. At that
2700 point the OProfile viewer will download the profile files it's
2701 collected (this may take some time, especially if the kernel
2702 was profiled). While it downloads the files, you should see
2703 something like the following:
2704 </para>
2705
2706 <para>
2707 <imagedata fileref="figures/oprofileui-downloading.png" width="6in" depth="7in" align="center" scalefit="1" />
2708 </para>
2709
2710 <para>
2711 Once the profile files have been retrieved, you should see a
2712 list of the processes that were profiled:
2713 </para>
2714
2715 <para>
2716 <imagedata fileref="figures/oprofileui-processes.png" width="6in" depth="7in" align="center" scalefit="1" />
2717 </para>
2718
2719 <para>
2720 If you select one of them, you should see all the symbols that
2721 were hit during the profile. Selecting one of them will show a
2722 list of callers and callees of the chosen function in two
2723 panes below the top pane. For example, here's what we see
2724 when we select __copy_to_user_ll():
2725 </para>
2726
2727 <para>
2728 <imagedata fileref="figures/oprofileui-copy-to-user.png" width="6in" depth="7in" align="center" scalefit="1" />
2729 </para>
2730
2731 <para>
2732 As another example, we can look at the busybox process and see
2733 that the progress meter made a system call:
2734 </para>
2735
2736 <para>
2737 <imagedata fileref="figures/oprofileui-busybox.png" width="6in" depth="7in" align="center" scalefit="1" />
2738 </para>
2739 </section>
2740
2741 <section id='oprofile-documentation'>
2742 <title>Documentation</title>
2743
2744 <para>
2745 Yocto already has some information on setting up and using
2746 OProfile and oprofileui. As this document doesn't cover
2747 everything in detail, it may be worth taking a look at the
2748 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-oprofile'>Profiling with OProfile</ulink>"
2749 section in the Yocto Project Development Manual
2750 </para>
2751
2752 <para>
2753 The OProfile manual can be found here:
2754 <ulink url='http://oprofile.sourceforge.net/doc/index.html'>OProfile manual</ulink>
2755 </para>
2756
2757 <para>
2758 The OProfile website contains links to the above manual and
2759 bunch of other items including an extensive set of examples:
2760 <ulink url='http://oprofile.sourceforge.net/about/'>About OProfile</ulink>
2761 </para>
2762 </section>
2763</section>
2764
2765<section id='profile-manual-sysprof'>
2766 <title>Sysprof</title>
2767
2768 <para>
2769 Sysprof is a very easy to use system-wide profiler that consists
2770 of a single window with three panes and a few buttons which allow
2771 you to start, stop, and view the profile from one place.
2772 </para>
2773
2774 <section id='sysprof-setup'>
2775 <title>Setup</title>
2776
2777 <para>
2778 For this section, we'll assume you've already performed the
2779 basic setup outlined in the General Setup section.
2780 </para>
2781
2782 <para>
2783 Sysprof is a GUI-based application that runs on the target
2784 system. For the rest of this document we assume you've
2785 ssh'ed to the host and will be running Sysprof on the
2786 target (you can use the '-X' option to ssh and have the
2787 Sysprof GUI run on the target but display remotely on the
2788 host if you want).
2789 </para>
2790 </section>
2791
2792 <section id='sysprof-basic-usage'>
2793 <title>Basic Usage</title>
2794
2795 <para>
2796 To start profiling the system, you simply press the 'Start'
2797 button. To stop profiling and to start viewing the profile data
2798 in one easy step, press the 'Profile' button.
2799 </para>
2800
2801 <para>
2802 Once you've pressed the profile button, the three panes will
2803 fill up with profiling data:
2804 </para>
2805
2806 <para>
2807 <imagedata fileref="figures/sysprof-copy-to-user.png" width="6in" depth="4in" align="center" scalefit="1" />
2808 </para>
2809
2810 <para>
2811 The left pane shows a list of functions and processes.
2812 Selecting one of those expands that function in the right
2813 pane, showing all its callees. Note that this caller-oriented
2814 display is essentially the inverse of perf's default
2815 callee-oriented callchain display.
2816 </para>
2817
2818 <para>
2819 In the screenshot above, we're focusing on __copy_to_user_ll()
2820 and looking up the callchain we can see that one of the callers
2821 of __copy_to_user_ll is sys_read() and the complete callpath
2822 between them. Notice that this is essentially a portion of the
2823 same information we saw in the perf display shown in the perf
2824 section of this page.
2825 </para>
2826
2827 <para>
2828 <imagedata fileref="figures/sysprof-copy-from-user.png" width="6in" depth="4in" align="center" scalefit="1" />
2829 </para>
2830
2831 <para>
2832 Similarly, the above is a snapshot of the Sysprof display of a
2833 copy-from-user callchain.
2834 </para>
2835
2836 <para>
2837 Finally, looking at the third Sysprof pane in the lower left,
2838 we can see a list of all the callers of a particular function
2839 selected in the top left pane. In this case, the lower pane is
2840 showing all the callers of __mark_inode_dirty:
2841 </para>
2842
2843 <para>
2844 <imagedata fileref="figures/sysprof-callers.png" width="6in" depth="4in" align="center" scalefit="1" />
2845 </para>
2846
2847 <para>
2848 Double-clicking on one of those functions will in turn change the
2849 focus to the selected function, and so on.
2850 </para>
2851
2852 <informalexample>
2853 <emphasis>Tying it Together:</emphasis> If you like sysprof's 'caller-oriented'
2854 display, you may be able to approximate it in other tools as
2855 well. For example, 'perf report' has the -g (--call-graph)
2856 option that you can experiment with; one of the options is
2857 'caller' for an inverted caller-based callgraph display.
2858 </informalexample>
2859 </section>
2860
2861 <section id='sysprof-documentation'>
2862 <title>Documentation</title>
2863
2864 <para>
2865 There doesn't seem to be any documentation for Sysprof, but
2866 maybe that's because it's pretty self-explanatory.
2867 The Sysprof website, however, is here:
2868 <ulink url='http://sysprof.com/'>Sysprof, System-wide Performance Profiler for Linux</ulink>
2869 </para>
2870 </section>
2871</section>
2872
2873<section id='lttng-linux-trace-toolkit-next-generation'>
2874 <title>LTTng (Linux Trace Toolkit, next generation)</title>
2875
2876 <section id='lttng-setup'>
2877 <title>Setup</title>
2878
2879 <para>
2880 For this section, we'll assume you've already performed the
2881 basic setup outlined in the General Setup section.
2882 </para>
2883
2884 <para>
2885 LTTng is run on the target system by ssh'ing to it.
2886 However, if you want to see the traces graphically,
2887 install Eclipse as described in section
2888 "<link linkend='manually-copying-a-trace-to-the-host-and-viewing-it-in-eclipse'>Manually copying a trace to the host and viewing it in Eclipse (i.e. using Eclipse without network support)</link>"
2889 and follow the directions to manually copy traces to the host and
2890 view them in Eclipse (i.e. using Eclipse without network support).
2891 </para>
2892
2893 <note>
2894 Be sure to download and install/run the 'SR1' or later Juno release
2895 of eclipse e.g.:
2896 <ulink url='http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/juno/SR1/eclipse-cpp-juno-SR1-linux-gtk-x86_64.tar.gz'>http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/juno/SR1/eclipse-cpp-juno-SR1-linux-gtk-x86_64.tar.gz</ulink>
2897 </note>
2898 </section>
2899
2900 <section id='collecting-and-viewing-traces'>
2901 <title>Collecting and Viewing Traces</title>
2902
2903 <para>
2904 Once you've applied the above commits and built and booted your
2905 image (you need to build the core-image-sato-sdk image or the
2906 other methods described in the General Setup section), you're
2907 ready to start tracing.
2908 </para>
2909
2910 <section id='collecting-and-viewing-a-trace-on-the-target-inside-a-shell'>
2911 <title>Collecting and viewing a trace on the target (inside a shell)</title>
2912
2913 <para>
2914 First, from the target, ssh to the target:
2915 <literallayout class='monospaced'>
2916 $ ssh -l root 192.168.1.47
2917 The authenticity of host '192.168.1.47 (192.168.1.47)' can't be established.
2918 RSA key fingerprint is 23:bd:c8:b1:a8:71:52:00:ee:00:4f:64:9e:10:b9:7e.
2919 Are you sure you want to continue connecting (yes/no)? yes
2920 Warning: Permanently added '192.168.1.47' (RSA) to the list of known hosts.
2921 root@192.168.1.47's password:
2922 </literallayout>
2923 Once on the target, use these steps to create a trace:
2924 <literallayout class='monospaced'>
2925 root@crownbay:~# lttng create
2926 Spawning a session daemon
2927 Session auto-20121015-232120 created.
2928 Traces will be written in /home/root/lttng-traces/auto-20121015-232120
2929 </literallayout>
2930 Enable the events you want to trace (in this case all
2931 kernel events):
2932 <literallayout class='monospaced'>
2933 root@crownbay:~# lttng enable-event --kernel --all
2934 All kernel events are enabled in channel channel0
2935 </literallayout>
2936 Start the trace:
2937 <literallayout class='monospaced'>
2938 root@crownbay:~# lttng start
2939 Tracing started for session auto-20121015-232120
2940 </literallayout>
2941 And then stop the trace after awhile or after running
2942 a particular workload that you want to trace:
2943 <literallayout class='monospaced'>
2944 root@crownbay:~# lttng stop
2945 Tracing stopped for session auto-20121015-232120
2946 </literallayout>
2947 You can now view the trace in text form on the target:
2948 <literallayout class='monospaced'>
2949 root@crownbay:~# lttng view
2950 [23:21:56.989270399] (+?.?????????) sys_geteuid: { 1 }, { }
2951 [23:21:56.989278081] (+0.000007682) exit_syscall: { 1 }, { ret = 0 }
2952 [23:21:56.989286043] (+0.000007962) sys_pipe: { 1 }, { fildes = 0xB77B9E8C }
2953 [23:21:56.989321802] (+0.000035759) exit_syscall: { 1 }, { ret = 0 }
2954 [23:21:56.989329345] (+0.000007543) sys_mmap_pgoff: { 1 }, { addr = 0x0, len = 10485760, prot = 3, flags = 131362, fd = 4294967295, pgoff = 0 }
2955 [23:21:56.989351694] (+0.000022349) exit_syscall: { 1 }, { ret = -1247805440 }
2956 [23:21:56.989432989] (+0.000081295) sys_clone: { 1 }, { clone_flags = 0x411, newsp = 0xB5EFFFE4, parent_tid = 0xFFFFFFFF, child_tid = 0x0 }
2957 [23:21:56.989477129] (+0.000044140) sched_stat_runtime: { 1 }, { comm = "lttng-consumerd", tid = 1193, runtime = 681660, vruntime = 43367983388 }
2958 [23:21:56.989486697] (+0.000009568) sched_migrate_task: { 1 }, { comm = "lttng-consumerd", tid = 1193, prio = 20, orig_cpu = 1, dest_cpu = 1 }
2959 [23:21:56.989508418] (+0.000021721) hrtimer_init: { 1 }, { hrtimer = 3970832076, clockid = 1, mode = 1 }
2960 [23:21:56.989770462] (+0.000262044) hrtimer_cancel: { 1 }, { hrtimer = 3993865440 }
2961 [23:21:56.989771580] (+0.000001118) hrtimer_cancel: { 0 }, { hrtimer = 3993812192 }
2962 [23:21:56.989776957] (+0.000005377) hrtimer_expire_entry: { 1 }, { hrtimer = 3993865440, now = 79815980007057, function = 3238465232 }
2963 [23:21:56.989778145] (+0.000001188) hrtimer_expire_entry: { 0 }, { hrtimer = 3993812192, now = 79815980008174, function = 3238465232 }
2964 [23:21:56.989791695] (+0.000013550) softirq_raise: { 1 }, { vec = 1 }
2965 [23:21:56.989795396] (+0.000003701) softirq_raise: { 0 }, { vec = 1 }
2966 [23:21:56.989800635] (+0.000005239) softirq_raise: { 0 }, { vec = 9 }
2967 [23:21:56.989807130] (+0.000006495) sched_stat_runtime: { 1 }, { comm = "lttng-consumerd", tid = 1193, runtime = 330710, vruntime = 43368314098 }
2968 [23:21:56.989809993] (+0.000002863) sched_stat_runtime: { 0 }, { comm = "lttng-sessiond", tid = 1181, runtime = 1015313, vruntime = 36976733240 }
2969 [23:21:56.989818514] (+0.000008521) hrtimer_expire_exit: { 0 }, { hrtimer = 3993812192 }
2970 [23:21:56.989819631] (+0.000001117) hrtimer_expire_exit: { 1 }, { hrtimer = 3993865440 }
2971 [23:21:56.989821866] (+0.000002235) hrtimer_start: { 0 }, { hrtimer = 3993812192, function = 3238465232, expires = 79815981000000, softexpires = 79815981000000 }
2972 [23:21:56.989822984] (+0.000001118) hrtimer_start: { 1 }, { hrtimer = 3993865440, function = 3238465232, expires = 79815981000000, softexpires = 79815981000000 }
2973 [23:21:56.989832762] (+0.000009778) softirq_entry: { 1 }, { vec = 1 }
2974 [23:21:56.989833879] (+0.000001117) softirq_entry: { 0 }, { vec = 1 }
2975 [23:21:56.989838069] (+0.000004190) timer_cancel: { 1 }, { timer = 3993871956 }
2976 [23:21:56.989839187] (+0.000001118) timer_cancel: { 0 }, { timer = 3993818708 }
2977 [23:21:56.989841492] (+0.000002305) timer_expire_entry: { 1 }, { timer = 3993871956, now = 79515980, function = 3238277552 }
2978 [23:21:56.989842819] (+0.000001327) timer_expire_entry: { 0 }, { timer = 3993818708, now = 79515980, function = 3238277552 }
2979 [23:21:56.989854831] (+0.000012012) sched_stat_runtime: { 1 }, { comm = "lttng-consumerd", tid = 1193, runtime = 49237, vruntime = 43368363335 }
2980 [23:21:56.989855949] (+0.000001118) sched_stat_runtime: { 0 }, { comm = "lttng-sessiond", tid = 1181, runtime = 45121, vruntime = 36976778361 }
2981 [23:21:56.989861257] (+0.000005308) sched_stat_sleep: { 1 }, { comm = "kworker/1:1", tid = 21, delay = 9451318 }
2982 [23:21:56.989862374] (+0.000001117) sched_stat_sleep: { 0 }, { comm = "kworker/0:0", tid = 4, delay = 9958820 }
2983 [23:21:56.989868241] (+0.000005867) sched_wakeup: { 0 }, { comm = "kworker/0:0", tid = 4, prio = 120, success = 1, target_cpu = 0 }
2984 [23:21:56.989869358] (+0.000001117) sched_wakeup: { 1 }, { comm = "kworker/1:1", tid = 21, prio = 120, success = 1, target_cpu = 1 }
2985 [23:21:56.989877460] (+0.000008102) timer_expire_exit: { 1 }, { timer = 3993871956 }
2986 [23:21:56.989878577] (+0.000001117) timer_expire_exit: { 0 }, { timer = 3993818708 }
2987 .
2988 .
2989 .
2990 </literallayout>
2991 You can now safely destroy the trace session (note that
2992 this doesn't delete the trace - it's still there
2993 in ~/lttng-traces):
2994 <literallayout class='monospaced'>
2995 root@crownbay:~# lttng destroy
2996 Session auto-20121015-232120 destroyed at /home/root
2997 </literallayout>
2998 Note that the trace is saved in a directory of the same
2999 name as returned by 'lttng create', under the ~/lttng-traces
3000 directory (note that you can change this by supplying your
3001 own name to 'lttng create'):
3002 <literallayout class='monospaced'>
3003 root@crownbay:~# ls -al ~/lttng-traces
3004 drwxrwx--- 3 root root 1024 Oct 15 23:21 .
3005 drwxr-xr-x 5 root root 1024 Oct 15 23:57 ..
3006 drwxrwx--- 3 root root 1024 Oct 15 23:21 auto-20121015-232120
3007 </literallayout>
3008 </para>
3009 </section>
3010
3011 <section id='collecting-and-viewing-a-userspace-trace-on-the-target-inside-a-shell'>
3012 <title>Collecting and viewing a userspace trace on the target (inside a shell)</title>
3013
3014 <para>
3015 For lttng userspace tracing, you need to have a properly
3016 instrumented userspace program. For this example, we'll use
3017 the 'hello' test program generated by the lttng-ust build.
3018 </para>
3019
3020 <para>
3021 The 'hello' test program isn't installed on the rootfs by
3022 the lttng-ust build, so we need to copy it over manually.
3023 First cd into the build directory that contains the hello
3024 executable:
3025 <literallayout class='monospaced'>
3026 $ cd build/tmp/work/core2-poky-linux/lttng-ust/2.0.5-r0/git/tests/hello/.libs
3027 </literallayout>
3028 Copy that over to the target machine:
3029 <literallayout class='monospaced'>
3030 $ scp hello root@192.168.1.20:
3031 </literallayout>
3032 You now have the instrumented lttng 'hello world' test
3033 program on the target, ready to test.
3034 </para>
3035
3036 <para>
3037 First, from the target, ssh to the target:
3038 <literallayout class='monospaced'>
3039 $ ssh -l root 192.168.1.47
3040 The authenticity of host '192.168.1.47 (192.168.1.47)' can't be established.
3041 RSA key fingerprint is 23:bd:c8:b1:a8:71:52:00:ee:00:4f:64:9e:10:b9:7e.
3042 Are you sure you want to continue connecting (yes/no)? yes
3043 Warning: Permanently added '192.168.1.47' (RSA) to the list of known hosts.
3044 root@192.168.1.47's password:
3045 </literallayout>
3046 Once on the target, use these steps to create a trace:
3047 <literallayout class='monospaced'>
3048 root@crownbay:~# lttng create
3049 Session auto-20190303-021943 created.
3050 Traces will be written in /home/root/lttng-traces/auto-20190303-021943
3051 </literallayout>
3052 Enable the events you want to trace (in this case all
3053 userspace events):
3054 <literallayout class='monospaced'>
3055 root@crownbay:~# lttng enable-event --userspace --all
3056 All UST events are enabled in channel channel0
3057 </literallayout>
3058 Start the trace:
3059 <literallayout class='monospaced'>
3060 root@crownbay:~# lttng start
3061 Tracing started for session auto-20190303-021943
3062 </literallayout>
3063 Run the instrumented hello world program:
3064 <literallayout class='monospaced'>
3065 root@crownbay:~# ./hello
3066 Hello, World!
3067 Tracing... done.
3068 </literallayout>
3069 And then stop the trace after awhile or after running a
3070 particular workload that you want to trace:
3071 <literallayout class='monospaced'>
3072 root@crownbay:~# lttng stop
3073 Tracing stopped for session auto-20190303-021943
3074 </literallayout>
3075 You can now view the trace in text form on the target:
3076 <literallayout class='monospaced'>
3077 root@crownbay:~# lttng view
3078 [02:31:14.906146544] (+?.?????????) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 0, intfield2 = 0x0, longfield = 0, netintfield = 0, netintfieldhex = 0x0, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2, boolfield = 1 }
3079 [02:31:14.906170360] (+0.000023816) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 1, intfield2 = 0x1, longfield = 1, netintfield = 1, netintfieldhex = 0x1, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2, boolfield = 1 }
3080 [02:31:14.906183140] (+0.000012780) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 2, intfield2 = 0x2, longfield = 2, netintfield = 2, netintfieldhex = 0x2, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2, boolfield = 1 }
3081 [02:31:14.906194385] (+0.000011245) hello:1424 ust_tests_hello:tptest: { cpu_id = 1 }, { intfield = 3, intfield2 = 0x3, longfield = 3, netintfield = 3, netintfieldhex = 0x3, arrfield1 = [ [0] = 1, [1] = 2, [2] = 3 ], arrfield2 = "test", _seqfield1_length = 4, seqfield1 = [ [0] = 116, [1] = 101, [2] = 115, [3] = 116 ], _seqfield2_length = 4, seqfield2 = "test", stringfield = "test", floatfield = 2222, doublefield = 2, boolfield = 1 }
3082 .
3083 .
3084 .
3085 </literallayout>
3086 You can now safely destroy the trace session (note that
3087 this doesn't delete the trace - it's still
3088 there in ~/lttng-traces):
3089 <literallayout class='monospaced'>
3090 root@crownbay:~# lttng destroy
3091 Session auto-20190303-021943 destroyed at /home/root
3092 </literallayout>
3093 </para>
3094 </section>
3095
3096 <section id='manually-copying-a-trace-to-the-host-and-viewing-it-in-eclipse'>
3097 <title>Manually copying a trace to the host and viewing it in Eclipse (i.e. using Eclipse without network support)</title>
3098
3099 <para>
3100 If you already have an LTTng trace on a remote target and
3101 would like to view it in Eclipse on the host, you can easily
3102 copy it from the target to the host and import it into
3103 Eclipse to view it using the LTTng Eclipse plug-in already
3104 bundled in the Eclipse (Juno SR1 or greater).
3105 </para>
3106
3107 <para>
3108 Using the trace we created in the previous section, archive
3109 it and copy it to your host system:
3110 <literallayout class='monospaced'>
3111 root@crownbay:~/lttng-traces# tar zcvf auto-20121015-232120.tar.gz auto-20121015-232120
3112 auto-20121015-232120/
3113 auto-20121015-232120/kernel/
3114 auto-20121015-232120/kernel/metadata
3115 auto-20121015-232120/kernel/channel0_1
3116 auto-20121015-232120/kernel/channel0_0
3117
3118 $ scp root@192.168.1.47:lttng-traces/auto-20121015-232120.tar.gz .
3119 root@192.168.1.47's password:
3120 auto-20121015-232120.tar.gz 100% 1566KB 1.5MB/s 00:01
3121 </literallayout>
3122 Unarchive it on the host:
3123 <literallayout class='monospaced'>
3124 $ gunzip -c auto-20121015-232120.tar.gz | tar xvf -
3125 auto-20121015-232120/
3126 auto-20121015-232120/kernel/
3127 auto-20121015-232120/kernel/metadata
3128 auto-20121015-232120/kernel/channel0_1
3129 auto-20121015-232120/kernel/channel0_0
3130 </literallayout>
3131 We can now import the trace into Eclipse and view it:
3132 <orderedlist>
3133 <listitem><para>First, start eclipse and open the
3134 'LTTng Kernel' perspective by selecting the following
3135 menu item:
3136 <literallayout class='monospaced'>
3137 Window | Open Perspective | Other...
3138 </literallayout></para></listitem>
3139 <listitem><para>In the dialog box that opens, select
3140 'LTTng Kernel' from the list.</para></listitem>
3141 <listitem><para>Back at the main menu, select the
3142 following menu item:
3143 <literallayout class='monospaced'>
3144 File | New | Project...
3145 </literallayout></para></listitem>
3146 <listitem><para>In the dialog box that opens, select
3147 the 'Tracing | Tracing Project' wizard and press
3148 'Next>'.</para></listitem>
3149 <listitem><para>Give the project a name and press
3150 'Finish'.</para></listitem>
3151 <listitem><para>In the 'Project Explorer' pane under
3152 the project you created, right click on the
3153 'Traces' item.</para></listitem>
3154 <listitem><para>Select 'Import..." and in the dialog
3155 that's displayed:</para></listitem>
3156 <listitem><para>Browse the filesystem and find the
3157 select the 'kernel' directory containing the trace
3158 you copied from the target
3159 e.g. auto-20121015-232120/kernel</para></listitem>
3160 <listitem><para>'Checkmark' the directory in the tree
3161 that's displayed for the trace</para></listitem>
3162 <listitem><para>Below that, select 'Common Trace Format:
3163 Kernel Trace' for the 'Trace Type'</para></listitem>
3164 <listitem><para>Press 'Finish' to close the dialog
3165 </para></listitem>
3166 <listitem><para>Back in the 'Project Explorer' pane,
3167 double-click on the 'kernel' item for the
3168 trace you just imported under 'Traces'
3169 </para></listitem>
3170 </orderedlist>
3171 You should now see your trace data displayed graphically
3172 in several different views in Eclipse:
3173 </para>
3174
3175 <para>
3176 <imagedata fileref="figures/lttngmain0.png" width="6in" depth="6in" align="center" scalefit="1" />
3177 </para>
3178
3179 <para>
3180 You can access extensive help information on how to use
3181 the LTTng plug-in to search and analyze captured traces via
3182 the Eclipse help system:
3183 <literallayout class='monospaced'>
3184 Help | Help Contents | LTTng Plug-in User Guide
3185 </literallayout>
3186 </para>
3187 </section>
3188
3189 <section id='collecting-and-viewing-a-trace-in-eclipse'>
3190 <title>Collecting and viewing a trace in Eclipse</title>
3191
3192 <note>
3193 This section on collecting traces remotely doesn't currently
3194 work because of Eclipse 'RSE' connectivity problems. Manually
3195 tracing on the target, copying the trace files to the host,
3196 and viewing the trace in Eclipse on the host as outlined in
3197 previous steps does work however - please use the manual
3198 steps outlined above to view traces in Eclipse.
3199 </note>
3200
3201 <para>
3202 In order to trace a remote target, you also need to add
3203 a 'tracing' group on the target and connect as a user
3204 who's part of that group e.g:
3205 <literallayout class='monospaced'>
3206 # adduser tomz
3207 # groupadd -r tracing
3208 # usermod -a -G tracing tomz
3209 </literallayout>
3210 <orderedlist>
3211 <listitem><para>First, start eclipse and open the
3212 'LTTng Kernel' perspective by selecting the following
3213 menu item:
3214 <literallayout class='monospaced'>
3215 Window | Open Perspective | Other...
3216 </literallayout></para></listitem>
3217 <listitem><para>In the dialog box that opens, select
3218 'LTTng Kernel' from the list.</para></listitem>
3219 <listitem><para>Back at the main menu, select the
3220 following menu item:
3221 <literallayout class='monospaced'>
3222 File | New | Project...
3223 </literallayout></para></listitem>
3224 <listitem><para>In the dialog box that opens, select
3225 the 'Tracing | Tracing Project' wizard and
3226 press 'Next>'.</para></listitem>
3227 <listitem><para>Give the project a name and press
3228 'Finish'. That should result in an entry in the
3229 'Project' subwindow.</para></listitem>
3230 <listitem><para>In the 'Control' subwindow just below
3231 it, press 'New Connection'.</para></listitem>
3232 <listitem><para>Add a new connection, giving it the
3233 hostname or IP address of the target system.
3234 </para></listitem>
3235 <listitem><para>Provide the username and password
3236 of a qualified user (a member of the 'tracing' group)
3237 or root account on the target system.
3238 </para></listitem>
3239 <listitem><para>Provide appropriate answers to whatever
3240 else is asked for e.g. 'secure storage password'
3241 can be anything you want.
3242 If you get an 'RSE Error' it may be due to proxies.
3243 It may be possible to get around the problem by
3244 changing the following setting:
3245 <literallayout class='monospaced'>
3246 Window | Preferences | Network Connections
3247 </literallayout>
3248 Switch 'Active Provider' to 'Direct'
3249 </para></listitem>
3250 </orderedlist>
3251 </para>
3252 </section>
3253 </section>
3254
3255 <section id='lltng-documentation'>
3256 <title>Documentation</title>
3257
3258 <para>
3259 There doesn't seem to be any current documentation covering
3260 LTTng 2.0, but maybe that's because the project is in transition.
3261 The LTTng 2.0 website, however, is here:
3262 <ulink url='http://lttng.org/lttng2.0'>LTTng Project</ulink>
3263 </para>
3264
3265 <para>
3266 You can access extensive help information on how to use the
3267 LTTng plug-in to search and analyze captured traces via the
3268 Eclipse help system:
3269 <literallayout class='monospaced'>
3270 Help | Help Contents | LTTng Plug-in User Guide
3271 </literallayout>
3272 </para>
3273 </section>
3274</section>
3275
3276<section id='profile-manual-blktrace'>
3277 <title>blktrace</title>
3278
3279 <para>
3280 blktrace is a tool for tracing and reporting low-level disk I/O.
3281 blktrace provides the tracing half of the equation; its output can
3282 be piped into the blkparse program, which renders the data in a
3283 human-readable form and does some basic analysis:
3284 </para>
3285
3286 <section id='blktrace-setup'>
3287 <title>Setup</title>
3288
3289 <para>
3290 For this section, we'll assume you've already performed the
3291 basic setup outlined in the
3292 "<link linkend='profile-manual-general-setup'>General Setup</link>"
3293 section.
3294 </para>
3295
3296 <para>
3297 blktrace is an application that runs on the target system.
3298 You can run the entire blktrace and blkparse pipeline on the
3299 target, or you can run blktrace in 'listen' mode on the target
3300 and have blktrace and blkparse collect and analyze the data on
3301 the host (see the
3302 "<link linkend='using-blktrace-remotely'>Using blktrace Remotely</link>"
3303 section below).
3304 For the rest of this section we assume you've ssh'ed to the
3305 host and will be running blkrace on the target.
3306 </para>
3307 </section>
3308
3309 <section id='blktrace-basic-usage'>
3310 <title>Basic Usage</title>
3311
3312 <para>
3313 To record a trace, simply run the 'blktrace' command, giving it
3314 the name of the block device you want to trace activity on:
3315 <literallayout class='monospaced'>
3316 root@crownbay:~# blktrace /dev/sdc
3317 </literallayout>
3318 In another shell, execute a workload you want to trace.
3319 <literallayout class='monospaced'>
3320 root@crownbay:/media/sdc# rm linux-2.6.19.2.tar.bz2; wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>; sync
3321 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
3322 linux-2.6.19.2.tar.b 100% |*******************************| 41727k 0:00:00 ETA
3323 </literallayout>
3324 Press Ctrl-C in the blktrace shell to stop the trace. It will
3325 display how many events were logged, along with the per-cpu file
3326 sizes (blktrace records traces in per-cpu kernel buffers and
3327 simply dumps them to userspace for blkparse to merge and sort
3328 later).
3329 <literallayout class='monospaced'>
3330 ^C=== sdc ===
3331 CPU 0: 7082 events, 332 KiB data
3332 CPU 1: 1578 events, 74 KiB data
3333 Total: 8660 events (dropped 0), 406 KiB data
3334 </literallayout>
3335 If you examine the files saved to disk, you see multiple files,
3336 one per CPU and with the device name as the first part of the
3337 filename:
3338 <literallayout class='monospaced'>
3339 root@crownbay:~# ls -al
3340 drwxr-xr-x 6 root root 1024 Oct 27 22:39 .
3341 drwxr-sr-x 4 root root 1024 Oct 26 18:24 ..
3342 -rw-r--r-- 1 root root 339938 Oct 27 22:40 sdc.blktrace.0
3343 -rw-r--r-- 1 root root 75753 Oct 27 22:40 sdc.blktrace.1
3344 </literallayout>
3345 To view the trace events, simply invoke 'blkparse' in the
3346 directory containing the trace files, giving it the device name
3347 that forms the first part of the filenames:
3348 <literallayout class='monospaced'>
3349 root@crownbay:~# blkparse sdc
3350
3351 8,32 1 1 0.000000000 1225 Q WS 3417048 + 8 [jbd2/sdc-8]
3352 8,32 1 2 0.000025213 1225 G WS 3417048 + 8 [jbd2/sdc-8]
3353 8,32 1 3 0.000033384 1225 P N [jbd2/sdc-8]
3354 8,32 1 4 0.000043301 1225 I WS 3417048 + 8 [jbd2/sdc-8]
3355 8,32 1 0 0.000057270 0 m N cfq1225 insert_request
3356 8,32 1 0 0.000064813 0 m N cfq1225 add_to_rr
3357 8,32 1 5 0.000076336 1225 U N [jbd2/sdc-8] 1
3358 8,32 1 0 0.000088559 0 m N cfq workload slice:150
3359 8,32 1 0 0.000097359 0 m N cfq1225 set_active wl_prio:0 wl_type:1
3360 8,32 1 0 0.000104063 0 m N cfq1225 Not idling. st->count:1
3361 8,32 1 0 0.000112584 0 m N cfq1225 fifo= (null)
3362 8,32 1 0 0.000118730 0 m N cfq1225 dispatch_insert
3363 8,32 1 0 0.000127390 0 m N cfq1225 dispatched a request
3364 8,32 1 0 0.000133536 0 m N cfq1225 activate rq, drv=1
3365 8,32 1 6 0.000136889 1225 D WS 3417048 + 8 [jbd2/sdc-8]
3366 8,32 1 7 0.000360381 1225 Q WS 3417056 + 8 [jbd2/sdc-8]
3367 8,32 1 8 0.000377422 1225 G WS 3417056 + 8 [jbd2/sdc-8]
3368 8,32 1 9 0.000388876 1225 P N [jbd2/sdc-8]
3369 8,32 1 10 0.000397886 1225 Q WS 3417064 + 8 [jbd2/sdc-8]
3370 8,32 1 11 0.000404800 1225 M WS 3417064 + 8 [jbd2/sdc-8]
3371 8,32 1 12 0.000412343 1225 Q WS 3417072 + 8 [jbd2/sdc-8]
3372 8,32 1 13 0.000416533 1225 M WS 3417072 + 8 [jbd2/sdc-8]
3373 8,32 1 14 0.000422121 1225 Q WS 3417080 + 8 [jbd2/sdc-8]
3374 8,32 1 15 0.000425194 1225 M WS 3417080 + 8 [jbd2/sdc-8]
3375 8,32 1 16 0.000431968 1225 Q WS 3417088 + 8 [jbd2/sdc-8]
3376 8,32 1 17 0.000435251 1225 M WS 3417088 + 8 [jbd2/sdc-8]
3377 8,32 1 18 0.000440279 1225 Q WS 3417096 + 8 [jbd2/sdc-8]
3378 8,32 1 19 0.000443911 1225 M WS 3417096 + 8 [jbd2/sdc-8]
3379 8,32 1 20 0.000450336 1225 Q WS 3417104 + 8 [jbd2/sdc-8]
3380 8,32 1 21 0.000454038 1225 M WS 3417104 + 8 [jbd2/sdc-8]
3381 8,32 1 22 0.000462070 1225 Q WS 3417112 + 8 [jbd2/sdc-8]
3382 8,32 1 23 0.000465422 1225 M WS 3417112 + 8 [jbd2/sdc-8]
3383 8,32 1 24 0.000474222 1225 I WS 3417056 + 64 [jbd2/sdc-8]
3384 8,32 1 0 0.000483022 0 m N cfq1225 insert_request
3385 8,32 1 25 0.000489727 1225 U N [jbd2/sdc-8] 1
3386 8,32 1 0 0.000498457 0 m N cfq1225 Not idling. st->count:1
3387 8,32 1 0 0.000503765 0 m N cfq1225 dispatch_insert
3388 8,32 1 0 0.000512914 0 m N cfq1225 dispatched a request
3389 8,32 1 0 0.000518851 0 m N cfq1225 activate rq, drv=2
3390 .
3391 .
3392 .
3393 8,32 0 0 58.515006138 0 m N cfq3551 complete rqnoidle 1
3394 8,32 0 2024 58.516603269 3 C WS 3156992 + 16 [0]
3395 8,32 0 0 58.516626736 0 m N cfq3551 complete rqnoidle 1
3396 8,32 0 0 58.516634558 0 m N cfq3551 arm_idle: 8 group_idle: 0
3397 8,32 0 0 58.516636933 0 m N cfq schedule dispatch
3398 8,32 1 0 58.516971613 0 m N cfq3551 slice expired t=0
3399 8,32 1 0 58.516982089 0 m N cfq3551 sl_used=13 disp=6 charge=13 iops=0 sect=80
3400 8,32 1 0 58.516985511 0 m N cfq3551 del_from_rr
3401 8,32 1 0 58.516990819 0 m N cfq3551 put_queue
3402
3403 CPU0 (sdc):
3404 Reads Queued: 0, 0KiB Writes Queued: 331, 26,284KiB
3405 Read Dispatches: 0, 0KiB Write Dispatches: 485, 40,484KiB
3406 Reads Requeued: 0 Writes Requeued: 0
3407 Reads Completed: 0, 0KiB Writes Completed: 511, 41,000KiB
3408 Read Merges: 0, 0KiB Write Merges: 13, 160KiB
3409 Read depth: 0 Write depth: 2
3410 IO unplugs: 23 Timer unplugs: 0
3411 CPU1 (sdc):
3412 Reads Queued: 0, 0KiB Writes Queued: 249, 15,800KiB
3413 Read Dispatches: 0, 0KiB Write Dispatches: 42, 1,600KiB
3414 Reads Requeued: 0 Writes Requeued: 0
3415 Reads Completed: 0, 0KiB Writes Completed: 16, 1,084KiB
3416 Read Merges: 0, 0KiB Write Merges: 40, 276KiB
3417 Read depth: 0 Write depth: 2
3418 IO unplugs: 30 Timer unplugs: 1
3419
3420 Total (sdc):
3421 Reads Queued: 0, 0KiB Writes Queued: 580, 42,084KiB
3422 Read Dispatches: 0, 0KiB Write Dispatches: 527, 42,084KiB
3423 Reads Requeued: 0 Writes Requeued: 0
3424 Reads Completed: 0, 0KiB Writes Completed: 527, 42,084KiB
3425 Read Merges: 0, 0KiB Write Merges: 53, 436KiB
3426 IO unplugs: 53 Timer unplugs: 1
3427
3428 Throughput (R/W): 0KiB/s / 719KiB/s
3429 Events (sdc): 6,592 entries
3430 Skips: 0 forward (0 - 0.0%)
3431 Input file sdc.blktrace.0 added
3432 Input file sdc.blktrace.1 added
3433 </literallayout>
3434 The report shows each event that was found in the blktrace data,
3435 along with a summary of the overall block I/O traffic during
3436 the run. You can look at the
3437 <ulink url='http://linux.die.net/man/1/blkparse'>blkparse</ulink>
3438 manpage to learn the
3439 meaning of each field displayed in the trace listing.
3440 </para>
3441
3442 <section id='blktrace-live-mode'>
3443 <title>Live Mode</title>
3444
3445 <para>
3446 blktrace and blkparse are designed from the ground up to
3447 be able to operate together in a 'pipe mode' where the
3448 stdout of blktrace can be fed directly into the stdin of
3449 blkparse:
3450 <literallayout class='monospaced'>
3451 root@crownbay:~# blktrace /dev/sdc -o - | blkparse -i -
3452 </literallayout>
3453 This enables long-lived tracing sessions to run without
3454 writing anything to disk, and allows the user to look for
3455 certain conditions in the trace data in 'real-time' by
3456 viewing the trace output as it scrolls by on the screen or
3457 by passing it along to yet another program in the pipeline
3458 such as grep which can be used to identify and capture
3459 conditions of interest.
3460 </para>
3461
3462 <para>
3463 There's actually another blktrace command that implements
3464 the above pipeline as a single command, so the user doesn't
3465 have to bother typing in the above command sequence:
3466 <literallayout class='monospaced'>
3467 root@crownbay:~# btrace /dev/sdc
3468 </literallayout>
3469 </para>
3470 </section>
3471
3472 <section id='using-blktrace-remotely'>
3473 <title>Using blktrace Remotely</title>
3474
3475 <para>
3476 Because blktrace traces block I/O and at the same time
3477 normally writes its trace data to a block device, and
3478 in general because it's not really a great idea to make
3479 the device being traced the same as the device the tracer
3480 writes to, blktrace provides a way to trace without
3481 perturbing the traced device at all by providing native
3482 support for sending all trace data over the network.
3483 </para>
3484
3485 <para>
3486 To have blktrace operate in this mode, start blktrace on
3487 the target system being traced with the -l option, along with
3488 the device to trace:
3489 <literallayout class='monospaced'>
3490 root@crownbay:~# blktrace -l /dev/sdc
3491 server: waiting for connections...
3492 </literallayout>
3493 On the host system, use the -h option to connect to the
3494 target system, also passing it the device to trace:
3495 <literallayout class='monospaced'>
3496 $ blktrace -d /dev/sdc -h 192.168.1.43
3497 blktrace: connecting to 192.168.1.43
3498 blktrace: connected!
3499 </literallayout>
3500 On the target system, you should see this:
3501 <literallayout class='monospaced'>
3502 server: connection from 192.168.1.43
3503 </literallayout>
3504 In another shell, execute a workload you want to trace.
3505 <literallayout class='monospaced'>
3506 root@crownbay:/media/sdc# rm linux-2.6.19.2.tar.bz2; wget <ulink url='http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2'>http://downloads.yoctoproject.org/mirror/sources/linux-2.6.19.2.tar.bz2</ulink>; sync
3507 Connecting to downloads.yoctoproject.org (140.211.169.59:80)
3508 linux-2.6.19.2.tar.b 100% |*******************************| 41727k 0:00:00 ETA
3509 </literallayout>
3510 When it's done, do a Ctrl-C on the host system to
3511 stop the trace:
3512 <literallayout class='monospaced'>
3513 ^C=== sdc ===
3514 CPU 0: 7691 events, 361 KiB data
3515 CPU 1: 4109 events, 193 KiB data
3516 Total: 11800 events (dropped 0), 554 KiB data
3517 </literallayout>
3518 On the target system, you should also see a trace
3519 summary for the trace just ended:
3520 <literallayout class='monospaced'>
3521 server: end of run for 192.168.1.43:sdc
3522 === sdc ===
3523 CPU 0: 7691 events, 361 KiB data
3524 CPU 1: 4109 events, 193 KiB data
3525 Total: 11800 events (dropped 0), 554 KiB data
3526 </literallayout>
3527 The blktrace instance on the host will save the target
3528 output inside a hostname-timestamp directory:
3529 <literallayout class='monospaced'>
3530 $ ls -al
3531 drwxr-xr-x 10 root root 1024 Oct 28 02:40 .
3532 drwxr-sr-x 4 root root 1024 Oct 26 18:24 ..
3533 drwxr-xr-x 2 root root 1024 Oct 28 02:40 192.168.1.43-2012-10-28-02:40:56
3534 </literallayout>
3535 cd into that directory to see the output files:
3536 <literallayout class='monospaced'>
3537 $ ls -l
3538 -rw-r--r-- 1 root root 369193 Oct 28 02:44 sdc.blktrace.0
3539 -rw-r--r-- 1 root root 197278 Oct 28 02:44 sdc.blktrace.1
3540 </literallayout>
3541 And run blkparse on the host system using the device name:
3542 <literallayout class='monospaced'>
3543 $ blkparse sdc
3544
3545 8,32 1 1 0.000000000 1263 Q RM 6016 + 8 [ls]
3546 8,32 1 0 0.000036038 0 m N cfq1263 alloced
3547 8,32 1 2 0.000039390 1263 G RM 6016 + 8 [ls]
3548 8,32 1 3 0.000049168 1263 I RM 6016 + 8 [ls]
3549 8,32 1 0 0.000056152 0 m N cfq1263 insert_request
3550 8,32 1 0 0.000061600 0 m N cfq1263 add_to_rr
3551 8,32 1 0 0.000075498 0 m N cfq workload slice:300
3552 .
3553 .
3554 .
3555 8,32 0 0 177.266385696 0 m N cfq1267 arm_idle: 8 group_idle: 0
3556 8,32 0 0 177.266388140 0 m N cfq schedule dispatch
3557 8,32 1 0 177.266679239 0 m N cfq1267 slice expired t=0
3558 8,32 1 0 177.266689297 0 m N cfq1267 sl_used=9 disp=6 charge=9 iops=0 sect=56
3559 8,32 1 0 177.266692649 0 m N cfq1267 del_from_rr
3560 8,32 1 0 177.266696560 0 m N cfq1267 put_queue
3561
3562 CPU0 (sdc):
3563 Reads Queued: 0, 0KiB Writes Queued: 270, 21,708KiB
3564 Read Dispatches: 59, 2,628KiB Write Dispatches: 495, 39,964KiB
3565 Reads Requeued: 0 Writes Requeued: 0
3566 Reads Completed: 90, 2,752KiB Writes Completed: 543, 41,596KiB
3567 Read Merges: 0, 0KiB Write Merges: 9, 344KiB
3568 Read depth: 2 Write depth: 2
3569 IO unplugs: 20 Timer unplugs: 1
3570 CPU1 (sdc):
3571 Reads Queued: 688, 2,752KiB Writes Queued: 381, 20,652KiB
3572 Read Dispatches: 31, 124KiB Write Dispatches: 59, 2,396KiB
3573 Reads Requeued: 0 Writes Requeued: 0
3574 Reads Completed: 0, 0KiB Writes Completed: 11, 764KiB
3575 Read Merges: 598, 2,392KiB Write Merges: 88, 448KiB
3576 Read depth: 2 Write depth: 2
3577 IO unplugs: 52 Timer unplugs: 0
3578
3579 Total (sdc):
3580 Reads Queued: 688, 2,752KiB Writes Queued: 651, 42,360KiB
3581 Read Dispatches: 90, 2,752KiB Write Dispatches: 554, 42,360KiB
3582 Reads Requeued: 0 Writes Requeued: 0
3583 Reads Completed: 90, 2,752KiB Writes Completed: 554, 42,360KiB
3584 Read Merges: 598, 2,392KiB Write Merges: 97, 792KiB
3585 IO unplugs: 72 Timer unplugs: 1
3586
3587 Throughput (R/W): 15KiB/s / 238KiB/s
3588 Events (sdc): 9,301 entries
3589 Skips: 0 forward (0 - 0.0%)
3590 </literallayout>
3591 You should see the trace events and summary just as
3592 you would have if you'd run the same command on the target.
3593 </para>
3594 </section>
3595
3596 <section id='tracing-block-io-via-ftrace'>
3597 <title>Tracing Block I/O via 'ftrace'</title>
3598
3599 <para>
3600 It's also possible to trace block I/O using only
3601 <link linkend='the-trace-events-subsystem'>trace events subsystem</link>,
3602 which can be useful for casual tracing
3603 if you don't want bother dealing with the userspace tools.
3604 </para>
3605
3606 <para>
3607 To enable tracing for a given device, use
3608 /sys/block/xxx/trace/enable, where xxx is the device name.
3609 This for example enables tracing for /dev/sdc:
3610 <literallayout class='monospaced'>
3611 root@crownbay:/sys/kernel/debug/tracing# echo 1 > /sys/block/sdc/trace/enable
3612 </literallayout>
3613 Once you've selected the device(s) you want to trace,
3614 selecting the 'blk' tracer will turn the blk tracer on:
3615 <literallayout class='monospaced'>
3616 root@crownbay:/sys/kernel/debug/tracing# cat available_tracers
3617 blk function_graph function nop
3618
3619 root@crownbay:/sys/kernel/debug/tracing# echo blk > current_tracer
3620 </literallayout>
3621 Execute the workload you're interested in:
3622 <literallayout class='monospaced'>
3623 root@crownbay:/sys/kernel/debug/tracing# cat /media/sdc/testfile.txt
3624 </literallayout>
3625 And look at the output (note here that we're using
3626 'trace_pipe' instead of trace to capture this trace -
3627 this allows us to wait around on the pipe for data to
3628 appear):
3629 <literallayout class='monospaced'>
3630 root@crownbay:/sys/kernel/debug/tracing# cat trace_pipe
3631 cat-3587 [001] d..1 3023.276361: 8,32 Q R 1699848 + 8 [cat]
3632 cat-3587 [001] d..1 3023.276410: 8,32 m N cfq3587 alloced
3633 cat-3587 [001] d..1 3023.276415: 8,32 G R 1699848 + 8 [cat]
3634 cat-3587 [001] d..1 3023.276424: 8,32 P N [cat]
3635 cat-3587 [001] d..2 3023.276432: 8,32 I R 1699848 + 8 [cat]
3636 cat-3587 [001] d..1 3023.276439: 8,32 m N cfq3587 insert_request
3637 cat-3587 [001] d..1 3023.276445: 8,32 m N cfq3587 add_to_rr
3638 cat-3587 [001] d..2 3023.276454: 8,32 U N [cat] 1
3639 cat-3587 [001] d..1 3023.276464: 8,32 m N cfq workload slice:150
3640 cat-3587 [001] d..1 3023.276471: 8,32 m N cfq3587 set_active wl_prio:0 wl_type:2
3641 cat-3587 [001] d..1 3023.276478: 8,32 m N cfq3587 fifo= (null)
3642 cat-3587 [001] d..1 3023.276483: 8,32 m N cfq3587 dispatch_insert
3643 cat-3587 [001] d..1 3023.276490: 8,32 m N cfq3587 dispatched a request
3644 cat-3587 [001] d..1 3023.276497: 8,32 m N cfq3587 activate rq, drv=1
3645 cat-3587 [001] d..2 3023.276500: 8,32 D R 1699848 + 8 [cat]
3646 </literallayout>
3647 And this turns off tracing for the specified device:
3648 <literallayout class='monospaced'>
3649 root@crownbay:/sys/kernel/debug/tracing# echo 0 > /sys/block/sdc/trace/enable
3650 </literallayout>
3651 </para>
3652 </section>
3653 </section>
3654
3655 <section id='blktrace-documentation'>
3656 <title>Documentation</title>
3657
3658 <para>
3659 Online versions of the man pages for the commands discussed
3660 in this section can be found here:
3661 <itemizedlist>
3662 <listitem><para><ulink url='http://linux.die.net/man/8/blktrace'>http://linux.die.net/man/8/blktrace</ulink>
3663 </para></listitem>
3664 <listitem><para><ulink url='http://linux.die.net/man/1/blkparse'>http://linux.die.net/man/1/blkparse</ulink>
3665 </para></listitem>
3666 <listitem><para><ulink url='http://linux.die.net/man/8/btrace'>http://linux.die.net/man/8/btrace</ulink>
3667 </para></listitem>
3668 </itemizedlist>
3669 </para>
3670
3671 <para>
3672 The above manpages, along with manpages for the other
3673 blktrace utilities (btt, blkiomon, etc) can be found in the
3674 /doc directory of the blktrace tools git repo:
3675 <literallayout class='monospaced'>
3676 $ git clone git://git.kernel.dk/blktrace.git
3677 </literallayout>
3678 </para>
3679 </section>
3680</section>
3681</chapter>
3682<!--
3683vim: expandtab tw=80 ts=4
3684-->
diff --git a/documentation/profile-manual/profile-manual.xml b/documentation/profile-manual/profile-manual.xml
new file mode 100644
index 0000000..bafecff
--- /dev/null
+++ b/documentation/profile-manual/profile-manual.xml
@@ -0,0 +1,85 @@
1<!DOCTYPE book 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<book id='profile-manual' lang='en'
6 xmlns:xi="http://www.w3.org/2003/XInclude"
7 xmlns="http://docbook.org/ns/docbook"
8 >
9 <bookinfo>
10
11 <mediaobject>
12 <imageobject>
13 <imagedata fileref='figures/profile-title.png'
14 format='SVG'
15 align='left' scalefit='1' width='100%'/>
16 </imageobject>
17 </mediaobject>
18
19 <title>
20 Yocto Project Profiling and Tracing Manual
21 </title>
22
23 <authorgroup>
24 <author>
25 <firstname>Tom</firstname> <surname>Zanussi</surname>
26 <affiliation>
27 <orgname>Intel Corporation</orgname>
28 </affiliation>
29 <email>tom.zanussi@intel.com</email>
30 </author>
31 </authorgroup>
32
33 <revhistory>
34 <revision>
35 <revnumber>1.4</revnumber>
36 <date>April 2013</date>
37 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
38 </revision>
39 <revision>
40 <revnumber>1.5</revnumber>
41 <date>October 2013</date>
42 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
43 </revision>
44 <revision>
45 <revnumber>1.5.1</revnumber>
46 <date>Sometime in 2013</date>
47 <revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
48 </revision>
49 </revhistory>
50
51 <copyright>
52 <year>&COPYRIGHT_YEAR;</year>
53 <holder>Linux Foundation</holder>
54 </copyright>
55
56 <legalnotice>
57 <para>
58 Permission is granted to copy, distribute and/or modify this document under
59 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">
60 Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by
61 Creative Commons.
62 </para>
63
64 <note>
65 For the latest version of this manual associated with this
66 Yocto Project release, see the
67 <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>
68 from the Yocto Project website.
69 </note>
70 </legalnotice>
71
72 </bookinfo>
73
74 <xi:include href="profile-manual-intro.xml"/>
75
76 <xi:include href="profile-manual-arch.xml"/>
77
78 <xi:include href="profile-manual-usage.xml"/>
79
80 <xi:include href="profile-manual-examples.xml"/>
81
82</book>
83<!--
84vim: expandtab tw=80 ts=4
85-->
diff --git a/documentation/ref-manual/TODO b/documentation/ref-manual/TODO
new file mode 100644
index 0000000..ee0db97
--- /dev/null
+++ b/documentation/ref-manual/TODO
@@ -0,0 +1,11 @@
1Handbook Todo List:
2
3 * Document adding a new IMAGE_FEATURE to the customising images section
4 * Add instructions about using zaurus/openmoko emulation
5 * Add component overview/block diagrams
6 * Software Deevelopment intro should mention its software development for
7 intended target and could be a different arch etc and thus special case.
8 * Expand insane.bbclass documentation to cover tests
9 * Document remaining classes (see list in ref-classes)
10 * Document formfactor
11
diff --git a/documentation/ref-manual/closer-look.xml b/documentation/ref-manual/closer-look.xml
new file mode 100644
index 0000000..4883981
--- /dev/null
+++ b/documentation/ref-manual/closer-look.xml
@@ -0,0 +1,1224 @@
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='closer-look'>
6<title>A Closer Look at the Yocto Project Development Environment</title>
7
8 <para>
9 This chapter takes a more detailed look at the Yocto Project
10 development environment.
11 The following diagram represents the development environment at a
12 high level.
13 The remainder of this chapter expands on the fundamental input, output,
14 process, and
15 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>) blocks
16 in the Yocto Project development environment.
17 </para>
18
19 <para id='general-yocto-environment-figure'>
20 <imagedata fileref="figures/yocto-environment-ref.png" align="center" width="8in" depth="4.25in" />
21 </para>
22
23 <para>
24 The generalized Yocto Project Development Environment consists of
25 several functional areas:
26 <itemizedlist>
27 <listitem><para><emphasis>User Configuration:</emphasis>
28 Metadata you can use to control the build process.
29 </para></listitem>
30 <listitem><para><emphasis>Metadata Layers:</emphasis>
31 Various layers that provide software, machine, and
32 distro Metadata.</para></listitem>
33 <listitem><para><emphasis>Source Files:</emphasis>
34 Upstream releases, local projects, and SCMs.</para></listitem>
35 <listitem><para><emphasis>Build System:</emphasis>
36 Processes under the control of BitBake.
37 This block expands on how BitBake fetches source, applies
38 patches, completes compilation, analyzes output for package
39 generation, creates and tests packages, generates images, and
40 generates cross-development tools.</para></listitem>
41 <listitem><para><emphasis>Package Feeds:</emphasis>
42 Directories containing output packages (rpm, deb or ipk),
43 which are subsequently used in the construction of an image or
44 SDK, produced by the build system.
45 These feeds can also be copied and shared using a web server or
46 other means to facilitate extending or updating existing
47 images on devices at runtime if runtime package management is
48 enabled.</para></listitem>
49 <listitem><para><emphasis>Images:</emphasis>
50 Images produced by the development process.
51 Where do they go?
52 Can you mess with them (i.e. freely delete them or move them?).
53 </para></listitem>
54 <listitem><para><emphasis>Application Development SDK:</emphasis>
55 Cross-development tools that are produced along with an image
56 or separately with BitBake.</para></listitem>
57 </itemizedlist>
58 </para>
59
60 <section id="user-configuration">
61 <title>User Configuration</title>
62
63 <para>
64 User configuration helps define the build.
65 Through user configuration, you can tell BitBake the
66 target architecture for which you are building the image,
67 where to store downloaded source, and other build properties.
68 </para>
69
70 <para>
71 The following figure shows an expanded representation of the
72 "User Configuration" box of the
73 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>:
74 </para>
75
76 <para>
77 <imagedata fileref="figures/user-configuration.png" align="center" width="5.5in" depth="3.5in" />
78 </para>
79
80 <para>
81 BitBake needs some basic configuration files in order to complete
82 a build.
83 These files are <filename>*.conf</filename> files.
84 The minimally necessary ones reside as example files in the
85 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
86 For simplicity, this section refers to the Source Directory as
87 the "Poky Directory."
88 </para>
89
90 <para>
91 When you clone the <filename>poky</filename> Git repository or you
92 download and unpack a Yocto Project release, you can set up the
93 Source Directory to be named anything you want.
94 For this discussion, the cloned repository uses the default
95 name <filename>poky</filename>.
96 <note>
97 The Poky repository is primarily an aggregation of existing
98 repositories.
99 It is not a canonical upstream source.
100 </note>
101 </para>
102
103 <para>
104 The <filename>meta-yocto</filename> layer inside Poky contains
105 a <filename>conf</filename> directory that has example
106 configuration files.
107 These example files are used as a basis for creating actual
108 configuration files when you source the build environment
109 script
110 (i.e.
111 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
112 or
113 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
114 </para>
115
116 <para>
117 Sourcing the build environment script creates a
118 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
119 if one does not already exist.
120 BitBake uses the Build Directory for all its work during builds.
121 The Build Directory has a <filename>conf</filename> directory that
122 contains default versions of your <filename>local.conf</filename>
123 and <filename>bblayers.conf</filename> configuration files.
124 These default configuration files are created only if versions
125 do not already exist in the Build Directory at the time you
126 source the build environment setup script.
127 </para>
128
129 <para>
130 Because the Poky repository is fundamentally an aggregation of
131 existing repositories, some users might be familiar with running
132 the <filename>&OE_INIT_FILE;</filename> or
133 <filename>oe-init-build-env-memres</filename> script in the context
134 of separate OpenEmbedded-Core and BitBake repositories rather than a
135 single Poky repository.
136 This discussion assumes the script is executed from within a cloned
137 or unpacked version of Poky.
138 </para>
139
140 <para>
141 Depending on where the script is sourced, different sub-scripts
142 are called to set up the Build Directory (Yocto or OpenEmbedded).
143 Specifically, the script
144 <filename>scripts/oe-setup-builddir</filename> inside the
145 poky directory sets up the Build Directory and seeds the directory
146 (if necessary) with configuration files appropriate for the
147 Yocto Project development environment.
148 <note>
149 The <filename>scripts/oe-setup-builddir</filename> script
150 uses the <filename>$TEMPLATECONF</filename> variable to
151 determine which sample configuration files to locate.
152 </note>
153 </para>
154
155 <para>
156 The <filename>local.conf</filename> file provides many
157 basic variables that define a build environment.
158 Here is a list of a few.
159 To see the default configurations in a <filename>local.conf</filename>
160 file created by the build environment script, see the
161 <filename>local.conf.sample</filename> in the
162 <filename>meta-yocto</filename> layer:
163 <itemizedlist>
164 <listitem><para><emphasis>Parallelism Options:</emphasis>
165 Controlled by the
166 <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
167 and
168 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
169 variables.</para></listitem>
170 <listitem><para><emphasis>Target Machine Selection:</emphasis>
171 Controlled by the
172 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
173 variable.</para></listitem>
174 <listitem><para><emphasis>Download Directory:</emphasis>
175 Controlled by the
176 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
177 variable.</para></listitem>
178 <listitem><para><emphasis>Shared State Directory:</emphasis>
179 Controlled by the
180 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>
181 variable.</para></listitem>
182 <listitem><para><emphasis>Build Output:</emphasis>
183 Controlled by the
184 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
185 variable.</para></listitem>
186 </itemizedlist>
187 <note>
188 Configurations set in the <filename>conf/local.conf</filename>
189 file can also be set in the
190 <filename>conf/site.conf</filename> and
191 <filename>conf/auto.conf</filename> configuration files.
192 </note>
193 </para>
194
195 <para>
196 The <filename>bblayers.conf</filename> file tells BitBake what
197 layers you want considered during the build.
198 By default, the layers listed in this file include layers
199 minimally needed by the build system.
200 However, you must manually add any custom layers you have created.
201 You can find more information on working with the
202 <filename>bblayers.conf</filename> file in the
203 "<ulink url='&YOCTO_DOCS_DEV_URL;#enabling-your-layer'>Enabling Your Layer</ulink>"
204 section in the Yocto Project Development Manual.
205 </para>
206
207 <para>
208 The files <filename>site.conf</filename> and
209 <filename>auto.conf</filename> are not created by the environment
210 initialization script.
211 If you want these configuration files, you must create them
212 yourself:
213 <itemizedlist>
214 <listitem><para><emphasis><filename>site.conf</filename>:</emphasis>
215 You can use the <filename>conf/site.conf</filename>
216 configuration file to configure multiple build directories.
217 For example, suppose you had several build environments and
218 they shared some common features.
219 You can set these default build properties here.
220 A good example is perhaps the level of parallelism you want
221 to use through the
222 <link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
223 and
224 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>
225 variables.</para>
226 <para>One useful scenario for using the
227 <filename>conf/site.conf</filename> file is to extend your
228 <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
229 variable to include the path to a
230 <filename>conf/site.conf</filename>.
231 Then, when BitBake looks for Metadata using
232 <filename>BBPATH</filename>, it finds the
233 <filename>conf/site.conf</filename> file and applies your
234 common configurations found in the file.
235 To override configurations in a particular build directory,
236 alter the similar configurations within that build
237 directory's <filename>conf/local.conf</filename> file.
238 </para></listitem>
239 <listitem><para><emphasis><filename>auto.conf</filename>:</emphasis>
240 This file is not hand-created.
241 Rather, the file is usually created and written to by
242 an autobuilder.
243 The settings put into the file are typically the same as
244 you would find in the <filename>conf/local.conf</filename>
245 or the <filename>conf/site.conf</filename> files.
246 </para></listitem>
247 </itemizedlist>
248 </para>
249
250 <para>
251 You can edit all configuration files to further define
252 any particular build environment.
253 This process is represented by the "User Configuration Edits"
254 box in the figure.
255 </para>
256
257 <para>
258 When you launch your build with the
259 <filename>bitbake &lt;target&gt;</filename> command, BitBake
260 sorts out the configurations to ultimately define your build
261 environment.
262 </para>
263 </section>
264
265 <section id="metadata-machine-configuration-and-policy-configuration">
266 <title>Metadata, Machine Configuration, and Policy Configuration</title>
267
268 <para>
269 The previous section described the user configurations that
270 define BitBake's global behavior.
271 This section takes a closer look at the layers the build system
272 uses to further control the build.
273 These layers provide Metadata for the software, machine, and
274 policy.
275 </para>
276
277 <para>
278 In general, three types of layer input exist:
279 <itemizedlist>
280 <listitem><para><emphasis>Policy Configuration:</emphasis>
281 Distribution Layers provide top-level or general
282 policies for the image or SDK being built.
283 For example, this layer would dictate whether BitBake
284 produces RPM or IPK packages.</para></listitem>
285 <listitem><para><emphasis>Machine Configuration:</emphasis>
286 Board Support Package (BSP) layers provide machine
287 configurations.
288 This type of information is specific to a particular
289 target architecture.</para></listitem>
290 <listitem><para><emphasis>Metadata:</emphasis>
291 Software layers contain user-supplied recipe files,
292 patches, and append files.
293 </para></listitem>
294 </itemizedlist>
295 </para>
296
297 <para>
298 The following figure shows an expanded representation of the
299 Metadata, Machine Configuration, and Policy Configuration input
300 (layers) boxes of the
301 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>:
302 </para>
303
304 <para>
305 <imagedata fileref="figures/layer-input.png" align="center" width="8in" depth="7.5in" />
306 </para>
307
308 <para>
309 In general, all layers have a similar structure.
310 They all contain a licensing file
311 (e.g. <filename>COPYING</filename>) if the layer is to be
312 distributed, a <filename>README</filename> file as good practice
313 and especially if the layer is to be distributed, a
314 configuration directory, and recipe directories.
315 </para>
316
317 <para>
318 The Yocto Project has many layers that can be used.
319 You can see a web-interface listing of them on the
320 <ulink url="http://git.yoctoproject.org/">Source Repositories</ulink>
321 page.
322 The layers are shown at the bottom categorized under
323 "Yocto Metadata Layers."
324 These layers are fundamentally a subset of the
325 <ulink url="http://layers.openembedded.org/layerindex/layers/">OpenEmbedded Metadata Index</ulink>,
326 which lists all layers provided by the OpenEmbedded community.
327 <note>
328 Layers exist in the Yocto Project Source Repositories that
329 cannot be found in the OpenEmbedded Metadata Index.
330 These layers are either deprecated or experimental in nature.
331 </note>
332 </para>
333
334 <para>
335 BitBake uses the <filename>conf/bblayers.conf</filename> file,
336 which is part of the user configuration, to find what layers it
337 should be using as part of the build.
338 </para>
339
340 <para>
341 For more information on layers, see the
342 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
343 section in the Yocto Project Development Manual.
344 </para>
345
346 <section id="distro-layer">
347 <title>Distro Layer</title>
348
349 <para>
350 The distribution layer provides policy configurations for your
351 distribution.
352 Best practices dictate that you isolate these types of
353 configurations into their own layer.
354 Settings you provide in
355 <filename>conf/&lt;distro&gt;.conf</filename> override similar
356 settings that BitBake finds in your
357 <filename>conf/local.conf</filename> file in the Build
358 Directory.
359 </para>
360
361 <para>
362 The following list provides some explanation and references
363 for what you typically find in the distribution layer:
364 <itemizedlist>
365 <listitem><para><emphasis>classes:</emphasis>
366 Class files (<filename>.bbclass</filename>) hold
367 common functionality that can be shared among
368 recipes in the distribution.
369 When your recipes inherit a class, they take on the
370 settings and functions for that class.
371 You can read more about class files in the
372 "<link linkend='ref-classes'>Classes</link>" section.
373 </para></listitem>
374 <listitem><para><emphasis>conf:</emphasis>
375 This area holds configuration files for the
376 layer (<filename>conf/layer.conf</filename>),
377 the distribution
378 (<filename>conf/distro/&lt;distro&gt;.conf</filename>),
379 and any distribution-wide include files.
380 </para></listitem>
381 <listitem><para><emphasis>recipes-*:</emphasis>
382 Recipes and append files that affect common
383 functionality across the distribution.
384 This area could include recipes and append files
385 to add distribution-specific configuration,
386 initialization scripts, custom image recipes,
387 and so forth.</para></listitem>
388 </itemizedlist>
389 </para>
390 </section>
391
392 <section id="bsp-layer">
393 <title>BSP Layer</title>
394
395 <para>
396 The BSP Layer provides machine configurations.
397 Everything in this layer is specific to the machine for which
398 you are building the image or the SDK.
399 A common structure or form is defined for BSP layers.
400 You can learn more about this structure in the
401 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
402 <note>
403 In order for a BSP layer to be considered compliant with the
404 Yocto Project, it must meet some structural requirements.
405 </note>
406 </para>
407
408 <para>
409 The BSP Layer's configuration directory contains
410 configuration files for the machine
411 (<filename>conf/machine/&lt;machine&gt;.conf</filename>) and,
412 of course, the layer (<filename>conf/layer.conf</filename>).
413 </para>
414
415 <para>
416 The remainder of the layer is dedicated to specific recipes
417 by function: <filename>recipes-bsp</filename>,
418 <filename>recipes-core</filename>,
419 <filename>recipes-graphics</filename>, and
420 <filename>recipes-kernel</filename>.
421 Metadata can exist for multiple formfactors, graphics
422 support systems, and so forth.
423 <note>
424 While the figure shows several <filename>recipes-*</filename>
425 directories, not all these directories appear in all
426 BSP layers.
427 </note>
428 </para>
429 </section>
430
431 <section id="software-layer">
432 <title>Software Layer</title>
433
434 <para>
435 The software layer provides the Metadata for additional
436 software packages used during the build.
437 This layer does not include Metadata that is specific to the
438 distribution or the machine, which are found in their
439 respective layers.
440 </para>
441
442 <para>
443 This layer contains any new recipes that your project needs
444 in the form of recipe files.
445 </para>
446 </section>
447 </section>
448
449 <section id="sources-dev-environment">
450 <title>Sources</title>
451
452 <para>
453 In order for the OpenEmbedded build system to create an image or
454 any target, it must be able to access source files.
455 The
456 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
457 represents source files using the "Upstream Project Releases",
458 "Local Projects", and "SCMs (optional)" boxes.
459 The figure represents mirrors, which also play a role in locating
460 source files, with the "Source Mirror(s)" box.
461 </para>
462
463 <para>
464 The method by which source files are ultimately organized is
465 a function of the project.
466 For example, for released software, projects tend to use tarballs
467 or other archived files that can capture the state of a release
468 guaranteeing that it is statically represented.
469 On the other hand, for a project that is more dynamic or
470 experimental in nature, a project might keep source files in a
471 repository controlled by a Source Control Manager (SCM) such as
472 Git.
473 Pulling source from a repository allows you to control
474 the point in the repository (the revision) from which you want to
475 build software.
476 Finally, a combination of the two might exist, which would give the
477 consumer a choice when deciding where to get source files.
478 </para>
479
480 <para>
481 BitBake uses the
482 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
483 variable to point to source files regardless of their location.
484 Each recipe must have a <filename>SRC_URI</filename> variable
485 that points to the source.
486 </para>
487
488 <para>
489 Another area that plays a significant role in where source files
490 come from is pointed to by the
491 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
492 variable.
493 This area is a cache that can hold previously downloaded source.
494 You can also instruct the OpenEmbedded build system to create
495 tarballs from Git repositories, which is not the default behavior,
496 and store them in the <filename>DL_DIR</filename> by using the
497 <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
498 variable.
499 </para>
500
501 <para>
502 Judicious use of a <filename>DL_DIR</filename> directory can
503 save the build system a trip across the Internet when looking
504 for files.
505 A good method for using a download directory is to have
506 <filename>DL_DIR</filename> point to an area outside of your
507 Build Directory.
508 Doing so allows you to safely delete the Build Directory
509 if needed without fear of removing any downloaded source file.
510 </para>
511
512 <para>
513 The remainder of this section provides a deeper look into the
514 source files and the mirrors.
515 Here is a more detailed look at the source file area of the
516 base figure:
517 <imagedata fileref="figures/source-input.png" align="center" width="7in" depth="7.5in" />
518 </para>
519
520 <section id='upstream-project-releases'>
521 <title>Upstream Project Releases</title>
522
523 <para>
524 Upstream project releases exist anywhere in the form of an
525 archived file (e.g. tarball or zip file).
526 These files correspond to individual recipes.
527 For example, the figure uses specific releases each for
528 BusyBox, Qt, and Dbus.
529 An archive file can be for any released product that can be
530 built using a recipe.
531 </para>
532 </section>
533
534 <section id='local-projects'>
535 <title>Local Projects</title>
536
537 <para>
538 Local projects are custom bits of software the user provides.
539 These bits reside somewhere local to a project - perhaps
540 a directory into which the user checks in items (e.g.
541 a local directory containing a development source tree
542 used by the group).
543 </para>
544
545 <para>
546 The canonical method through which to include a local project
547 is to use the
548 <link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>
549 class to include that local project.
550 You use either the <filename>local.conf</filename> or a
551 recipe's append file to override or set the
552 recipe to point to the local directory on your disk to pull
553 in the whole source tree.
554 </para>
555
556 <para>
557 For information on how to use the
558 <filename>externalsrc.bbclass</filename>, see the
559 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
560 section.
561 </para>
562 </section>
563
564 <section id='scms'>
565 <title>Source Control Managers (Optional)</title>
566
567 <para>
568 Another place the build system can get source files from is
569 through an SCM such as Git or Subversion.
570 In this case, a repository is cloned or checked out.
571 The <filename>do_fetch</filename> task inside BitBake uses
572 the <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
573 variable and the argument's prefix to determine the correct
574 fetcher module.
575 </para>
576
577 <note>
578 For information on how to have the OpenEmbedded build system
579 generate tarballs for Git repositories and place them in the
580 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
581 directory, see the
582 <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
583 variable.
584 </note>
585
586 <para>
587 When fetching a repository, BitBake uses the
588 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
589 variable to determine the specific revision from which to
590 build.
591 </para>
592 </section>
593
594 <section id='source-mirrors'>
595 <title>Source Mirror(s)</title>
596
597 <para>
598 Two kinds of mirrors exist: pre-mirrors and regular mirrors.
599 The <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
600 and
601 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
602 variables point to these, respectively.
603 BitBake checks pre-mirrors before looking upstream for any
604 source files.
605 Pre-mirrors are appropriate when you have a shared directory
606 that is not a directory defined by the
607 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
608 variable.
609 A Pre-mirror typically points to a shared directory that is
610 local to your organization.
611 </para>
612
613 <para>
614 Regular mirrors can be any site across the Internet that is
615 used as an alternative location for source code should the
616 primary site not be functioning for some reason or another.
617 </para>
618 </section>
619 </section>
620
621 <section id="package-feeds-dev-environment">
622 <title>Package Feeds</title>
623
624 <para>
625 When the OpenEmbedded build system generates an image or an SDK,
626 it gets the packages from a package feed area located in the
627 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
628 The
629 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
630 shows this package feeds area in the upper-right corner.
631 </para>
632
633 <para>
634 This section looks a little closer into the package feeds area used
635 by the build system.
636 Here is a more detailed look at the area:
637 <imagedata fileref="figures/package-feeds.png" align="center" width="7in" depth="6in" />
638 </para>
639
640 <para>
641 Package feeds are an intermediary step in the build process.
642 BitBake generates packages whose type is defined by the
643 <link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>
644 variable.
645 Before placing the packages into package feeds,
646 the build process validates them with generated output quality
647 assurance checks through the
648 <link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>
649 class.
650 </para>
651
652 <para>
653 The package feed area resides in
654 <filename>tmp/deploy</filename> of the Build Directory.
655 Folders are created that correspond to the package type
656 (IPK, DEB, or RPM) created.
657 Further organization is derived through the value of the
658 <link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link>
659 variable for each package.
660 For example, packages can exist for the i586 or qemux86
661 architectures.
662 The package files themselves reside within the appropriate
663 architecture folder.
664 </para>
665
666 <para>
667 BitBake uses the <filename>do_package_write_*</filename> task to
668 place generated packages into the package holding area (e.g.
669 <filename>do_package_write_ipk</filename> for IPK packages).
670 </para>
671 </section>
672
673 <section id='bitbake-dev-environment'>
674 <title>BitBake</title>
675
676 <para>
677 The OpenEmbedded build system uses BitBake to produce images.
678 You can see from the
679 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
680 the BitBake area consists of several functional areas.
681 This section takes a closer look at each of those areas.
682 </para>
683
684 <section id='source-fetching-dev-environment'>
685 <title>Source Fetching</title>
686
687 <para>
688 The first stages of building a recipe are to fetch and unpack
689 the source code:
690 <imagedata fileref="figures/source-fetching.png" align="center" width="6.5in" depth="5in" />
691 </para>
692
693 <para>
694 The <filename>do_fetch</filename> and
695 <filename>do_unpack</filename> tasks fetch the source files
696 and unpack them into a working directory.
697 By default, everything is accomplished in the
698 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
699 which has a defined structure.
700 For additional general information on the Build Directory,
701 see the
702 "<link linkend='structure-core-build'><filename>build/</filename></link>"
703 section.
704 </para>
705
706 <para>
707 Unpacked source files are pointed to by the
708 <link linkend='var-S'><filename>S</filename></link> variable.
709 Each recipe has an area in the Build Directory where the
710 unpacked source code resides.
711 The name of that directory for any given recipe is defined from
712 several different variables.
713 You can see the variables that define these directories
714 by looking at the figure:
715 <itemizedlist>
716 <listitem><para><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>
717 </para></listitem>
718 <listitem><para><link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link>
719 </para></listitem>
720 <listitem><para><link linkend='var-TARGET_OS'><filename>TARGET_OS</filename></link>
721 </para></listitem>
722 <listitem><para><link linkend='var-PN'><filename>PN</filename></link>
723 </para></listitem>
724 <listitem><para><link linkend='var-PV'><filename>PV</filename></link>
725 </para></listitem>
726 <listitem><para><link linkend='var-PR'><filename>PR</filename></link>
727 </para></listitem>
728 <listitem><para><link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
729 </para></listitem>
730 <listitem><para><link linkend='var-S'><filename>S</filename></link>
731 </para></listitem>
732 </itemizedlist>
733 </para>
734
735 <para>
736 Briefly, the <filename>S</filename> directory contains the
737 unpacked source files for a recipe.
738 The <filename>WORKDIR</filename> directory is where all the
739 building goes on for a given recipe.
740 </para>
741 </section>
742
743 <section id='patching-dev-environment'>
744 <title>Patching</title>
745
746 <para>
747 Once source code is fetched and unpacked, BitBake locates
748 patch files and applies them to the source files:
749 <imagedata fileref="figures/patching.png" align="center" width="6in" depth="5in" />
750 </para>
751
752 <para>
753 The <filename>do_patch</filename> task processes recipes by
754 using the
755 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
756 variable to locate applicable patch files, which by default
757 are <filename>*.patch</filename> or
758 <filename>*.diff</filename> files, or any file if
759 "apply=yes" is specified for the file in
760 <filename>SRC_URI</filename>.
761 </para>
762
763 <para>
764 BitBake finds and applies multiple patches for a single recipe
765 in the order in which it finds the patches.
766 Patches are applied to the recipe's source files located in the
767 <link linkend='var-S'><filename>S</filename></link> directory.
768 </para>
769
770 <para>
771 For more information on how the source directories are
772 created, see the
773 "<link linkend='source-fetching-dev-environment'>Source Fetching</link>"
774 section.
775 </para>
776 </section>
777
778 <section id='configuration-and-compilation-dev-environment'>
779 <title>Configuration and Compilation</title>
780
781 <para>
782 After source code is patched, BitBake executes tasks that
783 configure and compile the source code:
784 <imagedata fileref="figures/configuration-compile-autoreconf.png" align="center" width="7in" depth="5in" />
785 </para>
786
787 <para>
788 This step in the build process consists of three tasks:
789 <itemizedlist>
790 <listitem><para><emphasis><filename>do_configure</filename>:</emphasis>
791 This task configures the source by enabling and
792 disabling any build-time and configuration options for
793 the software being built.
794 Configurations can come from the recipe itself as well
795 as from an inherited class.
796 Additionally, the software itself might configure itself
797 depending on the target for which it is being built.
798 </para>
799
800 <para>The configurations handled by the
801 <filename>do_configure</filename> task are specific
802 to source code configuration for the source code
803 being built by the recipe.</para>
804
805 <para>If you are using
806 <link linkend='ref-classes-autotools'><filename>autotools.bbclass</filename></link>,
807 you can add additional configuration options by using
808 the <link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>
809 variable.
810 For information on how this variable works within
811 that class, see the
812 <filename>meta/classes/autotools.bbclass</filename> file.
813 </para></listitem>
814 <listitem><para><emphasis><filename>do_compile</filename>:</emphasis>
815 Once a configuration task has been satisfied, BitBake
816 compiles the source using the
817 <filename>do_compile</filename> task.
818 Compilation occurs in the directory pointed to by the
819 <link linkend='var-B'><filename>B</filename></link>
820 variable.
821 Realize that the <filename>B</filename> directory is, by
822 default, the same as the
823 <link linkend='var-S'><filename>S</filename></link>
824 directory.</para></listitem>
825 <listitem><para><emphasis><filename>do_install</filename>:</emphasis>
826 Once compilation is done, BitBake executes the
827 <filename>do_install</filename> task.
828 This task copies files from the <filename>B</filename>
829 directory and places them in a holding area pointed to
830 by the
831 <link linkend='var-D'><filename>D</filename></link>
832 variable.</para></listitem>
833 </itemizedlist>
834 </para>
835 </section>
836
837 <section id='package-splitting-dev-environment'>
838 <title>Package Splitting</title>
839
840 <para>
841 After source code is configured and compiled, the
842 OpenEmbedded build system analyzes
843 the results and splits the output into packages:
844 <imagedata fileref="figures/analysis-for-package-splitting.png" align="center" width="7in" depth="7in" />
845 </para>
846
847 <para>
848 The <filename>do_package</filename> and
849 <filename>do_packagedata</filename> tasks combine to analyze
850 the files found in the
851 <link linkend='var-D'><filename>D</filename></link> directory
852 and split them into subsets based on available packages and
853 files.
854 The analyzing process involves the following as well as other
855 items: splitting out debugging symbols,
856 looking at shared library dependencies between packages,
857 and looking at package relationships.
858 The <filename>do_packagedata</filename> task creates package
859 metadata based on the analysis such that the
860 OpenEmbedded build system can generate the final packages.
861 Working, staged, and intermediate results of the analysis
862 and package splitting process use these areas:
863 <itemizedlist>
864 <listitem><para><link linkend='var-PKGD'><filename>PKGD</filename></link>
865 </para></listitem>
866 <listitem><para><link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>
867 </para></listitem>
868 <listitem><para><link linkend='var-PKGDESTWORK'><filename>PKGDESTWORK</filename></link>
869 </para></listitem>
870 <listitem><para><link linkend='var-PKGDEST'><filename>PKGDEST</filename></link>
871 </para></listitem>
872 </itemizedlist>
873 The <link linkend='var-FILES'><filename>FILES</filename></link>
874 variable defines the files that go into each package in
875 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>.
876 If you want details on how this is accomplished, you can
877 look at
878 <link linkend='ref-classes-package'><filename>package.bbclass</filename></link>.
879 </para>
880
881 <para>
882 Depending on the type of packages being created (RPM, DEB, or
883 IPK), the <filename>do_package_write_*</filename> task
884 creates the actual packages and places them in the
885 Package Feed area, which is
886 <filename>${TMPDIR}/deploy</filename>.
887 You can see the
888 "<link linkend='package-feeds-dev-environment'>Package Feeds</link>"
889 section for more detail on that part of the build process.
890 <note>
891 Support for creating feeds directly from the
892 <filename>deploy/*</filename> directories does not exist.
893 Creating such feeds usually requires some kind of feed
894 maintenance mechanism that would upload the new packages
895 into an official package feed (e.g. the
896 Ångström distribution).
897 This functionality is highly distribution-specific
898 and thus is not provided out of the box.
899 </note>
900 </para>
901 </section>
902
903 <section id='image-generation-dev-environment'>
904 <title>Image Generation</title>
905
906 <para>
907 Once packages are split and stored in the Package Feeds area,
908 the OpenEmbedded build system uses BitBake to generate the
909 root filesystem image:
910 <imagedata fileref="figures/image-generation.png" align="center" width="6in" depth="7in" />
911 </para>
912
913 <para>
914 The image generation process consists of several stages and
915 depends on many variables.
916 The <filename>do_rootfs</filename> task uses these key variables
917 to help create the list of packages to actually install:
918 <itemizedlist>
919 <listitem><para><link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>:
920 Lists out the base set of packages to install from
921 the Package Feeds area.</para></listitem>
922 <listitem><para><link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>:
923 Specifies packages that should not be installed.
924 </para></listitem>
925 <listitem><para><link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>:
926 Specifies features to include in the image.
927 Most of these features map to additional packages for
928 installation.</para></listitem>
929 <listitem><para><link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>:
930 Specifies the package backend to use and consequently
931 helps determine where to locate packages within the
932 Package Feeds area.</para></listitem>
933 <listitem><para><link linkend='var-IMAGE_LINGUAS'><filename>IMAGE_LINGUAS</filename></link>:
934 Determines the language(s) for which additional
935 language support packages are installed.
936 </para></listitem>
937 </itemizedlist>
938 </para>
939
940 <para>
941 Package installation is under control of the package manager
942 (e.g. smart/rpm, opkg, or apt/dpkg) regardless of whether or
943 not package management is enabled for the target.
944 At the end of the process, if package management is not
945 enabled for the target, the package manager's data files
946 are deleted from the root filesystem.
947 </para>
948
949 <para>
950 During image generation, the build system attempts to run
951 all post-installation scripts.
952 Any that fail to run on the build host are run on the
953 target when the target system is first booted.
954 If you are using a
955 <ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>read-only root filesystem</ulink>,
956 all the post installation scripts must succeed during the
957 package installation phase since the root filesystem cannot be
958 written into.
959 </para>
960
961 <para>
962 During Optimization, optimizing processes are run across
963 the image.
964 These processes include <filename>mklibs</filename> and
965 <filename>prelink</filename>.
966 The <filename>mklibs</filename> process optimizes the size
967 of the libraries.
968 A <filename>prelink</filename> process optimizes the dynamic
969 linking of shared libraries to reduce start up time of
970 executables.
971 </para>
972
973 <para>
974 Part of the image generation process includes compressing the
975 root filesystem image.
976 Compression is accomplished through several optimization
977 routines designed to reduce the overall size of the image.
978 </para>
979
980 <para>
981 After the root filesystem has been constructed, the image
982 generation process turns everything into an image file or
983 a set of image files.
984 The formats used for the root filesystem depend on the
985 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
986 variable.
987 </para>
988
989 <note>
990 The entire image generation process is run under Pseudo.
991 Running under Pseudo ensures that the files in the root
992 filesystem have correct ownership.
993 </note>
994 </section>
995
996 <section id='sdk-generation-dev-environment'>
997 <title>SDK Generation</title>
998
999 <para>
1000 The OpenEmbedded build system uses BitBake to generate the
1001 Software Development Kit (SDK) installer script:
1002 <imagedata fileref="figures/sdk-generation.png" align="center" width="6in" depth="7in" />
1003 </para>
1004
1005 <note>
1006 For more information on the cross-development toolchain
1007 generation, see the
1008 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
1009 section.
1010 </note>
1011
1012 <para>
1013 Like image generation, the SDK script process consists of
1014 several stages and depends on many variables.
1015 The <filename>do_populate_sdk</filename> task uses these
1016 key variables to help create the list of packages to actually
1017 install.
1018 For information on the variables listed in the figure, see the
1019 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1020 section.
1021 </para>
1022
1023 <para>
1024 The <filename>do_populate_sdk</filename> task handles two
1025 parts: a target part and a host part.
1026 The target part is the part built for the target hardware and
1027 includes libraries and headers.
1028 The host part is the part of the SDK that runs on the
1029 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
1030 </para>
1031
1032 <para>
1033 Once both parts are constructed, the
1034 <filename>do_populate_sdk</filename> task performs some cleanup
1035 on both parts.
1036 After the cleanup, the task creates a cross-development
1037 environment setup script and any configuration files that
1038 might be needed.
1039 </para>
1040
1041 <para>
1042 The final output of the task is the Cross-development
1043 toolchain installation script (<filename>.sh</filename> file),
1044 which includes the environment setup script.
1045 </para>
1046 </section>
1047 </section>
1048
1049 <section id='images-dev-environment'>
1050 <title>Images</title>
1051
1052 <para>
1053 The images produced by the OpenEmbedded build system
1054 are compressed forms of the
1055 root filesystem that are ready to boot on a target device.
1056 You can see from the
1057 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>
1058 that BitBake output in part consists of images.
1059 This section is going to look more closely at this output:
1060 <imagedata fileref="figures/images.png" align="center" width="5.5in" depth="5.5in" />
1061 </para>
1062
1063 <para>
1064 For a list of example images that the Yocto Project provides,
1065 see the
1066 "<link linkend='ref-images'>Images</link>" chapter.
1067 </para>
1068
1069 <para>
1070 Images are written out to the
1071 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1072 inside the <filename>tmp/deploy/images/&lt;machine&gt;/</filename>
1073 folder as shown in the figure.
1074 This folder contains any files expected to be loaded on the
1075 target device.
1076 The
1077 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
1078 variable points to the <filename>deploy</filename> directory,
1079 while the
1080 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
1081 variable points to the appropriate directory containing images for
1082 the current configuration.
1083 <itemizedlist>
1084 <listitem><para><filename>&lt;kernel-image&gt;</filename>:
1085 A kernel binary file.
1086 The <link linkend='var-KERNEL_IMAGETYPE'><filename>KERNEL_IMAGETYPE</filename></link>
1087 variable setting determines the naming scheme for the
1088 kernel image file.
1089 Depending on that variable, the file could begin with
1090 a variety of naming strings.
1091 The <filename>deploy/images/&lt;machine&gt;</filename>
1092 directory can contain multiple image files for the
1093 machine.</para></listitem>
1094 <listitem><para><filename>&lt;root-filesystem-image&gt;</filename>:
1095 Root filesystems for the target device (e.g.
1096 <filename>*.ext3</filename> or <filename>*.bz2</filename>
1097 files).
1098 The <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
1099 variable setting determines the root filesystem image
1100 type.
1101 The <filename>deploy/images/&lt;machine&gt;</filename>
1102 directory can contain multiple root filesystems for the
1103 machine.</para></listitem>
1104 <listitem><para><filename>&lt;kernel-modules&gt;</filename>:
1105 Tarballs that contain all the modules built for the kernel.
1106 Kernel module tarballs exist for legacy purposes and
1107 can be suppressed by setting the
1108 <link linkend='var-MODULE_TARBALL_DEPLOY'><filename>MODULE_TARBALL_DEPLOY</filename></link>
1109 variable to "0".
1110 The <filename>deploy/images/&lt;machine&gt;</filename>
1111 directory can contain multiple kernel module tarballs
1112 for the machine.</para></listitem>
1113 <listitem><para><filename>&lt;bootloaders&gt;</filename>:
1114 Bootloaders supporting the image, if applicable to the
1115 target machine.
1116 The <filename>deploy/images/&lt;machine&gt;</filename>
1117 directory can contain multiple bootloaders for the
1118 machine.</para></listitem>
1119 <listitem><para><filename>&lt;symlinks&gt;</filename>:
1120 The <filename>deploy/images/&lt;machine&gt;</filename>
1121 folder contains
1122 a symbolic link that points to the most recently built file
1123 for each machine.
1124 These links might be useful for external scripts that
1125 need to obtain the latest version of each file.
1126 </para></listitem>
1127 </itemizedlist>
1128 </para>
1129 </section>
1130
1131 <section id='sdk-dev-environment'>
1132 <title>Application Development SDK</title>
1133
1134 <para>
1135 In the
1136 <link linkend='general-yocto-environment-figure'>general Yocto Project Development Environment figure</link>,
1137 the output labeled "Application Development SDK" represents an
1138 SDK.
1139 This section is going to take a closer look at this output:
1140 <imagedata fileref="figures/sdk.png" align="center" width="5in" depth="4in" />
1141 </para>
1142
1143 <para>
1144 The specific form of this output is a self-extracting
1145 SDK installer (<filename>*.sh</filename>) that, when run,
1146 installs the SDK, which consists of a cross-development
1147 toolchain, a set of libraries and headers, and an SDK
1148 environment setup script.
1149 Running this installer essentially sets up your
1150 cross-development environment.
1151 You can think of the cross-toolchain as the "host"
1152 part because it runs on the SDK machine.
1153 You can think of the libraries and headers as the "target"
1154 part because they are built for the target hardware.
1155 The setup script is added so that you can initialize the
1156 environment before using the tools.
1157 </para>
1158
1159 <note>
1160 <para>
1161 The Yocto Project supports several methods by which you can
1162 set up this cross-development environment.
1163 These methods include downloading pre-built SDK installers,
1164 building and installing your own SDK installer, or running
1165 an Application Development Toolkit (ADT) installer to
1166 install not just cross-development toolchains
1167 but also additional tools to help in this type of
1168 development.
1169 </para>
1170
1171 <para>
1172 For background information on cross-development toolchains
1173 in the Yocto Project development environment, see the
1174 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
1175 section.
1176 For information on setting up a cross-development
1177 environment, see the
1178 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
1179 section in the Yocto Project Application Developer's Guide.
1180 </para>
1181 </note>
1182
1183 <para>
1184 Once built, the SDK installers are written out to the
1185 <filename>deploy/sdk</filename> folder inside the
1186 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1187 as shown in the figure at the beginning of this section.
1188 Several variables exist that help configure these files:
1189 <itemizedlist>
1190 <listitem><para><link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>:
1191 Points to the <filename>deploy</filename>
1192 directory.</para></listitem>
1193 <listitem><para><link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>:
1194 Specifies the architecture of the machine
1195 on which the cross-development tools are run to
1196 create packages for the target hardware.
1197 </para></listitem>
1198 <listitem><para><link linkend='var-SDKIMAGE_FEATURES'><filename>SDKIMAGE_FEATURES</filename></link>:
1199 Lists the features to include in the "target" part
1200 of the SDK.
1201 </para></listitem>
1202 <listitem><para><link linkend='var-TOOLCHAIN_HOST_TASK'><filename>TOOLCHAIN_HOST_TASK</filename></link>:
1203 Lists packages that make up the host
1204 part of the SDK (i.e. the part that runs on
1205 the <filename>SDKMACHINE</filename>).
1206 When you use
1207 <filename>bitbake -c populate_sdk &lt;imagename&gt;</filename>
1208 to create the SDK, a set of default packages
1209 apply.
1210 This variable allows you to add more packages.
1211 </para></listitem>
1212 <listitem><para><link linkend='var-TOOLCHAIN_TARGET_TASK'><filename>TOOLCHAIN_TARGET_TASK</filename></link>:
1213 Lists packages that make up the target part
1214 of the SDK (i.e. the part built for the
1215 target hardware).
1216 </para></listitem>
1217 </itemizedlist>
1218 </para>
1219 </section>
1220
1221</chapter>
1222<!--
1223vim: expandtab tw=80 ts=4
1224-->
diff --git a/documentation/ref-manual/examples/hello-autotools/hello_2.3.bb b/documentation/ref-manual/examples/hello-autotools/hello_2.3.bb
new file mode 100644
index 0000000..5dfb0b3
--- /dev/null
+++ b/documentation/ref-manual/examples/hello-autotools/hello_2.3.bb
@@ -0,0 +1,8 @@
1DESCRIPTION = "GNU Helloworld application"
2SECTION = "examples"
3LICENSE = "GPLv3"
4LIC_FILES_CHKSUM = "file://COPYING;md5=adefda309052235aa5d1e99ce7557010"
5
6SRC_URI = "${GNU_MIRROR}/hello/hello-${PV}.tar.bz2"
7
8inherit autotools
diff --git a/documentation/ref-manual/examples/hello-single/files/helloworld.c b/documentation/ref-manual/examples/hello-single/files/helloworld.c
new file mode 100644
index 0000000..fc7169b
--- /dev/null
+++ b/documentation/ref-manual/examples/hello-single/files/helloworld.c
@@ -0,0 +1,8 @@
1#include <stdio.h>
2
3int main(void)
4{
5 printf("Hello world!\n");
6
7 return 0;
8}
diff --git a/documentation/ref-manual/examples/hello-single/hello.bb b/documentation/ref-manual/examples/hello-single/hello.bb
new file mode 100644
index 0000000..0812743
--- /dev/null
+++ b/documentation/ref-manual/examples/hello-single/hello.bb
@@ -0,0 +1,17 @@
1DESCRIPTION = "Simple helloworld application"
2SECTION = "examples"
3LICENSE = "MIT"
4LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
5
6SRC_URI = "file://helloworld.c"
7
8S = "${WORKDIR}"
9
10do_compile() {
11 ${CC} helloworld.c -o helloworld
12}
13
14do_install() {
15 install -d ${D}${bindir}
16 install -m 0755 helloworld ${D}${bindir}
17}
diff --git a/documentation/ref-manual/examples/libxpm/libxpm_3.5.6.bb b/documentation/ref-manual/examples/libxpm/libxpm_3.5.6.bb
new file mode 100644
index 0000000..b58d4d7
--- /dev/null
+++ b/documentation/ref-manual/examples/libxpm/libxpm_3.5.6.bb
@@ -0,0 +1,14 @@
1require xorg-lib-common.inc
2
3DESCRIPTION = "X11 Pixmap library"
4LICENSE = "X-BSD"
5LIC_FILES_CHKSUM = "file://COPYING;md5=3e07763d16963c3af12db271a31abaa5"
6DEPENDS += "libxext"
7PR = "r2"
8PE = "1"
9
10XORG_PN = "libXpm"
11
12PACKAGES =+ "sxpm cxpm"
13FILES_cxpm = "${bindir}/cxpm"
14FILES_sxpm = "${bindir}/sxpm"
diff --git a/documentation/ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb b/documentation/ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb
new file mode 100644
index 0000000..5d05a43
--- /dev/null
+++ b/documentation/ref-manual/examples/mtd-makefile/mtd-utils_1.0.0.bb
@@ -0,0 +1,15 @@
1DESCRIPTION = "Tools for managing memory technology devices."
2SECTION = "base"
3DEPENDS = "zlib"
4HOMEPAGE = "http://www.linux-mtd.infradead.org/"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
7 file://include/common.h;beginline=1;endline=17;md5=ba05b07912a44ea2bf81ce409380049c"
8
9SRC_URI = "ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-${PV}.tar.gz"
10
11CFLAGS_prepend = "-I ${S}/include "
12
13do_install() {
14 oe_runmake install DESTDIR=${D}
15}
diff --git a/documentation/ref-manual/faq.xml b/documentation/ref-manual/faq.xml
new file mode 100644
index 0000000..c7ccaaf
--- /dev/null
+++ b/documentation/ref-manual/faq.xml
@@ -0,0 +1,698 @@
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='faq'>
6<title>FAQ</title>
7<qandaset>
8 <qandaentry>
9 <question>
10 <para>
11 How does Poky differ from <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>?
12 </para>
13 </question>
14 <answer>
15 <para>
16 The term "<ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink>"
17 refers to the specific reference build system that
18 the Yocto Project provides.
19 Poky is based on <ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink>
20 and <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>.
21 Thus, the generic term used here for the build system is
22 the "OpenEmbedded build system."
23 Development in the Yocto Project using Poky is closely tied to OpenEmbedded, with
24 changes always being merged to OE-Core or BitBake first before being pulled back
25 into Poky.
26 This practice benefits both projects immediately.
27 </para>
28 </answer>
29 </qandaentry>
30
31 <qandaentry>
32 <question>
33 <para>
34 My development system does not have Python 2.7.3 or greater,
35 which the Yocto Project requires.
36 Can I still use the Yocto Project?
37 </para>
38 </question>
39 <answer>
40 <para>
41 You can get the required tools on your host development
42 system a couple different ways (i.e. building a tarball or
43 downloading a tarball).
44 See the
45 "<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>"
46 section for steps on how to update your build tools.
47 </para>
48 </answer>
49 </qandaentry>
50
51 <qandaentry>
52 <question>
53 <para>
54 How can you claim Poky / OpenEmbedded-Core is stable?
55 </para>
56 </question>
57 <answer>
58 <para>
59 There are three areas that help with stability;
60 <itemizedlist>
61 <listitem><para>The Yocto Project team keeps
62 <ulink url='&YOCTO_DOCS_DEV_URL;#oe-core'>OE-Core</ulink> small
63 and focused, containing around 830 recipes as opposed to the thousands
64 available in other OpenEmbedded community layers.
65 Keeping it small makes it easy to test and maintain.</para></listitem>
66 <listitem><para>The Yocto Project team runs manual and automated tests
67 using a small, fixed set of reference hardware as well as emulated
68 targets.</para></listitem>
69 <listitem><para>The Yocto Project uses an autobuilder,
70 which provides continuous build and integration tests.</para></listitem>
71 </itemizedlist>
72 </para>
73 </answer>
74 </qandaentry>
75
76 <qandaentry>
77 <question>
78 <para>
79 How do I get support for my board added to the Yocto Project?
80 </para>
81 </question>
82 <answer>
83 <para>
84 Support for an additional board is added by creating a
85 Board Support Package (BSP) layer for it.
86 For more information on how to create a BSP layer, see the
87 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and Creating Layers</ulink>"
88 section in the Yocto Project Development Manual and the
89 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
90 </para>
91 <para>
92 Usually, if the board is not completely exotic, adding support in
93 the Yocto Project is fairly straightforward.
94 </para>
95 </answer>
96 </qandaentry>
97
98 <qandaentry>
99 <question>
100 <para>
101 Are there any products built using the OpenEmbedded build system?
102 </para>
103 </question>
104 <answer>
105 <para>
106 The software running on the <ulink url='http://vernier.com/labquest/'>Vernier LabQuest</ulink>
107 is built using the OpenEmbedded build system.
108 See the <ulink url='http://www.vernier.com/products/interfaces/labq/'>Vernier LabQuest</ulink>
109 website for more information.
110 There are a number of pre-production devices using the OpenEmbedded build system
111 and the Yocto Project team
112 announces them as soon as they are released.
113 </para>
114 </answer>
115 </qandaentry>
116
117 <qandaentry>
118 <question>
119 <para>
120 What does the OpenEmbedded build system produce as output?
121 </para>
122 </question>
123 <answer>
124 <para>
125 Because you can use the same set of recipes to create output of
126 various formats, the output of an OpenEmbedded build depends on
127 how you start it.
128 Usually, the output is a flashable image ready for the target
129 device.
130 </para>
131 </answer>
132 </qandaentry>
133
134 <qandaentry>
135 <question>
136 <para>
137 How do I add my package to the Yocto Project?
138 </para>
139 </question>
140 <answer>
141 <para>
142 To add a package, you need to create a BitBake recipe.
143 For information on how to add a package, see the section
144 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-addpkg'>Writing a Recipe to Add a Package to Your Image</ulink>"
145 in the Yocto Project Development Manual.
146 </para>
147 </answer>
148 </qandaentry>
149
150 <qandaentry>
151 <question>
152 <para>
153 Do I have to reflash my entire board with a new Yocto Project image when recompiling
154 a package?
155 </para>
156 </question>
157 <answer>
158 <para>
159 The OpenEmbedded build system can build packages in various
160 formats such as IPK for OPKG, Debian package
161 (<filename>.deb</filename>), or RPM.
162 You can then upgrade the packages using the package tools on
163 the device, much like on a desktop distribution such as
164 Ubuntu or Fedora.
165 However, package management on the target is entirely optional.
166 </para>
167 </answer>
168 </qandaentry>
169
170 <qandaentry>
171 <question>
172 <para>
173 What is GNOME Mobile and what is the difference between GNOME Mobile and GNOME?
174 </para>
175 </question>
176 <answer>
177 <para>
178 GNOME Mobile is a subset of the <ulink url='http://www.gnome.org'>GNOME</ulink>
179 platform targeted at mobile and embedded devices.
180 The main difference between GNOME Mobile and standard GNOME is that
181 desktop-orientated libraries have been removed, along with deprecated libraries,
182 creating a much smaller footprint.
183 </para>
184 </answer>
185 </qandaentry>
186
187 <qandaentry>
188 <question>
189 <para>
190 I see the error '<filename>chmod: XXXXX new permissions are r-xrwxrwx, not r-xr-xr-x</filename>'.
191 What is wrong?
192 </para>
193 </question>
194 <answer>
195 <para>
196 You are probably running the build on an NTFS filesystem.
197 Use <filename>ext2</filename>, <filename>ext3</filename>, or <filename>ext4</filename> instead.
198 </para>
199 </answer>
200 </qandaentry>
201
202<!-- <qandaentry>
203 <question>
204 <para>
205 How do I make the Yocto Project work in RHEL/CentOS?
206 </para>
207 </question>
208 <answer>
209 <para>
210 To get the Yocto Project working under RHEL/CentOS 5.1 you need to first
211 install some required packages.
212 The standard CentOS packages needed are:
213 <itemizedlist>
214 <listitem><para>"Development tools" (selected during installation)</para></listitem>
215 <listitem><para><filename>texi2html</filename></para></listitem>
216 <listitem><para><filename>compat-gcc-34</filename></para></listitem>
217 </itemizedlist>
218 On top of these, you need the following external packages:
219 <itemizedlist>
220 <listitem><para><filename>python-sqlite2</filename> from
221 <ulink url='http://dag.wieers.com/rpm/packages/python-sqlite2/'>DAG repository</ulink>
222 </para></listitem>
223 <listitem><para><filename>help2man</filename> from
224 <ulink url='http://centos.karan.org/el4/extras/stable/x86_64/RPMS/repodata/repoview/help2man-0-1.33.1-2.html'>Karan repository</ulink></para></listitem>
225 </itemizedlist>
226 </para>
227
228 <para>
229 Once these packages are installed, the OpenEmbedded build system will be able
230 to build standard images.
231 However, there might be a problem with the QEMU emulator segfaulting.
232 You can either disable the generation of binary locales by setting
233 <filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>ENABLE_BINARY_LOCALE_GENERATION</link>
234 </filename> to "0" or by removing the <filename>linux-2.6-execshield.patch</filename>
235 from the kernel and rebuilding it since that is the patch that causes the problems with QEMU.
236 </para>
237
238 <note>
239 <para>For information on distributions that the Yocto Project
240 uses during validation, see the
241 <ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink>
242 Wiki page.</para>
243 <para>For notes about using the Yocto Project on a RHEL 4-based
244 host, see the
245 <ulink url='&YOCTO_WIKI_URL;/wiki/BuildingOnRHEL4'>Building on RHEL4</ulink>
246 Wiki page.</para>
247 </note>
248 </answer>
249 </qandaentry> -->
250
251 <qandaentry>
252 <question>
253 <para>
254 I see lots of 404 responses for files on
255 <filename>&YOCTO_HOME_URL;/sources/*</filename>. Is something wrong?
256 </para>
257 </question>
258 <answer>
259 <para>
260 Nothing is wrong.
261 The OpenEmbedded build system checks any configured source mirrors before downloading
262 from the upstream sources.
263 The build system does this searching for both source archives and
264 pre-checked out versions of SCM-managed software.
265 These checks help in large installations because it can reduce load on the SCM servers
266 themselves.
267 The address above is one of the default mirrors configured into the
268 build system.
269 Consequently, if an upstream source disappears, the team
270 can place sources there so builds continue to work.
271 </para>
272 </answer>
273 </qandaentry>
274
275 <qandaentry>
276 <question>
277 <para>
278 I have machine-specific data in a package for one machine only but the package is
279 being marked as machine-specific in all cases, how do I prevent this?
280 </para>
281 </question>
282 <answer>
283 <para>
284 Set <filename><link linkend='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'>SRC_URI_OVERRIDES_PACKAGE_ARCH</link>
285 </filename> = "0" in the <filename>.bb</filename> file but make sure the package is
286 manually marked as
287 machine-specific for the case that needs it.
288 The code that handles
289 <filename>SRC_URI_OVERRIDES_PACKAGE_ARCH</filename> is in
290 the <filename>meta/classes/base.bbclass</filename> file.
291 </para>
292 </answer>
293 </qandaentry>
294
295 <qandaentry>
296 <question>
297 <para>
298 I'm behind a firewall and need to use a proxy server. How do I do that?
299 </para>
300 </question>
301 <answer>
302 <para>
303 Most source fetching by the OpenEmbedded build system is done by <filename>wget</filename>
304 and you therefore need to specify the proxy settings in a
305 <filename>.wgetrc</filename> file in your home directory.
306 Here are some example settings:
307 <literallayout class='monospaced'>
308 http_proxy = http://proxy.yoyodyne.com:18023/
309 ftp_proxy = http://proxy.yoyodyne.com:18023/
310 </literallayout>
311 The Yocto Project also includes a
312 <filename>site.conf.sample</filename> file that shows how to
313 configure CVS and Git proxy servers if needed.
314 </para>
315 </answer>
316 </qandaentry>
317
318 <qandaentry>
319 <question>
320 <para>
321 What’s the difference between <filename>foo</filename> and <filename>foo-native</filename>?
322 </para>
323 </question>
324 <answer>
325 <para>
326 The <filename>*-native</filename> targets are designed to run on the system
327 being used for the build.
328 These are usually tools that are needed to assist the build in some way such as
329 <filename>quilt-native</filename>, which is used to apply patches.
330 The non-native version is the one that runs on the target device.
331 </para>
332 </answer>
333 </qandaentry>
334
335 <qandaentry>
336 <question>
337 <para>
338 I'm seeing random build failures. Help?!
339 </para>
340 </question>
341 <answer>
342 <para>
343 If the same build is failing in totally different and random
344 ways, the most likely explanation is:
345 <itemizedlist>
346 <listitem><para>The hardware you are running the build on
347 has some problem.</para></listitem>
348 <listitem><para>You are running the build under
349 virtualization, in which case the virtualization
350 probably has bugs.</para></listitem>
351 </itemizedlist>
352 The OpenEmbedded build system processes a massive amount of
353 data that causes lots of network, disk and CPU activity and
354 is sensitive to even single-bit failures in any of these areas.
355 True random failures have always been traced back to hardware
356 or virtualization issues.
357 </para>
358 </answer>
359 </qandaentry>
360
361 <qandaentry>
362 <question>
363 <para>
364 What do we need to ship for license compliance?
365 </para>
366 </question>
367 <answer>
368 <para>
369 This is a difficult question and you need to consult your lawyer
370 for the answer for your specific case.
371 It is worth bearing in mind that for GPL compliance, there needs
372 to be enough information shipped to allow someone else to
373 rebuild and produce the same end result you are shipping.
374 This means sharing the source code, any patches applied to it,
375 and also any configuration information about how that package
376 was configured and built.
377 </para>
378
379 <para>
380 You can find more information on licensing in the
381 "<ulink url='&YOCTO_DOCS_DEV_URL;#licensing'>Licensing</ulink>"
382 and "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
383 sections, both of which are in the Yocto Project Development
384 Manual.
385 </para>
386 </answer>
387 </qandaentry>
388
389 <qandaentry>
390 <question>
391 <para>
392 How do I disable the cursor on my touchscreen device?
393 </para>
394 </question>
395 <answer>
396 <para>
397 You need to create a form factor file as described in the
398 "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes'>Miscellaneous BSP-Specific Recipe Files</ulink>"
399 section in the Yocto Project Board Support Packages (BSP)
400 Developer's Guide.
401 Set the <filename>HAVE_TOUCHSCREEN</filename> variable equal to
402 one as follows:
403 <literallayout class='monospaced'>
404 HAVE_TOUCHSCREEN=1
405 </literallayout>
406 </para>
407 </answer>
408 </qandaentry>
409
410 <qandaentry>
411 <question>
412 <para>
413 How do I make sure connected network interfaces are brought up by default?
414 </para>
415 </question>
416 <answer>
417 <para>
418 The default interfaces file provided by the netbase recipe does not
419 automatically bring up network interfaces.
420 Therefore, you will need to add a BSP-specific netbase that includes an interfaces
421 file.
422 See the "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-filelayout-misc-recipes'>Miscellaneous BSP-Specific Recipe Files</ulink>"
423 section in the Yocto Project Board Support Packages (BSP)
424 Developer's Guide for information on creating these types of
425 miscellaneous recipe files.
426 </para>
427 <para>
428 For example, add the following files to your layer:
429 <literallayout class='monospaced'>
430 meta-MACHINE/recipes-bsp/netbase/netbase/MACHINE/interfaces
431 meta-MACHINE/recipes-bsp/netbase/netbase_5.0.bbappend
432 </literallayout>
433 </para>
434 </answer>
435 </qandaentry>
436
437 <qandaentry>
438 <question>
439 <para>
440 How do I create images with more free space?
441 </para>
442 </question>
443 <answer>
444 <para>
445 By default, the OpenEmbedded build system creates images
446 that are 1.3 times the size of the populated root filesystem.
447 To affect the image size, you need to set various
448 configurations:
449 <itemizedlist>
450 <listitem><para><emphasis>Image Size:</emphasis>
451 The OpenEmbedded build system uses the
452 <link linkend='var-IMAGE_ROOTFS_SIZE'><filename>IMAGE_ROOTFS_SIZE</filename></link>
453 variable to define the size of the image in Kbytes.
454 The build system determines the size by taking into
455 account the initial root filesystem size before any
456 modifications such as requested size for the image and
457 any requested additional free disk space to be
458 added to the image.</para></listitem>
459 <listitem><para><emphasis>Overhead:</emphasis>
460 Use the
461 <link linkend='var-IMAGE_OVERHEAD_FACTOR'><filename>IMAGE_OVERHEAD_FACTOR</filename></link>
462 variable to define the multiplier that the build system
463 applies to the initial image size, which is 1.3 by
464 default.</para></listitem>
465 <listitem><para><emphasis>Additional Free Space:</emphasis>
466 Use the
467 <link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'><filename>IMAGE_ROOTFS_EXTRA_SPACE</filename></link>
468 variable to add additional free space to the image.
469 The build system adds this space to the image after
470 it determines its
471 <filename>IMAGE_ROOTFS_SIZE</filename>.
472 </para></listitem>
473 </itemizedlist>
474 </para>
475 </answer>
476 </qandaentry>
477
478 <qandaentry>
479 <question>
480 <para>
481 Why don't you support directories with spaces in the pathnames?
482 </para>
483 </question>
484 <answer>
485 <para>
486 The Yocto Project team has tried to do this before but too
487 many of the tools the OpenEmbedded build system depends on,
488 such as <filename>autoconf</filename>, break when they find
489 spaces in pathnames.
490 Until that situation changes, the team will not support spaces
491 in pathnames.
492 </para>
493 </answer>
494 </qandaentry>
495
496 <qandaentry>
497 <question>
498 <para>
499 How do I use an external toolchain?
500 </para>
501 </question>
502 <answer>
503 <para>
504 The toolchain configuration is very flexible and customizable.
505 It is primarily controlled with the
506 <filename><link linkend='var-TCMODE'>TCMODE</link></filename>
507 variable.
508 This variable controls which <filename>tcmode-*.inc</filename>
509 file to include from the
510 <filename>meta/conf/distro/include</filename> directory within
511 the
512 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
513 </para>
514
515 <para>
516 The default value of <filename>TCMODE</filename> is "default"
517 (i.e. <filename>tcmode-default.inc</filename>).
518 However, other patterns are accepted.
519 In particular, "external-*" refers to external toolchains of
520 which there are some basic examples included in the
521 OpenEmbedded Core (<filename>meta</filename>).
522 You can use your own custom toolchain definition in your own
523 layer (or as defined in the <filename>local.conf</filename>
524 file) at the location
525 <filename>conf/distro/include/tcmode-*.inc</filename>.
526 </para>
527
528 <para>
529 In addition to the toolchain configuration, you also need a
530 corresponding toolchain recipe file.
531 This recipe file needs to package up any pre-built objects in
532 the toolchain such as <filename>libgcc</filename>,
533 <filename>libstdcc++</filename>, any locales, and
534 <filename>libc</filename>.
535 An example is the
536 <filename>external-sourcery-toolchain.bb</filename>, which is
537 located in <filename>meta/recipes-core/meta/</filename> within
538 the Source Directory.
539 </para>
540
541 <para>
542 For information on installing and using cross-development
543 toolchains, see the
544 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
545 section in the Yocto Project Application Developer's Guide.
546 For general information on cross-development toolchains, see
547 the
548 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
549 section.
550 </para>
551 </answer>
552 </qandaentry>
553
554 <qandaentry>
555 <question>
556 <para id='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>
557 How does the OpenEmbedded build system obtain source code and
558 will it work behind my firewall or proxy server?
559 </para>
560 </question>
561 <answer>
562 <para>
563 The way the build system obtains source code is highly
564 configurable.
565 You can setup the build system to get source code in most
566 environments if HTTP transport is available.
567 </para>
568 <para>
569 When the build system searches for source code, it first
570 tries the local download directory.
571 If that location fails, Poky tries
572 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
573 the upstream source, and then
574 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
575 in that order.
576 </para>
577 <para>
578 Assuming your distribution is "poky", the OpenEmbedded build
579 system uses the Yocto Project source
580 <filename>PREMIRRORS</filename> by default for SCM-based
581 sources, upstreams for normal tarballs, and then falls back
582 to a number of other mirrors including the Yocto Project
583 source mirror if those fail.
584 </para>
585 <para>
586 As an example, you could add a specific server for the
587 build system to attempt before any others by adding something
588 like the following to the <filename>local.conf</filename>
589 configuration file:
590 <literallayout class='monospaced'>
591 PREMIRRORS_prepend = "\
592 git://.*/.* http://www.yoctoproject.org/sources/ \n \
593 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
594 http://.*/.* http://www.yoctoproject.org/sources/ \n \
595 https://.*/.* http://www.yoctoproject.org/sources/ \n"
596 </literallayout>
597 </para>
598 <para>
599 These changes cause the build system to intercept Git, FTP,
600 HTTP, and HTTPS requests and direct them to the
601 <filename>http://</filename> sources mirror.
602 You can use <filename>file://</filename> URLs to point to
603 local directories or network shares as well.
604 </para>
605 <para>
606 Aside from the previous technique, these options also exist:
607 <literallayout class='monospaced'>
608 BB_NO_NETWORK = "1"
609 </literallayout>
610 This statement tells BitBake to issue an error instead of
611 trying to access the Internet.
612 This technique is useful if you want to ensure code builds
613 only from local sources.
614 </para>
615 <para>
616 Here is another technique:
617 <literallayout class='monospaced'>
618 BB_FETCH_PREMIRRORONLY = "1"
619 </literallayout>
620 This statement limits the build system to pulling source
621 from the <filename>PREMIRRORS</filename> only.
622 Again, this technique is useful for reproducing builds.
623 </para>
624 <para>
625 Here is another technique:
626 <literallayout class='monospaced'>
627 BB_GENERATE_MIRROR_TARBALLS = "1"
628 </literallayout>
629 This statement tells the build system to generate mirror
630 tarballs.
631 This technique is useful if you want to create a mirror server.
632 If not, however, the technique can simply waste time during
633 the build.
634 </para>
635 <para>
636 Finally, consider an example where you are behind an
637 HTTP-only firewall.
638 You could make the following changes to the
639 <filename>local.conf</filename> configuration file as long as
640 the <filename>PREMIRRORS</filename> server is current:
641 <literallayout class='monospaced'>
642 PREMIRRORS_prepend = "\
643 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
644 http://.*/.* http://www.yoctoproject.org/sources/ \n \
645 https://.*/.* http://www.yoctoproject.org/sources/ \n"
646 BB_FETCH_PREMIRRORONLY = "1"
647 </literallayout>
648 These changes would cause the build system to successfully
649 fetch source over HTTP and any network accesses to anything
650 other than the <filename>PREMIRRORS</filename> would fail.
651 </para>
652 <para>
653 The build system also honors the standard shell environment
654 variables <filename>http_proxy</filename>,
655 <filename>ftp_proxy</filename>,
656 <filename>https_proxy</filename>, and
657 <filename>all_proxy</filename> to redirect requests through
658 proxy servers.
659 </para>
660 </answer>
661 </qandaentry>
662
663 <qandaentry>
664 <question>
665 <para>
666 Can I get rid of build output so I can start over?
667 </para>
668 </question>
669 <answer>
670 <para>
671 Yes - you can easily do this.
672 When you use BitBake to build an image, all the build output
673 goes into the directory created when you run the
674 build environment setup script (i.e.
675 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
676 or
677 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
678 By default, this <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
679 is named <filename>build</filename> but can be named
680 anything you want.
681 </para>
682
683 <para>
684 Within the Build Directory, is the <filename>tmp</filename>
685 directory.
686 To remove all the build output yet preserve any source code or
687 downloaded files from previous builds, simply remove the
688 <filename>tmp</filename> directory.
689 </para>
690 </answer>
691 </qandaentry>
692
693
694</qandaset>
695</chapter>
696<!--
697vim: expandtab tw=80 ts=4
698-->
diff --git a/documentation/ref-manual/figures/analysis-for-package-splitting.png b/documentation/ref-manual/figures/analysis-for-package-splitting.png
new file mode 100644
index 0000000..04f2794
--- /dev/null
+++ b/documentation/ref-manual/figures/analysis-for-package-splitting.png
Binary files differ
diff --git a/documentation/ref-manual/figures/buildhistory-web.png b/documentation/ref-manual/figures/buildhistory-web.png
new file mode 100644
index 0000000..f6db86c
--- /dev/null
+++ b/documentation/ref-manual/figures/buildhistory-web.png
Binary files differ
diff --git a/documentation/ref-manual/figures/buildhistory.png b/documentation/ref-manual/figures/buildhistory.png
new file mode 100644
index 0000000..edf98d9
--- /dev/null
+++ b/documentation/ref-manual/figures/buildhistory.png
Binary files differ
diff --git a/documentation/ref-manual/figures/configuration-compile-autoreconf.png b/documentation/ref-manual/figures/configuration-compile-autoreconf.png
new file mode 100644
index 0000000..a07464f
--- /dev/null
+++ b/documentation/ref-manual/figures/configuration-compile-autoreconf.png
Binary files differ
diff --git a/documentation/ref-manual/figures/cross-development-toolchains.png b/documentation/ref-manual/figures/cross-development-toolchains.png
new file mode 100644
index 0000000..d36670a
--- /dev/null
+++ b/documentation/ref-manual/figures/cross-development-toolchains.png
Binary files differ
diff --git a/documentation/ref-manual/figures/image-generation.png b/documentation/ref-manual/figures/image-generation.png
new file mode 100644
index 0000000..5594658
--- /dev/null
+++ b/documentation/ref-manual/figures/image-generation.png
Binary files differ
diff --git a/documentation/ref-manual/figures/images.png b/documentation/ref-manual/figures/images.png
new file mode 100644
index 0000000..d99eac1
--- /dev/null
+++ b/documentation/ref-manual/figures/images.png
Binary files differ
diff --git a/documentation/ref-manual/figures/layer-input.png b/documentation/ref-manual/figures/layer-input.png
new file mode 100644
index 0000000..0a4f2e7
--- /dev/null
+++ b/documentation/ref-manual/figures/layer-input.png
Binary files differ
diff --git a/documentation/ref-manual/figures/package-feeds.png b/documentation/ref-manual/figures/package-feeds.png
new file mode 100644
index 0000000..4bc311f
--- /dev/null
+++ b/documentation/ref-manual/figures/package-feeds.png
Binary files differ
diff --git a/documentation/ref-manual/figures/patching.png b/documentation/ref-manual/figures/patching.png
new file mode 100644
index 0000000..8ecd018
--- /dev/null
+++ b/documentation/ref-manual/figures/patching.png
Binary files differ
diff --git a/documentation/ref-manual/figures/poky-title.png b/documentation/ref-manual/figures/poky-title.png
new file mode 100644
index 0000000..2893d84
--- /dev/null
+++ b/documentation/ref-manual/figures/poky-title.png
Binary files differ
diff --git a/documentation/ref-manual/figures/sdk-generation.png b/documentation/ref-manual/figures/sdk-generation.png
new file mode 100644
index 0000000..c37e274
--- /dev/null
+++ b/documentation/ref-manual/figures/sdk-generation.png
Binary files differ
diff --git a/documentation/ref-manual/figures/sdk.png b/documentation/ref-manual/figures/sdk.png
new file mode 100644
index 0000000..a539cc5
--- /dev/null
+++ b/documentation/ref-manual/figures/sdk.png
Binary files differ
diff --git a/documentation/ref-manual/figures/source-fetching.png b/documentation/ref-manual/figures/source-fetching.png
new file mode 100644
index 0000000..26aefb5
--- /dev/null
+++ b/documentation/ref-manual/figures/source-fetching.png
Binary files differ
diff --git a/documentation/ref-manual/figures/source-input.png b/documentation/ref-manual/figures/source-input.png
new file mode 100644
index 0000000..f751505
--- /dev/null
+++ b/documentation/ref-manual/figures/source-input.png
Binary files differ
diff --git a/documentation/ref-manual/figures/user-configuration.png b/documentation/ref-manual/figures/user-configuration.png
new file mode 100644
index 0000000..f2b3f8e
--- /dev/null
+++ b/documentation/ref-manual/figures/user-configuration.png
Binary files differ
diff --git a/documentation/ref-manual/figures/yocto-environment-ref.png b/documentation/ref-manual/figures/yocto-environment-ref.png
new file mode 100644
index 0000000..650c6c8
--- /dev/null
+++ b/documentation/ref-manual/figures/yocto-environment-ref.png
Binary files differ
diff --git a/documentation/ref-manual/introduction.xml b/documentation/ref-manual/introduction.xml
new file mode 100644
index 0000000..8232ba8
--- /dev/null
+++ b/documentation/ref-manual/introduction.xml
@@ -0,0 +1,439 @@
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='intro'>
6<title>Introduction</title>
7
8<section id='intro-welcome'>
9 <title>Introduction</title>
10
11 <para>
12 This manual provides reference information for the current release of the Yocto Project.
13 The Yocto Project is an open-source collaboration project focused on embedded Linux
14 developers.
15 Amongst other things, the Yocto Project uses the OpenEmbedded build system, which
16 is based on the Poky project, to construct complete Linux images.
17 You can find complete introductory and getting started information on the Yocto Project
18 by reading the
19 <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>.
20 For task-based information using the Yocto Project, see the
21 <ulink url='&YOCTO_DOCS_DEV_URL;'>Yocto Project Development Manual</ulink>
22 and the <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>.
23 For Board Support Package (BSP) structure information, see the
24 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support Package (BSP) Developer's Guide</ulink>.
25 You can also find lots of Yocto Project information on the
26 <ulink url="&YOCTO_HOME_URL;">Yocto Project website</ulink>.
27 </para>
28</section>
29
30<section id='intro-manualoverview'>
31 <title>Documentation Overview</title>
32 <para>
33 This reference manual consists of the following:
34 <itemizedlist>
35 <listitem><para><emphasis>
36 <link linkend='usingpoky'>Using the Yocto Project</link>:</emphasis>
37 Provides an overview of the components that make up the Yocto Project
38 followed by information about debugging images created in the Yocto Project.
39 </para></listitem>
40 <listitem><para><emphasis>
41 <link linkend='technical-details'>Technical Details</link>:</emphasis>
42 Describes fundamental Yocto Project components as well as an explanation
43 behind how the Yocto Project uses shared state (sstate) cache to speed build time.
44 </para></listitem>
45 <listitem><para><emphasis>
46 <link linkend='ref-structure'>Directory Structure</link>:</emphasis>
47 Describes the
48 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> created
49 either by unpacking a released Yocto Project tarball on your host development system,
50 or by cloning the upstream
51 <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink> Git repository.
52 </para></listitem>
53 <listitem><para><emphasis>
54 <link linkend='ref-bitbake'>BitBake</link>:</emphasis>
55 Provides an overview of the BitBake tool and its role within
56 the Yocto Project.</para></listitem>
57 <listitem><para><emphasis>
58 <link linkend='ref-classes'>Classes</link>:</emphasis>
59 Describes the classes used in the Yocto Project.</para></listitem>
60 <listitem><para><emphasis>
61 <link linkend='ref-images'>Images</link>:</emphasis>
62 Describes the standard images that the Yocto Project supports.
63 </para></listitem>
64 <listitem><para><emphasis>
65 <link linkend='ref-features'>Features</link>:</emphasis>
66 Describes mechanisms for creating distribution, machine, and image
67 features during the build process using the OpenEmbedded build system.</para></listitem>
68 <listitem><para><emphasis>
69 <link linkend='ref-variables-glos'>Variables Glossary</link>:</emphasis>
70 Presents most variables used by the OpenEmbedded build system, which
71 uses BitBake.
72 Entries describe the function of the variable and how to apply them.
73 </para></listitem>
74 <listitem><para><emphasis>
75 <link linkend='ref-varlocality'>Variable Context</link>:</emphasis>
76 Provides variable locality or context.</para></listitem>
77 <listitem><para><emphasis>
78 <link linkend='faq'>FAQ</link>:</emphasis>
79 Provides answers for commonly asked questions in the Yocto Project
80 development environment.</para></listitem>
81 <listitem><para><emphasis>
82 <link linkend='resources'>Contributing to the Yocto Project</link>:</emphasis>
83 Provides guidance on how you can contribute back to the Yocto
84 Project.</para></listitem>
85 </itemizedlist>
86 </para>
87</section>
88
89
90<section id='intro-requirements'>
91<title>System Requirements</title>
92 <para>
93 For general Yocto Project system requirements, see the
94 "<ulink url='&YOCTO_DOCS_QS_URL;#yp-resources'>What You Need and How You Get It</ulink>" section
95 in the Yocto Project Quick Start.
96 The remainder of this section provides details on system requirements
97 not covered in the Yocto Project Quick Start.
98 </para>
99
100 <section id='detailed-supported-distros'>
101 <title>Supported Linux Distributions</title>
102
103 <para>
104 Currently, the Yocto Project is supported on the following
105 distributions:
106 <note>
107 <para>
108 Yocto Project releases are tested against the stable Linux
109 distributions in the following list.
110 The Yocto Project should work on other distributions but
111 validation is not performed against them.
112 </para>
113
114 <para>
115 In particular, the Yocto Project does not support
116 and currently has no plans to support
117 rolling-releases or development distributions due to their
118 constantly changing nature.
119 We welcome patches and bug reports, but keep in mind that
120 our priority is on the supported platforms listed below.
121 </para>
122
123 <para>
124 If you encounter problems, please go to
125 <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
126 and submit a bug.
127 We are interested in hearing about your experience.
128 </para>
129 </note>
130 <itemizedlist>
131<!-- <listitem><para>Ubuntu 10.04</para></listitem>
132 <listitem><para>Ubuntu 11.10</para></listitem> -->
133 <listitem><para>Ubuntu 12.04 (LTS)</para></listitem>
134 <listitem><para>Ubuntu 12.10</para></listitem>
135 <listitem><para>Ubuntu 13.04</para></listitem>
136<!-- <listitem><para>Fedora 16 (Verne)</para></listitem>
137 <listitem><para>Fedora 17 (Spherical)</para></listitem> -->
138 <listitem><para>Fedora release 18 (Spherical Cow)</para></listitem>
139 <listitem><para>Fedora release 19 (Schrödinger's Cat)</para></listitem>
140<!-- <listitem><para>CentOS release 5.6 (Final)</para></listitem>
141 <listitem><para>CentOS release 5.7 (Final)</para></listitem>
142 <listitem><para>CentOS release 5.8 (Final)</para></listitem>
143 <listitem><para>CentOS release 6.3 (Final)</para></listitem> -->
144 <listitem><para>CentOS release 6.4</para></listitem>
145<!-- <listitem><para>Debian GNU/Linux 6.0 (Squeeze)</para></listitem> -->
146 <listitem><para>Debian GNU/Linux 6.0.7 (Squeeze)</para></listitem>
147 <listitem><para>Debian GNU/Linux 7.0 (Wheezy)</para></listitem>
148 <listitem><para>Debian GNU/Linux 7.1 (Wheezy)</para></listitem>
149<!-- <listitem><para>openSUSE 11.4</para></listitem>
150 <listitem><para>openSUSE 12.1</para></listitem> -->
151 <listitem><para>openSUSE 12.2</para></listitem>
152 <listitem><para>openSUSE 12.3</para></listitem>
153 </itemizedlist>
154 </para>
155
156 <note>
157 While the Yocto Project Team attempts to ensure all Yocto Project
158 releases are one hundred percent compatible with each officially
159 supported Linux distribution, instances might exist where you
160 encounter a problem while using the Yocto Project on a specific
161 distribution.
162 For example, the CentOS 6.4 distribution does not include the
163 Gtk+ 2.20.0 and PyGtk 2.21.0 (or higher) packages, which are
164 required to run
165 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob</ulink>.
166 </note>
167 </section>
168
169 <section id='required-packages-for-the-host-development-system'>
170 <title>Required Packages for the Host Development System</title>
171
172 <para>
173 The list of packages you need on the host development system can
174 be large when covering all build scenarios using the Yocto Project.
175 This section provides required packages according to
176 Linux distribution and function.
177 </para>
178
179 <section id='ubuntu-packages'>
180 <title>Ubuntu and Debian</title>
181
182 <para>
183 The following list shows the required packages by function
184 given a supported Ubuntu or Debian Linux distribution:
185 <itemizedlist>
186 <listitem><para><emphasis>Essentials:</emphasis>
187 Packages needed to build an image on a headless
188 system:
189 <literallayout class='monospaced'>
190 $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL;
191 </literallayout></para></listitem>
192 <listitem><para><emphasis>Graphical Extras:</emphasis>
193 Packages recommended if the host system has graphics support:
194 <literallayout class='monospaced'>
195 $ sudo apt-get install libsdl1.2-dev xterm
196 </literallayout></para></listitem>
197 <listitem><para><emphasis>Documentation:</emphasis>
198 Packages needed if you are going to build out the
199 Yocto Project documentation manuals:
200 <literallayout class='monospaced'>
201 $ sudo apt-get install make xsltproc docbook-utils fop dblatex xmlto
202 </literallayout></para></listitem>
203 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
204 Packages needed if you are going to be using the
205 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
206 <literallayout class='monospaced'>
207 $ sudo apt-get install autoconf automake libtool libglib2.0-dev
208 </literallayout></para></listitem>
209 </itemizedlist>
210 </para>
211 </section>
212
213 <section id='fedora-packages'>
214 <title>Fedora Packages</title>
215
216 <para>
217 The following list shows the required packages by function
218 given a supported Fedora Linux distribution:
219 <itemizedlist>
220 <listitem><para><emphasis>Essentials:</emphasis>
221 Packages needed to build an image for a headless
222 system:
223 <literallayout class='monospaced'>
224 $ sudo yum install &FEDORA_HOST_PACKAGES_ESSENTIAL;
225 </literallayout></para></listitem>
226 <listitem><para><emphasis>Graphical Extras:</emphasis>
227 Packages recommended if the host system has graphics support:
228 <literallayout class='monospaced'>
229 $ sudo yum install SDL-devel xterm
230 </literallayout></para></listitem>
231 <listitem><para><emphasis>Documentation:</emphasis>
232 Packages needed if you are going to build out the
233 Yocto Project documentation manuals:
234 <literallayout class='monospaced'>
235 $ sudo yum install make docbook-style-dsssl docbook-style-xsl \
236 docbook-dtds docbook-utils fop libxslt dblatex xmlto
237 </literallayout></para></listitem>
238 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
239 Packages needed if you are going to be using the
240 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
241 <literallayout class='monospaced'>
242 $ sudo yum install autoconf automake libtool glib2-devel
243 </literallayout></para></listitem>
244 </itemizedlist>
245 </para>
246 </section>
247
248 <section id='opensuse-packages'>
249 <title>openSUSE Packages</title>
250
251 <para>
252 The following list shows the required packages by function
253 given a supported openSUSE Linux distribution:
254 <itemizedlist>
255 <listitem><para><emphasis>Essentials:</emphasis>
256 Packages needed to build an image for a headless
257 system:
258 <literallayout class='monospaced'>
259 $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL;
260 </literallayout></para></listitem>
261 <listitem><para><emphasis>Graphical Extras:</emphasis>
262 Packages recommended if the host system has graphics support:
263 <literallayout class='monospaced'>
264 $ sudo zypper install libSDL-devel xterm
265 </literallayout></para></listitem>
266 <listitem><para><emphasis>Documentation:</emphasis>
267 Packages needed if you are going to build out the
268 Yocto Project documentation manuals:
269 <literallayout class='monospaced'>
270 $ sudo zypper install make fop xsltproc dblatex xmlto
271 </literallayout></para></listitem>
272 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
273 Packages needed if you are going to be using the
274 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
275 <literallayout class='monospaced'>
276 $ sudo zypper install autoconf automake libtool glib2-devel
277 </literallayout></para></listitem>
278 </itemizedlist>
279 </para>
280 </section>
281
282 <section id='centos-packages'>
283 <title>CentOS Packages</title>
284
285 <para>
286 The following list shows the required packages by function
287 given a supported CentOS Linux distribution:
288 <note>Depending on the CentOS version you are using, other requirements
289 and dependencies might exist.
290 For details, you should look at the CentOS sections on the
291 <ulink url='https://wiki.yoctoproject.org/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
292 wiki page.
293 </note>
294 <itemizedlist>
295 <listitem><para><emphasis>Essentials:</emphasis>
296 Packages needed to build an image for a headless
297 system:
298 <literallayout class='monospaced'>
299 $ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL;
300 </literallayout></para></listitem>
301 <listitem><para><emphasis>Graphical Extras:</emphasis>
302 Packages recommended if the host system has graphics support:
303 <literallayout class='monospaced'>
304 $ sudo yum install SDL-devel xterm
305 </literallayout></para></listitem>
306 <listitem><para><emphasis>Documentation:</emphasis>
307 Packages needed if you are going to build out the
308 Yocto Project documentation manuals:
309 <literallayout class='monospaced'>
310 $ sudo yum install make docbook-style-dsssl docbook-style-xsl \
311 docbook-dtds docbook-utils fop libxslt dblatex xmlto
312 </literallayout></para></listitem>
313 <listitem><para><emphasis>ADT Installer Extras:</emphasis>
314 Packages needed if you are going to be using the
315 <ulink url='&YOCTO_DOCS_ADT_URL;#using-the-adt-installer'>Application Development Toolkit (ADT) Installer</ulink>:
316 <literallayout class='monospaced'>
317 $ sudo yum install autoconf automake libtool glib2-devel
318 </literallayout></para></listitem>
319 </itemizedlist>
320 </para>
321 </section>
322 </section>
323
324 <section id='required-git-tar-and-python-versions'>
325 <title>Required Git, tar, and Python Versions</title>
326
327 <para>
328 In order to use the build system, your host development system
329 must meet the following version requirements for Git, tar, and
330 Python:
331 <itemizedlist>
332 <listitem><para>Git 1.7.5 or greater</para></listitem>
333 <listitem><para>tar 1.24 or greater</para></listitem>
334 <listitem><para>Python 2.7.3 or greater not including
335 Python 3.x, which is not supported.</para></listitem>
336 </itemizedlist>
337 </para>
338
339 <para>
340 If your host development system does not meet all these requirements,
341 you can resolve this by either downloading a pre-built tarball
342 containing these tools, or building such a tarball on another
343 system.
344 Regardless of the method, once you have the tarball, you simply
345 install it somewhere on your system, such as a directory in your
346 home directory, and then source the environment script provided,
347 which adds the tools into <filename>PATH</filename> and sets
348 any other environment variables required to run the tools.
349 Doing so gives you working versions of Git, tar, Python and
350 <filename>chrpath</filename>.
351 </para>
352
353 <para>
354 If downloading a pre-built tarball, locate the
355 <filename>*.sh</filename> at
356 <ulink url='&YOCTO_DL_URL;/releases/yocto/yocto-&DISTRO;/buildtools/'></ulink>.
357 </para>
358
359 <para>
360 If building your own tarball, do so using this command:
361 <literallayout class='monospaced'>
362 $ bitbake buildtools-tarball
363 </literallayout>
364 <note>
365 The <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>
366 variable determines whether you build tools for a 32-bit
367 or 64-bit system.
368 </note>
369 Once the build completes, you can find the file that installs the
370 the tools in the <filename>tmp/deploy/sdk</filename> subdirectory
371 of the
372 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
373 The file used to install the tarball has the string "buildtools"
374 in the name.
375 </para>
376
377 <para>
378 After you have either built the tarball or downloaded it, you need
379 to install it.
380 Install the tools by executing the <filename>*.sh</filename> file.
381 During execution, a prompt appears that allows you to choose the
382 installation directory.
383 For example, you could choose the following:
384 <literallayout class='monospaced'>
385 /home/your-username/sdk
386 </literallayout>
387 </para>
388
389 <para>
390 The final step before you can actually use the tools is to source
391 the tools environment with a command like the following:
392 <literallayout class='monospaced'>
393 $ source /home/your-username/sdk/environment-setup-i586-poky-linux
394 </literallayout>
395 Of course, you need to supply your installation directory and be
396 sure to use the right file (i.e. i585 or x86-64).
397 </para>
398 </section>
399</section>
400
401<section id='intro-getit'>
402 <title>Obtaining the Yocto Project</title>
403 <para>
404 The Yocto Project development team makes the Yocto Project available through a number
405 of methods:
406 <itemizedlist>
407 <listitem><para><emphasis>Releases:</emphasis> Stable, tested releases are available through
408 <ulink url='&YOCTO_DL_URL;/releases/yocto/'/>.</para></listitem>
409 <listitem><para><emphasis>Nightly Builds:</emphasis> These releases are available at
410 <ulink url='http://autobuilder.yoctoproject.org/nightly'/>.
411 These builds include Yocto Project releases, meta-toolchain tarball installation scripts, and
412 experimental builds.</para></listitem>
413 <listitem><para><emphasis>Yocto Project Website:</emphasis> You can find releases
414 of the Yocto Project and supported BSPs at the
415 <ulink url='&YOCTO_HOME_URL;'>Yocto Project website</ulink>.
416 Along with these downloads, you can find lots of other information at this site.
417 </para></listitem>
418 </itemizedlist>
419 </para>
420</section>
421
422<section id='intro-getit-dev'>
423 <title>Development Checkouts</title>
424 <para>
425 Development using the Yocto Project requires a local
426 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
427 You can set up the Source Directory by downloading a Yocto Project release tarball and unpacking it,
428 or by cloning a copy of the upstream
429 <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink> Git repository.
430 For information on both these methods, see the
431 "<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Set Up</ulink>"
432 section in the Yocto Project Development Manual.
433 </para>
434</section>
435
436</chapter>
437<!--
438vim: expandtab tw=80 ts=4
439-->
diff --git a/documentation/ref-manual/migration.xml b/documentation/ref-manual/migration.xml
new file mode 100644
index 0000000..dc24628
--- /dev/null
+++ b/documentation/ref-manual/migration.xml
@@ -0,0 +1,1089 @@
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='migration'>
6<title>Migrating to a Newer Yocto Project Release</title>
7
8 <para>
9 This chapter provides information you can use to migrate work to a
10 newer Yocto Project release. You can find the same information in the
11 release notes for a given release.
12 </para>
13
14<section id='moving-to-the-yocto-project-1.3-release'>
15 <title>Moving to the Yocto Project 1.3 Release</title>
16
17 <para>
18 This section provides migration information for moving to the
19 Yocto Project 1.3 Release from the prior release.
20 </para>
21
22 <section id='1.3-local-configuration'>
23 <title>Local Configuration</title>
24
25 <para>
26 Differences include changes for
27 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
28 and <filename>bblayers.conf</filename>.
29 </para>
30
31 <section id='migration-1.3-sstate-mirrors'>
32 <title>SSTATE_MIRRORS</title>
33
34 <para>
35 The shared state cache (sstate-cache), as pointed to by
36 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>, by default
37 now has two-character subdirectories to prevent issues arising
38 from too many files in the same directory.
39 Also, native sstate-cache packages will go into a subdirectory named using
40 the distro ID string.
41 If you copy the newly structured sstate-cache to a mirror location
42 (either local or remote) and then point to it in
43 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>,
44 you need to append "PATH" to the end of the mirror URL so that
45 the path used by BitBake before the mirror substitution is
46 appended to the path used to access the mirror.
47 Here is an example:
48 <literallayout class='monospaced'>
49 SSTATE_MIRRORS = "file://.* http://someserver.tld/share/sstate/PATH"
50 </literallayout>
51 </para>
52 </section>
53
54 <section id='migration-1.3-bblayers-conf'>
55 <title>bblayers.conf</title>
56
57 <para>
58 The <filename>meta-yocto</filename> layer consists of two parts
59 that correspond to the Poky reference distribution and the
60 reference hardware Board Support Packages (BSPs), respectively:
61 <filename>meta-yocto</filename> and
62 <filename>meta-yocto-bsp</filename>.
63 When running BitBake or Hob for the first time after upgrading,
64 your <filename>conf/bblayers.conf</filename> file will be
65 updated to handle this change and you will be asked to
66 re-run or restart for the changes to take effect.
67 </para>
68 </section>
69 </section>
70
71 <section id='1.3-recipes'>
72 <title>Recipes</title>
73
74 <para>
75 Differences include changes for the following:
76 <itemizedlist>
77 <listitem><para>Python function whitespace</para></listitem>
78 <listitem><para><filename>proto=</filename> in <filename>SRC_URI</filename></para></listitem>
79 <listitem><para><filename>nativesdk</filename></para></listitem>
80 <listitem><para>Task recipes</para></listitem>
81 <listitem><para><filename>IMAGE_FEATURES</filename></para></listitem>
82 <listitem><para>Removed recipes</para></listitem>
83 </itemizedlist>
84 </para>
85
86 <section id='migration-1.3-python-function-whitespace'>
87 <title>Python Function Whitespace</title>
88
89 <para>
90 All Python functions must now use four spaces for indentation.
91 Previously, an inconsistent mix of spaces and tabs existed,
92 which made extending these functions using
93 <filename>_append</filename> or <filename>_prepend</filename>
94 complicated given that Python treats whitespace as
95 syntactically significant.
96 If you are defining or extending any Python functions (e.g.
97 <filename>populate_packages</filename>, <filename>do_unpack</filename>,
98 <filename>do_patch</filename> and so forth) in custom recipes
99 or classes, you need to ensure you are using consistent
100 four-space indentation.
101 </para>
102 </section>
103
104 <section id='migration-1.3-proto=-in-src-uri'>
105 <title>proto= in SRC_URI</title>
106
107 <para>
108 Any use of <filename>proto=</filename> in
109 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>
110 needs to be changed to <filename>protocol=</filename>.
111 In particular, this applies to the following URIs:
112 <itemizedlist>
113 <listitem><para><filename>svn://</filename></para></listitem>
114 <listitem><para><filename>bzr://</filename></para></listitem>
115 <listitem><para><filename>hg://</filename></para></listitem>
116 <listitem><para><filename>osc://</filename></para></listitem>
117 </itemizedlist>
118 Other URIs were already using <filename>protocol=</filename>.
119 This change improves consistency.
120 </para>
121 </section>
122
123 <section id='migration-1.3-nativesdk'>
124 <title>nativesdk</title>
125
126 <para>
127 The suffix <filename>nativesdk</filename> is now implemented
128 as a prefix, which simplifies a lot of the packaging code for
129 <filename>nativesdk</filename> recipes.
130 All custom <filename>nativesdk</filename> recipes and any
131 references need to be updated to use
132 <filename>nativesdk-*</filename> instead of
133 <filename>*-nativesdk</filename>.
134 </para>
135 </section>
136
137 <section id='migration-1.3-task-recipes'>
138 <title>Task Recipes</title>
139
140 <para>
141 "Task" recipes are now known as "Package groups" and have
142 been renamed from <filename>task-*.bb</filename> to
143 <filename>packagegroup-*.bb</filename>.
144 Existing references to the previous <filename>task-*</filename>
145 names should work in most cases as there is an automatic
146 upgrade path for most packages.
147 However, you should update references in your own recipes and
148 configurations as they could be removed in future releases.
149 You should also rename any custom <filename>task-*</filename>
150 recipes to <filename>packagegroup-*</filename>, and change
151 them to inherit <filename>packagegroup</filename> instead of
152 <filename>task</filename>, as well as taking the opportunity
153 to remove anything now handled by
154 <filename>packagegroup.bbclass</filename>, such as providing
155 <filename>-dev</filename> and <filename>-dbg</filename>
156 packages, setting
157 <link linkend='var-LIC_FILES_CHKSUM'><filename>LIC_FILES_CHKSUM</filename></link>,
158 and so forth.
159 See the
160 "<link linkend='ref-classes-packagegroup'>Package Groups - packagegroup.bbclass</link>"
161 section for further details.
162 </para>
163 </section>
164
165 <section id='migration-1.3-image-features'>
166 <title>IMAGE_FEATURES</title>
167
168 <para>
169 Image recipes that previously included "apps-console-core"
170 in <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
171 should now include "splash" instead to enable the boot-up
172 splash screen.
173 Retaining "apps-console-core" will still include the splash
174 screen but generates a warning.
175 The "apps-x11-core" and "apps-x11-games"
176 <filename>IMAGE_FEATURES</filename> features have been removed.
177 </para>
178 </section>
179
180 <section id='migration-1.3-removed-recipes'>
181 <title>Removed Recipes</title>
182
183 <para>
184 The following recipes have been removed.
185 For most of them, it is unlikely that you would have any
186 references to them in your own
187 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>.
188 However, you should check your metadata against this list to be sure:
189 <itemizedlist>
190 <listitem><para><emphasis><filename>libx11-trim</filename></emphasis>:
191 Replaced by <filename>libx11</filename>, which has a negligible
192 size difference with modern Xorg.</para></listitem>
193 <listitem><para><emphasis><filename>xserver-xorg-lite</filename></emphasis>:
194 Use <filename>xserver-xorg</filename>, which has a negligible
195 size difference when DRI and GLX modules are not installed.</para></listitem>
196 <listitem><para><emphasis><filename>xserver-kdrive</filename></emphasis>:
197 Effectively unmaintained for many years.</para></listitem>
198 <listitem><para><emphasis><filename>mesa-xlib</filename></emphasis>:
199 No longer serves any purpose.</para></listitem>
200 <listitem><para><emphasis><filename>galago</filename></emphasis>:
201 Replaced by telepathy.</para></listitem>
202 <listitem><para><emphasis><filename>gail</filename></emphasis>:
203 Functionality was integrated into GTK+ 2.13.</para></listitem>
204 <listitem><para><emphasis><filename>eggdbus</filename></emphasis>:
205 No longer needed.</para></listitem>
206 <listitem><para><emphasis><filename>gcc-*-intermediate</filename></emphasis>:
207 The build has been restructured to avoid the need for
208 this step.</para></listitem>
209 <listitem><para><emphasis><filename>libgsmd</filename></emphasis>:
210 Unmaintained for many years.
211 Functionality now provided by
212 <filename>ofono</filename> instead.</para></listitem>
213 <listitem><para><emphasis>contacts, dates, tasks, eds-tools</emphasis>:
214 Largely unmaintained PIM application suite.
215 It has been moved to <filename>meta-gnome</filename>
216 in <filename>meta-openembedded</filename>.</para></listitem>
217 </itemizedlist>
218 In addition to the previously listed changes, the
219 <filename>meta-demoapps</filename> directory has also been removed
220 because the recipes in it were not being maintained and many
221 had become obsolete or broken.
222 Additionally, these recipes were not parsed in the default configuration.
223 Many of these recipes are already provided in an updated and
224 maintained form within the OpenEmbedded community layers such as
225 <filename>meta-oe</filename> and <filename>meta-gnome</filename>.
226 For the remainder, you can now find them in the
227 <filename>meta-extras</filename> repository, which is in the
228 Yocto Project
229 <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>.
230 </para>
231 </section>
232 </section>
233
234 <section id='1.3-linux-kernel-naming'>
235 <title>Linux Kernel Naming</title>
236
237 <para>
238 The naming scheme for kernel output binaries has been changed to
239 now include
240 <link linkend='var-PE'><filename>PE</filename></link> as part of the
241 filename:
242 <literallayout class='monospaced'>
243 KERNEL_IMAGE_BASE_NAME ?= "${KERNEL_IMAGETYPE}-${PE}-${PV}-${PR}-${MACHINE}-${DATETIME}"
244 </literallayout>
245 </para>
246
247 <para>
248 Because the <filename>PE</filename> variable is not set by default,
249 these binary files could result with names that include two dash
250 characters.
251 Here is an example:
252 <literallayout class='monospaced'>
253 bzImage--3.10.9+git0+cd502a8814_7144bcc4b8-r0-qemux86-64-20130830085431.bin
254 </literallayout>
255 </para>
256 </section>
257</section>
258
259<section id='moving-to-the-yocto-project-1.4-release'>
260 <title>Moving to the Yocto Project 1.4 Release</title>
261
262 <para>
263 This section provides migration information for moving to the
264 Yocto Project 1.4 Release from the prior release.
265 </para>
266
267 <section id='migration-1.4-bitbake'>
268 <title>BitBake</title>
269
270 <para>
271 Differences include the following:
272 <itemizedlist>
273 <listitem><para><emphasis>Comment Continuation:</emphasis>
274 If a comment ends with a line continuation (\) character,
275 then the next line must also be a comment.
276 Any instance where this is not the case, now triggers
277 a warning.
278 You must either remove the continuation character, or be
279 sure the next line is a comment.
280 </para></listitem>
281 <listitem><para><emphasis>Package Name Overrides:</emphasis>
282 The runtime package specific variables
283 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
284 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
285 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
286 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
287 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
288 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
289 <link linkend='var-FILES'><filename>FILES</filename></link>,
290 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>,
291 and the pre, post, install, and uninstall script functions
292 <filename>pkg_preinst</filename>,
293 <filename>pkg_postinst</filename>,
294 <filename>pkg_prerm</filename>, and
295 <filename>pkg_postrm</filename> should always have a
296 package name override.
297 For example, use <filename>RDEPENDS_${PN}</filename> for
298 the main package instead of <filename>RDEPENDS</filename>.
299 BitBake uses more strict checks when it parses recipes.
300 </para></listitem>
301 </itemizedlist>
302 </para>
303 </section>
304
305 <section id='migration-1.4-build-behavior'>
306 <title>Build Behavior</title>
307
308 <para>
309 Differences include the following:
310 <itemizedlist>
311 <listitem><para><emphasis>Shared State Code:</emphasis>
312 The shared state code has been optimized to avoid running
313 unnecessary tasks.
314 For example,
315 <filename>bitbake -c rootfs some-image</filename> from
316 shared state no longer populates the target sysroot
317 since that is not necessary.
318 Instead, the system just needs to extract the output
319 package contents, re-create the packages, and construct
320 the root filesystem.
321 This change is unlikely to cause any problems unless
322 you have missing declared dependencies.
323 </para></listitem>
324 <listitem><para><emphasis>Scanning Directory Names:</emphasis>
325 When scanning for files in
326 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>,
327 the build system now uses
328 <link linkend='var-FILESOVERRIDES'><filename>FILESOVERRIDES</filename></link>
329 instead of <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
330 for the directory names.
331 In general, the values previously in
332 <filename>OVERRIDES</filename> are now in
333 <filename>FILESOVERRIDES</filename> as well.
334 However, if you relied upon an additional value
335 you previously added to <filename>OVERRIDES</filename>,
336 you might now need to add it to
337 <filename>FILESOVERRIDES</filename> unless you are already
338 adding it through the
339 <link linkend='var-MACHINEOVERRIDES'><filename>MACHINEOVERRIDES</filename></link>
340 or <link linkend='var-DISTROOVERRIDES'><filename>DISTROOVERRIDES</filename></link>
341 variables, as appropriate.
342 For more related changes, see the
343 "<link linkend='migration-1.4-variables'>Variables</link>"
344 section.
345 </para></listitem>
346 </itemizedlist>
347 </para>
348 </section>
349
350
351 <section id='migration-1.4-proxies-and-fetching-source'>
352 <title>Proxies and Fetching Source</title>
353
354 <para>
355 A new <filename>oe-git-proxy</filename> script has been added to
356 replace previous methods of handling proxies and fetching source
357 from Git.
358 See the <filename>meta-yocto/conf/site.conf.sample</filename> file
359 for information on how to use this script.
360 </para>
361 </section>
362
363 <section id='migration-1.4-custom-interfaces-file-netbase-change'>
364 <title>Custom Interfaces File (netbase change)</title>
365
366 <para>
367 If you have created your own custom
368 <filename>etc/network/interfaces</filename> file by creating
369 an append file for the <filename>netbase</filename> recipe,
370 you now need to create an append file for the
371 <filename>init-ifupdown</filename> recipe instead, which you can
372 find in the
373 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
374 at <filename>meta/recipes-core/init-ifupdown</filename>.
375 For information on how to use append files, see the
376 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-bbappend-files'>Using .bbappend Files</ulink>"
377 in the Yocto Project Development Manual.
378 </para>
379 </section>
380
381 <section id='migration-1.4-remote-debugging'>
382 <title>Remote Debugging</title>
383
384 <para>
385 Support for remote debugging with the Eclipse IDE is now
386 separated into an image feature
387 (<filename>eclipse-debug</filename>) that corresponds to the
388 <filename>packagegroup-core-eclipse-debug</filename> package group.
389 Previously, the debugging feature was included through the
390 <filename>tools-debug</filename> image feature, which corresponds
391 to the <filename>packagegroup-core-tools-debug</filename>
392 package group.
393 </para>
394 </section>
395
396 <section id='migration-1.4-variables'>
397 <title>Variables</title>
398
399 <para>
400 The following variables have changed:
401 <itemizedlist>
402 <listitem><para><emphasis><filename>SANITY_TESTED_DISTROS</filename>:</emphasis>
403 This variable now uses a distribution ID, which is composed
404 of the host distributor ID followed by the release.
405 Previously,
406 <link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>
407 was composed of the description field.
408 For example, "Ubuntu 12.10" becomes "Ubuntu-12.10".
409 You do not need to worry about this change if you are not
410 specifically setting this variable, or if you are
411 specifically setting it to "".
412 </para></listitem>
413 <listitem><para><emphasis><filename>SRC_URI</filename>:</emphasis>
414 The <filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>,
415 <filename>${</filename><link linkend='var-PF'><filename>PF</filename></link><filename>}</filename>,
416 <filename>${</filename><link linkend='var-P'><filename>P</filename></link><filename>}</filename>,
417 and <filename>FILE_DIRNAME</filename> directories have been
418 dropped from the default value of the
419 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
420 variable, which is used as the search path for finding files
421 referred to in
422 <link linkend='var-SRC_URI'><filename>SRC_URI</filename></link>.
423 If you have a recipe that relied upon these directories,
424 which would be unusual, then you will need to add the
425 appropriate paths within the recipe or, alternatively,
426 rearrange the files.
427 The most common locations are still covered by
428 <filename>${BP}</filename>, <filename>${BPN}</filename>,
429 and "files", which all remain in the default value of
430 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
431 </para></listitem>
432 </itemizedlist>
433 </para>
434 </section>
435
436 <section id='migration-target-package-management-with-rpm'>
437 <title>Target Package Management with RPM</title>
438
439 <para>
440 If runtime package management is enabled and the RPM backend
441 is selected, Smart is now installed for package download, dependency
442 resolution, and upgrades instead of Zypper.
443 For more information on how to use Smart, run the following command
444 on the target:
445 <literallayout class='monospaced'>
446 smart --help
447 </literallayout>
448 </para>
449 </section>
450
451 <section id='migration-1.4-recipes-moved'>
452 <title>Recipes Moved</title>
453
454 <para>
455 The following recipes were moved from their previous locations
456 because they are no longer used by anything in
457 the OpenEmbedded-Core:
458 <itemizedlist>
459 <listitem><para><emphasis><filename>clutter-box2d</filename>:</emphasis>
460 Now resides in the <filename>meta-oe</filename> layer.
461 </para></listitem>
462 <listitem><para><emphasis><filename>evolution-data-server</filename>:</emphasis>
463 Now resides in the <filename>meta-gnome</filename> layer.
464 </para></listitem>
465 <listitem><para><emphasis><filename>gthumb</filename>:</emphasis>
466 Now resides in the <filename>meta-gnome</filename> layer.
467 </para></listitem>
468 <listitem><para><emphasis><filename>gtkhtml2</filename>:</emphasis>
469 Now resides in the <filename>meta-oe</filename> layer.
470 </para></listitem>
471 <listitem><para><emphasis><filename>gupnp</filename>:</emphasis>
472 Now resides in the <filename>meta-multimedia</filename> layer.
473 </para></listitem>
474 <listitem><para><emphasis><filename>gypsy</filename>:</emphasis>
475 Now resides in the <filename>meta-oe</filename> layer.
476 </para></listitem>
477 <listitem><para><emphasis><filename>libcanberra</filename>:</emphasis>
478 Now resides in the <filename>meta-gnome</filename> layer.
479 </para></listitem>
480 <listitem><para><emphasis><filename>libgdata</filename>:</emphasis>
481 Now resides in the <filename>meta-gnome</filename> layer.
482 </para></listitem>
483 <listitem><para><emphasis><filename>libmusicbrainz</filename>:</emphasis>
484 Now resides in the <filename>meta-multimedia</filename> layer.
485 </para></listitem>
486 <listitem><para><emphasis><filename>metacity</filename>:</emphasis>
487 Now resides in the <filename>meta-gnome</filename> layer.
488 </para></listitem>
489 <listitem><para><emphasis><filename>polkit</filename>:</emphasis>
490 Now resides in the <filename>meta-oe</filename> layer.
491 </para></listitem>
492 <listitem><para><emphasis><filename>zeroconf</filename>:</emphasis>
493 Now resides in the <filename>meta-networking</filename> layer.
494 </para></listitem>
495 </itemizedlist>
496 </para>
497 </section>
498
499 <section id='migration-1.4-removals-and-renames'>
500 <title>Removals and Renames</title>
501
502 <para>
503 The following list shows what has been removed or renamed:
504 <itemizedlist>
505 <listitem><para><emphasis><filename>evieext</filename>:</emphasis>
506 Removed because it has been removed from
507 <filename>xserver</filename> since 2008.
508 </para></listitem>
509 <listitem><para><emphasis>Gtk+ DirectFB:</emphasis>
510 Removed support because upstream Gtk+ no longer supports it
511 as of version 2.18.
512 </para></listitem>
513 <listitem><para><emphasis><filename>libxfontcache / xfontcacheproto</filename>:</emphasis>
514 Removed because they were removed from the Xorg server in 2008.
515 </para></listitem>
516 <listitem><para><emphasis><filename>libxp / libxprintapputil / libxprintutil / printproto</filename>:</emphasis>
517 Removed because the XPrint server was removed from
518 Xorg in 2008.
519 </para></listitem>
520 <listitem><para><emphasis><filename>libxtrap / xtrapproto</filename>:</emphasis>
521 Removed because their functionality was broken upstream.
522 </para></listitem>
523 <listitem><para><emphasis>linux-yocto 3.0 kernel:</emphasis>
524 Removed with linux-yocto 3.8 kernel being added.
525 The linux-yocto 3.2 and linux-yocto 3.4 kernels remain
526 as part of the release.
527 </para></listitem>
528 <listitem><para><emphasis><filename>lsbsetup</filename>:</emphasis>
529 Removed with functionality now provided by
530 <filename>lsbtest</filename>.
531 </para></listitem>
532 <listitem><para><emphasis><filename>matchbox-stroke</filename>:</emphasis>
533 Removed because it was never more than a proof-of-concept.
534 </para></listitem>
535 <listitem><para><emphasis><filename>matchbox-wm-2 / matchbox-theme-sato-2</filename>:</emphasis>
536 Removed because they are not maintained.
537 However, <filename>matchbox-wm</filename> and
538 <filename>matchbox-theme-sato</filename> are still
539 provided.
540 </para></listitem>
541 <listitem><para><emphasis><filename>mesa-dri</filename>:</emphasis>
542 Renamed to <filename>mesa</filename>.
543 </para></listitem>
544 <listitem><para><emphasis><filename>mesa-xlib</filename>:</emphasis>
545 Removed because it was no longer useful.
546 </para></listitem>
547 <listitem><para><emphasis><filename>mutter</filename>:</emphasis>
548 Removed because nothing ever uses it and the recipe is
549 very old.
550 </para></listitem>
551 <listitem><para><emphasis><filename>orinoco-conf</filename>:</emphasis>
552 Removed because it has become obsolete.
553 </para></listitem>
554 <listitem><para><emphasis><filename>update-modules</filename>:</emphasis>
555 Removed because it is no longer used.
556 The kernel module <filename>postinstall</filename> and
557 <filename>postrm</filename> scripts can now do the same
558 task without the use of this script.
559 </para></listitem>
560 <listitem><para><emphasis><filename>web</filename>:</emphasis>
561 Removed because it is not maintained. Superseded by
562 <filename>web-webkit</filename>.
563 </para></listitem>
564 <listitem><para><emphasis><filename>xf86bigfontproto</filename>:</emphasis>
565 Removed because upstream it has been disabled by default
566 since 2007.
567 Nothing uses <filename>xf86bigfontproto</filename>.
568 </para></listitem>
569 <listitem><para><emphasis><filename>xf86rushproto</filename>:</emphasis>
570 Removed because its dependency in
571 <filename>xserver</filename> was spurious and it was
572 removed in 2005.
573 </para></listitem>
574 <listitem><para><emphasis><filename>zypper / libzypp / sat-solver</filename>:</emphasis>
575 Removed and been functionally replaced with Smart
576 (<filename>python-smartpm</filename>) when RPM packaging
577 is used and package management is enabled on the target.
578 </para></listitem>
579 </itemizedlist>
580 </para>
581 </section>
582</section>
583
584<section id='moving-to-the-yocto-project-1.5-release'>
585 <title>Moving to the Yocto Project 1.5 Release</title>
586
587 <para>
588 This section provides migration information for moving to the
589 Yocto Project 1.5 Release from the prior release.
590 </para>
591
592 <section id='migration-1.5-host-dependency-changes'>
593 <title>Host Dependency Changes</title>
594
595 <para>
596 The OpenEmbedded build system now has some additional requirements
597 on the host system:
598 <itemizedlist>
599 <listitem><para>Python 2.7.3+</para></listitem>
600 <listitem><para>Tar 1.24+</para></listitem>
601 <listitem><para>Git 1.7.5+</para></listitem>
602 <listitem><para>Patched version of Make if you are using
603 3.82.
604 Most distributions that provide Make 3.82 use the patched
605 version.</para></listitem>
606 </itemizedlist>
607 If the Linux distribution you are using on your build host
608 does not provide packages for these, you can install and use
609 the Buildtools tarball, which provides an SDK-like environment
610 containing them.
611 </para>
612
613 <para>
614 For more information on this requirement, see the
615 "<link linkend='required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</link>"
616 section.
617 </para>
618 </section>
619
620 <section id='migration-1.5-atom-pc-bsp'>
621 <title><filename>atom-pc</filename> Board Support Package (BSP)</title>
622
623 <para>
624 The <filename>atom-pc</filename> hardware reference BSP has been
625 replaced by a <filename>genericx86</filename> BSP.
626 This BSP is not necessarily guaranteed to work on all x86
627 hardware, but it will run on a wider range of systems than the
628 <filename>atom-pc</filename> did.
629 <note>
630 Additionally, a <filename>genericx86-64</filename> BSP has been
631 added for 64-bit systems.
632 </note>
633 </para>
634 </section>
635
636 <section id='migration-1.5-bitbake'>
637 <title>BitBake</title>
638
639 <para>
640 The following changes have been made that relate to BitBake:
641 <itemizedlist>
642 <listitem><para>
643 BitBake now supports a <filename>_remove</filename>
644 operator.
645 The addition of this operator means you will have to
646 rename any items in recipe space (functions, variables)
647 whose names currently contain
648 <filename>_remove_</filename> or end with
649 <filename>_remove</filename> to avoid unexpected behavior.
650 </para></listitem>
651 <listitem><para>
652 BitBake's global method pool has been removed.
653 This method is not particularly useful and led to clashes
654 between recipes containing functions that had the
655 same name.</para></listitem>
656 <listitem><para>
657 The "none" server backend has been removed.
658 The "process" server backend has been serving well as the
659 default for a long time now.</para></listitem>
660 <listitem><para>
661 The <filename>bitbake-runtask</filename> script has been
662 removed.</para></listitem>
663 <listitem><para>
664 <filename>${</filename><link linkend='var-P'><filename>P</filename></link><filename>}</filename>
665 and
666 <filename>${</filename><link linkend='var-PF'><filename>PF</filename></link><filename>}</filename>
667 are no longer added to
668 <link linkend='var-PROVIDES'><filename>PROVIDES</filename></link>
669 by default in <filename>bitbake.conf</filename>.
670 These version-specific <filename>PROVIDES</filename>
671 items were seldom used.
672 Attempting to use them could result in two versions being
673 built simultaneously rather than just one version due to
674 the way BitBake resolves dependencies.</para></listitem>
675 </itemizedlist>
676 </para>
677 </section>
678
679 <section id='migration-1.5-qa-warnings'>
680 <title>QA Warnings</title>
681
682 <para>
683 The following changes have been made to the package QA checks:
684 <itemizedlist>
685 <listitem><para>
686 If you have customized
687 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
688 or <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link>
689 values in your configuration, check that they contain all of
690 the issues that you wish to be reported.
691 Previous Yocto Project versions contained a bug that meant
692 that any item not mentioned in <filename>ERROR_QA</filename>
693 or <filename>WARN_QA</filename> would be treated as a
694 warning.
695 Consequently, several important items were not already in
696 the default value of <filename>WARN_QA</filename>.
697 All of the possible QA checks are now documented in the
698 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
699 section.</para></listitem>
700 <listitem><para>
701 An additional QA check has been added to check if
702 <filename>/usr/share/info/dir</filename> is being installed.
703 Your recipe should delete this file within
704 <filename>do_install</filename> if "make install" is
705 installing it.</para></listitem>
706 <listitem><para>
707 If you are using the buildhistory class, the check for the
708 package version going backwards is now controlled using a
709 standard QA check.
710 Thus, if you have customized your
711 <filename>ERROR_QA</filename> or
712 <filename>WARN_QA</filename> values and still wish to have
713 this check performed, you should add
714 "version-going-backwards" to your value for one or the
715 other variables depending on how you wish it to be handled.
716 See the documented QA checks in the
717 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
718 section.
719 </para></listitem>
720 </itemizedlist>
721 </para>
722 </section>
723
724 <section id='migration-1.5-directory-layout-changes'>
725 <title>Directory Layout Changes</title>
726
727 <para>
728 The following directory changes exist:
729 <itemizedlist>
730 <listitem><para>
731 Output SDK installer files are now named to include the
732 image name and tuning architecture through the
733 <link linkend='var-SDK_NAME'><filename>SDK_NAME</filename></link>
734 variable.</para></listitem>
735 <listitem><para>
736 Images and related files are now installed into a directory
737 that is specific to the machine, instead of a parent
738 directory containing output files for multiple machines.
739 The
740 <link linkend='var-DEPLOY_DIR_IMAGE'><filename>DEPLOY_DIR_IMAGE</filename></link>
741 variable continues to point to the directory containing
742 images for the current
743 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
744 and should be used anywhere there is a need to refer to
745 this directory.
746 The <filename>runqemu</filename> script now uses this
747 variable to find images and kernel binaries and will use
748 BitBake to determine the directory.
749 Alternatively, you can set the
750 <filename>DEPLOY_DIR_IMAGE</filename> variable in the
751 external environment.</para></listitem>
752 <listitem><para>
753 When buildhistory is enabled, its output is now written
754 under the
755 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
756 rather than
757 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>.
758 Doing so makes it easier to delete
759 <filename>TMPDIR</filename> and preserve the build history.
760 Additionally, data for produced SDKs is now split by
761 <link linkend='var-IMAGE_NAME'><filename>IMAGE_NAME</filename></link>.
762 </para></listitem>
763 <listitem><para>
764 The <filename>pkgdata</filename> directory produced as
765 part of the packaging process has been collapsed into a
766 single machine-specific directory.
767 This directory is located under
768 <filename>sysroots</filename> and uses a machine-specific
769 name (i.e.
770 <filename>tmp/sysroots/&lt;machine&gt;/pkgdata</filename>).
771 </para></listitem>
772 </itemizedlist>
773 </para>
774 </section>
775
776 <section id='migration-1.5-shortened-git-srcrev-values'>
777 <title>Shortened Git <filename>SRCREV</filename> Values</title>
778
779 <para>
780 BitBake will now shorten revisions from Git repositories from the
781 normal 40 characters down to 10 characters within
782 <link linkend='var-SRCPV'><filename>SRCPV</filename></link>
783 for improved usability in path and file names.
784 This change should be safe within contexts where these revisions
785 are used because the chances of spatially close collisions
786 is very low.
787 Distant collisions are not a major issue in the way
788 the values are used.
789 </para>
790 </section>
791
792 <section id='migration-1.5-image-features'>
793 <title><filename>IMAGE_FEATURES</filename></title>
794
795 <para>
796 The following changes have been made that relate to
797 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>:
798 <itemizedlist>
799 <listitem><para>
800 The value of
801 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
802 is now validated to ensure invalid feature items are not
803 added.
804 Some users mistakenly add package names to this variable
805 instead of using
806 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
807 in order to have the package added to the image, which does
808 not work.
809 This change is intended to catch those kinds of situations.
810 Valid <filename>IMAGE_FEATURES</filename> are drawn from
811 <link linkend='var-PACKAGE_GROUP'><filename>PACKAGE_GROUP</filename></link>
812 definitions,
813 <link linkend='var-COMPLEMENTARY_GLOB'><filename>COMPLEMENTARY_GLOB</filename></link>
814 and a new "validitems" varflag on
815 <filename>IMAGE_FEATURES</filename>.
816 The "validitems" varflag change allows additional features
817 to be added if they are not provided using the previous
818 two mechanisms.
819 </para></listitem>
820 <listitem><para>
821 The previously deprecated "apps-console-core"
822 <filename>IMAGE_FEATURES</filename> item is no longer
823 supported.
824 Add "splash" to <filename>IMAGE_FEATURES</filename> if you
825 wish to have the splash screen enabled, since this is
826 all that apps-console-core was doing.</para></listitem>
827 </itemizedlist>
828 </para>
829 </section>
830
831 <section id='migration-1.5-run'>
832 <title><filename>run</filename></title>
833
834 <para>
835 The <filename>run</filename> directory from the Filesystem
836 Hierarchy Standard 3.0 has been introduced.
837 You can find some of the implications for this change
838 <ulink url='http://cgit.openembedded.org/openembedded-core/commit/?id=0e326280a15b0f2c4ef2ef4ec441f63f55b75873'>here</ulink>.
839 The change also means that recipes that install files to
840 <filename>/var/run</filename> must be changed.
841 You can find a guide on how to make these changes
842 <ulink url='http://permalink.gmane.org/gmane.comp.handhelds.openembedded/58530'>here</ulink>.
843 </para>
844 </section>
845
846 <section id='migration-1.5-removal-of-package-manager-database-within-image-recipes'>
847 <title>Removal of Package Manager Database Within Image Recipes</title>
848
849 <para>
850 The image <filename>core-image-minimal</filename> no longer adds
851 <filename>remove_packaging_data_files</filename> to
852 <link linkend='var-ROOTFS_POSTPROCESS_COMMAND'><filename>ROOTFS_POSTPROCESS_COMMAND</filename></link>.
853 This addition is now handled automatically when "package-management"
854 is not in
855 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
856 If you have custom image recipes that make this addition,
857 you should remove the lines, as they are not needed and might
858 interfere with correct operation of postinstall scripts.
859 </para>
860 </section>
861
862 <section id='migration-1.5-images-now-rebuild-only-on-changes-instead-of-every-time'>
863 <title>Images Now Rebuild Only on Changes Instead of Every Time</title>
864
865 <para>
866 The <filename>do_rootfs</filename> and other related image
867 construction tasks are no longer marked as "nostamp".
868 Consequently, they will only be re-executed when their inputs have
869 changed.
870 Previous versions of the OpenEmbedded build system always rebuilt
871 the image when requested rather when necessary.
872 </para>
873 </section>
874
875 <section id='migration-1.5-task-recipes'>
876 <title>Task Recipes</title>
877
878 <para>
879 The previously deprecated <filename>task.bbclass</filename> has
880 now been dropped.
881 For recipes that previously inherited from this task, you should
882 rename them from <filename>task-*</filename> to
883 <filename>packagegroup-*</filename> and inherit packagegroup
884 instead.
885 </para>
886
887 <para>
888 For more information, see the
889 "<link linkend='ref-classes-packagegroup'>Package Groups - <filename>packagegroup.bbclass</filename></link>"
890 section.
891 </para>
892 </section>
893
894 <section id='migration-1.5-busybox'>
895 <title>BusyBox</title>
896
897 <para>
898 By default, we now split BusyBox into two binaries:
899 one that is suid root for those components that need it, and
900 another for the rest of the components.
901 Splitting BusyBox allows for optimization that eliminates the
902 <filename>tinylogin</filename> recipe as recommended by upstream.
903 You can disable this split by setting
904 <link linkend='var-BUSYBOX_SPLIT_SUID'><filename>BUSYBOX_SPLIT_SUID</filename></link>
905 to "0".
906 </para>
907 </section>
908
909 <section id='migration-1.5-automated-image-testing'>
910 <title>Automated Image Testing</title>
911
912 <para>
913 A new automated image testing framework has been added
914 through the
915 <link linkend='ref-classes-testimage'><filename>testimage*.bbclass</filename></link>
916 class.
917 This framework replaces the older
918 <filename>imagetest-qemu</filename> framework.
919 </para>
920
921 <para>
922 You can learn more about performing automated image tests in the
923 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
924 section.
925 </para>
926 </section>
927
928 <section id='migration-1.5-build-history'>
929 <title>Build History</title>
930
931 <para>
932 Following are changes to Build History:
933 <itemizedlist>
934 <listitem><para>
935 Installed package sizes:
936 <filename>installed-package-sizes.txt</filename> for an
937 image now records the size of the files installed by each
938 package instead of the size of each compressed package
939 archive file.</para></listitem>
940 <listitem><para>
941 The dependency graphs (<filename>depends*.dot</filename>)
942 now use the actual package names instead of replacing
943 dashes, dots and plus signs with underscores.
944 </para></listitem>
945 <listitem><para>
946 The <filename>buildhistory-diff</filename> and
947 <filename>buildhistory-collect-srcrevs</filename>
948 utilities have improved command-line handling.
949 Use the <filename>&dash;&dash;help</filename> option for
950 each utility for more information on the new syntax.
951 </para></listitem>
952 </itemizedlist>
953 For more information on Build History, see the
954 "<link linkend='maintaining-build-output-quality'>Maintaining Build Output Quality</link>"
955 section.
956 </para>
957 </section>
958
959 <section id='migration-1.5-udev'>
960 <title><filename>udev</filename></title>
961
962 <para>
963 Following are changes to <filename>udev</filename>:
964 <itemizedlist>
965 <listitem><para>
966 <filename>udev</filename> no longer brings in
967 <filename>udev-extraconf</filename> automatically
968 through
969 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
970 since this was originally intended to be optional.
971 If you need the extra rules, then add
972 <filename>udev-extraconf</filename> to your image.
973 </para></listitem>
974 <listitem><para>
975 <filename>udev</filename> no longer brings in
976 <filename>pciutils-ids</filename> or
977 <filename>usbutils-ids</filename> through
978 <filename>RRECOMMENDS</filename>.
979 These are not needed by <filename>udev</filename> itself
980 and removing them saves around 350KB.
981 </para></listitem>
982 </itemizedlist>
983 </para>
984 </section>
985
986 <section id='removed-renamed-recipes'>
987 <title>Removed and Renamed Recipes</title>
988
989 <itemizedlist>
990 <listitem><para>
991 The <filename>linux-yocto</filename> 3.2 kernel has been
992 removed.</para></listitem>
993 <listitem><para>
994 <filename>libtool-nativesdk</filename> has been renamed to
995 <filename>nativesdk-libtool</filename>.</para></listitem>
996 <listitem><para>
997 <filename>tinylogin</filename> has been removed.
998 It has been replaced by a suid portion of Busybox.
999 See the
1000 "<link linkend='migration-1.5-busybox'>BusyBox</link>" section
1001 for more information.</para></listitem>
1002 <listitem><para>
1003 <filename>external-python-tarball</filename> has been renamed
1004 to <filename>buildtools-tarball</filename>.
1005 </para></listitem>
1006 <listitem><para>
1007 <filename>web-webkit</filename> has been removed.
1008 It has been functionally replaced by
1009 <filename>midori</filename>.</para></listitem>
1010 <listitem><para>
1011 <filename>imake</filename> has been removed.
1012 It is no longer needed by any other recipe.
1013 </para></listitem>
1014 <listitem><para>
1015 <filename>transfig-native</filename> has been removed.
1016 It is no longer needed by any other recipe.
1017 </para></listitem>
1018 <listitem><para>
1019 <filename>anjuta-remote-run</filename> has been removed.
1020 Anjuta IDE integration has not been officially supported for
1021 several releases.</para></listitem>
1022 </itemizedlist>
1023 </section>
1024
1025 <section id='migration-1.5-other-changes'>
1026 <title>Other Changes</title>
1027
1028 <para>
1029 Following is a list of short entries describing other changes:
1030 <itemizedlist>
1031 <listitem><para>
1032 <filename>run-postinsts</filename>: Make this generic.
1033 </para></listitem>
1034 <listitem><para>
1035 <filename>base-files</filename>: Remove the unnecessary
1036 <filename>media/xxx</filename> directories.
1037 </para></listitem>
1038 <listitem><para>
1039 <filename>alsa-state</filename>: Provide an empty
1040 <filename>asound.conf</filename> by default.
1041 </para></listitem>
1042 <listitem><para>
1043 <filename>classes/image</filename>: Ensure
1044 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
1045 supports pre-renamed package names.</para></listitem>
1046 <listitem><para>
1047 <filename>classes/rootfs_rpm</filename>: Implement
1048 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
1049 for RPM.</para></listitem>
1050 <listitem><para>
1051 <filename>systemd</filename>: Remove
1052 <filename>systemd_unitdir</filename> if
1053 <filename>systemd</filename> is not in
1054 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
1055 </para></listitem>
1056 <listitem><para>
1057 <filename>systemd</filename>: Remove
1058 <filename>init.d</filename> dir if
1059 <filename>systemd</filename> unit file is present and
1060 <filename>sysvinit</filename> is not a distro feature.
1061 </para></listitem>
1062 <listitem><para>
1063 <filename>libpam</filename>: Deny all services for the
1064 <filename>OTHER</filename> entries.
1065 </para></listitem>
1066 <listitem><para>
1067 <filename>image.bbclass</filename>: Move
1068 <filename>runtime_mapping_rename</filename> to avoid
1069 conflict with <filename>multilib</filename>.
1070 See
1071 <ulink url='https://bugzilla.yoctoproject.org/show_bug.cgi?id=4993'><filename>YOCTO #4993</filename></ulink>
1072 in Bugzilla for more information.
1073 </para></listitem>
1074 <listitem><para>
1075 <filename>linux-dtb</filename>: Use kernel build system
1076 to generate the <filename>dtb</filename> files.
1077 </para></listitem>
1078 <listitem><para>
1079 <filename>kern-tools</filename>: Switch from guilt to
1080 new <filename>kgit-s2q</filename> tool.
1081 </para></listitem>
1082 </itemizedlist>
1083 </para>
1084 </section>
1085</section>
1086</chapter>
1087<!--
1088vim: expandtab tw=80 ts=4
1089-->
diff --git a/documentation/ref-manual/ref-bitbake.xml b/documentation/ref-manual/ref-bitbake.xml
new file mode 100644
index 0000000..e24ea45
--- /dev/null
+++ b/documentation/ref-manual/ref-bitbake.xml
@@ -0,0 +1,432 @@
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-bitbake'>
6
7 <title>BitBake</title>
8
9 <para>
10 BitBake is a program written in Python that interprets the
11 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> used by
12 the OpenEmbedded build system.
13 At some point, developers wonder what actually happens when you enter:
14 <literallayout class='monospaced'>
15 $ bitbake core-image-sato
16 </literallayout>
17 </para>
18
19 <para>
20 This chapter provides an overview of what happens behind the scenes from BitBake's perspective.
21 </para>
22
23 <note>
24 BitBake strives to be a generic "task" executor that is capable of handling complex dependency relationships.
25 As such, it has no real knowledge of what the tasks being executed actually do.
26 BitBake just considers a list of tasks with dependencies and handles
27 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
28 consisting of variables in a certain format that get passed to the tasks.
29 </note>
30
31 <section id='ref-bitbake-parsing'>
32 <title>Parsing</title>
33
34 <para>
35 BitBake parses configuration files, classes, and <filename>.bb</filename> files.
36 </para>
37
38 <para>
39 The first thing BitBake does is look for the <filename>bitbake.conf</filename> file.
40 This file resides in the
41 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
42 within the <filename>meta/conf/</filename> directory.
43 BitBake finds it by examining its
44 <link linkend='var-BBPATH'><filename>BBPATH</filename></link> environment
45 variable and looking for the <filename>meta/conf/</filename>
46 directory.
47 </para>
48
49 <para>
50 The <filename>bitbake.conf</filename> file lists other configuration
51 files to include from a <filename>conf/</filename>
52 directory below the directories listed in <filename>BBPATH</filename>.
53 In general, the most important configuration file from a user's perspective
54 is <filename>local.conf</filename>, which contains a user's customized
55 settings for the OpenEmbedded build environment.
56 Other notable configuration files are the distribution
57 configuration file (set by the
58 <filename><link linkend='var-DISTRO'>DISTRO</link></filename> variable)
59 and the machine configuration file
60 (set by the
61 <filename><link linkend='var-MACHINE'>MACHINE</link></filename> variable).
62 The <filename>DISTRO</filename> and <filename>MACHINE</filename> BitBake environment
63 variables are both usually set in
64 the <filename>local.conf</filename> file.
65 Valid distribution
66 configuration files are available in the <filename>meta/conf/distro/</filename> directory
67 and valid machine configuration
68 files in the <filename>meta/conf/machine/</filename> directory.
69 Within the <filename>meta/conf/machine/include/</filename>
70 directory are various <filename>tune-*.inc</filename> configuration files that provide common
71 "tuning" settings specific to and shared between particular architectures and machines.
72 </para>
73
74 <para>
75 After the parsing of the configuration files, some standard classes are included.
76 The <filename>base.bbclass</filename> file is always included.
77 Other classes that are specified in the configuration using the
78 <filename><link linkend='var-INHERIT'>INHERIT</link></filename>
79 variable are also included.
80 Class files are searched for in a <filename>classes</filename> subdirectory
81 under the paths in <filename>BBPATH</filename> in the same way as
82 configuration files.
83 </para>
84
85 <para>
86 After classes are included, the variable
87 <filename><link linkend='var-BBFILES'>BBFILES</link></filename>
88 is set, usually in
89 <filename>local.conf</filename>, and defines the list of places to search for
90 <filename>.bb</filename> files.
91 By default, the <filename>BBFILES</filename> variable specifies the
92 <filename>meta/recipes-*/</filename> directory within Poky.
93 Adding extra content to <filename>BBFILES</filename> is best achieved through the use of
94 BitBake layers as described in the
95 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
96 Creating Layers</ulink>" section of the Yocto Project Development Manual.
97 </para>
98
99 <para>
100 BitBake parses each <filename>.bb</filename> file in <filename>BBFILES</filename> and
101 stores the values of various variables.
102 In summary, for each <filename>.bb</filename>
103 file the configuration plus the base class of variables are set, followed
104 by the data in the <filename>.bb</filename> file
105 itself, followed by any inherit commands that
106 <filename>.bb</filename> file might contain.
107 </para>
108
109 <para>
110 Because parsing <filename>.bb</filename> files is a time
111 consuming process, a cache is kept to speed up subsequent parsing.
112 This cache is invalid if the timestamp of the <filename>.bb</filename>
113 file itself changes, or if the timestamps of any of the include,
114 configuration files or class files on which the
115 <filename>.bb</filename> file depends change.
116 </para>
117 </section>
118
119 <section id='ref-bitbake-providers'>
120 <title>Preferences and Providers</title>
121
122 <para>
123 Once all the <filename>.bb</filename> files have been
124 parsed, BitBake starts to build the target (<filename>core-image-sato</filename>
125 in the previous section's example) and looks for providers of that target.
126 Once a provider is selected, BitBake resolves all the dependencies for
127 the target.
128 In the case of <filename>core-image-sato</filename>, it would lead to
129 <filename>packagegroup-core-x11-sato</filename>,
130 which in turn leads to recipes like <filename>matchbox-terminal</filename>,
131 <filename>pcmanfm</filename> and <filename>gthumb</filename>.
132 These recipes in turn depend on <filename>eglibc</filename> and the toolchain.
133 </para>
134
135 <para>
136 Sometimes a target might have multiple providers.
137 A common example is "virtual/kernel", which is provided by each kernel package.
138 Each machine often selects the best kernel provider by using a line similar to the
139 following in the machine configuration file:
140 </para>
141
142 <literallayout class='monospaced'>
143 PREFERRED_PROVIDER_virtual/kernel = "linux-yocto"
144 </literallayout>
145
146 <para>
147 The default <filename><link linkend='var-PREFERRED_PROVIDER'>PREFERRED_PROVIDER</link></filename>
148 is the provider with the same name as the target.
149 </para>
150
151 <para>
152 Understanding how providers are chosen is made complicated by the fact
153 that multiple versions might exist.
154 BitBake defaults to the highest version of a provider.
155 Version comparisons are made using the same method as Debian.
156 You can use the
157 <filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
158 variable to specify a particular version (usually in the distro configuration).
159 You can influence the order by using the
160 <filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE</link></filename>
161 variable.
162 By default, files have a preference of "0".
163 Setting the <filename>DEFAULT_PREFERENCE</filename> to "-1" makes the
164 package unlikely to be used unless it is explicitly referenced.
165 Setting the <filename>DEFAULT_PREFERENCE</filename> to "1" makes it likely the package is used.
166 <filename>PREFERRED_VERSION</filename> overrides any <filename>DEFAULT_PREFERENCE</filename> setting.
167 <filename>DEFAULT_PREFERENCE</filename> is often used to mark newer and more experimental package
168 versions until they have undergone sufficient testing to be considered stable.
169 </para>
170
171 <para>
172 In summary, BitBake has created a list of providers, which is prioritized, for each target.
173 </para>
174 </section>
175
176 <section id='ref-bitbake-dependencies'>
177 <title>Dependencies</title>
178
179 <para>
180 Each target BitBake builds consists of multiple tasks such as
181 <filename>fetch</filename>, <filename>unpack</filename>,
182 <filename>patch</filename>, <filename>configure</filename>,
183 and <filename>compile</filename>.
184 For best performance on multi-core systems, BitBake considers each task as an independent
185 entity with its own set of dependencies.
186 </para>
187
188 <para>
189 Dependencies are defined through several variables.
190 You can find information about variables BitBake uses in the BitBake documentation,
191 which is found in the <filename>bitbake/doc/manual</filename> directory within the
192 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
193 At a basic level, it is sufficient to know that BitBake uses the
194 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename> and
195 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename> variables when
196 calculating dependencies.
197 </para>
198 </section>
199
200 <section id='ref-bitbake-tasklist'>
201 <title>The Task List</title>
202
203 <para>
204 Based on the generated list of providers and the dependency information,
205 BitBake can now calculate exactly what tasks it needs to run and in what
206 order it needs to run them.
207 The build now starts with BitBake forking off threads up to the limit set in the
208 <filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link></filename> variable.
209 BitBake continues to fork threads as long as there are tasks ready to run,
210 those tasks have all their dependencies met, and the thread threshold has not been
211 exceeded.
212 </para>
213
214 <para>
215 It is worth noting that you can greatly speed up the build time by properly setting
216 the <filename>BB_NUMBER_THREADS</filename> variable.
217 See the
218 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
219 section in the Yocto Project Quick Start for more information.
220 </para>
221
222 <para>
223 As each task completes, a timestamp is written to the directory specified by the
224 <filename><link linkend='var-STAMP'>STAMP</link></filename> variable.
225 On subsequent runs, BitBake looks within the <filename>build/tmp/stamps</filename>
226 directory and does not rerun
227 tasks that are already completed unless a timestamp is found to be invalid.
228 Currently, invalid timestamps are only considered on a per
229 <filename>.bb</filename> file basis.
230 So, for example, if the configure stamp has a timestamp greater than the
231 compile timestamp for a given target, then the compile task would rerun.
232 Running the compile task again, however, has no effect on other providers
233 that depend on that target.
234 This behavior could change or become configurable in future versions of BitBake.
235 </para>
236
237 <note>
238 Some tasks are marked as "nostamp" tasks.
239 No timestamp file is created when these tasks are run.
240 Consequently, "nostamp" tasks are always rerun.
241 </note>
242 </section>
243
244 <section id='ref-bitbake-runtask'>
245 <title>Running a Task</title>
246
247 <para>
248 Tasks can either be a shell task or a Python task.
249 For shell tasks, BitBake writes a shell script to
250 <filename>${WORKDIR}/temp/run.do_taskname.pid</filename> and then executes the script.
251 The generated shell script contains all the exported variables, and the shell functions
252 with all variables expanded.
253 Output from the shell script goes to the file <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
254 Looking at the expanded shell functions in the run file and the output in the log files
255 is a useful debugging technique.
256 </para>
257
258 <para>
259 For Python tasks, BitBake executes the task internally and logs information to the
260 controlling terminal.
261 Future versions of BitBake will write the functions to files similar to the way
262 shell tasks are handled.
263 Logging will be handled in a way similar to shell tasks as well.
264 </para>
265
266 <para>
267 Once all the tasks have been completed BitBake exits.
268 </para>
269
270 <para>
271 When running a task, BitBake tightly controls the execution environment
272 of the build tasks to make sure unwanted contamination from the build machine
273 cannot influence the build.
274 Consequently, if you do want something to get passed into the build
275 task's environment, you must take a few steps:
276 <orderedlist>
277 <listitem><para>Tell BitBake to load what you want from the environment
278 into the data store.
279 You can do so through the <filename>BB_ENV_EXTRAWHITE</filename>
280 variable.
281 For example, assume you want to prevent the build system from
282 accessing your <filename>$HOME/.ccache</filename> directory.
283 The following command tells BitBake to load
284 <filename>CCACHE_DIR</filename> from the environment into the data
285 store:
286 <literallayout class='monospaced'>
287 export BB_ENV_EXTRAWHITE="$BB_ENV_EXTRAWHITE CCACHE_DIR"
288 </literallayout></para></listitem>
289 <listitem><para>Tell BitBake to export what you have loaded into the
290 environment store to the task environment of every running task.
291 Loading something from the environment into the data store
292 (previous step) only makes it available in the datastore.
293 To export it to the task environment of every running task,
294 use a command similar to the following in your
295 <filename>local.conf</filename> or distro configuration file:
296 <literallayout class='monospaced'>
297 export CCACHE_DIR
298 </literallayout></para></listitem>
299 </orderedlist>
300 </para>
301
302 <note>
303 A side effect of the previous steps is that BitBake records the variable
304 as a dependency of the build process in things like the shared state
305 checksums.
306 If doing so results in unnecessary rebuilds of tasks, you can whitelist the
307 variable so that the shared state code ignores the dependency when it creates
308 checksums.
309 For information on this process, see the <filename>BB_HASHBASE_WHITELIST</filename>
310 example in the "<link linkend='checksums'>Checksums (Signatures)</link>" section.
311 </note>
312 </section>
313
314 <section id='ref-bitbake-commandline'>
315 <title>BitBake Command Line</title>
316
317 <para>
318 Following is the BitBake help output:
319 </para>
320
321 <screen>
322$ bitbake --help
323Usage: bitbake [options] [recipename/target ...]
324
325 Executes the specified task (default is 'build') for a given set of target recipes (.bb files).
326 It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which
327 will provide the layer, BBFILES and other configuration information.
328
329Options:
330 --version show program's version number and exit
331 -h, --help show this help message and exit
332 -b BUILDFILE, --buildfile=BUILDFILE
333 Execute tasks from a specific .bb recipe directly.
334 WARNING: Does not handle any dependencies from other
335 recipes.
336 -k, --continue Continue as much as possible after an error. While the
337 target that failed and anything depending on it cannot
338 be built, as much as possible will be built before
339 stopping.
340 -a, --tryaltconfigs Continue with builds by trying to use alternative
341 providers where possible.
342 -f, --force Force the specified targets/task to run (invalidating
343 any existing stamp file).
344 -c CMD, --cmd=CMD Specify the task to execute. The exact options
345 available depend on the metadata. Some examples might
346 be 'compile' or 'populate_sysroot' or 'listtasks' may
347 give a list of the tasks available.
348 -C INVALIDATE_STAMP, --clear-stamp=INVALIDATE_STAMP
349 Invalidate the stamp for the specified task such as
350 'compile' and then run the default task for the
351 specified target(s).
352 -r PREFILE, --read=PREFILE
353 Read the specified file before bitbake.conf.
354 -R POSTFILE, --postread=POSTFILE
355 Read the specified file after bitbake.conf.
356 -v, --verbose Output more log message data to the terminal.
357 -D, --debug Increase the debug level. You can specify this more
358 than once.
359 -n, --dry-run Don't execute, just go through the motions.
360 -S, --dump-signatures
361 Don't execute, just dump out the signature
362 construction information.
363 -p, --parse-only Quit after parsing the BB recipes.
364 -s, --show-versions Show current and preferred versions of all recipes.
365 -e, --environment Show the global or per-package environment complete
366 with information about where variables were
367 set/changed.
368 -g, --graphviz Save dependency tree information for the specified
369 targets in the dot syntax.
370 -I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED
371 Assume these dependencies don't exist and are already
372 provided (equivalent to ASSUME_PROVIDED). Useful to
373 make dependency graphs more appealing
374 -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS
375 Show debug logging for the specified logging domains
376 -P, --profile Profile the command and save reports.
377 -u UI, --ui=UI The user interface to use (e.g. knotty, hob, depexp).
378 -t SERVERTYPE, --servertype=SERVERTYPE
379 Choose which server to use, process or xmlrpc.
380 --revisions-changed Set the exit code depending on whether upstream
381 floating revisions have changed or not.
382 --server-only Run bitbake without a UI, only starting a server
383 (cooker) process.
384 -B BIND, --bind=BIND The name/address for the bitbake server to bind to.
385 --no-setscene Do not run any setscene tasks. sstate will be ignored
386 and everything needed, built.
387 --remote-server=REMOTE_SERVER
388 Connect to the specified server.
389 -m, --kill-server Terminate the remote server.
390 --observe-only Connect to a server as an observing-only client.
391 </screen>
392 </section>
393
394 <section id='ref-bitbake-fetchers'>
395 <title>Fetchers</title>
396
397 <para>
398 BitBake also contains a set of "fetcher" modules that allow
399 retrieval of source code from various types of sources.
400 For example, BitBake can get source code from a disk with the metadata, from websites,
401 from remote shell accounts, or from Source Code Management (SCM) systems
402 like <filename>cvs/subversion/git</filename>.
403 </para>
404
405 <para>
406 Fetchers are usually triggered by entries in
407 <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>.
408 You can find information about the options and formats of entries for specific
409 fetchers in the BitBake manual located in the
410 <filename>bitbake/doc/manual</filename> directory of the
411 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
412 </para>
413
414 <para>
415 One useful feature for certain Source Code Manager (SCM) fetchers is the ability to
416 "auto-update" when the upstream SCM changes version.
417 Since this ability requires certain functionality from the SCM, not all
418 systems support it.
419 Currently Subversion, Bazaar and to a limited extent, Git support the ability to "auto-update".
420 This feature works using the <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
421 variable.
422 See the
423 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-srcrev'>Using an External SCM</ulink>" section
424 in the Yocto Project Development Manual for more information.
425 </para>
426
427 </section>
428
429</chapter>
430<!--
431vim: expandtab tw=80 ts=4 spell spelllang=en_gb
432-->
diff --git a/documentation/ref-manual/ref-classes.xml b/documentation/ref-manual/ref-classes.xml
new file mode 100644
index 0000000..27edfde
--- /dev/null
+++ b/documentation/ref-manual/ref-classes.xml
@@ -0,0 +1,1104 @@
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-classes'>
6<title>Classes</title>
7
8<para>
9 Class files are used to abstract common functionality and share it amongst multiple
10 <filename>.bb</filename> files.
11 Any <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> usually
12 found in a <filename>.bb</filename> file can also be placed in a class
13 file.
14 Class files are identified by the extension <filename>.bbclass</filename> and are usually placed
15 in a <filename>classes/</filename> directory beneath the
16 <filename>meta*/</filename> directory found in the
17 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
18 Class files can also be pointed to by
19 <link linkend='var-BUILDDIR'><filename>BUILDDIR</filename></link>
20 (e.g. <filename>build/</filename>) in the same way as
21 <filename>.conf</filename> files in the <filename>conf</filename> directory.
22 Class files are searched for in <link linkend='var-BBPATH'><filename>BBPATH</filename></link>
23 using the same method by which <filename>.conf</filename> files are searched.
24</para>
25
26<para>
27 In most cases inheriting the class is enough to enable its features, although
28 for some classes you might need to set variables or override some of the
29 default behavior.
30</para>
31
32<para>
33 This chapter discusses only the most useful and important classes.
34 Other classes do exist within the <filename>meta/classes</filename>
35 directory in the
36 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
37 You can reference the <filename>.bbclass</filename> files directly
38 for more information.
39</para>
40
41<section id='ref-classes-base'>
42 <title>The base Class - <filename>base.bbclass</filename></title>
43
44 <para>
45 The base class is special in that every <filename>.bb</filename>
46 file inherits it automatically.
47 This class contains definitions for standard basic
48 tasks such as fetching, unpacking, configuring (empty by default), compiling
49 (runs any <filename>Makefile</filename> present), installing (empty by default) and packaging
50 (empty by default).
51 These classes are often overridden or extended by other classes
52 such as <filename>autotools.bbclass</filename> or <filename>package.bbclass</filename>.
53 The class also contains some commonly used functions such as <filename>oe_runmake</filename>.
54 </para>
55</section>
56
57<section id='ref-classes-autotools'>
58 <title>Autotooled Packages - <filename>autotools.bbclass</filename></title>
59
60 <para>
61 Autotools (<filename>autoconf</filename>, <filename>automake</filename>,
62 and <filename>libtool</filename>) bring standardization.
63 This class defines a set of tasks (configure, compile etc.) that
64 work for all Autotooled packages.
65 It should usually be enough to define a few standard variables
66 and then simply <filename>inherit autotools</filename>.
67 This class can also work with software that emulates Autotools.
68 For more information, see the
69 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-addpkg-autotools'>Autotooled Package</ulink>"
70 section in the Yocto Project Development Manual.
71 </para>
72
73 <para>
74 It's useful to have some idea of how the tasks defined by this class work
75 and what they do behind the scenes.
76 <itemizedlist>
77 <listitem><para><filename>do_configure</filename> &dash; Regenerates the
78 configure script (using <filename>autoreconf</filename>) and then launches it
79 with a standard set of arguments used during cross-compilation.
80 You can pass additional parameters to <filename>configure</filename> through the
81 <filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link></filename> variable.
82 </para></listitem>
83 <listitem><para><filename>do_compile</filename> &dash; Runs <filename>make</filename> with
84 arguments that specify the compiler and linker.
85 You can pass additional arguments through
86 the <filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link></filename> variable.
87 </para></listitem>
88 <listitem><para><filename>do_install</filename> &dash; Runs <filename>make install</filename>
89 and passes in
90 <filename>${</filename><link linkend='var-D'><filename>D</filename></link><filename>}</filename>
91 as <filename>DESTDIR</filename>.
92 </para></listitem>
93 </itemizedlist>
94 </para>
95</section>
96
97<section id='ref-classes-update-alternatives'>
98 <title>Alternatives - <filename>update-alternatives.bbclass</filename></title>
99
100 <para>
101 This class helps the alternatives system when multiple sources provide
102 the same command.
103 This situation occurs when several programs that have the same or
104 similar function are installed with the same name.
105 For example, the <filename>ar</filename> command is available from the
106 <filename>busybox</filename>, <filename>binutils</filename> and
107 <filename>elfutils</filename> packages.
108 The <filename>update-alternatives.bbclass</filename> class handles
109 renaming the binaries so that multiple packages can be installed
110 without conflicts.
111 The <filename>ar</filename> command still works regardless of which
112 packages are installed or subsequently removed.
113 The class renames the conflicting binary in each package and symlinks
114 the highest priority binary during installation or removal of packages.
115 </para>
116
117 <para>
118 To use this class, you need to define a number of variables:
119 <itemizedlist>
120 <listitem><para><link linkend='var-ALTERNATIVE'><filename>ALTERNATIVE</filename></link>
121 </para></listitem>
122 <listitem><para><link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link>
123 </para></listitem>
124 <listitem><para><link linkend='var-ALTERNATIVE_TARGET'><filename>ALTERNATIVE_TARGET</filename></link>
125 </para></listitem>
126 <listitem><para><link linkend='var-ALTERNATIVE_PRIORITY'><filename>ALTERNATIVE_PRIORITY</filename></link>
127 </para></listitem>
128 </itemizedlist>
129 These variables list alternative commands needed by a package,
130 provide pathnames for links, default links for targets, and
131 so forth.
132 For details on how to use this class, see the comments in the
133 <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/classes/update-alternatives.bbclass'><filename>update-alternatives.bbclass</filename></ulink>.
134 </para>
135
136 <note>
137 You can use the <filename>update-alternatives</filename> command
138 directly in your recipes.
139 However, this class simplifies things in most cases.
140 </note>
141</section>
142
143<section id='ref-classes-update-rc.d'>
144 <title>Initscripts - <filename>update-rc.d.bbclass</filename></title>
145
146 <para>
147 This class uses <filename>update-rc.d</filename> to safely install an
148 initialization script on behalf of the package.
149 The OpenEmbedded build system takes care of details such as making sure the script is stopped before
150 a package is removed and started when the package is installed.
151 Three variables control this class:
152 <filename><link linkend='var-INITSCRIPT_PACKAGES'>INITSCRIPT_PACKAGES</link></filename>,
153 <filename><link linkend='var-INITSCRIPT_NAME'>INITSCRIPT_NAME</link></filename> and
154 <filename><link linkend='var-INITSCRIPT_PARAMS'>INITSCRIPT_PARAMS</link></filename>.
155 See the variable links for details.
156 </para>
157</section>
158
159<section id='ref-classes-binconfig'>
160 <title><filename>binconfig.bbclass</filename></title>
161
162 <para>
163 This class helps to correct paths in shell scripts.
164 </para>
165
166 <para>
167 Before <filename>pkg-config</filename> had become widespread, libraries
168 shipped shell scripts to give information about the libraries and
169 include paths needed to build software (usually named
170 <filename>LIBNAME-config</filename>).
171 This class assists any recipe using such scripts.
172 </para>
173
174 <para>
175 During staging, the OpenEmbedded build system installs such scripts
176 into the <filename>sysroots/</filename> directory.
177 Inheriting this class results in all paths in these scripts being
178 changed to point into the <filename>sysroots/</filename> directory so
179 that all builds that use the script use the correct directories
180 for the cross compiling layout.
181 See the
182 <link linkend='var-BINCONFIG_GLOB'><filename>BINCONFIG_GLOB</filename></link>
183 variable for more information.
184 </para>
185</section>
186
187<section id='ref-classes-debian'>
188 <title>Debian Renaming - <filename>debian.bbclass</filename></title>
189
190 <para>
191 This class renames packages so that they follow the Debian naming
192 policy (i.e. <filename>eglibc</filename> becomes <filename>libc6</filename>
193 and <filename>eglibc-devel</filename> becomes <filename>libc6-dev</filename>.)
194 </para>
195</section>
196
197<section id='ref-classes-pkgconfig'>
198 <title>Pkg-config - <filename>pkgconfig.bbclass</filename></title>
199
200 <para>
201 <filename>pkg-config</filename> provides a standard way to get
202 header and library information.
203 This class aims to smooth integration of
204 <filename>pkg-config</filename> into libraries that use it.
205 </para>
206
207 <para>
208 During staging, BitBake installs <filename>pkg-config</filename> data into the
209 <filename>sysroots/</filename> directory.
210 By making use of sysroot functionality within <filename>pkg-config</filename>,
211 this class no longer has to manipulate the files.
212 </para>
213</section>
214
215<section id='ref-classes-archiver'>
216 <title>Archiving Sources - <filename>archive*.bbclass</filename></title>
217
218 <para>
219 Many software licenses require that source code and other materials be
220 released with the binaries.
221 To help with that task, the following classes are provided:
222 <itemizedlist>
223 <listitem><filename>archive-original-sources.bbclass</filename></listitem>
224 <listitem><filename>archive-patched-sources.bbclass</filename></listitem>
225 <listitem><filename>archive-configured-sources.bbclass</filename></listitem>
226 <listitem><filename>archiver.bbclass</filename></listitem>
227 </itemizedlist>
228 </para>
229
230 <para>
231 For more details on the source archiver, see the
232 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
233 section in the Yocto Project Development Manual.
234 </para>
235</section>
236
237<section id='ref-classes-perl'>
238 <title>Perl Modules - <filename>cpan.bbclass</filename></title>
239
240 <para>
241 Recipes for Perl modules are simple.
242 These recipes usually only need to point to the source's archive and then inherit the
243 proper <filename>.bbclass</filename> file.
244 Building is split into two methods depending on which method the module authors used.
245 <itemizedlist>
246 <listitem><para>Modules that use old
247 <filename>Makefile.PL</filename>-based build system require
248 <filename>cpan.bbclass</filename> in their recipes.
249 </para></listitem>
250 <listitem><para>Modules that use
251 <filename>Build.PL</filename>-based build system require
252 using <filename>cpan_build.bbclass</filename> in their recipes.
253 </para></listitem>
254 </itemizedlist>
255 </para>
256</section>
257
258<section id='ref-classes-distutils'>
259 <title>Python Extensions - <filename>distutils.bbclass</filename></title>
260
261 <para>
262 Recipes for Python extensions are simple.
263 These recipes usually only need to point to the source's archive and then inherit
264 the proper <filename>.bbclass</filename> file.
265 Building is split into two methods depending on which method the module authors used.
266 <itemizedlist>
267 <listitem><para>Extensions that use an Autotools-based build system
268 require Autotools and
269 <filename>distutils</filename>-based
270 <filename>.bbclasse</filename> files in their recipes.
271 </para></listitem>
272 <listitem><para>Extensions that use
273 <filename>distutils</filename>-based build systems require
274 <filename>distutils.bbclass</filename> in their recipes.
275 </para></listitem>
276 </itemizedlist>
277 </para>
278</section>
279
280<section id='ref-classes-devshell'>
281 <title>Developer Shell - <filename>devshell.bbclass</filename></title>
282
283 <para>
284 This class adds the <filename>devshell</filename> task.
285 Distribution policy dictates whether to include this class.
286 See the
287 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
288 in the Yocto Project Development Manual for more information about using <filename>devshell</filename>.
289 </para>
290</section>
291
292<section id='ref-classes-packagegroup'>
293 <title>Package Groups - <filename>packagegroup.bbclass</filename></title>
294
295 <para>
296 This class sets default values appropriate for package group recipes (e.g.
297 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>,
298 <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>,
299 <filename><link linkend='var-ALLOW_EMPTY'>ALLOW_EMPTY</link></filename>,
300 and so forth).
301 It is highly recommended that all package group recipes inherit this class.
302 </para>
303 <para>
304 For information on how to use this class, see the
305 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-customtasks'>Customizing Images Using Custom Package Groups</ulink>"
306 section in the Yocto Project Development Manual.
307 </para>
308 <para>
309 Previously, this class was named <filename>task.bbclass</filename>.
310 </para>
311</section>
312
313
314<section id='ref-classes-package'>
315 <title>Packaging - <filename>package*.bbclass</filename></title>
316
317 <para>
318 The packaging classes add support for generating packages from a build's
319 output.
320 The core generic functionality is in <filename>package.bbclass</filename>.
321 The code specific to particular package types is contained in various sub-classes such as
322 <filename>package_deb.bbclass</filename>, <filename>package_ipk.bbclass</filename>,
323 and <filename>package_rpm.bbclass</filename>.
324 Most users will want one or more of these classes.
325 </para>
326
327 <para>
328 You can control the list of resulting package formats by using the
329 <filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link></filename>
330 variable defined in the <filename>local.conf</filename> configuration file,
331 which is located in the <filename>conf</filename> folder of the
332 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
333 When defining the variable, you can specify one or more package types.
334 Since images are generated from packages, a packaging class is
335 needed to enable image generation.
336 The first class listed in this variable is used for image generation.
337 </para>
338
339 <para>
340 If you take the optional step to set up a repository (package feed)
341 on the development host that can be used by Smart, you can
342 install packages from the feed while you are running the image
343 on the target (i.e. runtime installation of packages).
344 For more information, see the
345 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-runtime-package-management'>Using Runtime Package Management</ulink>"
346 section in the Yocto Project Development Manual.
347 </para>
348
349 <para>
350 The package class you choose can affect build-time performance and has space
351 ramifications.
352 In general, building a package with IPK takes about thirty percent less
353 time as compared to using RPM to build the same or similar package.
354 This comparison takes into account a complete build of the package with
355 all dependencies previously built.
356 The reason for this discrepancy is because the RPM package manager
357 creates and processes more
358 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> than the
359 IPK package manager.
360 Consequently, you might consider setting <filename>PACKAGE_CLASSES</filename>
361 to "package_ipk" if you are building smaller systems.
362 </para>
363
364 <para>
365 Before making your decision on package manager, however, you should
366 consider some further things about using RPM:
367 <itemizedlist>
368 <listitem><para>
369 RPM starts to provide more abilities than IPK due to
370 the fact that it processes more metadata.
371 For example, this information includes individual file types,
372 file checksum generation and evaluation on install, sparse file
373 support, conflict detection and resolution for Multilib systems,
374 ACID style upgrade, and repackaging abilities for rollbacks.
375 </para></listitem>
376 <listitem><para>
377 For smaller systems, the extra space used for the Berkley
378 Database and the amount of metadata when using RPM can affect
379 your ability to perform on-device upgrades.
380 </para></listitem>
381 </itemizedlist>
382 </para>
383
384 <para>
385 You can find additional information on the effects of the package
386 class at these two Yocto Project mailing list links:
387 <itemizedlist>
388 <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006362.html'>
389 https://lists.yoctoproject.org/pipermail/poky/2011-May/006362.html</ulink></para></listitem>
390 <listitem><para><ulink url='&YOCTO_LISTS_URL;/pipermail/poky/2011-May/006363.html'>
391 https://lists.yoctoproject.org/pipermail/poky/2011-May/006363.html</ulink></para></listitem>
392 </itemizedlist>
393 </para>
394</section>
395
396<section id='ref-classes-kernel'>
397 <title>Building Kernels - <filename>kernel.bbclass</filename></title>
398
399 <para>
400 This class handles building Linux kernels.
401 The class contains code to build all kernel trees.
402 All needed headers are staged into the
403 <filename><link linkend='var-STAGING_KERNEL_DIR'>STAGING_KERNEL_DIR</link></filename>
404 directory to allow out-of-tree module builds using <filename>module.bbclass</filename>.
405 </para>
406
407 <para>
408 This means that each built kernel module is packaged separately and inter-module
409 dependencies are created by parsing the <filename>modinfo</filename> output.
410 If all modules are required, then installing the <filename>kernel-modules</filename>
411 package installs all packages with modules and various other kernel packages
412 such as <filename>kernel-vmlinux</filename>.
413 </para>
414
415 <para>
416 Various other classes are used by the kernel and module classes internally including
417 <filename>kernel-arch.bbclass</filename>, <filename>module_strip.bbclass</filename>,
418 <filename>module-base.bbclass</filename>, and <filename>linux-kernel-base.bbclass</filename>.
419 </para>
420</section>
421
422<section id='ref-classes-image'>
423 <title>Creating Images - <filename>image.bbclass</filename> and <filename>rootfs*.bbclass</filename></title>
424
425 <para>
426 These classes add support for creating images in several formats.
427 First, the root filesystem is created from packages using
428 one of the <filename>rootfs_*.bbclass</filename>
429 files (depending on the package format used) and then the image is created.
430 <itemizedlist>
431 <listitem><para>The
432 <filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link></filename>
433 variable controls the types of images to generate.
434 </para></listitem>
435 <listitem><para>The
436 <filename><link linkend='var-IMAGE_INSTALL'>IMAGE_INSTALL</link></filename>
437 variable controls the list of packages to install into the
438 image.</para></listitem>
439 </itemizedlist>
440 </para>
441</section>
442
443<section id='ref-classes-sanity'>
444 <title>Host System Sanity Checks - <filename>sanity.bbclass</filename></title>
445
446 <para>
447 This class checks to see if prerequisite software is present on the host system
448 so that users can be notified of potential problems that might affect their build.
449 The class also performs basic user configuration checks from
450 the <filename>local.conf</filename> configuration file to
451 prevent common mistakes that cause build failures.
452 Distribution policy usually determines whether to include this class.
453 </para>
454</section>
455
456<section id='ref-classes-insane'>
457<title><filename>insane.bbclass</filename></title>
458
459 <para>
460 This class adds a step to the package generation process so that
461 output quality assurance checks are generated by the OpenEmbedded
462 build system.
463 A range of checks are performed that check the build's output
464 for common problems that show up during runtime.
465 Distribution policy usually dictates whether to include this class.
466 </para>
467
468 <para>
469 You can configure the sanity checks so that specific test failures
470 either raise a warning or an error message.
471 Typically, failures for new tests generate a warning.
472 Subsequent failures for the same test would then generate an error
473 message once the metadata is in a known and good condition.
474 </para>
475
476 <para>
477 Use the
478 <link linkend='var-WARN_QA'><filename>WARN_QA</filename></link> and
479 <link linkend='var-ERROR_QA'><filename>ERROR_QA</filename></link>
480 variables to control the behavior of
481 these checks at the global level (i.e. in your custom distro
482 configuration).
483 However, to skip one or more checks in recipes, you should use
484 <link linkend='var-INSANE_SKIP'><filename>INSANE_SKIP</filename></link>.
485 For example, to skip the check for symbolic link
486 <filename>.so</filename> files in the main package of a recipe,
487 add the following to the recipe.
488 You need to realize that the package name override, in this example
489 <filename>${PN}</filename>, must be used:
490 <literallayout class='monospaced'>
491 INSANE_SKIP_${PN} += "dev-so"
492 </literallayout>
493 Please keep in mind that the QA checks exist in order to detect real
494 or potential problems in the packaged output.
495 So exercise caution when disabling these checks.
496 </para>
497
498 <para>
499 The following list shows the tests you can list with the
500 <filename>WARN_QA</filename> and <filename>ERROR_QA</filename>
501 variables:
502 <itemizedlist>
503 <listitem><para><emphasis><filename>ldflags:</filename></emphasis>
504 Ensures that the binaries were linked with the
505 <filename>LDFLAGS</filename> options provided by the build system.
506 If this test fails, check that the <filename>LDFLAGS</filename> variable
507 is being passed to the linker command.</para></listitem>
508 <listitem><para><emphasis><filename>useless-rpaths:</filename></emphasis>
509 Checks for dynamic library load paths (rpaths) in the binaries that
510 by default on a standard system are searched by the linker (e.g.
511 <filename>/lib</filename> and <filename>/usr/lib</filename>).
512 While these paths will not cause any breakage, they do waste space and
513 are unnecessary.</para></listitem>
514 <listitem><para><emphasis><filename>rpaths:</filename></emphasis>
515 Checks for rpaths in the binaries that contain build system paths such
516 as <filename>TMPDIR</filename>.
517 If this test fails, bad <filename>-rpath</filename> options are being
518 passed to the linker commands and your binaries have potential security
519 issues.</para></listitem>
520 <listitem><para><emphasis><filename>dev-so:</filename></emphasis>
521 Checks that the <filename>.so</filename> symbolic links are in the
522 <filename>-dev</filename> package and not in any of the other packages.
523 In general, these symlinks are only useful for development purposes.
524 Thus, the <filename>-dev</filename> package is the correct location for
525 them.
526 Some very rare cases do exist for dynamically loaded modules where
527 these symlinks are needed instead in the main package.
528 </para></listitem>
529 <listitem><para><emphasis><filename>debug-files:</filename></emphasis>
530 Checks for <filename>.debug</filename> directories in anything but the
531 <filename>-dbg</filename> package.
532 The debug files should all be in the <filename>-dbg</filename> package.
533 Thus, anything packaged elsewhere is incorrect packaging.</para></listitem>
534 <listitem><para><emphasis><filename>arch:</filename></emphasis>
535 Checks the Executable and Linkable Format (ELF) type, bit size, and endianness
536 of any binaries to ensure they match the target architecture.
537 This test fails if any binaries don't match the type since there would be an
538 incompatibility.
539 Sometimes software, like bootloaders, might need to bypass this check.
540 </para></listitem>
541 <listitem><para><emphasis><filename>debug-deps:</filename></emphasis>
542 Checks that <filename>-dbg</filename> packages only depend on other
543 <filename>-dbg</filename> packages and not on any other types of packages,
544 which would cause a packaging bug.</para></listitem>
545 <listitem><para><emphasis><filename>dev-deps:</filename></emphasis>
546 Checks that <filename>-dev</filename> packages only depend on other
547 <filename>-dev</filename> packages and not on any other types of packages,
548 which would be a packaging bug.</para></listitem>
549 <listitem><para><emphasis><filename>pkgconfig:</filename></emphasis>
550 Checks <filename>.pc</filename> files for any
551 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>/<link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
552 paths.
553 Any <filename>.pc</filename> file containing these paths is incorrect
554 since <filename>pkg-config</filename> itself adds the correct sysroot prefix
555 when the files are accessed.</para></listitem>
556 <listitem><para><emphasis><filename>textrel:</filename></emphasis>
557 Checks for ELF binaries that contain relocations in their
558 <filename>.text</filename> sections, which can result in a
559 performance impact at runtime.</para></listitem>
560 <listitem><para><emphasis><filename>pkgvarcheck:</filename></emphasis>
561 Checks through the variables
562 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
563 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
564 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
565 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>,
566 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
567 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
568 <link linkend='var-FILES'><filename>FILES</filename></link>,
569 <link linkend='var-ALLOW_EMPTY'><filename>ALLOW_EMPTY</filename></link>,
570 <filename>pkg_preinst</filename>,
571 <filename>pkg_postinst</filename>,
572 <filename>pkg_prerm</filename>
573 and <filename>pkg_postrm</filename>, and reports if there are
574 variable sets that are not package-specific.
575 Using these variables without a package suffix is bad practice,
576 and might unnecessarily complicate dependencies of other packages
577 within the same recipe or have other unintended consequences.
578 </para></listitem>
579 <listitem><para><emphasis><filename>xorg-driver-abi:</filename></emphasis>
580 Checks that all packages containing Xorg drivers have ABI
581 dependencies.
582 The <filename>xserver-xorg</filename> recipe provides driver
583 ABI names.
584 All drivers should depend on the ABI versions that they have
585 been built against.
586 Driver recipes that include
587 <filename>xorg-driver-input.inc</filename>
588 or <filename>xorg-driver-video.inc</filename> will
589 automatically get these versions.
590 Consequently, you should only need to explicitly add
591 dependencies to binary driver recipes.
592 </para></listitem>
593 <listitem><para><emphasis><filename>libexec:</filename></emphasis>
594 Checks if a package contains files in
595 <filename>/usr/libexec</filename>.
596 This check is not performed if the
597 <filename>libexecdir</filename> variable has been set
598 explicitly to <filename>/usr/libexec</filename>.
599 </para></listitem>
600 <listitem><para><emphasis><filename>staticdev:</filename></emphasis>
601 Checks for static library files (<filename>*.a</filename>) in
602 non-<filename>staticdev</filename> packages.
603 </para></listitem>
604 <listitem><para><emphasis><filename>la:</filename></emphasis>
605 Checks <filename>.la</filename> files for any <filename>TMPDIR</filename>
606 paths.
607 Any <filename>.la</filename> file containing these paths is incorrect since
608 <filename>libtool</filename> adds the correct sysroot prefix when using the
609 files automatically itself.</para></listitem>
610 <listitem><para><emphasis><filename>desktop:</filename></emphasis>
611 Runs the <filename>desktop-file-validate</filename> program
612 against any <filename>.desktop</filename> files to validate
613 their contents against the specification for
614 <filename>.desktop</filename> files.</para></listitem>
615 <listitem><para><emphasis><filename>already-stripped:</filename></emphasis>
616 Checks that produced binaries have not already been
617 stripped prior to the build system extracting debug symbols.
618 It is common for upstream software projects to default to
619 stripping debug symbols for output binaries.
620 In order for debugging to work on the target using
621 <filename>-dbg</filename> packages, this stripping must be
622 disabled.
623 </para></listitem>
624 <listitem><para><emphasis><filename>split-strip:</filename></emphasis>
625 Reports that splitting or stripping debug symbols from binaries
626 has failed.
627 </para></listitem>
628 <listitem><para><emphasis><filename>arch:</filename></emphasis>
629 Checks to ensure the architecture, bit size, and endianness
630 of all output binaries matches that of the target.
631 This test can detect when the wrong compiler or compiler options
632 have been used.
633 </para></listitem>
634 <listitem><para><emphasis><filename>installed-vs-shipped:</filename></emphasis>
635 Reports when files have been installed within
636 <filename>do_install</filename> but have not been included in
637 any package by way of the
638 <link linkend='var-FILES'><filename>FILES</filename></link>
639 variable.
640 Files that do not appear in any package cannot be present in
641 an image later on in the build process.
642 Ideally, all installed files should be packaged or not
643 installed at all.
644 These files can be deleted at the end of
645 <filename>do_install</filename> if the files are not
646 needed in any package.
647 </para></listitem>
648 <listitem><para><emphasis><filename>dep-cmp:</filename></emphasis>
649 Checks for invalid version comparison statements in runtime
650 dependency relationships between packages (i.e. in
651 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>,
652 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>,
653 <link linkend='var-RSUGGESTS'><filename>RSUGGESTS</filename></link>,
654 <link linkend='var-RPROVIDES'><filename>RPROVIDES</filename></link>,
655 <link linkend='var-RREPLACES'><filename>RREPLACES</filename></link>,
656 and
657 <link linkend='var-RCONFLICTS'><filename>RCONFLICTS</filename></link>
658 variable values).
659 Any invalid comparisons might trigger failures or undesirable
660 behavior when passed to the package manager.
661 </para></listitem>
662 <listitem><para><emphasis><filename>files-invalid:</filename></emphasis>
663 Checks for
664 <link linkend='var-FILES'><filename>FILES</filename></link>
665 variable values that contain "//", which is invalid.
666 </para></listitem>
667 <listitem><para><emphasis><filename>incompatible-license:</filename></emphasis>
668 Report when packages are excluded from being created due to
669 being marked with a license that is in
670 <link linkend='var-INCOMPATIBLE_LICENSE'><filename>INCOMPATIBLE_LICENSE</filename></link>.
671 </para></listitem>
672 <listitem><para><emphasis><filename>compile-host-path:</filename></emphasis>
673 Checks the <filename>do_compile</filename> log for indications
674 that paths to locations on the build host were used.
675 Using such paths might result in host contamination of the
676 build output.
677 </para></listitem>
678 <listitem><para><emphasis><filename>install-host-path:</filename></emphasis>
679 Checks the <filename>do_install</filename> log for indications
680 that paths to locations on the build host were used.
681 Using such paths might result in host contamination of the
682 build output.
683 </para></listitem>
684 <listitem><para><emphasis><filename>libdir:</filename></emphasis>
685 Checks for libraries being installed into incorrect
686 (possibly hardcoded) installation paths.
687 For example, this test will catch recipes that install
688 <filename>/lib/bar.so</filename> when
689 <filename>${base_libdir}</filename> is "lib32".
690 Another example is when recipes install
691 <filename>/usr/lib64/foo.so</filename> when
692 <filename>${libdir}</filename> is "/usr/lib".
693 </para></listitem>
694 <listitem><para><emphasis><filename>packages-list:</filename></emphasis>
695 Checks for the same package being listed multiple times through
696 the <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
697 variable value.
698 Installing the package in this manner can cause errors during
699 packaging.
700 </para></listitem>
701 <listitem><para><emphasis><filename>perm-config:</filename></emphasis>
702 Reports lines in <filename>fs-perms.txt</filename> that have
703 an invalid format.
704 </para></listitem>
705 <listitem><para><emphasis><filename>perm-line:</filename></emphasis>
706 Reports lines in <filename>fs-perms.txt</filename> that have
707 an invalid format.
708 </para></listitem>
709 <listitem><para><emphasis><filename>perm-link:</filename></emphasis>
710 Reports lines in <filename>fs-perms.txt</filename> that
711 specify 'link' where the specified target already exists.
712 </para></listitem>
713 <listitem><para><emphasis><filename>pkgname:</filename></emphasis>
714 Checks that all packages in
715 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
716 have names that do not contain invalid characters (i.e.
717 characters other than 0-9, a-z, ., +, and -).
718 </para></listitem>
719 <listitem><para><emphasis><filename>pn-overrides:</filename></emphasis>
720 Checks that a recipe does not have a name
721 (<link linkend='var-PN'><filename>PN</filename></link>) value
722 that appears in
723 <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>.
724 If a recipe is named such that its <filename>PN</filename>
725 value matches something already in
726 <filename>OVERRIDES</filename> (e.g. <filename>PN</filename>
727 happens to be the same as
728 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>
729 or
730 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>),
731 it can have unexpected consequences.
732 For example, assignments such as
733 <filename>FILES_${PN} = "xyz"</filename> effectively turn into
734 <filename>FILES = "xyz"</filename>.
735 </para></listitem>
736 <listitem><para><emphasis><filename>unsafe-references-in-binaries:</filename></emphasis>
737 Reports when a binary installed in
738 <filename>${base_libdir}</filename>,
739 <filename>${base_bindir}</filename>, or
740 <filename>${base_sbindir}</filename>, depends on another
741 binary installed under <filename>${exec_prefix}</filename>.
742 This dependency is a concern if you want the system to remain
743 basically operable if <filename>/usr</filename> is mounted
744 separately and is not mounted.
745 <note>
746 Defaults for binaries installed in
747 <filename>${base_libdir}</filename>,
748 <filename>${base_bindir}</filename>, and
749 <filename>${base_sbindir}</filename> are
750 <filename>/lib</filename>, <filename>/bin</filename>, and
751 <filename>/sbin</filename>, respectively.
752 The default for a binary installed
753 under <filename>${exec_prefix}</filename> is
754 <filename>/usr</filename>.
755 </note>
756 </para></listitem>
757 <listitem><para><emphasis><filename>unsafe-references-in-scripts:</filename></emphasis>
758 Reports when a script file installed in
759 <filename>${base_libdir}</filename>,
760 <filename>${base_bindir}</filename>, or
761 <filename>${base_sbindir}</filename>, depends on files
762 installed under <filename>${exec_prefix}</filename>.
763 This dependency is a concern if you want the system to remain
764 basically operable if <filename>/usr</filename> is mounted
765 separately and is not mounted.
766 <note>
767 Defaults for binaries installed in
768 <filename>${base_libdir}</filename>,
769 <filename>${base_bindir}</filename>, and
770 <filename>${base_sbindir}</filename> are
771 <filename>/lib</filename>, <filename>/bin</filename>, and
772 <filename>/sbin</filename>, respectively.
773 The default for a binary installed
774 under <filename>${exec_prefix}</filename> is
775 <filename>/usr</filename>.
776 </note>
777 </para></listitem>
778 <listitem><para><emphasis><filename>var-undefined:</filename></emphasis>
779 Reports when variables fundamental to packaging (i.e.
780 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
781 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>,
782 <link linkend='var-D'><filename>D</filename></link>,
783 <link linkend='var-PN'><filename>PN</filename></link>, and
784 <link linkend='var-PKGD'><filename>PKGD</filename></link>) are
785 undefined during <filename>do_package</filename>.
786 </para></listitem>
787 <listitem><para><emphasis><filename>pkgv-undefined:</filename></emphasis>
788 Checks to see if the <filename>PKGV</filename> variable
789 is undefined during <filename>do_package</filename>.
790 </para></listitem>
791 <listitem><para><emphasis><filename>buildpaths:</filename></emphasis>
792 Checks for paths to locations on the build host inside the
793 output files.
794 Currently, this test triggers too many false positives and
795 thus is not normally enabled.
796 </para></listitem>
797 <listitem><para><emphasis><filename>perms:</filename></emphasis>
798 Currently, this check is unused but reserved.
799 </para></listitem>
800 <listitem><para><emphasis><filename>version-going-backwards:</filename></emphasis>
801 If Build History is enabled, reports when a package
802 being written out has a lower version than the previously
803 written package under the same name.
804 If you are placing output packages into a feed and
805 upgrading packages on a target system using that feed, the
806 version of a package going backwards can result in the target
807 system not correctly upgrading to the "new" version of the
808 package.
809 <note>
810 If you are not using runtime package management on your
811 target system, then you do not need to worry about
812 this situation.
813 </note>
814 </para></listitem>
815 </itemizedlist>
816 </para>
817</section>
818
819<section id='ref-classes-rm-work'>
820 <title>Removing Work Files During the Build - <filename>rm_work.bbclass</filename></title>
821
822 <para>
823 The OpenEmbedded build system can use a substantial amount of disk
824 space during the build process.
825 A portion of this space is the work files under the
826 <filename>${TMPDIR}/work</filename> directory for each recipe.
827 Once the build system generates the packages for a recipe, the work
828 files for that recipe are no longer needed.
829 However, by default, the build system preserves these files
830 for inspection and possible debugging purposes.
831 If you would rather have these files deleted to save disk space
832 as the build progresses, you can enable <filename>rm_work</filename>
833 by adding the following to your <filename>local.conf</filename> file,
834 which is found in the
835 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
836 <literallayout class='monospaced'>
837 INHERIT += "rm_work"
838 </literallayout>
839 If you are modifying and building source code out of the work directory
840 for a recipe, enabling <filename>rm_work</filename> will potentially
841 result in your changes to the source being lost.
842 To exclude some recipes from having their work directories deleted by
843 <filename>rm_work</filename>, you can add the names of the recipe or
844 recipes you are working on to the <filename>RM_WORK_EXCLUDE</filename>
845 variable, which can also be set in your <filename>local.conf</filename>
846 file.
847 Here is an example:
848 <literallayout class='monospaced'>
849 RM_WORK_EXCLUDE += "busybox eglibc"
850 </literallayout>
851 </para>
852</section>
853
854
855<section id='ref-classes-siteinfo'>
856 <title>Autotools Configuration Data Cache - <filename>siteinfo.bbclass</filename></title>
857
858 <para>
859 Autotools can require tests that must execute on the target hardware.
860 Since this is not possible in general when cross compiling, site information is
861 used to provide cached test results so these tests can be skipped over but
862 still make the correct values available.
863 The <filename><link linkend='structure-meta-site'>meta/site directory</link></filename>
864 contains test results sorted into different categories such as architecture, endianness, and
865 the <filename>libc</filename> used.
866 Site information provides a list of files containing data relevant to
867 the current build in the
868 <filename><link linkend='var-CONFIG_SITE'>CONFIG_SITE</link></filename> variable
869 that Autotools automatically picks up.
870 </para>
871
872 <para>
873 The class also provides variables like
874 <filename><link linkend='var-SITEINFO_ENDIANNESS'>SITEINFO_ENDIANNESS</link></filename>
875 and <filename><link linkend='var-SITEINFO_BITS'>SITEINFO_BITS</link></filename>
876 that can be used elsewhere in the metadata.
877 </para>
878
879 <para>
880 Because this class is included from <filename>base.bbclass</filename>, it is always active.
881 </para>
882</section>
883
884<section id='ref-classes-useradd'>
885 <title>Adding Users - <filename>useradd.bbclass</filename></title>
886
887 <para>
888 If you have packages that install files that are owned by custom users or groups,
889 you can use this class to specify those packages and associate the users and groups
890 with those packages.
891 The <filename>meta-skeleton/recipes-skeleton/useradd/useradd-example.bb</filename>
892 recipe in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
893 provides a simple example that shows how to add three
894 users and groups to two packages.
895 See the <filename>useradd-example.bb</filename> for more information on how to
896 use this class.
897 </para>
898</section>
899
900<section id='ref-classes-externalsrc'>
901 <title><filename>externalsrc.bbclass</filename></title>
902
903 <para>
904 You can use this class to build software from source code that is
905 external to the OpenEmbedded build system.
906 Building software from an external source tree means that the build
907 system's normal fetch, unpack, and patch process is not used.
908 </para>
909
910 <para>
911 By default, the OpenEmbedded build system uses the
912 <link linkend='var-S'><filename>S</filename></link> and
913 <link linkend='var-B'><filename>B</filename></link> variables to
914 locate unpacked recipe source code and to build it, respectively.
915 When your recipe inherits <filename>externalsrc.bbclass</filename>,
916 you use the
917 <link linkend='var-EXTERNALSRC'><filename>EXTERNALSRC</filename></link>
918 and
919 <link linkend='var-EXTERNALSRC_BUILD'><filename>EXTERNALSRC_BUILD</filename></link>
920 variables to ultimately define <filename>S</filename> and
921 <filename>B</filename>.
922 </para>
923
924 <para>
925 By default, this class expects the source code to support recipe builds
926 that use the <link linkend='var-B'><filename>B</filename></link>
927 variable to point to the directory in which the OpenEmbedded build
928 system places the generated objects built from the recipes.
929 By default, the <filename>B</filename> directory is set to the
930 following, which is separate from the source directory
931 (<filename>S</filename>):
932 <literallayout class='monospaced'>
933 ${WORKDIR}/${BPN}/{PV}/
934 </literallayout>
935 See the glossary entries for the
936 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>,
937 <link linkend='var-BPN'><filename>BPN</filename></link>,
938 <link linkend='var-PV'><filename>PV</filename></link>,
939 </para>
940
941 <para>
942 For more information on
943 <filename>externalsrc.bbclass</filename>, see the comments in
944 <filename>meta/classes/externalsrc.bbclass</filename> in the
945 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
946 For information on how to use <filename>externalsrc.bbclass</filename>,
947 see the
948 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
949 section in the Yocto Project Development Manual.
950 </para>
951</section>
952
953<section id='ref-classes-testimage'>
954 <title><filename>testimage.bbclass</filename></title>
955
956 <para>
957 You can use this class to enable running a series of automated tests
958 for images.
959 The class handles loading the tests and starting the image.
960 <note>
961 Currently, there is only support for running these tests
962 under QEMU.
963 </note>
964 </para>
965
966 <para>
967 To use the class, you need to perform steps to set up the
968 environment.
969 The tests are commands that run on the target system over
970 <filename>ssh</filename>.
971 they are written in Python and make use of the
972 <filename>unittest</filename> module.
973 </para>
974
975 <para>
976 For information on how to enable, run, and create new tests, see the
977 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
978 section.
979 </para>
980</section>
981
982<section id='ref-classes-others'>
983 <title>Other Classes</title>
984
985 <para>
986 Thus far, this chapter has discussed only the most useful and important
987 classes.
988 However, other classes exist within the <filename>meta/classes</filename> directory
989 in the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
990 You can examine the <filename>.bbclass</filename> files directly for more
991 information.
992 </para>
993</section>
994
995<!-- Undocumented classes are:
996 allarch.bbclass
997 archive*.bbclass
998 binconfig.bbclass
999 bin_package.bbclass
1000 blacklist.bbclass
1001 bootimg.bbclass
1002 boot-directdisk.bbclass
1003 bugzilla.bbclass
1004 buildhistory.bbclass
1005 buildstats.bbclass
1006 ccache.bbclass
1007 chrpath.bbclass
1008 clutter.bbclass
1009 cmake.bbclass
1010 cml1.bbclass
1011 copyleft_compliance.bbclass
1012 core-image.bbclass
1013 cross.bbclass
1014 cross-canadian.bbclass
1015 crosssdk.bbclass
1016 deploy.bbclass
1017 distrodata.bbclass
1018 distro_features_check.bbclass
1019 dummy.bbclass
1020 extrausers.bbclass
1021 fontcache.bbclass
1022 gconf.bbclass
1023 gettext.bbclass
1024 gnomebase.bbclass
1025 gnome.bbclass
1026 grub-efi.bbclass
1027 gsettings.bbclass
1028 gtk-doc.bbclass
1029 gtk-icon-cache.bbclass
1030 gtk-immodules-cache.bbclass
1031 gzipnative.bbclass
1032 icecc.bbclass
1033 image-empty.bbclass
1034 image-live.bbclass
1035 image-vmdk.bbclass
1036 image-mklibs.bbclass
1037 image-prelink.bbclass
1038 image-swab.bbclass
1039 image_types.bbclass
1040 image_types_uboot.bbclass
1041 insserv.bbclass
1042 kernel-arch.bbclass
1043 kernel-module-split.bbclass
1044 kernel-yocto.bbclass
1045 lib_package.bbclass
1046 linux-kernel-base.bbclass
1047 license.bbclass
1048 logging.bbclass
1049 meta.bbclass
1050 metadata_scm.bbclass
1051 migrate_localcount.bbclass
1052 mime.bbclass
1053 mirrors.bbclass
1054 multilib*.bbclass
1055 native.bbclass
1056 nativesdk.bbclass
1057 oelint.bbclass
1058 own-mirrors.bbclass
1059 packagedata.bbclass
1060 packageinfo.bbclass
1061 patch.bbclass
1062 perlnative.bbclass
1063 pixbufcache.bbclass
1064 pkg_distribute.bbclass
1065 pkg_metainfo.bbclass
1066 populate_sdk*.bbclass
1067 prexport.bbclass
1068 primport.bbclass
1069 prserv.bbclass
1070 ptest.bbclass
1071 python-dir.bbclass
1072 pythonnative.bbclass
1073 qemu.bbclass
1074 qmake*.bbclass
1075 qt4*.bbclass
1076 recipe_sanity.bbclass
1077 relocatable.bbclass
1078 scons.bbclass
1079 sdl.bbclass
1080 setuptools.bbclass
1081 sip.bbclass
1082 siteconfig.bbclass
1083 sourcepkg.bbclass
1084 spdx.bbclass
1085 sstate.bbclass
1086 staging.bbclass
1087 syslinux.bbclass
1088 systemd.bbclass
1089 terminal.bbclass
1090 tinderclient.bbclass
1091 toolchain-scripts.bbclass
1092 typecheck.bbclass
1093 uboot-config.bbclass
1094 utility-tasks.bbclass
1095 utils.bbclass
1096 vala.bbclass
1097 waf.bbclass
1098-->
1099
1100
1101</chapter>
1102<!--
1103vim: expandtab tw=80 ts=4
1104-->
diff --git a/documentation/ref-manual/ref-features.xml b/documentation/ref-manual/ref-features.xml
new file mode 100644
index 0000000..dedcf67
--- /dev/null
+++ b/documentation/ref-manual/ref-features.xml
@@ -0,0 +1,334 @@
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-features'>
6 <title>Reference: Features</title>
7
8 <para>
9 This chapter provides a reference of shipped machine and distro features
10 you can include as part of the image, a reference on image types you can
11 build, and a reference on feature backfilling.
12 </para>
13
14 <para>
15 Features provide a mechanism for working out which packages
16 should be included in the generated images.
17 Distributions can select which features they want to support through the
18 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
19 variable, which is set in the <filename>poky.conf</filename> distribution configuration file.
20 Machine features are set in the
21 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
22 variable, which is set in the machine configuration file and
23 specifies the hardware features for a given machine.
24 </para>
25
26 <para>
27 These two variables combine to work out which kernel modules,
28 utilities, and other packages to include.
29 A given distribution can support a selected subset of features so some machine features might not
30 be included if the distribution itself does not support them.
31 </para>
32
33 <para>
34 One method you can use to determine which recipes are checking to see if a
35 particular feature is contained or not is to <filename>grep</filename> through
36 the <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
37 for the feature.
38 Here is an example that discovers the recipes whose build is potentially
39 changed based on a given feature:
40 <literallayout class='monospaced'>
41 $ cd poky
42 $ git grep 'contains.*MACHINE_FEATURES.*&lt;feature&gt;'
43 </literallayout>
44 </para>
45
46 <section id='ref-features-distro'>
47 <title>Distro</title>
48
49 <para>
50 The items below are features you can use with
51 <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
52 Features do not have a one-to-one correspondence to packages, and they can
53 go beyond simply controlling the installation of a package or packages.
54 Sometimes a feature can influence how certain recipes are built.
55 For example, a feature might determine whether a particular configure option
56 is specified within <filename>do_configure</filename> for a particular
57 recipe.
58 </para>
59
60 <para>
61 This list only represents features as shipped with the Yocto Project metadata:
62 <itemizedlist>
63 <listitem><para><emphasis>alsa:</emphasis> Include ALSA support
64 (OSS compatibility kernel modules installed if available).
65 </para></listitem>
66 <listitem><para><emphasis>bluetooth:</emphasis> Include
67 bluetooth support (integrated BT only).</para></listitem>
68 <listitem><para><emphasis>cramfs:</emphasis> Include CramFS
69 support.</para></listitem>
70 <listitem><para><emphasis>ext2:</emphasis> Include tools for
71 supporting for devices with internal HDD/Microdrive for
72 storing files (instead of Flash only devices).
73 </para></listitem>
74 <listitem><para><emphasis>ipsec:</emphasis> Include IPSec
75 support.</para></listitem>
76 <listitem><para><emphasis>ipv6:</emphasis> Include IPv6 support.
77 </para></listitem>
78 <listitem><para><emphasis>irda:</emphasis> Include Irda support.
79 </para></listitem>
80 <listitem><para><emphasis>keyboard:</emphasis> Include keyboard
81 support (e.g. keymaps will be loaded during boot).
82 </para></listitem>
83 <listitem><para><emphasis>nfs:</emphasis> Include NFS client
84 support (for mounting NFS exports on device).
85 </para></listitem>
86 <listitem><para><emphasis>opengl:</emphasis>
87 Include the Open Graphics Library, which is a
88 cross-language, multi-platform application programming
89 interface used for rendering two and three-dimensional
90 graphics.</para></listitem>
91 <listitem><para><emphasis>pci:</emphasis> Include PCI bus
92 support.</para></listitem>
93 <listitem><para><emphasis>pcmcia:</emphasis> Include
94 PCMCIA/CompactFlash support.</para></listitem>
95 <listitem><para><emphasis>ppp:</emphasis> Include PPP dialup
96 support.</para></listitem>
97 <listitem><para><emphasis>smbfs:</emphasis> Include SMB networks
98 client support (for mounting Samba/Microsoft Windows shares
99 on device).</para></listitem>
100 <listitem><para><emphasis>systemd:</emphasis> Include support
101 for this <filename>init</filename> manager, which is a full
102 replacement of for <filename>init</filename> with parallel
103 starting of services, reduced shell overhead, and other
104 features.
105 This <filename>init</filename> manager is used by many
106 distributions.</para></listitem>
107 <listitem><para><emphasis>usbgadget:</emphasis> Include USB
108 Gadget Device support (for USB networking/serial/storage).
109 </para></listitem>
110 <listitem><para><emphasis>usbhost:</emphasis> Include USB Host
111 support (allows to connect external keyboard, mouse,
112 storage, network etc).</para></listitem>
113 <listitem><para><emphasis>wayland:</emphasis> Include the
114 Wayland display server protocol and the library that
115 supports it.</para></listitem>
116 <listitem><para><emphasis>wifi:</emphasis> Include WiFi support
117 (integrated only).</para></listitem>
118 <listitem><para><emphasis>sdk-pms:</emphasis> Include Package
119 Management Tools in the
120 <filename>nativesdk</filename> toolchain tarball.
121 Including these tools allows for easy sandbox use when
122 creating the root filesystem while using the SDK tarball.
123 </para></listitem>
124 </itemizedlist>
125 </para>
126 </section>
127
128 <section id='ref-features-machine'>
129 <title>Machine</title>
130
131 <para>
132 The items below are features you can use with
133 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>.
134 Features do not have a one-to-one correspondence to packages, and they can
135 go beyond simply controlling the installation of a package or packages.
136 Sometimes a feature can influence how certain recipes are built.
137 For example, a feature might determine whether a particular configure option
138 is specified within <filename>do_configure</filename> for a particular
139 recipe.
140 </para>
141
142 <para>
143 This feature list only represents features as shipped with the Yocto Project metadata:
144 <itemizedlist>
145 <listitem><para><emphasis>acpi:</emphasis> Hardware has ACPI (x86/x86_64 only)
146 </para></listitem>
147 <listitem><para><emphasis>alsa:</emphasis> Hardware has ALSA audio drivers
148 </para></listitem>
149 <listitem><para><emphasis>apm:</emphasis> Hardware uses APM (or APM emulation)
150 </para></listitem>
151 <listitem><para><emphasis>bluetooth:</emphasis> Hardware has integrated BT
152 </para></listitem>
153 <listitem><para><emphasis>ext2:</emphasis> Hardware HDD or Microdrive
154 </para></listitem>
155 <listitem><para><emphasis>irda:</emphasis> Hardware has Irda support
156 </para></listitem>
157 <listitem><para><emphasis>keyboard:</emphasis> Hardware has a keyboard
158 </para></listitem>
159 <listitem><para><emphasis>pci:</emphasis> Hardware has a PCI bus
160 </para></listitem>
161 <listitem><para><emphasis>pcmcia:</emphasis> Hardware has PCMCIA or CompactFlash sockets
162 </para></listitem>
163 <listitem><para><emphasis>screen:</emphasis> Hardware has a screen
164 </para></listitem>
165 <listitem><para><emphasis>serial:</emphasis> Hardware has serial support (usually RS232)
166 </para></listitem>
167 <listitem><para><emphasis>touchscreen:</emphasis> Hardware has a touchscreen
168 </para></listitem>
169 <listitem><para><emphasis>usbgadget:</emphasis> Hardware is USB gadget device capable
170 </para></listitem>
171 <listitem><para><emphasis>usbhost:</emphasis> Hardware is USB Host capable
172 </para></listitem>
173 <listitem><para><emphasis>wifi:</emphasis> Hardware has integrated WiFi
174 </para></listitem>
175 </itemizedlist>
176 </para>
177 </section>
178
179 <section id='ref-features-image'>
180 <title>Images</title>
181
182 <para>
183 The contents of images generated by the OpenEmbedded build system can be controlled by the
184 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>
185 and <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename>
186 variables that you typically configure in your image recipes.
187 Through these variables, you can add several different
188 predefined packages such as development utilities or packages with debug
189 information needed to investigate application problems or profile applications.
190 </para>
191
192 <para>
193 Current list of
194 <filename>IMAGE_FEATURES</filename> contains the following:
195 <itemizedlist>
196 <listitem><para><emphasis>dbg-pkgs:</emphasis> Installs debug symbol packages for all packages
197 installed in a given image.</para></listitem>
198 <listitem><para><emphasis>dev-pkgs:</emphasis> Installs development packages (headers and
199 extra library links) for all packages installed in a given image.</para></listitem>
200 <listitem><para><emphasis>doc-pkgs:</emphasis> Installs documentation packages for all packages
201 installed in a given image.</para></listitem>
202 <listitem><para><emphasis>nfs-server:</emphasis> Installs an NFS server.</para></listitem>
203 <listitem><para><emphasis>read-only-rootfs:</emphasis> Creates
204 an image whose root filesystem is read-only.
205 See the
206 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
207 section in the Yocto Project Development Manual for more
208 information.</para></listitem>
209 <listitem><para><emphasis>splash:</emphasis> Enables showing a splash screen during boot.
210 By default, this screen is provided by <filename>psplash</filename>, which does
211 allow customization.
212 If you prefer to use an alternative splash screen package, you can do so by
213 setting the <filename>SPLASH</filename> variable
214 to a different package name (or names) within the image recipe or at the distro
215 configuration level.</para></listitem>
216 <listitem><para><emphasis>ssh-server-dropbear:</emphasis> Installs the Dropbear minimal
217 SSH server.
218 </para></listitem>
219 <listitem><para><emphasis>ssh-server-openssh:</emphasis> Installs the OpenSSH SSH server,
220 which is more full-featured than Dropbear.
221 Note that if both the OpenSSH SSH server and the Dropbear minimal SSH server
222 are present in <filename>IMAGE_FEATURES</filename>, then OpenSSH will take
223 precedence and Dropbear will not be installed.</para></listitem>
224 <listitem><para><emphasis>staticdev-pkgs:</emphasis> Installs static development
225 packages (i.e. static libraries containing <filename>*.a</filename> files) for all
226 packages installed in a given image.</para></listitem>
227 <listitem><para><emphasis>tools-debug:</emphasis> Installs debugging tools such as
228 <filename>strace</filename> and <filename>gdb</filename>.
229 For information on GDB, see the
230 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
231 section in the Yocto Project Development Manual.
232 For information on tracing and profiling, see the
233 <ulink url='&YOCTO_DOCS_PROF_URL;'>Yocto Project Profiling and Tracing Manual</ulink>.
234 </para></listitem>
235 <listitem><para><emphasis>tools-profile:</emphasis> Installs profiling tools such as
236 <filename>oprofile</filename>, <filename>exmap</filename>, and
237 <filename>LTTng</filename>.
238 For general information on user-space tools, see the
239 "<ulink url='&YOCTO_DOCS_ADT_URL;#user-space-tools'>User-Space Tools</ulink>"
240 section in the Yocto Project Application Developer's Guide.</para></listitem>
241 <listitem><para><emphasis>tools-sdk:</emphasis> Installs a full SDK that runs on the device.
242 </para></listitem>
243 <listitem><para><emphasis>tools-testapps:</emphasis> Installs device testing tools (e.g.
244 touchscreen debugging).</para></listitem>
245 <listitem><para><emphasis>x11:</emphasis> Installs the X server</para></listitem>
246 <listitem><para><emphasis>x11-base:</emphasis> Installs the X server with a
247 minimal environment.</para></listitem>
248 <listitem><para><emphasis>x11-sato:</emphasis> Installs the OpenedHand Sato environment.
249 </para></listitem>
250 </itemizedlist>
251 </para>
252 </section>
253
254 <section id='ref-features-backfill'>
255 <title>Feature Backfilling</title>
256
257 <para>
258 Sometimes it is necessary in the OpenEmbedded build system to extend
259 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
260 or <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>
261 to control functionality that was previously enabled and not able
262 to be disabled.
263 For these cases, we need to add an
264 additional feature item to appear in one of these variables,
265 but we do not want to force developers who have existing values
266 of the variables in their configuration to add the new feature
267 in order to retain the same overall level of functionality.
268 Thus, the OpenEmbedded build system has a mechanism to
269 automatically "backfill" these added features into existing
270 distro or machine configurations.
271 You can see the list of features for which this is done by
272 finding the
273 <link linkend='var-DISTRO_FEATURES_BACKFILL'><filename>DISTRO_FEATURES_BACKFILL</filename></link>
274 and <link linkend='var-MACHINE_FEATURES_BACKFILL'><filename>MACHINE_FEATURES_BACKFILL</filename></link>
275 variables in the <filename>meta/conf/bitbake.conf</filename> file.
276 </para>
277
278 <para>
279 Because such features are backfilled by default into all
280 configurations as described in the previous paragraph, developers
281 who wish to disable the new features need to be able to selectively
282 prevent the backfilling from occurring.
283 They can do this by adding the undesired feature or features to the
284 <link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename></link>
285 or <link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename></link>
286 variables for distro features and machine features respectively.
287 </para>
288
289 <para>
290 Here are two examples to help illustrate feature backfilling:
291 <itemizedlist>
292 <listitem><para><emphasis>The "pulseaudio" distro feature option</emphasis>:
293 Previously, PulseAudio support was enabled within the Qt and
294 GStreamer frameworks.
295 Because of this, the feature is backfilled and thus
296 enabled for all distros through the
297 <filename>DISTRO_FEATURES_BACKFILL</filename>
298 variable in the <filename>meta/conf/bitbake.conf</filename> file.
299 However, your distro needs to disable the feature.
300 You can disable the feature without affecting
301 other existing distro configurations that need PulseAudio support
302 by adding "pulseaudio" to
303 <filename>DISTRO_FEATURES_BACKFILL_CONSIDERED</filename>
304 in your distro's <filename>.conf</filename> file.
305 Adding the feature to this variable when it also
306 exists in the <filename>DISTRO_FEATURES_BACKFILL</filename>
307 variable prevents the build system from adding the feature to
308 your configuration's <filename>DISTRO_FEATURES</filename>, effectively disabling
309 the feature for that particular distro.</para></listitem>
310 <listitem><para><emphasis>The "rtc" machine feature option</emphasis>:
311 Previously, real time clock (RTC) support was enabled for all
312 target devices.
313 Because of this, the feature is backfilled and thus enabled
314 for all machines through the <filename>MACHINE_FEATURES_BACKFILL</filename>
315 variable in the <filename>meta/conf/bitbake.conf</filename> file.
316 However, your target device does not have this capability.
317 You can disable RTC support for your device without
318 affecting other machines that need RTC support
319 by adding the feature to your machine's
320 <filename>MACHINE_FEATURES_BACKFILL_CONSIDERED</filename>
321 list in the machine's <filename>.conf</filename> file.
322 Adding the feature to this variable when it also
323 exists in the <filename>MACHINE_FEATURES_BACKFILL</filename>
324 variable prevents the build system from adding the feature to
325 your configuration's <filename>MACHINE_FEATURES</filename>, effectively
326 disabling RTC support for that particular machine.</para></listitem>
327 </itemizedlist>
328 </para>
329 </section>
330</chapter>
331
332<!--
333vim: expandtab tw=80 ts=4 spell spelllang=en_gb
334-->
diff --git a/documentation/ref-manual/ref-images.xml b/documentation/ref-manual/ref-images.xml
new file mode 100644
index 0000000..37c8051
--- /dev/null
+++ b/documentation/ref-manual/ref-images.xml
@@ -0,0 +1,150 @@
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-images'>
6 <title>Images</title>
7
8 <para>
9 The OpenEmbedded build system provides several example
10 images to satisfy different needs.
11 When you issue the <filename>bitbake</filename> command you provide a “top-level” recipe
12 that essentially begins the build for the type of image you want.
13 </para>
14
15 <note>
16 Building an image without GNU General Public License Version 3 (GPLv3) components
17 is only supported for minimal and base images.
18 Furthermore, if you are going to build an image using non-GPLv3 components,
19 you must make the following changes in the <filename>local.conf</filename> file
20 before using the BitBake command to build the minimal or base image:
21 <literallayout class='monospaced'>
22 1. Comment out the EXTRA_IMAGE_FEATURES line
23 2. Set INCOMPATIBLE_LICENSE = "GPLv3"
24 </literallayout>
25 </note>
26
27 <para>
28 From within the <filename>poky</filename> Git repository, use the following command to list
29 the supported images:
30 <literallayout class='monospaced'>
31 $ ls meta*/recipes*/images/*.bb
32 </literallayout>
33 These recipes reside in the <filename>meta/recipes-core/images</filename>,
34 <filename>meta/recipes-extended/images</filename>,
35 <filename>meta/recipes-graphics/images</filename>,
36 <filename>meta/recipes-qt/images</filename>,
37 <filename>meta/recipes-rt/images</filename>,
38 <filename>meta/recipes-sato/images</filename>, and
39 <filename>meta-skeleton/recipes-multilib/images</filename> directories
40 within the <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
41 Although the recipe names are somewhat explanatory, here is a list that describes them:
42 </para>
43
44 <itemizedlist>
45 <listitem><para><emphasis><filename>build-appliance-image</filename>:</emphasis>
46 An example virtual machine that contains all the pieces required to
47 run builds using the build system as well as the build system itself.
48 You can boot and run the image using either the
49 <ulink url='http://www.vmware.com/products/player/overview.html'>VMware Player</ulink>
50 or <ulink url='http://www.vmware.com/products/workstation/overview.html'>VMware Workstation</ulink>.
51 For more information on this image, see the
52 <ulink url='&YOCTO_HOME_URL;/documentation/build-appliance'>Build Appliance</ulink> page on
53 the Yocto Project website.</para></listitem>
54 <listitem><para><emphasis><filename>core-image-base</filename>:</emphasis>
55 A console-only image that fully supports the target device hardware.</para></listitem>
56 <listitem><para><emphasis><filename>core-image-minimal</filename>:</emphasis>
57 A small image just capable of allowing a device to boot.</para></listitem>
58 <listitem><para><emphasis><filename>core-image-minimal-dev</filename>:</emphasis>
59 A <filename>core-image-minimal</filename> image suitable for development work
60 using the host.
61 The image includes headers and libraries you can use in a host development
62 environment.
63 </para></listitem>
64 <listitem><para><emphasis><filename>core-image-minimal-initramfs</filename>:</emphasis>
65 A <filename>core-image-minimal</filename> image that has the Minimal RAM-based
66 Initial Root Filesystem (<filename>initramfs</filename>) as part of the kernel,
67 which allows the system to find the first “init” program more efficiently.
68 </para></listitem>
69 <listitem><para><emphasis><filename>core-image-minimal-mtdutils</filename>:</emphasis>
70 A <filename>core-image-minimal</filename> image that has support
71 for the Minimal MTD Utilities, which let the user interact with the
72 MTD subsystem in the kernel to perform operations on flash devices.
73 </para></listitem>
74 <listitem><para><emphasis><filename>core-image-basic</filename>:</emphasis>
75 A console-only image with more full-featured Linux system
76 functionality installed.</para></listitem>
77 <listitem><para><emphasis><filename>core-image-lsb</filename>:</emphasis>
78 An image that conforms to the Linux Standard Base (LSB) specification.
79 </para></listitem>
80 <listitem><para><emphasis><filename>core-image-lsb-dev</filename>:</emphasis>
81 A <filename>core-image-lsb</filename> image that is suitable for development work
82 using the host.
83 The image includes headers and libraries you can use in a host development
84 environment.
85 </para></listitem>
86 <listitem><para><emphasis><filename>core-image-lsb-sdk</filename>:</emphasis>
87 A <filename>core-image-lsb</filename> that includes everything in meta-toolchain
88 but also includes development headers and libraries to form a complete standalone SDK.
89 This image is suitable for development using the target.</para></listitem>
90 <listitem><para><emphasis><filename>core-image-clutter</filename>:</emphasis>
91 An image with support for the Open GL-based toolkit Clutter, which enables development of
92 rich and animated graphical user interfaces.</para></listitem>
93 <listitem><para><emphasis><filename>core-image-gtk-directfb</filename>:</emphasis>
94 An image that uses <filename>gtk+</filename> over <filename>directfb</filename>
95 instead of X11.
96 In order to build, this image requires specific distro configuration that enables
97 <filename>gtk</filename> over <filename>directfb</filename>.</para></listitem>
98 <listitem><para><emphasis><filename>core-image-x11</filename>:</emphasis>
99 A very basic X11 image with a terminal.
100 </para></listitem>
101 <listitem><para><emphasis><filename>qt4e-demo-image</filename>:</emphasis>
102 An image that launches into the demo application for the embedded
103 (not based on X11) version of Qt.</para></listitem>
104 <listitem><para><emphasis><filename>core-image-rt</filename>:</emphasis>
105 A <filename>core-image-minimal</filename> image plus a real-time test suite and
106 tools appropriate for real-time use.</para></listitem>
107 <listitem><para><emphasis><filename>core-image-rt-sdk</filename>:</emphasis>
108 A <filename>core-image-rt</filename> image that includes everything in
109 <filename>meta-toolchain</filename>.
110 The image also includes development headers and libraries to form a complete
111 stand-alone SDK and is suitable for development using the target.
112 </para></listitem>
113 <listitem><para><emphasis><filename>core-image-sato</filename>:</emphasis>
114 An image with Sato support, a mobile environment and visual style that works well
115 with mobile devices.
116 The image supports X11 with a Sato theme and applications such as
117 a terminal, editor, file manager, media player, and so forth.
118 </para></listitem>
119 <listitem><para><emphasis><filename>core-image-sato-dev</filename>:</emphasis>
120 A <filename>core-image-sato</filename> image suitable for development
121 using the host.
122 The image includes libraries needed to build applications on the device itself,
123 testing and profiling tools, and debug symbols.
124 This image was formerly <filename>core-image-sdk</filename>.
125 </para></listitem>
126 <listitem><para><emphasis><filename>core-image-sato-sdk</filename>:</emphasis>
127 A <filename>core-image-sato</filename> image that includes everything in meta-toolchain.
128 The image also includes development headers and libraries to form a complete standalone SDK
129 and is suitable for development using the target.</para></listitem>
130 <listitem><para><emphasis><filename>core-image-multilib-example</filename>:</emphasis>
131 An example image that includes a <filename>lib32</filename> version
132 of Bash into an otherwise standard <filename>sato</filename> image.
133 The image assumes a "lib32" multilib has been enabled in the your
134 configuration.</para></listitem>
135 </itemizedlist>
136
137 <tip>
138 From the Yocto Project release 1.1 onwards, <filename>-live</filename> and
139 <filename>-directdisk</filename> images have been replaced by a "live"
140 option in <filename>IMAGE_FSTYPES</filename> that will work with any image to produce an
141 image file that can be
142 copied directly to a CD or USB device and run as is.
143 To build a live image, simply add
144 "live" to <filename>IMAGE_FSTYPES</filename> within the <filename>local.conf</filename>
145 file or wherever appropriate and then build the desired image as normal.
146 </tip>
147</chapter>
148<!--
149vim: expandtab tw=80 ts=4
150-->
diff --git a/documentation/ref-manual/ref-manual-customization.xsl b/documentation/ref-manual/ref-manual-customization.xsl
new file mode 100644
index 0000000..3ad3a31
--- /dev/null
+++ b/documentation/ref-manual/ref-manual-customization.xsl
@@ -0,0 +1,11 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
5
6 <xsl:param name="html.stylesheet" select="'ref-style.css'" />
7 <xsl:param name="chapter.autolabel" select="1" />
8 <xsl:param name="appendix.autolabel" select="A" />
9 <xsl:param name="section.autolabel" select="1" />
10 <xsl:param name="section.label.includes.component.label" select="1" />
11</xsl:stylesheet>
diff --git a/documentation/ref-manual/ref-manual-eclipse-customization.xsl b/documentation/ref-manual/ref-manual-eclipse-customization.xsl
new file mode 100644
index 0000000..4e6b799
--- /dev/null
+++ b/documentation/ref-manual/ref-manual-eclipse-customization.xsl
@@ -0,0 +1,27 @@
1<?xml version='1.0'?>
2<xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 version="1.0">
7
8 <xsl:import
9 href="http://docbook.sourceforge.net/release/xsl/current/eclipse/eclipse3.xsl" />
10
11 <xsl:param name="chunker.output.indent" select="'yes'"/>
12 <xsl:param name="chunk.quietly" select="1"/>
13 <xsl:param name="chunk.first.sections" select="1"/>
14 <xsl:param name="chunk.section.depth" select="10"/>
15 <xsl:param name="use.id.as.filename" select="1"/>
16 <xsl:param name="ulink.target" select="'_self'" />
17 <xsl:param name="base.dir" select="'html/ref-manual/'"/>
18 <xsl:param name="html.stylesheet" select="'../book.css'"/>
19 <xsl:param name="eclipse.manifest" select="0"/>
20 <xsl:param name="create.plugin.xml" select="0"/>
21 <xsl:param name="suppress.navigation" select="1"/>
22 <xsl:param name="generate.index" select="0"/>
23 <xsl:param name="chapter.autolabel" select="1" />
24 <xsl:param name="appendix.autolabel">A</xsl:param>
25 <xsl:param name="section.autolabel" select="1" />
26 <xsl:param name="section.label.includes.component.label" select="1" />
27</xsl:stylesheet>
diff --git a/documentation/ref-manual/ref-manual.xml b/documentation/ref-manual/ref-manual.xml
new file mode 100644
index 0000000..7db880b
--- /dev/null
+++ b/documentation/ref-manual/ref-manual.xml
@@ -0,0 +1,138 @@
1<!DOCTYPE book 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<book id='ref-manual' lang='en'
6 xmlns:xi="http://www.w3.org/2003/XInclude"
7 xmlns="http://docbook.org/ns/docbook"
8 >
9 <bookinfo>
10
11 <mediaobject>
12 <imageobject>
13 <imagedata fileref='figures/poky-title.png'
14 format='SVG'
15 align='left' scalefit='1' width='100%'/>
16 </imageobject>
17 </mediaobject>
18
19 <title>
20 Yocto Project Reference Manual
21 </title>
22
23 <authorgroup>
24 <author>
25 <firstname>Richard</firstname> <surname>Purdie</surname>
26 <affiliation>
27 <orgname>Linux Foundation</orgname>
28 </affiliation>
29 <email>richard.purdie@linuxfoundation.org</email>
30 </author>
31
32 </authorgroup>
33
34 <revhistory>
35 <revision>
36 <revnumber>4.0+git</revnumber>
37 <date>24 November 2010</date>
38 <revremark>Released with the Yocto Project 0.9 Release</revremark>
39 </revision>
40 <revision>
41 <revnumber>1.0</revnumber>
42 <date>6 April 2011</date>
43 <revremark>Released with the Yocto Project 1.0 Release.</revremark>
44 </revision>
45 <revision>
46 <revnumber>1.0.1</revnumber>
47 <date>23 May 2011</date>
48 <revremark>Released with the Yocto Project 1.0.1 Release.</revremark>
49 </revision>
50 <revision>
51 <revnumber>1.1</revnumber>
52 <date>6 October 2011</date>
53 <revremark>Released with the Yocto Project 1.1 Release.</revremark>
54 </revision>
55 <revision>
56 <revnumber>1.2</revnumber>
57 <date>April 2012</date>
58 <revremark>Released with the Yocto Project 1.2 Release.</revremark>
59 </revision>
60 <revision>
61 <revnumber>1.3</revnumber>
62 <date>October 2012</date>
63 <revremark>Released with the Yocto Project 1.3 Release.</revremark>
64 </revision>
65 <revision>
66 <revnumber>1.4</revnumber>
67 <date>April 2013</date>
68 <revremark>Released with the Yocto Project 1.4 Release.</revremark>
69 </revision>
70 <revision>
71 <revnumber>1.5</revnumber>
72 <date>October 2013</date>
73 <revremark>Released with the Yocto Project 1.5 Release.</revremark>
74 </revision>
75 <revision>
76 <revnumber>1.5.1</revnumber>
77 <date>Sometime in 2013</date>
78 <revremark>Released with the Yocto Project 1.5.1 Release.</revremark>
79 </revision>
80 </revhistory>
81
82 <copyright>
83 <year>&COPYRIGHT_YEAR;</year>
84 <holder>Linux Foundation</holder>
85 </copyright>
86
87 <legalnotice>
88 <para>
89 Permission is granted to copy, distribute and/or modify this document under
90 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
91 </para>
92 <note>
93 For the latest version of this manual associated with this
94 Yocto Project release, see the
95 <ulink url='&YOCTO_DOCS_REF_URL;'>Yocto Project Reference Manual</ulink>
96 from the Yocto Project website.
97 </note>
98 </legalnotice>
99
100 </bookinfo>
101
102 <xi:include href="introduction.xml"/>
103
104 <xi:include href="usingpoky.xml"/>
105
106 <xi:include href="closer-look.xml"/>
107
108 <xi:include href="technical-details.xml"/>
109
110 <xi:include href="migration.xml"/>
111
112 <xi:include href="ref-structure.xml"/>
113
114 <xi:include href="ref-bitbake.xml"/>
115
116 <xi:include href="ref-classes.xml"/>
117
118 <xi:include href="ref-images.xml"/>
119
120 <xi:include href="ref-features.xml"/>
121
122 <xi:include href="ref-variables.xml"/>
123
124 <xi:include href="ref-varlocality.xml"/>
125
126 <xi:include href="faq.xml"/>
127
128 <xi:include href="resources.xml"/>
129
130<!-- <index id='index'>
131 <title>Index</title>
132 </index>
133-->
134
135</book>
136<!--
137vim: expandtab tw=80 ts=4
138-->
diff --git a/documentation/ref-manual/ref-structure.xml b/documentation/ref-manual/ref-structure.xml
new file mode 100644
index 0000000..66e58f2
--- /dev/null
+++ b/documentation/ref-manual/ref-structure.xml
@@ -0,0 +1,942 @@
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-structure'>
6
7<title>Source Directory Structure</title>
8
9<para>
10 The <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> consists of several components.
11 Understanding them and knowing where they are located is key to using the Yocto Project well.
12 This chapter describes the Source Directory and gives information about the various
13 files and directories.
14</para>
15
16<para>
17 For information on how to establish a local Source Directory on your development system, see the
18 "<ulink url='&YOCTO_DOCS_DEV_URL;#getting-setup'>Getting Set Up</ulink>"
19 section in the Yocto Project Development Manual.
20</para>
21
22<note>
23 The OpenEmbedded build system does not support file or directory names that
24 contain spaces.
25 Be sure that the Source Directory you use does not contain these types
26 of names.
27</note>
28
29<section id='structure-core'>
30 <title>Top-Level Core Components</title>
31
32 <para>
33 This section describes the top-level components of the
34 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
35 </para>
36
37 <section id='structure-core-bitbake'>
38 <title><filename>bitbake/</filename></title>
39
40 <para>
41 This directory includes a copy of BitBake for ease of use.
42 The copy usually matches the current stable BitBake release from
43 the BitBake project.
44 BitBake, a
45 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
46 interpreter, reads the Yocto Project Metadata and runs the tasks
47 defined by that data.
48 Failures are usually from the Metadata and not from BitBake itself.
49 Consequently, most users do not need to worry about BitBake.
50 </para>
51
52 <para>
53 When you run the <filename>bitbake</filename> command, the
54 main BitBake executable, which resides in the
55 <filename>bitbake/bin/</filename> directory, starts.
56 Sourcing an environment setup script (e.g.
57 <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
58 or
59 <link linkend="structure-memres-core-script"><filename>oe-init-build-env-memres</filename></link>)
60 places the <filename>scripts</filename> and
61 <filename>bitbake/bin</filename> directories (in that order) into
62 the shell's <filename>PATH</filename> environment variable.
63 </para>
64
65 <para>
66 For more information on BitBake, see the BitBake documentation
67 included in the <filename>bitbake/doc/manual</filename> directory of the
68 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
69 </para>
70 </section>
71
72 <section id='structure-core-build'>
73 <title><filename>build/</filename></title>
74
75 <para>
76 This directory contains user configuration files and the output
77 generated by the OpenEmbedded build system in its standard configuration where
78 the source tree is combined with the output.
79 The <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
80 is created initially when you <filename>source</filename>
81 the OpenEmbedded build environment setup script
82 (i.e.
83 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
84 or
85 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
86 </para>
87
88 <para>
89 It is also possible to place output and configuration
90 files in a directory separate from the
91 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
92 by providing a directory name when you <filename>source</filename>
93 the setup script.
94 For information on separating output from your local
95 Source Directory files, see the
96 "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
97 and
98 "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
99 sections.
100 </para>
101 </section>
102
103 <section id='handbook'>
104 <title><filename>documentation/</filename></title>
105
106 <para>
107 This directory holds the source for the Yocto Project documentation
108 as well as templates and tools that allow you to generate PDF and HTML
109 versions of the manuals.
110 Each manual is contained in a sub-folder.
111 For example, the files for this manual reside in
112 the <filename>ref-manual/</filename> directory.
113 </para>
114 </section>
115
116 <section id='structure-core-meta'>
117 <title><filename>meta/</filename></title>
118
119 <para>
120 This directory contains the OpenEmbedded Core metadata.
121 The directory holds recipes, common classes, and machine
122 configuration for emulated targets (<filename>qemux86</filename>,
123 <filename>qemuarm</filename>, and so forth.)
124 </para>
125 </section>
126
127 <section id='structure-core-meta-yocto'>
128 <title><filename>meta-yocto/</filename></title>
129
130 <para>
131 This directory contains the configuration for the Poky
132 reference distribution.
133 </para>
134 </section>
135
136 <section id='structure-core-meta-yocto-bsp'>
137 <title><filename>meta-yocto-bsp/</filename></title>
138
139 <para>
140 This directory contains the Yocto Project reference
141 hardware Board Support Packages (BSPs).
142 For more information on BSPs, see the
143 <ulink url='&YOCTO_DOCS_BSP_URL;'>Yocto Project Board Support
144 Package (BSP) Developer's Guide</ulink>.
145 </para>
146 </section>
147
148 <section id='structure-meta-hob'>
149 <title><filename>meta-hob/</filename></title>
150
151 <para>
152 This directory contains template recipes used by Hob,
153 which is a Yocto Project build user interface.
154 For more information on the Hob, see the
155 <ulink url='&YOCTO_HOME_URL;/tools-resources/projects/hob'>Hob Project</ulink>
156 web page.
157 </para>
158 </section>
159
160 <section id='structure-meta-skeleton'>
161 <title><filename>meta-skeleton/</filename></title>
162
163 <para>
164 This directory contains template recipes for BSP and kernel development.
165 </para>
166 </section>
167
168 <section id='structure-core-scripts'>
169 <title><filename>scripts/</filename></title>
170
171 <para>
172 This directory contains various integration scripts that implement
173 extra functionality in the Yocto Project environment (e.g. QEMU scripts).
174 The <link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>
175 and
176 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
177 scripts append this directory to the shell's
178 <filename>PATH</filename> environment variable.
179 </para>
180
181 <para>
182 The <filename>scripts</filename> directory has useful scripts that assist in contributing
183 back to the Yocto Project, such as <filename>create-pull-request</filename> and
184 <filename>send-pull-request</filename>.
185 </para>
186 </section>
187
188 <section id='structure-core-script'>
189 <title><filename>&OE_INIT_FILE;</filename></title>
190
191 <para>
192 This script is one of two scripts that set up the OpenEmbedded build
193 environment.
194 For information on the other script, see the
195 "<link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>"
196 section.
197 </para>
198
199 <para>
200 Running this script with the <filename>source</filename> command in
201 a shell makes changes to <filename>PATH</filename> and sets other
202 core BitBake variables based on the current working directory.
203 You need to run an environment setup script before running BitBake
204 commands.
205 The script uses other scripts within the
206 <filename>scripts</filename> directory to do the bulk of the work.
207 </para>
208
209 <para>
210 By default, running this script without a
211 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
212 argument creates the <filename>build</filename> directory
213 in your current working directory.
214 If you provide a Build Directory argument when you
215 <filename>source</filename> the script, you direct the OpenEmbedded
216 build system to create a Build Directory of your choice.
217 For example, the following command creates a Build Directory named
218 <filename>mybuilds</filename> that is outside of the
219 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
220 <literallayout class='monospaced'>
221 $ source &OE_INIT_FILE; ~/mybuilds
222 </literallayout>
223 <note>
224 The OpenEmbedded build system does not support file or directory names that
225 contain spaces.
226 If you attempt to run the <filename>&OE_INIT_FILE;</filename> script
227 from a Source Directory that contains spaces in either the filenames
228 or directory names, the script returns an error indicating no such
229 file or directory.
230 Be sure to use a Source Directory free of names containing spaces.
231 </note>
232 </para>
233 </section>
234
235 <section id='structure-memres-core-script'>
236 <title><filename>oe-init-build-env-memres</filename></title>
237
238 <para>
239 This script is one of two scripts that set up the OpenEmbedded
240 build environment.
241 Aside from setting up the environment, this script starts a
242 memory-resident BitBake server.
243 For information on the other setup script, see the
244 "<link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>"
245 section.
246 </para>
247
248 <para>
249 Memory-resident BitBake resides in memory until you specifically
250 remove it using the following BitBake command:
251 <literallayout class='monospaced'>
252 $ bitbake -m
253 </literallayout>
254 </para>
255
256 <para>
257 Running this script with the <filename>source</filename> command in
258 a shell makes changes to <filename>PATH</filename> and sets other
259 core BitBake variables based on the current working directory.
260 One of these variables is the
261 <link linkend='var-BBSERVER'><filename>BBSERVER</filename></link>
262 variable, which allows the OpenEmbedded build system to locate
263 the server that is running BitBake.
264 </para>
265
266 <para>
267 You need to run an environment setup script before using BitBake
268 commands.
269 Following is the script syntax:
270 <literallayout class='monospaced'>
271 $ source oe-init-build-env-memres &lt;port_number&gt; &lt;build_dir&gt;
272 </literallayout>
273 The script uses other scripts within the
274 <filename>scripts</filename> directory to do the bulk of the work.
275 </para>
276
277 <para>
278 If you do not provide a port number with the script, the
279 BitBake server at port "12345" is started.
280 </para>
281
282 <para>
283 By default, running this script without a
284 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
285 argument creates a build directory named
286 <filename>build</filename>.
287 If you provide a Build Directory argument when you
288 <filename>source</filename> the script, the Build Directory is
289 created using that name.
290 For example, the following command starts the BitBake server using
291 the default port "12345" and creates a Build Directory named
292 <filename>mybuilds</filename> that is outside of the
293 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
294 <literallayout class='monospaced'>
295 $ source oe-init-build-env-memres ~/mybuilds
296 </literallayout>
297 <note>
298 The OpenEmbedded build system does not support file or
299 directory names that contain spaces.
300 If you attempt to run the
301 <filename>oe-init-build-env-memres</filename> script
302 from a Source Directory that contains spaces in either the
303 filenames or directory names, the script returns an error
304 indicating no such file or directory.
305 Be sure to use a Source Directory free of names containing
306 spaces.
307 </note>
308 </para>
309 </section>
310
311 <section id='structure-basic-top-level'>
312 <title><filename>LICENSE, README, and README.hardware</filename></title>
313
314 <para>
315 These files are standard top-level files.
316 </para>
317 </section>
318</section>
319
320<section id='structure-build'>
321 <title>The Build Directory - <filename>build/</filename></title>
322
323 <para>
324 The OpenEmbedded build system creates the
325 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
326 during the build.
327 By default, this directory is named <filename>build</filename>.
328 </para>
329
330 <section id='structure-build-conf-local.conf'>
331 <title><filename>build/conf/local.conf</filename></title>
332
333 <para>
334 This configuration file contains all the local user configurations
335 for your build environment.
336 The <filename>local.conf</filename> file contains documentation on
337 the various configuration options.
338 Any variable set here overrides any variable set elsewhere within
339 the environment unless that variable is hard-coded within a file
340 (e.g. by using '=' instead of '?=').
341 Some variables are hard-coded for various reasons but these
342 variables are relatively rare.
343 </para>
344
345 <para>
346 Edit this file to set the
347 <filename><link linkend='var-MACHINE'>MACHINE</link></filename>
348 for which you want to build, which package types you wish to use
349 (<link linkend='var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></link>),
350 the location from which you want to access downloaded files
351 (<filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>),
352 and how you want your host machine to use resources
353 (<link linkend='var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></link>
354 and
355 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>).
356 </para>
357
358 <para>
359 If <filename>local.conf</filename> is not present when you
360 start the build, the OpenEmbedded build system creates it from
361 <filename>local.conf.sample</filename> when
362 you <filename>source</filename> the top-level build environment
363 setup script (i.e.
364 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
365 or
366 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
367 </para>
368
369 <para>
370 The source <filename>local.conf.sample</filename> file used
371 depends on the <filename>$TEMPLATECONF</filename> script variable,
372 which defaults to <filename>meta-yocto/conf</filename>
373 when you are building from the Yocto Project development
374 environment and defaults to <filename>meta/conf</filename> when
375 you are building from the OpenEmbedded Core environment.
376 Because the script variable points to the source of the
377 <filename>local.conf.sample</filename> file, this implies that
378 you can configure your build environment from any layer by setting
379 the variable in the top-level build environment setup script as
380 follows:
381 <literallayout class='monospaced'>
382 TEMPLATECONF=&lt;your_layer&gt;/conf
383 </literallayout>
384 Once the build process gets the sample file, it uses
385 <filename>sed</filename> to substitute final
386 <filename>${</filename><link linkend='var-OEROOT'><filename>OEROOT</filename></link><filename>}</filename>
387 values for all <filename>##OEROOT##</filename> values.
388 <note>
389 You can see how the <filename>TEMPLATECONF</filename> variable
390 is used by looking at the
391 <filename>scripts/oe-setup-builddir</filename> script in the
392 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
393 You can find the Yocto Project version of the
394 <filename>local.conf.sample</filename> file in the
395 <filename>meta-yocto/conf</filename> directory.
396 </note>
397 </para>
398 </section>
399
400 <section id='structure-build-conf-bblayers.conf'>
401 <title><filename>build/conf/bblayers.conf</filename></title>
402
403 <para>
404 This configuration file defines
405 <ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>layers</ulink>,
406 which are directory trees, traversed (or walked) by BitBake.
407 The <filename>bblayers.conf</filename> file uses the
408 <link linkend='var-BBLAYERS'><filename>BBLAYERS</filename></link>
409 variable to list the layers BitBake tries to find, and uses the
410 <link linkend='var-BBLAYERS_NON_REMOVABLE'><filename>BBLAYERS_NON_REMOVABLE</filename></link>
411 variable to list layers that must not be removed.
412 </para>
413
414 <para>
415 If <filename>bblayers.conf</filename> is not present when you
416 start the build, the OpenEmbedded build system creates it from
417 <filename>bblayers.conf.sample</filename> when
418 you <filename>source</filename> the top-level build environment
419 setup script (i.e.
420 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
421 or
422 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
423 </para>
424
425 <para>
426 The source <filename>bblayers.conf.sample</filename> file used
427 depends on the <filename>$TEMPLATECONF</filename> script variable,
428 which defaults to <filename>meta-yocto/conf</filename>
429 when you are building from the Yocto Project development
430 environment and defaults to <filename>meta/conf</filename> when
431 you are building from the OpenEmbedded Core environment.
432 Because the script variable points to the source of the
433 <filename>bblayers.conf.sample</filename> file, this implies that
434 you can base your build from any layer by setting the variable in
435 the top-level build environment setup script as follows:
436 <literallayout class='monospaced'>
437 TEMPLATECONF=&lt;your_layer&gt;/conf
438 </literallayout>
439 Once the build process gets the sample file, it uses
440 <filename>sed</filename> to substitute final
441 <filename>${</filename><link linkend='var-OEROOT'><filename>OEROOT</filename></link><filename>}</filename>
442 values for all <filename>##OEROOT##</filename> values.
443 <note>
444 You can see how the <filename>TEMPLATECONF</filename> variable
445 <filename>scripts/oe-setup-builddir</filename> script in the
446 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
447 You can find the Yocto Project version of the
448 <filename>bblayers.conf.sample</filename> file in the
449 <filename>meta-yocto/conf</filename> directory.
450 </note>
451 </para>
452 </section>
453
454 <section id='structure-build-conf-sanity_info'>
455 <title><filename>build/conf/sanity_info</filename></title>
456
457 <para>
458 This file indicates the state of the sanity checks and is created
459 during the build.
460 </para>
461 </section>
462
463 <section id='structure-build-downloads'>
464 <title><filename>build/downloads/</filename></title>
465
466 <para>
467 This directory contains downloaded upstream source tarballs.
468 You can reuse the directory for multiple builds or move
469 the directory to another location.
470 You can control the location of this directory through the
471 <filename><link linkend='var-DL_DIR'>DL_DIR</link></filename> variable.
472 </para>
473 </section>
474
475 <section id='structure-build-sstate-cache'>
476 <title><filename>build/sstate-cache/</filename></title>
477
478 <para>
479 This directory contains the shared state cache.
480 You can reuse the directory for multiple builds or move
481 the directory to another location.
482 You can control the location of this directory through the
483 <filename><link linkend='var-SSTATE_DIR'>SSTATE_DIR</link></filename> variable.
484 </para>
485 </section>
486
487 <section id='structure-build-tmp'>
488 <title><filename>build/tmp/</filename></title>
489
490 <para>
491 This directory receives all of the OpenEmbedded build system's output.
492 BitBake creates this directory if it does not exist.
493 As a last resort, to clean up a build and start it from scratch (other than the downloads),
494 you can remove everything in the <filename>tmp</filename> directory or get rid of the
495 directory completely.
496 If you do, you should also completely remove the
497 <filename>build/sstate-cache</filename> directory.
498 </para>
499 </section>
500
501 <section id='structure-build-tmp-buildstats'>
502 <title><filename>build/tmp/buildstats/</filename></title>
503
504 <para>
505 This directory stores the build statistics.
506 </para>
507 </section>
508
509 <section id='structure-build-tmp-cache'>
510 <title><filename>build/tmp/cache/</filename></title>
511
512 <para>
513 When BitBake parses the metadata, it creates a cache file of the result that can
514 be used when subsequently running commands.
515 BitBake stores these results here on a per-machine basis.
516 </para>
517 </section>
518
519 <section id='structure-build-tmp-deploy'>
520 <title><filename>build/tmp/deploy/</filename></title>
521
522 <para>
523 This directory contains any "end result" output from the
524 OpenEmbedded build process.
525 The <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
526 variable points to this directory.
527 For more detail on the contents of the <filename>deploy</filename>
528 directory, see the
529 "<link linkend='images-dev-environment'>Images</link>" and
530 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
531 sections.
532 </para>
533 </section>
534
535 <section id='structure-build-tmp-deploy-deb'>
536 <title><filename>build/tmp/deploy/deb/</filename></title>
537
538 <para>
539 This directory receives any <filename>.deb</filename> packages produced by
540 the build process.
541 The packages are sorted into feeds for different architecture types.
542 </para>
543 </section>
544
545 <section id='structure-build-tmp-deploy-rpm'>
546 <title><filename>build/tmp/deploy/rpm/</filename></title>
547
548 <para>
549 This directory receives any <filename>.rpm</filename> packages produced by
550 the build process.
551 The packages are sorted into feeds for different architecture types.
552 </para>
553 </section>
554
555 <section id='structure-build-tmp-deploy-ipk'>
556 <title><filename>build/tmp/deploy/ipk/</filename></title>
557
558 <para>
559 This directory receives <filename>.ipk</filename> packages produced by
560 the build process.
561 </para>
562 </section>
563
564 <section id='structure-build-tmp-deploy-licenses'>
565 <title><filename>build/tmp/deploy/licenses/</filename></title>
566
567 <para>
568 This directory receives package licensing information.
569 For example, the directory contains sub-directories for <filename>bash</filename>,
570 <filename>busybox</filename>, and <filename>eglibc</filename> (among others) that in turn
571 contain appropriate <filename>COPYING</filename> license files with other licensing information.
572 For information on licensing, see the
573 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</ulink>"
574 section.
575 </para>
576 </section>
577
578 <section id='structure-build-tmp-deploy-images'>
579 <title><filename>build/tmp/deploy/images/</filename></title>
580
581 <para>
582 This directory receives complete filesystem images.
583 If you want to flash the resulting image from a build onto a device, look here for the image.
584 </para>
585
586 <para>
587 Be careful when deleting files in this directory.
588 You can safely delete old images from this directory (e.g.
589 <filename>core-image-*</filename>, <filename>hob-image-*</filename>,
590 etc.).
591 However, the kernel (<filename>*zImage*</filename>, <filename>*uImage*</filename>, etc.),
592 bootloader and other supplementary files might be deployed here prior to building an
593 image.
594 Because these files are not directly produced from the image, if you
595 delete them they will not be automatically re-created when you build the image again.
596 </para>
597
598 <para>
599 If you do accidentally delete files here, you will need to force them to be
600 re-created.
601 In order to do that, you will need to know the target that produced them.
602 For example, these commands rebuild and re-create the kernel files:
603 <literallayout class='monospaced'>
604 $ bitbake -c clean virtual/kernel
605 $ bitbake virtual/kernel
606 </literallayout>
607 </para>
608 </section>
609
610 <section id='structure-build-tmp-sysroots'>
611 <title><filename>build/tmp/sysroots/</filename></title>
612
613 <para>
614 This directory contains shared header files and libraries as well as other shared
615 data.
616 Packages that need to share output with other packages do so within this directory.
617 The directory is subdivided by architecture so multiple builds can run within
618 the one Build Directory.
619 </para>
620 </section>
621
622 <section id='structure-build-tmp-stamps'>
623 <title><filename>build/tmp/stamps/</filename></title>
624
625 <para>
626 This directory holds information that BitBake uses for accounting purposes
627 to track what tasks have run and when they have run.
628 The directory is sub-divided by architecture, package name, and
629 version.
630 Following is an example:
631 <literallayout class='monospaced'>
632 stamps/all-poky-linux/distcc-config/1.0-r0.do_build-2fdd....2do
633 </literallayout>
634 Although the files in the directory are empty of data,
635 BitBake uses the filenames and timestamps for tracking purposes.
636 </para>
637 </section>
638
639 <section id='structure-build-tmp-log'>
640 <title><filename>build/tmp/log/</filename></title>
641
642 <para>
643 This directory contains general logs that are not otherwise placed using the
644 package's <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
645 Examples of logs are the output from the <filename>check_pkg</filename> or
646 <filename>distro_check</filename> tasks.
647 Running a build does not necessarily mean this directory is created.
648 </para>
649 </section>
650
651 <section id='structure-build-tmp-work'>
652 <title><filename>build/tmp/work/</filename></title>
653
654 <para>
655 This directory contains architecture-specific work sub-directories
656 for packages built by BitBake.
657 All tasks execute from the appropriate work directory.
658 For example, the source for a particular package is unpacked,
659 patched, configured and compiled all within its own work directory.
660 Within the work directory, organization is based on the package group
661 and version for which the source is being compiled
662 as defined by the
663 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
664 </para>
665
666 <para>
667 It is worth considering the structure of a typical work directory.
668 As an example, consider <filename>linux-yocto-kernel-3.0</filename>
669 on the machine <filename>qemux86</filename>
670 built within the Yocto Project.
671 For this package, a work directory of
672 <filename>tmp/work/qemux86-poky-linux/linux-yocto/3.0+git1+&lt;.....&gt;</filename>,
673 referred to as the
674 <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>, is created.
675 Within this directory, the source is unpacked to
676 <filename>linux-qemux86-standard-build</filename> and then patched by Quilt.
677 (See the
678 "<ulink url='&YOCTO_DOCS_DEV_URL;#using-a-quilt-workflow'>Using a Quilt Flow</ulink>"
679 section in the Yocto Project Development Manual for more information.)
680 Within the <filename>linux-qemux86-standard-build</filename> directory,
681 standard Quilt directories <filename>linux-3.0/patches</filename>
682 and <filename>linux-3.0/.pc</filename> are created,
683 and standard Quilt commands can be used.
684 </para>
685
686 <para>
687 There are other directories generated within <filename>WORKDIR</filename>.
688 The most important directory is <filename>WORKDIR/temp/</filename>,
689 which has log files for each task (<filename>log.do_*.pid</filename>)
690 and contains the scripts BitBake runs for each task
691 (<filename>run.do_*.pid</filename>).
692 The <filename>WORKDIR/image/</filename> directory is where "make
693 install" places its output that is then split into sub-packages
694 within <filename>WORKDIR/packages-split/</filename>.
695 </para>
696 </section>
697</section>
698
699<section id='structure-meta'>
700 <title>The Metadata - <filename>meta/</filename></title>
701
702 <para>
703 As mentioned previously,
704 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> is the core
705 of the Yocto Project.
706 Metadata has several important subdivisions:
707 </para>
708
709 <section id='structure-meta-classes'>
710 <title><filename>meta/classes/</filename></title>
711
712 <para>
713 This directory contains the <filename>*.bbclass</filename> files.
714 Class files are used to abstract common code so it can be reused by multiple
715 packages.
716 Every package inherits the <filename>base.bbclass</filename> file.
717 Examples of other important classes are <filename>autotools.bbclass</filename>, which
718 in theory allows any Autotool-enabled package to work with the Yocto Project with minimal effort.
719 Another example is <filename>kernel.bbclass</filename> that contains common code and functions
720 for working with the Linux kernel.
721 Functions like image generation or packaging also have their specific class files
722 such as <filename>image.bbclass</filename>, <filename>rootfs_*.bbclass</filename> and
723 <filename>package*.bbclass</filename>.
724 </para>
725
726 <para>
727 For reference information on classes, see the
728 "<link linkend='ref-classes'>Classes</link>" chapter.
729 </para>
730 </section>
731
732 <section id='structure-meta-conf'>
733 <title><filename>meta/conf/</filename></title>
734
735 <para>
736 This directory contains the core set of configuration files that start from
737 <filename>bitbake.conf</filename> and from which all other configuration
738 files are included.
739 See the include statements at the end of the
740 <filename>bitbake.conf</filename> file and you will note that even
741 <filename>local.conf</filename> is loaded from there.
742 While <filename>bitbake.conf</filename> sets up the defaults, you can often override
743 these by using the (<filename>local.conf</filename>) file, machine file or
744 the distribution configuration file.
745 </para>
746 </section>
747
748 <section id='structure-meta-conf-machine'>
749 <title><filename>meta/conf/machine/</filename></title>
750
751 <para>
752 This directory contains all the machine configuration files.
753 If you set <filename>MACHINE = "qemux86"</filename>,
754 the OpenEmbedded build system looks for a <filename>qemux86.conf</filename> file in this
755 directory.
756 The <filename>include</filename> directory contains various data common to multiple machines.
757 If you want to add support for a new machine to the Yocto Project, look in this directory.
758 </para>
759 </section>
760
761 <section id='structure-meta-conf-distro'>
762 <title><filename>meta/conf/distro/</filename></title>
763
764 <para>
765 The contents of this directory controls any distribution-specific
766 configurations.
767 For the Yocto Project, the <filename>defaultsetup.conf</filename> is the main file here.
768 This directory includes the versions and the
769 <filename>SRCDATE</filename> definitions for applications that are configured here.
770 An example of an alternative configuration might be <filename>poky-bleeding.conf</filename>.
771 Although this file mainly inherits its configuration from Poky.
772 </para>
773 </section>
774
775 <section id='structure-meta-files'>
776 <title><filename>meta/files/</filename></title>
777
778 <para>
779 This directory contains common license files and several text files
780 used by the build system.
781 The text files contain minimal device information and
782 lists of files and directories with knows permissions.
783 </para>
784 </section>
785
786 <section id='structure-meta-lib'>
787 <title><filename>meta/lib/</filename></title>
788
789 <para>
790 This directory contains OpenEmbedded Python library code
791 used during the build process.
792 </para>
793 </section>
794
795 <section id='structure-meta-recipes-bsp'>
796 <title><filename>meta/recipes-bsp/</filename></title>
797
798 <para>
799 This directory contains anything linking to specific hardware or hardware
800 configuration information such as "u-boot" and "grub".
801 </para>
802 </section>
803
804 <section id='structure-meta-recipes-connectivity'>
805 <title><filename>meta/recipes-connectivity/</filename></title>
806
807 <para>
808 This directory contains libraries and applications related to communication with other devices.
809 </para>
810 </section>
811
812 <section id='structure-meta-recipes-core'>
813 <title><filename>meta/recipes-core/</filename></title>
814
815 <para>
816 This directory contains what is needed to build a basic working Linux image
817 including commonly used dependencies.
818 </para>
819 </section>
820
821 <section id='structure-meta-recipes-devtools'>
822 <title><filename>meta/recipes-devtools/</filename></title>
823
824 <para>
825 This directory contains tools that are primarily used by the build system.
826 The tools, however, can also be used on targets.
827 </para>
828 </section>
829
830 <section id='structure-meta-recipes-extended'>
831 <title><filename>meta/recipes-extended/</filename></title>
832
833 <para>
834 This directory contains non-essential applications that add features compared to the
835 alternatives in core.
836 You might need this directory for full tool functionality or for Linux Standard Base (LSB)
837 compliance.
838 </para>
839 </section>
840
841 <section id='structure-meta-recipes-gnome'>
842 <title><filename>meta/recipes-gnome/</filename></title>
843
844 <para>
845 This directory contains all things related to the GTK+ application framework.
846 </para>
847 </section>
848
849 <section id='structure-meta-recipes-graphics'>
850 <title><filename>meta/recipes-graphics/</filename></title>
851
852 <para>
853 This directory contains X and other graphically related system libraries
854 </para>
855 </section>
856
857 <section id='structure-meta-recipes-kernel'>
858 <title><filename>meta/recipes-kernel/</filename></title>
859
860 <para>
861 This directory contains the kernel and generic applications and libraries that
862 have strong kernel dependencies.
863 </para>
864 </section>
865
866 <section id='structure-meta-recipes-lsb4'>
867 <title><filename>meta/recipes-lsb4/</filename></title>
868
869 <para>
870 This directory contains recipes specifically added to support
871 the Linux Standard Base (LSB) version 4.x.
872 </para>
873 </section>
874
875 <section id='structure-meta-recipes-multimedia'>
876 <title><filename>meta/recipes-multimedia/</filename></title>
877
878 <para>
879 This directory contains codecs and support utilities for audio, images and video.
880 </para>
881 </section>
882
883 <section id='structure-meta-recipes-qt'>
884 <title><filename>meta/recipes-qt/</filename></title>
885
886 <para>
887 This directory contains all things related to the Qt application framework.
888 </para>
889 </section>
890
891 <section id='structure-meta-recipes-rt'>
892 <title><filename>meta/recipes-rt/</filename></title>
893
894 <para>
895 This directory contains package and image recipes for using and testing
896 the <filename>PREEMPT_RT</filename> kernel.
897 </para>
898 </section>
899
900 <section id='structure-meta-recipes-sato'>
901 <title><filename>meta/recipes-sato/</filename></title>
902
903 <para>
904 This directory contains the Sato demo/reference UI/UX and its associated applications
905 and configuration data.
906 </para>
907 </section>
908
909 <section id='structure-meta-recipes-support'>
910 <title><filename>meta/recipes-support/</filename></title>
911
912 <para>
913 This directory contains recipes used by other recipes, but that are
914 not directly included in images (i.e. dependencies of other
915 recipes).
916 </para>
917 </section>
918
919 <section id='structure-meta-site'>
920 <title><filename>meta/site/</filename></title>
921
922 <para>
923 This directory contains a list of cached results for various architectures.
924 Because certain "autoconf" test results cannot be determined when cross-compiling due to
925 the tests not able to run on a live system, the information in this directory is
926 passed to "autoconf" for the various architectures.
927 </para>
928 </section>
929
930 <section id='structure-meta-recipes-txt'>
931 <title><filename>meta/recipes.txt</filename></title>
932
933 <para>
934 This file is a description of the contents of <filename>recipes-*</filename>.
935 </para>
936 </section>
937</section>
938
939</chapter>
940<!--
941vim: expandtab tw=80 ts=4
942-->
diff --git a/documentation/ref-manual/ref-style.css b/documentation/ref-manual/ref-style.css
new file mode 100644
index 0000000..e896a39
--- /dev/null
+++ b/documentation/ref-manual/ref-style.css
@@ -0,0 +1,979 @@
1/*
2 Generic XHTML / DocBook XHTML CSS Stylesheet.
3
4 Browser wrangling and typographic design by
5 Oyvind Kolas / pippin@gimp.org
6
7 Customised for Poky by
8 Matthew Allum / mallum@o-hand.com
9
10 Thanks to:
11 Liam R. E. Quin
12 William Skaggs
13 Jakub Steiner
14
15 Structure
16 ---------
17
18 The stylesheet is divided into the following sections:
19
20 Positioning
21 Margins, paddings, width, font-size, clearing.
22 Decorations
23 Borders, style
24 Colors
25 Colors
26 Graphics
27 Graphical backgrounds
28 Nasty IE tweaks
29 Workarounds needed to make it work in internet explorer,
30 currently makes the stylesheet non validating, but up until
31 this point it is validating.
32 Mozilla extensions
33 Transparency for footer
34 Rounded corners on boxes
35
36*/
37
38
39 /*************** /
40 / Positioning /
41/ ***************/
42
43body {
44 font-family: Verdana, Sans, sans-serif;
45
46 min-width: 640px;
47 width: 80%;
48 margin: 0em auto;
49 padding: 2em 5em 5em 5em;
50 color: #333;
51}
52
53h1,h2,h3,h4,h5,h6,h7 {
54 font-family: Arial, Sans;
55 color: #00557D;
56 clear: both;
57}
58
59h1 {
60 font-size: 2em;
61 text-align: left;
62 padding: 0em 0em 0em 0em;
63 margin: 2em 0em 0em 0em;
64}
65
66h2.subtitle {
67 margin: 0.10em 0em 3.0em 0em;
68 padding: 0em 0em 0em 0em;
69 font-size: 1.8em;
70 padding-left: 20%;
71 font-weight: normal;
72 font-style: italic;
73}
74
75h2 {
76 margin: 2em 0em 0.66em 0em;
77 padding: 0.5em 0em 0em 0em;
78 font-size: 1.5em;
79 font-weight: bold;
80}
81
82h3.subtitle {
83 margin: 0em 0em 1em 0em;
84 padding: 0em 0em 0em 0em;
85 font-size: 142.14%;
86 text-align: right;
87}
88
89h3 {
90 margin: 1em 0em 0.5em 0em;
91 padding: 1em 0em 0em 0em;
92 font-size: 140%;
93 font-weight: bold;
94}
95
96h4 {
97 margin: 1em 0em 0.5em 0em;
98 padding: 1em 0em 0em 0em;
99 font-size: 120%;
100 font-weight: bold;
101}
102
103h5 {
104 margin: 1em 0em 0.5em 0em;
105 padding: 1em 0em 0em 0em;
106 font-size: 110%;
107 font-weight: bold;
108}
109
110h6 {
111 margin: 1em 0em 0em 0em;
112 padding: 1em 0em 0em 0em;
113 font-size: 110%;
114 font-weight: bold;
115}
116
117.authorgroup {
118 background-color: transparent;
119 background-repeat: no-repeat;
120 padding-top: 256px;
121 background-image: url("figures/poky-title.png");
122 background-position: left top;
123 margin-top: -256px;
124 padding-right: 50px;
125 margin-left: 0px;
126 text-align: right;
127 width: 740px;
128}
129
130h3.author {
131 margin: 0em 0me 0em 0em;
132 padding: 0em 0em 0em 0em;
133 font-weight: normal;
134 font-size: 100%;
135 color: #333;
136 clear: both;
137}
138
139.author tt.email {
140 font-size: 66%;
141}
142
143.titlepage hr {
144 width: 0em;
145 clear: both;
146}
147
148.revhistory {
149 padding-top: 2em;
150 clear: both;
151}
152
153.toc,
154.list-of-tables,
155.list-of-examples,
156.list-of-figures {
157 padding: 1.33em 0em 2.5em 0em;
158 color: #00557D;
159}
160
161.toc p,
162.list-of-tables p,
163.list-of-figures p,
164.list-of-examples p {
165 padding: 0em 0em 0em 0em;
166 padding: 0em 0em 0.3em;
167 margin: 1.5em 0em 0em 0em;
168}
169
170.toc p b,
171.list-of-tables p b,
172.list-of-figures p b,
173.list-of-examples p b{
174 font-size: 100.0%;
175 font-weight: bold;
176}
177
178.toc dl,
179.list-of-tables dl,
180.list-of-figures dl,
181.list-of-examples dl {
182 margin: 0em 0em 0.5em 0em;
183 padding: 0em 0em 0em 0em;
184}
185
186.toc dt {
187 margin: 0em 0em 0em 0em;
188 padding: 0em 0em 0em 0em;
189}
190
191.toc dd {
192 margin: 0em 0em 0em 2.6em;
193 padding: 0em 0em 0em 0em;
194}
195
196div.glossary dl,
197div.variablelist dl {
198}
199
200.glossary dl dt,
201.variablelist dl dt,
202.variablelist dl dt span.term {
203 font-weight: normal;
204 width: 20em;
205 text-align: right;
206}
207
208.variablelist dl dt {
209 margin-top: 0.5em;
210}
211
212.glossary dl dd,
213.variablelist dl dd {
214 margin-top: -1em;
215 margin-left: 25.5em;
216}
217
218.glossary dd p,
219.variablelist dd p {
220 margin-top: 0em;
221 margin-bottom: 1em;
222}
223
224
225div.calloutlist table td {
226 padding: 0em 0em 0em 0em;
227 margin: 0em 0em 0em 0em;
228}
229
230div.calloutlist table td p {
231 margin-top: 0em;
232 margin-bottom: 1em;
233}
234
235div p.copyright {
236 text-align: left;
237}
238
239div.legalnotice p.legalnotice-title {
240 margin-bottom: 0em;
241}
242
243p {
244 line-height: 1.5em;
245 margin-top: 0em;
246
247}
248
249dl {
250 padding-top: 0em;
251}
252
253hr {
254 border: solid 1px;
255}
256
257
258.mediaobject,
259.mediaobjectco {
260 text-align: center;
261}
262
263img {
264 border: none;
265}
266
267ul {
268 padding: 0em 0em 0em 1.5em;
269}
270
271ul li {
272 padding: 0em 0em 0em 0em;
273}
274
275ul li p {
276 text-align: left;
277}
278
279table {
280 width :100%;
281}
282
283th {
284 padding: 0.25em;
285 text-align: left;
286 font-weight: normal;
287 vertical-align: top;
288}
289
290td {
291 padding: 0.25em;
292 vertical-align: top;
293}
294
295p a[id] {
296 margin: 0px;
297 padding: 0px;
298 display: inline;
299 background-image: none;
300}
301
302a {
303 text-decoration: underline;
304 color: #444;
305}
306
307pre {
308 overflow: auto;
309}
310
311a:hover {
312 text-decoration: underline;
313 /*font-weight: bold;*/
314}
315
316
317div.informalfigure,
318div.informalexample,
319div.informaltable,
320div.figure,
321div.table,
322div.example {
323 margin: 1em 0em;
324 padding: 1em;
325 page-break-inside: avoid;
326}
327
328
329div.informalfigure p.title b,
330div.informalexample p.title b,
331div.informaltable p.title b,
332div.figure p.title b,
333div.example p.title b,
334div.table p.title b{
335 padding-top: 0em;
336 margin-top: 0em;
337 font-size: 100%;
338 font-weight: normal;
339}
340
341.mediaobject .caption,
342.mediaobject .caption p {
343 text-align: center;
344 font-size: 80%;
345 padding-top: 0.5em;
346 padding-bottom: 0.5em;
347}
348
349.epigraph {
350 padding-left: 55%;
351 margin-bottom: 1em;
352}
353
354.epigraph p {
355 text-align: left;
356}
357
358.epigraph .quote {
359 font-style: italic;
360}
361.epigraph .attribution {
362 font-style: normal;
363 text-align: right;
364}
365
366span.application {
367 font-style: italic;
368}
369
370.programlisting {
371 font-family: monospace;
372 font-size: 80%;
373 white-space: pre;
374 margin: 1.33em 0em;
375 padding: 1.33em;
376}
377
378.tip,
379.warning,
380.caution,
381.note {
382 margin-top: 1em;
383 margin-bottom: 1em;
384
385}
386
387/* force full width of table within div */
388.tip table,
389.warning table,
390.caution table,
391.note table {
392 border: none;
393 width: 100%;
394}
395
396
397.tip table th,
398.warning table th,
399.caution table th,
400.note table th {
401 padding: 0.8em 0.0em 0.0em 0.0em;
402 margin : 0em 0em 0em 0em;
403}
404
405.tip p,
406.warning p,
407.caution p,
408.note p {
409 margin-top: 0.5em;
410 margin-bottom: 0.5em;
411 padding-right: 1em;
412 text-align: left;
413}
414
415.acronym {
416 text-transform: uppercase;
417}
418
419b.keycap,
420.keycap {
421 padding: 0.09em 0.3em;
422 margin: 0em;
423}
424
425.itemizedlist li {
426 clear: none;
427}
428
429.filename {
430 font-size: medium;
431 font-family: Courier, monospace;
432}
433
434
435div.navheader, div.heading{
436 position: absolute;
437 left: 0em;
438 top: 0em;
439 width: 100%;
440 background-color: #cdf;
441 width: 100%;
442}
443
444div.navfooter, div.footing{
445 position: fixed;
446 left: 0em;
447 bottom: 0em;
448 background-color: #eee;
449 width: 100%;
450}
451
452
453div.navheader td,
454div.navfooter td {
455 font-size: 66%;
456}
457
458div.navheader table th {
459 /*font-family: Georgia, Times, serif;*/
460 /*font-size: x-large;*/
461 font-size: 80%;
462}
463
464div.navheader table {
465 border-left: 0em;
466 border-right: 0em;
467 border-top: 0em;
468 width: 100%;
469}
470
471div.navfooter table {
472 border-left: 0em;
473 border-right: 0em;
474 border-bottom: 0em;
475 width: 100%;
476}
477
478div.navheader table td a,
479div.navfooter table td a {
480 color: #777;
481 text-decoration: none;
482}
483
484/* normal text in the footer */
485div.navfooter table td {
486 color: black;
487}
488
489div.navheader table td a:visited,
490div.navfooter table td a:visited {
491 color: #444;
492}
493
494
495/* links in header and footer */
496div.navheader table td a:hover,
497div.navfooter table td a:hover {
498 text-decoration: underline;
499 background-color: transparent;
500 color: #33a;
501}
502
503div.navheader hr,
504div.navfooter hr {
505 display: none;
506}
507
508
509.qandaset tr.question td p {
510 margin: 0em 0em 1em 0em;
511 padding: 0em 0em 0em 0em;
512}
513
514.qandaset tr.answer td p {
515 margin: 0em 0em 1em 0em;
516 padding: 0em 0em 0em 0em;
517}
518.answer td {
519 padding-bottom: 1.5em;
520}
521
522.emphasis {
523 font-weight: bold;
524}
525
526
527 /************* /
528 / decorations /
529/ *************/
530
531.titlepage {
532}
533
534.part .title {
535}
536
537.subtitle {
538 border: none;
539}
540
541/*
542h1 {
543 border: none;
544}
545
546h2 {
547 border-top: solid 0.2em;
548 border-bottom: solid 0.06em;
549}
550
551h3 {
552 border-top: 0em;
553 border-bottom: solid 0.06em;
554}
555
556h4 {
557 border: 0em;
558 border-bottom: solid 0.06em;
559}
560
561h5 {
562 border: 0em;
563}
564*/
565
566.programlisting {
567 border: solid 1px;
568}
569
570div.figure,
571div.table,
572div.informalfigure,
573div.informaltable,
574div.informalexample,
575div.example {
576 border: 1px solid;
577}
578
579
580
581.tip,
582.warning,
583.caution,
584.note {
585 border: 1px solid;
586}
587
588.tip table th,
589.warning table th,
590.caution table th,
591.note table th {
592 border-bottom: 1px solid;
593}
594
595.question td {
596 border-top: 1px solid black;
597}
598
599.answer {
600}
601
602
603b.keycap,
604.keycap {
605 border: 1px solid;
606}
607
608
609div.navheader, div.heading{
610 border-bottom: 1px solid;
611}
612
613
614div.navfooter, div.footing{
615 border-top: 1px solid;
616}
617
618 /********* /
619 / colors /
620/ *********/
621
622body {
623 color: #333;
624 background: white;
625}
626
627a {
628 background: transparent;
629}
630
631a:hover {
632 background-color: #dedede;
633}
634
635
636h1,
637h2,
638h3,
639h4,
640h5,
641h6,
642h7,
643h8 {
644 background-color: transparent;
645}
646
647hr {
648 border-color: #aaa;
649}
650
651
652.tip, .warning, .caution, .note {
653 border-color: #fff;
654}
655
656
657.tip table th,
658.warning table th,
659.caution table th,
660.note table th {
661 border-bottom-color: #fff;
662}
663
664
665.warning {
666 background-color: #f0f0f2;
667}
668
669.caution {
670 background-color: #f0f0f2;
671}
672
673.tip {
674 background-color: #f0f0f2;
675}
676
677.note {
678 background-color: #f0f0f2;
679}
680
681.glossary dl dt,
682.variablelist dl dt,
683.variablelist dl dt span.term {
684 color: #044;
685}
686
687div.figure,
688div.table,
689div.example,
690div.informalfigure,
691div.informaltable,
692div.informalexample {
693 border-color: #aaa;
694}
695
696pre.programlisting {
697 color: black;
698 background-color: #fff;
699 border-color: #aaa;
700 border-width: 2px;
701}
702
703.guimenu,
704.guilabel,
705.guimenuitem {
706 background-color: #eee;
707}
708
709
710b.keycap,
711.keycap {
712 background-color: #eee;
713 border-color: #999;
714}
715
716
717div.navheader {
718 border-color: black;
719}
720
721
722div.navfooter {
723 border-color: black;
724}
725
726
727 /*********** /
728 / graphics /
729/ ***********/
730
731/*
732body {
733 background-image: url("images/body_bg.jpg");
734 background-attachment: fixed;
735}
736
737.navheader,
738.note,
739.tip {
740 background-image: url("images/note_bg.jpg");
741 background-attachment: fixed;
742}
743
744.warning,
745.caution {
746 background-image: url("images/warning_bg.jpg");
747 background-attachment: fixed;
748}
749
750.figure,
751.informalfigure,
752.example,
753.informalexample,
754.table,
755.informaltable {
756 background-image: url("images/figure_bg.jpg");
757 background-attachment: fixed;
758}
759
760*/
761h1,
762h2,
763h3,
764h4,
765h5,
766h6,
767h7{
768}
769
770/*
771Example of how to stick an image as part of the title.
772
773div.article .titlepage .title
774{
775 background-image: url("figures/white-on-black.png");
776 background-position: center;
777 background-repeat: repeat-x;
778}
779*/
780
781div.preface .titlepage .title,
782div.colophon .title,
783div.chapter .titlepage .title,
784div.article .titlepage .title
785{
786}
787
788div.section div.section .titlepage .title,
789div.sect2 .titlepage .title {
790 background: none;
791}
792
793
794h1.title {
795 background-color: transparent;
796 background-image: url("figures/poky-title.png");
797 background-repeat: no-repeat;
798 height: 256px;
799 text-indent: -9000px;
800 overflow:hidden;
801}
802
803h2.subtitle {
804 background-color: transparent;
805 text-indent: -9000px;
806 overflow:hidden;
807 width: 0px;
808 display: none;
809}
810
811 /*************************************** /
812 / pippin.gimp.org specific alterations /
813/ ***************************************/
814
815/*
816div.heading, div.navheader {
817 color: #777;
818 font-size: 80%;
819 padding: 0;
820 margin: 0;
821 text-align: left;
822 position: absolute;
823 top: 0px;
824 left: 0px;
825 width: 100%;
826 height: 50px;
827 background: url('/gfx/heading_bg.png') transparent;
828 background-repeat: repeat-x;
829 background-attachment: fixed;
830 border: none;
831}
832
833div.heading a {
834 color: #444;
835}
836
837div.footing, div.navfooter {
838 border: none;
839 color: #ddd;
840 font-size: 80%;
841 text-align:right;
842
843 width: 100%;
844 padding-top: 10px;
845 position: absolute;
846 bottom: 0px;
847 left: 0px;
848
849 background: url('/gfx/footing_bg.png') transparent;
850}
851*/
852
853
854
855 /****************** /
856 / nasty ie tweaks /
857/ ******************/
858
859/*
860div.heading, div.navheader {
861 width:expression(document.body.clientWidth + "px");
862}
863
864div.footing, div.navfooter {
865 width:expression(document.body.clientWidth + "px");
866 margin-left:expression("-5em");
867}
868body {
869 padding:expression("4em 5em 0em 5em");
870}
871*/
872
873 /**************************************** /
874 / mozilla vendor specific css extensions /
875/ ****************************************/
876/*
877div.navfooter, div.footing{
878 -moz-opacity: 0.8em;
879}
880
881div.figure,
882div.table,
883div.informalfigure,
884div.informaltable,
885div.informalexample,
886div.example,
887.tip,
888.warning,
889.caution,
890.note {
891 -moz-border-radius: 0.5em;
892}
893
894b.keycap,
895.keycap {
896 -moz-border-radius: 0.3em;
897}
898*/
899
900table tr td table tr td {
901 display: none;
902}
903
904
905hr {
906 display: none;
907}
908
909table {
910 border: 0em;
911}
912
913 .photo {
914 float: right;
915 margin-left: 1.5em;
916 margin-bottom: 1.5em;
917 margin-top: 0em;
918 max-width: 17em;
919 border: 1px solid gray;
920 padding: 3px;
921 background: white;
922}
923 .seperator {
924 padding-top: 2em;
925 clear: both;
926 }
927
928 #validators {
929 margin-top: 5em;
930 text-align: right;
931 color: #777;
932 }
933 @media print {
934 body {
935 font-size: 8pt;
936 }
937 .noprint {
938 display: none;
939 }
940 }
941
942
943.tip,
944.note {
945 background: #f0f0f2;
946 color: #333;
947 padding: 20px;
948 margin: 20px;
949}
950
951.tip h3,
952.note h3 {
953 padding: 0em;
954 margin: 0em;
955 font-size: 2em;
956 font-weight: bold;
957 color: #333;
958}
959
960.tip a,
961.note a {
962 color: #333;
963 text-decoration: underline;
964}
965
966.footnote {
967 font-size: small;
968 color: #333;
969}
970
971/* Changes the announcement text */
972.tip h3,
973.warning h3,
974.caution h3,
975.note h3 {
976 font-size:large;
977 color: #00557D;
978}
979
diff --git a/documentation/ref-manual/ref-variables.xml b/documentation/ref-manual/ref-variables.xml
new file mode 100644
index 0000000..2b0e890
--- /dev/null
+++ b/documentation/ref-manual/ref-variables.xml
@@ -0,0 +1,5929 @@
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<!-- Dummy chapter -->
6<chapter id='ref-variables-glos'>
7
8<title>Variables Glossary</title>
9
10<para>
11 This chapter lists common variables used in the OpenEmbedded build system and gives an overview
12 of their function and contents.
13</para>
14
15<glossary id='ref-variables-glossary'>
16
17
18 <para>
19 <link linkend='var-ALLOW_EMPTY'>A</link>
20 <link linkend='var-B'>B</link>
21 <link linkend='var-CFLAGS'>C</link>
22 <link linkend='var-D'>D</link>
23 <link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>E</link>
24 <link linkend='var-FEED_DEPLOYDIR_BASE_URI'>F</link>
25<!-- <link linkend='var-glossary-g'>G</link> -->
26 <link linkend='var-HOMEPAGE'>H</link>
27 <link linkend='var-IMAGE_BASENAME'>I</link>
28<!-- <link linkend='var-glossary-j'>J</link> -->
29 <link linkend='var-KARCH'>K</link>
30 <link linkend='var-LAYERDEPENDS'>L</link>
31 <link linkend='var-MACHINE'>M</link>
32<!-- <link linkend='var-glossary-n'>N</link> -->
33 <link linkend='var-OE_BINCONFIG_EXTRA_MANGLE'>O</link>
34 <link linkend='var-P'>P</link>
35<!-- <link linkend='var-glossary-q'>Q</link> -->
36 <link linkend='var-RCONFLICTS'>R</link>
37 <link linkend='var-S'>S</link>
38 <link linkend='var-T'>T</link>
39 <link linkend='var-UBOOT_ENTRYPOINT'>U</link>
40<!-- <link linkend='var-glossary-v'>V</link> -->
41 <link linkend='var-WARN_QA'>W</link>
42<!-- <link linkend='var-glossary-x'>X</link> -->
43<!-- <link linkend='var-glossary-y'>Y</link> -->
44<!-- <link linkend='var-glossary-z'>Z</link>-->
45 </para>
46
47 <glossdiv id='var-glossary-a'><title>A</title>
48
49 <glossentry id='var-ALLOW_EMPTY'><glossterm>ALLOW_EMPTY</glossterm>
50 <glossdef>
51 <para>
52 Specifies if an output package should still be produced if it is empty.
53 By default, BitBake does not produce empty packages.
54 This default behavior can cause issues when there is an
55 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link> or
56 some other hard runtime requirement on the existence of the package.
57 </para>
58
59 <para>
60 Like all package-controlling variables, you must always use them in
61 conjunction with a package name override, as in:
62 <literallayout class='monospaced'>
63 ALLOW_EMPTY_${PN} = "1"
64 ALLOW_EMPTY_${PN}-dev = "1"
65 ALLOW_EMPTY_${PN}-staticdev = "1"
66 </literallayout>
67 </para>
68 </glossdef>
69 </glossentry>
70
71 <glossentry id='var-ALTERNATIVE'><glossterm>ALTERNATIVE</glossterm>
72 <glossdef>
73 <para>
74 Lists commands in a package that need an alternative
75 binary naming scheme.
76 Sometimes the same command is provided in multiple packages.
77 When this occurs, the OpenEmbedded build system needs to
78 use the alternatives system to create a different binary
79 naming scheme so the commands can co-exist.
80 </para>
81
82 <para>
83 To use the variable, list out the package's commands
84 that also exist as part of another package.
85 For example, if the <filename>busybox</filename> package
86 has four commands that also exist as part of another
87 package, you identify them as follows:
88 <literallayout class='monospaced'>
89 ALTERNATIVE_busybox = "sh sed test bracket"
90 </literallayout>
91 For more information on the alternatives system, see the
92 "<link linkend='ref-classes-update-alternatives'>Alternatives - <filename>update-alternatives.bbclass</filename></link>"
93 section.
94 </para>
95 </glossdef>
96 </glossentry>
97
98 <glossentry id='var-ALTERNATIVE_LINK_NAME'><glossterm>ALTERNATIVE_LINK_NAME</glossterm>
99 <glossdef>
100 <para>
101 Used by the alternatives system to map duplicated commands
102 to actual locations.
103 For example, if the <filename>bracket</filename> command
104 provided by the <filename>busybox</filename> package is
105 duplicated through another package, you must use the
106 <filename>ALTERNATIVE_LINK_NAME</filename> variable to
107 specify the actual location:
108 <literallayout class='monospaced'>
109 ALTERNATIVE_LINK_NAME[bracket] = "/usr/bin/["
110 </literallayout>
111 In this example, the binary for the
112 <filename>bracket</filename> command (i.e.
113 <filename>[</filename>) from the
114 <filename>busybox</filename> package resides in
115 <filename>/usr/bin/</filename>.
116 <note>
117 If <filename>ALTERNATIVE_LINK_NAME</filename> is not
118 defined, it defaults to
119 <filename>${bindir}/&lt;name&gt;</filename>.
120 </note>
121 </para>
122
123 <para>
124 For more information on the alternatives system, see the
125 "<link linkend='ref-classes-update-alternatives'>Alternatives - <filename>update-alternatives.bbclass</filename></link>"
126 section.
127 </para>
128 </glossdef>
129 </glossentry>
130
131 <glossentry id='var-ALTERNATIVE_PRIORITY'><glossterm>ALTERNATIVE_PRIORITY</glossterm>
132 <glossdef>
133 <para>
134 Used by the alternatives system to create default
135 priorities for duplicated commands.
136 You can use the variable to create a single default
137 regardless of the command name or package, a default for
138 specific duplicated commands regardless of the package, or
139 a default for specific commands tied to particular packages.
140 Here are the available syntax forms:
141 <literallayout class='monospaced'>
142 ALTERNATIVE_PRIORITY = "&lt;priority&gt;"
143 ALTERNATIVE_PRIORITY[&lt;name&gt;] = "&lt;priority&gt;"
144 ALTERNATIVE_PRIORITY_&lt;pkg&gt;[&lt;name&gt;] = "&lt;priority&gt;"
145 </literallayout>
146 </para>
147
148 <para>
149 For more information on the alternatives system, see the
150 "<link linkend='ref-classes-update-alternatives'>Alternatives - <filename>update-alternatives.bbclass</filename></link>"
151 section.
152 </para>
153 </glossdef>
154 </glossentry>
155
156 <glossentry id='var-ALTERNATIVE_TARGET'><glossterm>ALTERNATIVE_TARGET</glossterm>
157 <glossdef>
158 <para>
159 Used by the alternatives system to create default link
160 locations for duplicated commands.
161 You can use the variable to create a single default
162 location for all duplicated commands regardless of the
163 command name or package, a default for
164 specific duplicated commands regardless of the package, or
165 a default for specific commands tied to particular packages.
166 Here are the available syntax forms:
167 <literallayout class='monospaced'>
168 ALTERNATIVE_TARGET = "&lt;target&gt;"
169 ALTERNATIVE_TARGET[&lt;name&gt;] = "&lt;target&gt;"
170 ALTERNATIVE_TARGET_&lt;pkg&gt;[&lt;name&gt;] = "&lt;target&gt;"
171 </literallayout>
172 <note>
173 <para>
174 If <filename>ALTERNATIVE_TARGET</filename> is not
175 defined, it inherits the value from the
176 <link linkend='var-ALTERNATIVE_LINK_NAME'><filename>ALTERNATIVE_LINK_NAME</filename></link>
177 variable.
178 </para>
179
180 <para>
181 If <filename>ALTERNATIVE_LINK_NAME</filename> and
182 <filename>ALTERNATIVE_TARGET</filename> are the
183 same, the target for
184 <filename>ALTERNATIVE_TARGET</filename>
185 has "<filename>.{BPN}</filename>" appended to it.
186 </para>
187
188 <para>
189 Finally, if the file referenced has not been
190 renamed, the alternatives system will rename it to
191 avoid the need to rename alternative files in the
192 <filename>do_install</filename> task while
193 retaining support for the command if necessary.
194 </para>
195 </note>
196 </para>
197
198 <para>
199 For more information on the alternatives system, see the
200 "<link linkend='ref-classes-update-alternatives'>Alternatives - <filename>update-alternatives.bbclass</filename></link>"
201 section.
202 </para>
203 </glossdef>
204 </glossentry>
205
206 <glossentry id='var-AUTHOR'><glossterm>AUTHOR</glossterm>
207 <glossdef>
208 <para>The email address used to contact the original author
209 or authors in order to send patches and forward bugs.</para>
210 </glossdef>
211 </glossentry>
212
213 <glossentry id='var-AUTOREV'><glossterm>AUTOREV</glossterm>
214 <glossdef>
215 <para>When <filename><link linkend='var-SRCREV'>SRCREV</link></filename>
216 is set to the value of this variable, it specifies to use the latest
217 source revision in the repository.
218 Here is an example:
219 <literallayout class='monospaced'>
220 SRCREV = "${AUTOREV}"
221 </literallayout>
222 </para>
223 </glossdef>
224 </glossentry>
225
226 </glossdiv>
227
228 <glossdiv id='var-glossary-b'><title>B</title>
229
230 <glossentry id='var-B'><glossterm>B</glossterm>
231 <glossdef>
232 <para>
233 The directory within the
234 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
235 in which the OpenEmbedded build system places generated
236 objects during a recipe's build process.
237 By default, this directory is the same as the <link linkend='var-S'><filename>S</filename></link>
238 directory, which is defined as:
239 <literallayout class='monospaced'>
240 S = "${WORKDIR}/${BP}/"
241 </literallayout>
242 You can separate the (<filename>S</filename>) directory
243 and the directory pointed to by the <filename>B</filename>
244 variable.
245 Most Autotools-based recipes support separating these
246 directories.
247 The build system defaults to using separate directories for
248 <filename>gcc</filename> and some kernel recipes.
249 </para>
250 </glossdef>
251 </glossentry>
252
253 <glossentry id='var-BAD_RECOMMENDATIONS'><glossterm>BAD_RECOMMENDATIONS</glossterm>
254 <glossdef>
255 <para>
256 Lists "recommended-only" packages to not install.
257 Recommended-only packages are packages installed only
258 through the
259 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
260 variable.
261 You can prevent any of these "recommended" packages from
262 being installed by listing them with the
263 <filename>BAD_RECOMMENDATIONS</filename> variable:
264 <literallayout class='monospaced'>
265 BAD_RECOMMENDATIONS = "&lt;package_name&gt; &lt;package_name&gt; &lt;package_name&gt; ..."
266 </literallayout>
267 You can set this variable globally in your
268 <filename>local.conf</filename> file or you can attach it to
269 a specific image recipe by using the recipe name override:
270 <literallayout class='monospaced'>
271 BAD_RECOMMENDATIONS_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
272 </literallayout>
273 </para>
274
275 <para>
276 It is important to realize that if you choose to not install
277 packages using this variable and some other packages are
278 dependent on them (i.e. listed in a recipe's
279 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
280 variable), the OpenEmbedded build system ignores your
281 request and will install the packages to avoid dependency
282 errors.
283 </para>
284
285 <para>
286 Support for this variable exists only when using the
287 IPK and RPM packaging backend.
288 Support does not exist for DEB.
289 </para>
290
291 <para>
292 See the
293 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>
294 and the
295 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
296 variables for related information.
297 </para>
298 </glossdef>
299 </glossentry>
300
301 <glossentry id='var-BB_DANGLINGAPPENDS_WARNONLY'><glossterm>BB_DANGLINGAPPENDS_WARNONLY</glossterm>
302 <glossdef>
303 <para>
304 Defines how BitBake handles situations where an append
305 file (<filename>.bbappend</filename>) has no
306 corresponding recipe file (<filename>.bb</filename>).
307 This condition often occurs when layers get out of sync
308 (e.g. <filename>oe-core</filename> bumps a
309 recipe version and the old recipe no longer exists and the
310 other layer has not been updated to the new version
311 of the recipe yet).
312 </para>
313
314 <para>
315 The default fatal behavior is safest because it is
316 the sane reaction given something is out of sync.
317 It is important to realize when your changes are no longer
318 being applied.
319 </para>
320
321 <para>
322 You can change the default behavior by setting this
323 variable to "1" in the <filename>local.conf</filename>
324 file in the
325 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
326 as follows:
327 <literallayout class='monospaced'>
328 BB_DANGLINGAPPENDS_WARNONLY = "1"
329 </literallayout>
330 </para>
331 </glossdef>
332 </glossentry>
333
334 <glossentry id='var-BB_DISKMON_DIRS'><glossterm>BB_DISKMON_DIRS</glossterm>
335 <glossdef>
336 <para>
337 Monitors disk space and available inodes during the build
338 and allows you to control the build based on these
339 parameters.
340 </para>
341
342 <para>
343 Disk space monitoring is disabled by default.
344 To enable monitoring, add the <filename>BB_DISKMON_DIRS</filename>
345 variable to your <filename>conf/local.conf</filename> file found in the
346 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
347 Use the following form:
348 <literallayout class='monospaced'>
349 BB_DISKMON_DIRS = "&lt;action&gt;,&lt;dir&gt;,&lt;threshold&gt; [...]"
350
351 where:
352
353 &lt;action&gt; is:
354 ABORT: Immediately abort the build when
355 a threshold is broken.
356 STOPTASKS: Stop the build after the currently
357 executing tasks have finished when
358 a threshold is broken.
359 WARN: Issue a warning but continue the
360 build when a threshold is broken.
361 Subsequent warnings are issued as
362 defined by the
363 <link linkend='var-BB_DISKMON_WARNINTERVAL'>BB_DISKMON_WARNINTERVAL</link> variable,
364 which must be defined in the
365 conf/local.conf file.
366
367 &lt;dir&gt; is:
368 Any directory you choose. You can specify one or
369 more directories to monitor by separating the
370 groupings with a space. If two directories are
371 on the same device, only the first directory
372 is monitored.
373
374 &lt;threshold&gt; is:
375 Either the minimum available disk space,
376 the minimum number of free inodes, or
377 both. You must specify at least one. To
378 omit one or the other, simply omit the value.
379 Specify the threshold using G, M, K for Gbytes,
380 Mbytes, and Kbytes, respectively. If you do
381 not specify G, M, or K, Kbytes is assumed by
382 default. Do not use GB, MB, or KB.
383 </literallayout>
384 </para>
385
386 <para>
387 Here are some examples:
388 <literallayout class='monospaced'>
389 BB_DISKMON_DIRS = "ABORT,${TMPDIR},1G,100K WARN,${SSTATE_DIR},1G,100K"
390 BB_DISKMON_DIRS = "STOPTASKS,${TMPDIR},1G"
391 BB_DISKMON_DIRS = "ABORT,${TMPDIR},,100K"
392 </literallayout>
393 The first example works only if you also provide
394 the <link linkend='var-BB_DISKMON_WARNINTERVAL'><filename>BB_DISKMON_WARNINTERVAL</filename></link> variable
395 in the <filename>conf/local.conf</filename>.
396 This example causes the build system to immediately
397 abort when either the disk space in <filename>${TMPDIR}</filename> drops
398 below 1 Gbyte or the available free inodes drops below
399 100 Kbytes.
400 Because two directories are provided with the variable, the
401 build system also issue a
402 warning when the disk space in the
403 <filename>${SSTATE_DIR}</filename> directory drops
404 below 1 Gbyte or the number of free inodes drops
405 below 100 Kbytes.
406 Subsequent warnings are issued during intervals as
407 defined by the <filename>BB_DISKMON_WARNINTERVAL</filename>
408 variable.
409 </para>
410
411 <para>
412 The second example stops the build after all currently
413 executing tasks complete when the minimum disk space
414 in the <filename>${<link linkend='var-TMPDIR'>TMPDIR</link>}</filename>
415 directory drops below 1 Gbyte.
416 No disk monitoring occurs for the free inodes in this case.
417 </para>
418
419 <para>
420 The final example immediately aborts the build when the
421 number of free inodes in the <filename>${TMPDIR}</filename> directory
422 drops below 100 Kbytes.
423 No disk space monitoring for the directory itself occurs
424 in this case.
425 </para>
426 </glossdef>
427 </glossentry>
428
429 <glossentry id='var-BB_DISKMON_WARNINTERVAL'><glossterm>BB_DISKMON_WARNINTERVAL</glossterm>
430 <glossdef>
431 <para>
432 Defines the disk space and free inode warning intervals.
433 To set these intervals, define the variable in your
434 <filename>conf/local.conf</filename> file in the
435 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
436 </para>
437
438 <para>
439 If you are going to use the
440 <filename>BB_DISKMON_WARNINTERVAL</filename> variable, you must
441 also use the
442 <link linkend='var-BB_DISKMON_DIRS'><filename>BB_DISKMON_DIRS</filename></link> variable
443 and define its action as "WARN".
444 During the build, subsequent warnings are issued each time
445 disk space or number of free inodes further reduces by
446 the respective interval.
447 </para>
448
449 <para>
450 If you do not provide a <filename>BB_DISKMON_WARNINTERVAL</filename>
451 variable and you do use <filename>BB_DISKMON_DIRS</filename> with
452 the "WARN" action, the disk monitoring interval defaults to
453 the following:
454 <literallayout class='monospaced'>
455 BB_DISKMON_WARNINTERVAL = "50M,5K"
456 </literallayout>
457 </para>
458
459 <para>
460 When specifying the variable in your configuration file,
461 use the following form:
462 <literallayout class='monospaced'>
463 BB_DISKMON_WARNINTERVAL = "&lt;disk_space_interval&gt;,&lt;disk_inode_interval&gt;"
464
465 where:
466
467 &lt;disk_space_interval&gt; is:
468 An interval of memory expressed in either
469 G, M, or K for Gbytes, Mbytes, or Kbytes,
470 respectively. You cannot use GB, MB, or KB.
471
472 &lt;disk_inode_interval&gt; is:
473 An interval of free inodes expressed in either
474 G, M, or K for Gbytes, Mbytes, or Kbytes,
475 respectively. You cannot use GB, MB, or KB.
476 </literallayout>
477 </para>
478
479 <para>
480 Here is an example:
481 <literallayout class='monospaced'>
482 BB_DISKMON_DIRS = "WARN,${SSTATE_DIR},1G,100K"
483 BB_DISKMON_WARNINTERVAL = "50M,5K"
484 </literallayout>
485 These variables cause the OpenEmbedded build system to
486 issue subsequent warnings each time the available
487 disk space further reduces by 50 Mbytes or the number
488 of free inodes further reduces by 5 Kbytes in the
489 <filename>${SSTATE_DIR}</filename> directory.
490 Subsequent warnings based on the interval occur each time
491 a respective interval is reached beyond the initial warning
492 (i.e. 1 Gbytes and 100 Kbytes).
493 </para>
494 </glossdef>
495 </glossentry>
496
497 <glossentry id='var-BB_GENERATE_MIRROR_TARBALLS'><glossterm>BB_GENERATE_MIRROR_TARBALLS</glossterm>
498 <glossdef>
499 <para>
500 Causes tarballs of the Git repositories to be placed in the
501 <link linkend='var-DL_DIR'><filename>DL_DIR</filename></link>
502 directory.
503 For performance reasons, creating and placing tarballs of
504 the Git repositories is not the default action by the
505 OpenEmbedded build system.
506 <literallayout class='monospaced'>
507 BB_GENERATE_MIRROR_TARBALLS = "1"
508 </literallayout>
509 Set this variable in your <filename>local.conf</filename>
510 file in the
511 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
512 </para>
513 </glossdef>
514 </glossentry>
515
516 <glossentry id='var-BB_NUMBER_THREADS'><glossterm>BB_NUMBER_THREADS</glossterm>
517 <glossdef>
518 <para>The maximum number of tasks BitBake should run in parallel at any one time.
519 If your host development system supports multiple cores, a good rule of thumb
520 is to set this variable to twice the number of cores.</para>
521 </glossdef>
522 </glossentry>
523
524 <glossentry id='var-BBCLASSEXTEND'><glossterm>BBCLASSEXTEND</glossterm>
525 <glossdef>
526 <para>
527 Allows you to extend a recipe so that it builds variants of the software.
528 Common variants for recipes exist such as "natives" like <filename>quilt-native</filename>,
529 which is a copy of Quilt built to run on the build system;
530 "crosses" such as <filename>gcc-cross</filename>,
531 which is a compiler built to run on the build machine but produces binaries
532 that run on the target <link linkend='var-MACHINE'><filename>MACHINE</filename></link>;
533 "nativesdk", which targets the SDK machine instead of <filename>MACHINE</filename>;
534 and "mulitlibs" in the form "<filename>multilib:&lt;multilib_name&gt;</filename>".
535 </para>
536
537 <para>
538 To build a different variant of the recipe with a minimal amount of code, it usually
539 is as simple as adding the following to your recipe:
540 <literallayout class='monospaced'>
541 BBCLASSEXTEND =+ "native nativesdk"
542 BBCLASSEXTEND =+ "multilib:&lt;multilib_name&gt;"
543 </literallayout>
544 </para>
545 </glossdef>
546 </glossentry>
547
548 <glossentry id='var-BBFILE_COLLECTIONS'><glossterm>BBFILE_COLLECTIONS</glossterm>
549 <glossdef>
550 <para>Lists the names of configured layers.
551 These names are used to find the other <filename>BBFILE_*</filename>
552 variables.
553 Typically, each layer will append its name to this variable in its
554 <filename>conf/layer.conf</filename> file.
555 </para>
556 </glossdef>
557 </glossentry>
558
559 <glossentry id='var-BBFILE_PATTERN'><glossterm>BBFILE_PATTERN</glossterm>
560 <glossdef>
561 <para>Variable that expands to match files from
562 <link linkend='var-BBFILES'><filename>BBFILES</filename></link>
563 in a particular layer.
564 This variable is used in the <filename>conf/layer.conf</filename> file and must
565 be suffixed with the name of the specific layer (e.g.
566 <filename>BBFILE_PATTERN_emenlow</filename>).</para>
567 </glossdef>
568 </glossentry>
569
570 <glossentry id='var-BBFILE_PRIORITY'><glossterm>BBFILE_PRIORITY</glossterm>
571 <glossdef>
572 <para>Assigns the priority for recipe files in each layer.</para>
573 <para>This variable is useful in situations where the same recipe appears in
574 more than one layer.
575 Setting this variable allows you to prioritize a
576 layer against other layers that contain the same recipe - effectively
577 letting you control the precedence for the multiple layers.
578 The precedence established through this variable stands regardless of a
579 recipe's version
580 (<link linkend='var-PV'><filename>PV</filename></link> variable).
581 For example, a layer that has a recipe with a higher <filename>PV</filename> value but for
582 which the <filename>BBFILE_PRIORITY</filename> is set to have a lower precedence still has a
583 lower precedence.</para>
584 <para>A larger value for the <filename>BBFILE_PRIORITY</filename> variable results in a higher
585 precedence.
586 For example, the value 6 has a higher precedence than the value 5.
587 If not specified, the <filename>BBFILE_PRIORITY</filename> variable is set based on layer
588 dependencies (see the
589 <filename><link linkend='var-LAYERDEPENDS'>LAYERDEPENDS</link></filename> variable for
590 more information.
591 The default priority, if unspecified
592 for a layer with no dependencies, is the lowest defined priority + 1
593 (or 1 if no priorities are defined).</para>
594 <tip>
595 You can use the command <filename>bitbake-layers show-layers</filename> to list
596 all configured layers along with their priorities.
597 </tip>
598 </glossdef>
599 </glossentry>
600
601 <glossentry id='var-BBFILES'><glossterm>BBFILES</glossterm>
602 <glossdef>
603 <para>List of recipe files used by BitBake to build software.</para>
604 </glossdef>
605 </glossentry>
606
607 <glossentry id='var-BBINCLUDELOGS'><glossterm>BBINCLUDELOGS</glossterm>
608 <glossdef>
609 <para>Variable that controls how BitBake displays logs on build failure.</para>
610 </glossdef>
611 </glossentry>
612
613 <glossentry id='var-BBLAYERS'><glossterm>BBLAYERS</glossterm>
614 <glossdef>
615 <para>Lists the layers to enable during the build.
616 This variable is defined in the <filename>bblayers.conf</filename> configuration
617 file in the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
618 Here is an example:
619 <literallayout class='monospaced'>
620 BBLAYERS = " \
621 /home/scottrif/poky/meta \
622 /home/scottrif/poky/meta-yocto \
623 /home/scottrif/poky/meta-yocto-bsp \
624 /home/scottrif/poky/meta-mykernel \
625 "
626
627 BBLAYERS_NON_REMOVABLE ?= " \
628 /home/scottrif/poky/meta \
629 /home/scottrif/poky/meta-yocto \
630 "
631 </literallayout>
632 This example enables four layers, one of which is a custom, user-defined layer
633 named <filename>meta-mykernel</filename>.
634 </para>
635 </glossdef>
636 </glossentry>
637
638 <glossentry id='var-BBLAYERS_NON_REMOVABLE'><glossterm>BBLAYERS_NON_REMOVABLE</glossterm>
639 <glossdef>
640 <para>Lists core layers that cannot be removed from the
641 <filename>bblayers.conf</filename> file during a build
642 using the
643 <ulink url='https://www.yoctoproject.org/tools-resources/projects/hob'>Hob</ulink>.
644 <note>
645 When building an image outside of Hob, this variable
646 is ignored.
647 </note>
648 In order for BitBake to build your image using Hob, your
649 <filename>bblayers.conf</filename> file must include the
650 <filename>meta</filename> and <filename>meta-yocto</filename>
651 core layers.
652 Here is an example that shows these two layers listed in
653 the <filename>BBLAYERS_NON_REMOVABLE</filename> statement:
654 <literallayout class='monospaced'>
655 BBLAYERS = " \
656 /home/scottrif/poky/meta \
657 /home/scottrif/poky/meta-yocto \
658 /home/scottrif/poky/meta-yocto-bsp \
659 /home/scottrif/poky/meta-mykernel \
660 "
661
662 BBLAYERS_NON_REMOVABLE ?= " \
663 /home/scottrif/poky/meta \
664 /home/scottrif/poky/meta-yocto \
665 "
666 </literallayout>
667 </para>
668 </glossdef>
669 </glossentry>
670
671 <glossentry id='var-BBMASK'><glossterm>BBMASK</glossterm>
672 <glossdef>
673 <para>
674 Prevents BitBake from processing recipes and recipe
675 append files.
676 Use the <filename>BBMASK</filename> variable from within the
677 <filename>conf/local.conf</filename> file found
678 in the
679 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
680 </para>
681
682 <para>
683 You can use the <filename>BBMASK</filename> variable
684 to "hide" these <filename>.bb</filename> and
685 <filename>.bbappend</filename> files.
686 BitBake ignores any recipe or recipe append files that
687 match the expression.
688 It is as if BitBake does not see them at all.
689 Consequently, matching files are not parsed or otherwise
690 used by BitBake.</para>
691 <para>
692 The value you provide is passed to Python's regular
693 expression compiler.
694 The expression is compared against the full paths to
695 the files.
696 For complete syntax information, see Python's
697 documentation at
698 <ulink url='http://docs.python.org/release/2.3/lib/re-syntax.html'></ulink>.
699 </para>
700
701 <para>
702 The following example uses a complete regular expression
703 to tell BitBake to ignore all recipe and recipe append
704 files in the <filename>meta-ti/recipes-misc/</filename>
705 directory:
706 <literallayout class='monospaced'>
707 BBMASK = "meta-ti/recipes-misc/"
708 </literallayout>
709 If you want to mask out multiple directories or recipes,
710 use the vertical bar to separate the regular expression
711 fragments.
712 This next example masks out multiple directories and
713 individual recipes:
714 <literallayout class='monospaced'>
715 BBMASK = "meta-ti/recipes-misc/|meta-ti/recipes-ti/packagegroup/"
716 BBMASK .= "|.*meta-oe/recipes-support/"
717 BBMASK .= "|.*openldap"
718 BBMASK .= "|.*opencv"
719 BBMASK .= "|.*lzma"
720 </literallayout>
721 Notice how the vertical bar is used to append the fragments.
722 <note>
723 When specifying a directory name, use the trailing
724 slash character to ensure you match just that directory
725 name.
726 </note>
727 </para>
728 </glossdef>
729 </glossentry>
730
731 <glossentry id='var-BBPATH'><glossterm>BBPATH</glossterm>
732 <glossdef>
733 <para>
734 Used by BitBake to locate
735 <filename>.bbclass</filename> and configuration files.
736 This variable is analogous to the
737 <filename>PATH</filename> variable.
738 <note>
739 If you run BitBake from a directory outside of the
740 <ulink url='&YOCTO_DOCS_DEV_URL;build-directory'>Build Directory</ulink>,
741 you must be sure to set
742 <filename>BBPATH</filename> to point to the
743 Build Directory.
744 Set the variable as you would any environment variable
745 and then run BitBake:
746 <literallayout class='monospaced'>
747 $ BBPATH = "&lt;build_directory&gt;"
748 $ export BBPATH
749 $ bitbake &lt;target&gt;
750 </literallayout>
751 </note>
752 </para>
753 </glossdef>
754 </glossentry>
755
756 <glossentry id='var-BBSERVER'><glossterm>BBSERVER</glossterm>
757 <glossdef>
758 <para>
759 Points to the server that runs memory-resident BitBake.
760 This variable is set by the
761 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
762 setup script and should not be hand-edited.
763 The variable is only used when you employ memory-resident
764 BitBake.
765 The setup script exports the value as follows:
766 <literallayout class='monospaced'>
767 export BBSERVER=localhost:$port
768 </literallayout>
769 For more information on how the
770 <filename>BBSERVER</filename> is used, see the
771 <filename>oe-init-build-env-memres</filename> script, which
772 is located in the
773 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
774 </para>
775 </glossdef>
776 </glossentry>
777
778 <glossentry id='var-BINCONFIG_GLOB'><glossterm>BINCONFIG_GLOB</glossterm>
779 <glossdef>
780 <para>
781 When inheriting <filename>binconfig.bbclass</filename>
782 from a recipe, this variable specifies a wildcard for
783 configuration scripts that need editing.
784 The scripts are edited to correct any paths that have been
785 set up during compilation so that they are correct for
786 use when installed into the sysroot and called by the
787 build processes of other recipes.
788 </para>
789
790 <para>
791 For more information on how this variable works, see
792 <filename>meta/classes/binconfig.bbclass</filename> in the
793 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
794 You can also find general information on the class in the
795 "<link linkend='ref-classes-binconfig'><filename>binconfig.bbclass</filename></link>"
796 section.
797 </para>
798 </glossdef>
799 </glossentry>
800
801 <glossentry id='var-BP'><glossterm>BP</glossterm>
802 <glossdef>
803 <para>The base recipe name and version but without any special
804 recipe name suffix (i.e. <filename>-native</filename>, <filename>lib64-</filename>,
805 and so forth).
806 <filename>BP</filename> is comprised of the following:
807 <literallayout class="monospaced">
808 ${BPN}-${PV}
809 </literallayout></para>
810 </glossdef>
811 </glossentry>
812
813 <glossentry id='var-BPN'><glossterm>BPN</glossterm>
814 <glossdef>
815 <para>The bare name of the recipe.
816 This variable is a version of the <link linkend='var-PN'><filename>PN</filename></link> variable
817 but removes common suffixes such as "-native" and "-cross" as well
818 as removes common prefixes such as multilib's "lib64-" and "lib32-".
819 The exact list of suffixes removed is specified by the
820 <link linkend='var-SPECIAL_PKGSUFFIX'><filename>SPECIAL_PKGSUFFIX</filename></link> variable.
821 The exact list of prefixes removed is specified by the
822 <link linkend='var-MLPREFIX'><filename>MLPREFIX</filename></link> variable.
823 Prefixes are removed for <filename>multilib</filename>
824 and <filename>nativesdk</filename> cases.</para>
825 </glossdef>
826 </glossentry>
827
828 <glossentry id='var-BUILDDIR'><glossterm>BUILDDIR</glossterm>
829 <glossdef>
830 <para>
831 Points to the location of the
832 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
833 You can define this directory indirectly through the
834 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
835 and
836 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>
837 scripts by passing in a Build Directory path when you run
838 the scripts.
839 If you run the scripts and do not provide a Build Directory
840 path, the <filename>BUILDDIR</filename> defaults to
841 <filename>build</filename> in the current directory.
842 </para>
843 </glossdef>
844 </glossentry>
845
846 <glossentry id='var-BUSYBOX_SPLIT_SUID'><glossterm>BUSYBOX_SPLIT_SUID</glossterm>
847 <glossdef>
848 <para>
849 For the BusyBox recipe, specifies whether to split the
850 output executable file into two parts: one for features
851 that require <filename>setuid root</filename>, and one for
852 the remaining features (i.e. those that do not require
853 <filename>setuid root</filename>).
854 </para>
855
856 <para>
857 The <filename>BUSYBOX_SPLIT_SUID</filename> variable
858 defaults to "1", which results in a single output
859 executable file.
860 Set the variable to "0" to split the output file.
861 </para>
862 </glossdef>
863 </glossentry>
864
865 </glossdiv>
866
867 <glossdiv id='var-glossary-c'><title>C</title>
868
869 <glossentry id='var-CFLAGS'><glossterm>CFLAGS</glossterm>
870 <glossdef>
871 <para>
872 Flags passed to the C compiler for the target system.
873 This variable evaluates to the same as
874 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>.
875 </para>
876 </glossdef>
877 </glossentry>
878
879 <glossentry id='var-COMBINED_FEATURES'><glossterm>COMBINED_FEATURES</glossterm>
880 <glossdef>
881 <para>A set of features common between
882 <link linkend='var-MACHINE_FEATURES'><filename>MACHINE_FEATURES</filename></link>
883 and <link linkend='var-DISTRO_FEATURES'><filename>DISTRO_FEATURES</filename></link>.
884 See the glossary descriptions for these variables for more information.</para>
885 </glossdef>
886 </glossentry>
887
888 <glossentry id='var-COMMON_LICENSE_DIR'><glossterm>COMMON_LICENSE_DIR</glossterm>
889 <glossdef>
890 <para>
891 Points to <filename>meta/files/common-licenses</filename>
892 in the
893 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
894 which is where generic license files reside.
895 </para>
896 </glossdef>
897 </glossentry>
898
899 <glossentry id='var-COMPATIBLE_HOST'><glossterm>COMPATIBLE_HOST</glossterm>
900 <glossdef>
901 <para>A regular expression that resolves to one or more hosts
902 (when the recipe is native) or one or more targets (when
903 the recipe is non-native) with which a recipe is compatible.
904 The regular expression is matched against
905 <link linkend="var-HOST_SYS"><filename>HOST_SYS</filename></link>.
906 You can use the variable to stop recipes from being built
907 for classes of systems with which the recipes are not
908 compatible.
909 Stopping these builds is particularly useful with kernels.
910 The variable also helps to increase parsing speed
911 since the build system skips parsing recipes not
912 compatible with the current system.</para>
913 </glossdef>
914 </glossentry>
915
916 <glossentry id='var-COMPATIBLE_MACHINE'><glossterm>COMPATIBLE_MACHINE</glossterm>
917 <glossdef>
918 <para>A regular expression that resolves to one or more
919 target machines with which a recipe is compatible.
920 The regular expression is matched against
921 <link linkend="var-MACHINEOVERRIDES"><filename>MACHINEOVERRIDES</filename></link>.
922 You can use the variable to stop recipes from being built
923 for machines with which the recipes are not compatible.
924 Stopping these builds is particularly useful with kernels.
925 The variable also helps to increase parsing speed
926 since the build system skips parsing recipes not
927 compatible with the current machine.</para>
928 </glossdef>
929 </glossentry>
930
931 <glossentry id='var-COMPLEMENTARY_GLOB'><glossterm>COMPLEMENTARY_GLOB</glossterm>
932 <glossdef>
933 <para>
934 Defines wildcards to match when installing a list of
935 complementary packages for all the packages explicitly
936 (or implicitly) installed in an image.
937 The resulting list of complementary packages is associated
938 with an item that can be added to
939 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
940 An example usage of this is the "dev-pkgs" item that when
941 added to <filename>IMAGE_FEATURES</filename> will
942 install -dev packages (containing headers and other
943 development files) for every package in the image.
944 </para>
945
946 <para>
947 To add a new feature item pointing to a wildcard, use a
948 variable flag to specify the feature item name and
949 use the value to specify the wildcard.
950 Here is an example:
951 <literallayout class='monospaced'>
952 COMPLEMENTARY_GLOB[dev-pkgs] = '*-dev'
953 </literallayout>
954 </para>
955 </glossdef>
956 </glossentry>
957
958 <glossentry id='var-CONFFILES'><glossterm>CONFFILES</glossterm>
959 <glossdef>
960 <para>
961 Identifies editable or configurable files that are part of a package.
962 If the Package Management System (PMS) is being used to update
963 packages on the target system, it is possible that
964 configuration files you have changed after the original installation
965 and that you now want to remain unchanged are overwritten.
966 In other words, editable files might exist in the package that you do not
967 want reset as part of the package update process.
968 You can use the <filename>CONFFILES</filename> variable to list the files in the
969 package that you wish to prevent the PMS from overwriting during this update process.
970 </para>
971
972 <para>
973 To use the <filename>CONFFILES</filename> variable, provide a package name
974 override that identifies the resulting package.
975 Then, provide a space-separated list of files.
976 Here is an example:
977 <literallayout class='monospaced'>
978 CONFFILES_${PN} += "${sysconfdir}/file1 \
979 ${sysconfdir}/file2 ${sysconfdir}/file3"
980 </literallayout>
981 </para>
982
983 <para>
984 A relationship exists between the <filename>CONFFILES</filename> and
985 <filename><link linkend='var-FILES'>FILES</link></filename> variables.
986 The files listed within <filename>CONFFILES</filename> must be a subset of
987 the files listed within <filename>FILES</filename>.
988 Because the configuration files you provide with <filename>CONFFILES</filename>
989 are simply being identified so that the PMS will not overwrite them,
990 it makes sense that
991 the files must already be included as part of the package through the
992 <filename>FILES</filename> variable.
993 </para>
994
995 <note>
996 When specifying paths as part of the <filename>CONFFILES</filename> variable,
997 it is good practice to use appropriate path variables.
998 For example, <filename>${sysconfdir}</filename> rather than
999 <filename>/etc</filename> or <filename>${bindir}</filename> rather
1000 than <filename>/usr/bin</filename>.
1001 You can find a list of these variables at the top of the
1002 <filename>meta/conf/bitbake.conf</filename> file in the
1003 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1004 </note>
1005 </glossdef>
1006 </glossentry>
1007
1008 <glossentry id='var-CONFIG_SITE'><glossterm>CONFIG_SITE</glossterm>
1009 <glossdef>
1010 <para>
1011 A list of files that contains <filename>autoconf</filename> test results relevant
1012 to the current build.
1013 This variable is used by the Autotools utilities when running
1014 <filename>configure</filename>.
1015 </para>
1016 </glossdef>
1017 </glossentry>
1018
1019 <glossentry id='var-CORE_IMAGE_EXTRA_INSTALL'><glossterm>CORE_IMAGE_EXTRA_INSTALL</glossterm>
1020 <glossdef>
1021 <para>
1022 Specifies the list of packages to be added to the image.
1023 You should only set this variable in the
1024 <filename>local.conf</filename> configuration file found
1025 in the
1026 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
1027 </para>
1028
1029 <para>
1030 This variable replaces <filename>POKY_EXTRA_INSTALL</filename>, which is no longer supported.
1031 </para>
1032 </glossdef>
1033 </glossentry>
1034
1035 <glossentry id='var-COREBASE'><glossterm>COREBASE</glossterm>
1036 <glossdef>
1037 <para>
1038 Specifies the parent directory of the OpenEmbedded
1039 Core Metadata layer (i.e. <filename>meta</filename>).
1040 </para>
1041
1042 <para>
1043 It is an important distinction that
1044 <filename>COREBASE</filename> points to the parent of this
1045 layer and not the layer itself.
1046 Consider an example where you have cloned the Poky Git
1047 repository and retained the <filename>poky</filename>
1048 name for your local copy of the repository.
1049 In this case, <filename>COREBASE</filename> points to
1050 the <filename>poky</filename> folder because it is the
1051 parent directory of the <filename>poky/meta</filename>
1052 layer.
1053 </para>
1054 </glossdef>
1055 </glossentry>
1056
1057 </glossdiv>
1058
1059 <glossdiv id='var-glossary-d'><title>D</title>
1060
1061 <glossentry id='var-D'><glossterm>D</glossterm>
1062 <glossdef>
1063 <para>The destination directory.</para>
1064 </glossdef>
1065 </glossentry>
1066
1067 <glossentry id='var-DATETIME'><glossterm>DATETIME</glossterm>
1068 <glossdef>
1069 <para>
1070 The date and time on which the current build started.
1071 The format is suitable for timestamps.
1072 </para>
1073 </glossdef>
1074 </glossentry>
1075
1076 <glossentry id='var-DEBUG_BUILD'><glossterm>DEBUG_BUILD</glossterm>
1077 <glossdef>
1078 <para>
1079 Specifies to build packages with debugging information.
1080 This influences the value of the
1081 <filename><link linkend='var-SELECTED_OPTIMIZATION'>SELECTED_OPTIMIZATION</link></filename>
1082 variable.
1083 </para>
1084 </glossdef>
1085 </glossentry>
1086
1087 <glossentry id='var-DEBUG_OPTIMIZATION'><glossterm>DEBUG_OPTIMIZATION</glossterm>
1088 <glossdef>
1089 <para>
1090 The options to pass in
1091 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>
1092 and <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename> when compiling
1093 a system for debugging.
1094 This variable defaults to "-O -fno-omit-frame-pointer ${DEBUG_FLAGS} -pipe".
1095 </para>
1096 </glossdef>
1097 </glossentry>
1098
1099 <glossentry id='var-DEFAULT_PREFERENCE'><glossterm>DEFAULT_PREFERENCE</glossterm>
1100 <glossdef>
1101 <para>
1102 Specifies a weak bias for recipe selection priority.
1103 </para>
1104 <para>
1105 The most common usage of this is variable is to set
1106 it to "-1" within a recipe for a development version of a
1107 piece of software.
1108 Using the variable in this way causes the stable version
1109 of the recipe to build by default in the absence of
1110 <filename><link linkend='var-PREFERRED_VERSION'>PREFERRED_VERSION</link></filename>
1111 being used to build the development version.
1112 </para>
1113 <note>
1114 The bias provided by <filename>DEFAULT_PREFERENCE</filename>
1115 is weak and is overridden by
1116 <filename><link linkend='var-BBFILE_PRIORITY'>BBFILE_PRIORITY</link></filename>
1117 if that variable is different between two layers
1118 that contain different versions of the same recipe.
1119 </note>
1120 </glossdef>
1121 </glossentry>
1122
1123 <glossentry id='var-DEPENDS'><glossterm>DEPENDS</glossterm>
1124 <glossdef>
1125 <para>
1126 Lists a recipe's build-time dependencies
1127 (i.e. other recipe files).
1128 The system ensures that all the dependencies listed
1129 have been built and have their contents in the appropriate
1130 sysroots before the recipe's configure task is executed.
1131 </para>
1132
1133 <para>
1134 Consider this simple example for two recipes named "a" and
1135 "b" that produce similarly named packages.
1136 In this example, the <filename>DEPENDS</filename>
1137 statement appears in the "a" recipe:
1138 <literallayout class='monospaced'>
1139 DEPENDS = "b"
1140 </literallayout>
1141 Here, the dependency is such that the
1142 <filename>do_configure</filename> task for recipe "a"
1143 depends on the <filename>do_populate_sysroot</filename>
1144 task of recipe "b".
1145 This means anything that recipe "b" puts into sysroot
1146 is available when recipe "a" is configuring itself.
1147 </para>
1148
1149 <para>
1150 For information on runtime dependencies, see the
1151 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
1152 variable.
1153 </para>
1154 </glossdef>
1155 </glossentry>
1156
1157 <glossentry id='var-DEPLOY_DIR'><glossterm>DEPLOY_DIR</glossterm>
1158 <glossdef>
1159 <para>
1160 Points to the general area that the OpenEmbedded build
1161 system uses to place images, packages, SDKs and other output
1162 files that are ready to be used outside of the build system.
1163 By default, this directory resides within the
1164 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1165 as <filename>${TMPDIR}/deploy</filename>.
1166 </para>
1167
1168 <para>
1169 For more information on the structure of the Build
1170 Directory, see
1171 "<link linkend='structure-build'>The Build Directory - <filename>build/</filename></link>"
1172 section.
1173 For more detail on the contents of the
1174 <filename>deploy</filename> directory, see the
1175 "<link linkend='images-dev-environment'>Images</link>" and
1176 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1177 sections.
1178 </para>
1179 </glossdef>
1180 </glossentry>
1181
1182 <glossentry id='var-DEPLOY_DIR_IMAGE'><glossterm>DEPLOY_DIR_IMAGE</glossterm>
1183 <glossdef>
1184 <para>
1185 Points to the area that the OpenEmbedded build system uses
1186 to place images and other associated output files that are
1187 ready to be deployed onto the target machine.
1188 The directory is machine-specific as it contains the
1189 <filename>${MACHINE}</filename> name.
1190 By default, this directory resides within the
1191 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
1192 as <filename>${DEPLOY_DIR}/images/${MACHINE}/</filename>.
1193 </para>
1194
1195 <para>
1196 For more information on the structure of the Build
1197 Directory, see
1198 "<link linkend='structure-build'>The Build Directory - <filename>build/</filename></link>"
1199 section.
1200 For more detail on the contents of the
1201 <filename>deploy</filename> directory, see the
1202 "<link linkend='images-dev-environment'>Images</link>" and
1203 "<link linkend='sdk-dev-environment'>Application Development SDK</link>"
1204 sections.
1205 </para>
1206 </glossdef>
1207 </glossentry>
1208
1209 <glossentry id='var-DESCRIPTION'><glossterm>DESCRIPTION</glossterm>
1210 <glossdef>
1211 <para>The package description used by package managers.
1212 If not set, <filename>DESCRIPTION</filename> takes
1213 the value of the
1214 <link linkend='var-SUMMARY'><filename>SUMMARY</filename></link>
1215 variable.
1216 </para>
1217 </glossdef>
1218 </glossentry>
1219
1220 <glossentry id='var-DISTRO'><glossterm>DISTRO</glossterm>
1221 <glossdef>
1222 <para>
1223 The short name of the distribution.
1224 This variable corresponds to a file with the
1225 extension <filename>.conf</filename>
1226 located in a <filename>conf/distro</filename> directory
1227 within the
1228 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
1229 that contains the distribution configuration.
1230 The value must not contain spaces, and is typically all lower-case.
1231 </para>
1232 <para>
1233 If the variable is blank, a set of default configuration
1234 will be used, which is specified
1235 within <filename>meta/conf/distro/defaultsetup.conf</filename>.
1236 </para>
1237 </glossdef>
1238 </glossentry>
1239
1240 <glossentry id='var-DISTRO_EXTRA_RDEPENDS'><glossterm>DISTRO_EXTRA_RDEPENDS</glossterm>
1241 <glossdef>
1242 <para>
1243 Specifies a list of distro-specific packages to add to all images.
1244 This variable takes affect through
1245 <filename>packagegroup-base</filename> so the
1246 variable only really applies to the more full-featured
1247 images that include <filename>packagegroup-base</filename>.
1248 You can use this variable to keep distro policy out of
1249 generic images.
1250 As with all other distro variables, you set this variable
1251 in the distro <filename>.conf</filename> file.
1252 </para>
1253 </glossdef>
1254 </glossentry>
1255
1256 <glossentry id='var-DISTRO_EXTRA_RRECOMMENDS'><glossterm>DISTRO_EXTRA_RRECOMMENDS</glossterm>
1257 <glossdef>
1258 <para>
1259 Specifies a list of distro-specific packages to add to all images
1260 if the packages exist.
1261 The packages might not exist or be empty (e.g. kernel modules).
1262 The list of packages are automatically installed but you can
1263 remove them.
1264 </para>
1265 </glossdef>
1266 </glossentry>
1267
1268 <glossentry id='var-DISTRO_FEATURES'><glossterm>DISTRO_FEATURES</glossterm>
1269 <glossdef>
1270 <para>The features enabled for the distribution.
1271 For a list of supported features that ship with the
1272 Yocto Project, see the
1273 "<link linkend='ref-features-distro'>Distro</link>"
1274 section.
1275 </para>
1276 </glossdef>
1277 </glossentry>
1278
1279 <glossentry id='var-DISTRO_FEATURES_BACKFILL'><glossterm>DISTRO_FEATURES_BACKFILL</glossterm>
1280 <glossdef>
1281 <para>Features to be added to
1282 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>
1283 if not also present in
1284 <filename><link linkend='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'>DISTRO_FEATURES_BACKFILL_CONSIDERED</link></filename>.
1285 </para>
1286
1287 <para>
1288 This variable is set in the <filename>meta/conf/bitbake.conf</filename> file.
1289 It is not intended to be user-configurable.
1290 It is best to just reference the variable to see which distro features are
1291 being backfilled for all distro configurations.
1292 See the <link linkend='ref-features-backfill'>Feature backfilling</link> section for
1293 more information.
1294 </para>
1295 </glossdef>
1296 </glossentry>
1297
1298 <glossentry id='var-DISTRO_FEATURES_BACKFILL_CONSIDERED'><glossterm>DISTRO_FEATURES_BACKFILL_CONSIDERED</glossterm>
1299 <glossdef>
1300 <para>Features from
1301 <filename><link linkend='var-DISTRO_FEATURES_BACKFILL'>DISTRO_FEATURES_BACKFILL</link></filename>
1302 that should not be backfilled (i.e. added to
1303 <filename><link linkend='var-DISTRO_FEATURES'>DISTRO_FEATURES</link></filename>)
1304 during the build.
1305 See the "<link linkend='ref-features-backfill'>Feature Backfilling</link>" section for
1306 more information.
1307 </para>
1308 </glossdef>
1309 </glossentry>
1310
1311 <glossentry id='var-DISTRO_NAME'><glossterm>DISTRO_NAME</glossterm>
1312 <glossdef>
1313 <para>The long name of the distribution.</para>
1314 </glossdef>
1315 </glossentry>
1316
1317 <glossentry id='var-DISTRO_PN_ALIAS'><glossterm>DISTRO_PN_ALIAS</glossterm>
1318 <glossdef>
1319 <para>Alias names used for the recipe in various Linux distributions.</para>
1320 <para>See the
1321 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-configuring-DISTRO_PN_ALIAS'>Handling
1322 a Package Name Alias</ulink>" section in the Yocto Project Development
1323 Manual for more information.</para>
1324 </glossdef>
1325 </glossentry>
1326
1327 <glossentry id='var-DISTRO_VERSION'><glossterm>DISTRO_VERSION</glossterm>
1328 <glossdef>
1329 <para>The version of the distribution.</para>
1330 </glossdef>
1331 </glossentry>
1332
1333 <glossentry id='var-DISTROOVERRIDES'><glossterm>DISTROOVERRIDES</glossterm>
1334 <glossdef>
1335 <para>
1336 This variable lists overrides specific to the current
1337 distribution.
1338 By default, the variable list includes the value of the
1339 <filename><link linkend='var-DISTRO'>DISTRO</link></filename>
1340 variable.
1341 You can extend the variable to apply any variable overrides
1342 you want as part of the distribution and are not
1343 already in <filename>OVERRIDES</filename> through
1344 some other means.
1345 </para>
1346 </glossdef>
1347 </glossentry>
1348
1349 <glossentry id='var-DL_DIR'><glossterm>DL_DIR</glossterm>
1350 <glossdef>
1351 <para>
1352 The central download directory used by the build process to
1353 store downloads.
1354 By default, <filename>DL_DIR</filename> gets files
1355 suitable for mirroring for everything except Git
1356 repositories.
1357 If you want tarballs of Git repositories, use the
1358 <link linkend='var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></link>
1359 variable.
1360 </para>
1361
1362 <para>
1363 You can set this directory by defining the
1364 <filename>DL_DIR</filename> variable in the
1365 <filename>conf/local.conf</filename> file.
1366 This directory is self-maintaining and you should not have
1367 to touch it.
1368 By default, the directory is <filename>downloads</filename>
1369 in the
1370 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
1371 <literallayout class='monospaced'>
1372 #DL_DIR ?= "${TOPDIR}/downloads"
1373 </literallayout>
1374 To specify a different download directory, simply remove
1375 the comment from the line and provide your directory.
1376 </para>
1377
1378 <para>
1379 During a first build, the system downloads many different
1380 source code tarballs from various upstream projects.
1381 Downloading can take a while, particularly if your network
1382 connection is slow.
1383 Tarballs are all stored in the directory defined by
1384 <filename>DL_DIR</filename> and the build system looks there
1385 first to find source tarballs.
1386 <note>
1387 When wiping and rebuilding, you can preserve this
1388 directory to speed up this part of subsequent
1389 builds.
1390 </note>
1391 </para>
1392
1393 <para>
1394 You can safely share this directory between multiple builds
1395 on the same development machine.
1396 For additional information on how the build process gets
1397 source files when working behind a firewall or proxy server,
1398 see this specific question in the
1399 "<link linkend='how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>FAQ</link>"
1400 chapter.
1401 </para>
1402 </glossdef>
1403
1404 </glossentry>
1405 </glossdiv>
1406
1407 <glossdiv id='var-glossary-e'><title>E</title>
1408
1409 <glossentry id='var-ENABLE_BINARY_LOCALE_GENERATION'><glossterm>ENABLE_BINARY_LOCALE_GENERATION</glossterm>
1410 <glossdef>
1411 <para></para>
1412 <para>Variable that controls which locales for
1413 <filename>eglibc</filename> are generated during the
1414 build (useful if the target device has 64Mbytes
1415 of RAM or less).</para>
1416 </glossdef>
1417 </glossentry>
1418
1419 <glossentry id='var-ERROR_QA'><glossterm>ERROR_QA</glossterm>
1420 <glossdef>
1421 <para>
1422 Specifies the quality assurance checks whose failures are
1423 reported as errors by the OpenEmbedded build system.
1424 You set this variable in your distribution configuration
1425 file.
1426 For a list of the checks you can control with this variable,
1427 see the
1428 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
1429 section.
1430 </para>
1431 </glossdef>
1432 </glossentry>
1433
1434 <glossentry id='var-EXCLUDE_FROM_WORLD'><glossterm>EXCLUDE_FROM_WORLD</glossterm>
1435 <glossdef>
1436 <para>
1437 Directs BitBake to exclude a recipe from world builds (i.e.
1438 <filename>bitbake world</filename>).
1439 During world builds, BitBake locates, parses and builds all
1440 recipes found in every layer exposed in the
1441 <filename>bblayers.conf</filename> configuration file.
1442 </para>
1443
1444 <para>
1445 To exclude a recipe from a world build using this variable,
1446 set the variable to "1" in the recipe.
1447 </para>
1448
1449 <note>
1450 Recipes added to <filename>EXCLUDE_FROM_WORLD</filename>
1451 may still be built during a world build in order to satisfy
1452 dependencies of other recipes.
1453 Adding a recipe to <filename>EXCLUDE_FROM_WORLD</filename>
1454 only ensures that the recipe is not explicitly added
1455 to the list of build targets in a world build.
1456 </note>
1457 </glossdef>
1458 </glossentry>
1459
1460 <glossentry id='var-EXTENDPE'><glossterm>EXTENDPE</glossterm>
1461 <glossdef>
1462 <para>
1463 Used with file and pathnames to create a prefix for a recipe's
1464 version based on the recipe's
1465 <link linkend='var-PE'><filename>PE</filename></link> value.
1466 If <filename>PE</filename> is set and greater than zero for a recipe,
1467 <filename>EXTENDPE</filename> becomes that value (e.g if
1468 <filename>PE</filename> is equal to "1" then <filename>EXTENDPE</filename>
1469 becomes "1_").
1470 If a recipe's <filename>PE</filename> is not set (the default) or is equal to
1471 zero, <filename>EXTENDPE</filename> becomes "".</para>
1472 <para>See the <link linkend='var-STAMP'><filename>STAMP</filename></link>
1473 variable for an example.
1474 </para>
1475 </glossdef>
1476 </glossentry>
1477
1478 <glossentry id='var-EXTENDPKGV'><glossterm>EXTENDPKGV</glossterm>
1479 <glossdef>
1480 <para>
1481 The full package version specification as it appears on the
1482 final packages produced by a recipe.
1483 The variable's value is normally used to fix a runtime
1484 dependency to the exact same version of another package
1485 in the same recipe:
1486 <literallayout class='monospaced'>
1487 RDEPENDS_${PN}-additional-module = "${PN} (= ${EXTENDPKGV})"
1488 </literallayout>
1489 </para>
1490
1491 <para>
1492 The dependency relationships are intended to force the
1493 package manager to upgrade these types of packages in
1494 lock-step.
1495 </para>
1496 </glossdef>
1497 </glossentry>
1498
1499 <glossentry id='var-EXTERNALSRC'><glossterm>EXTERNALSRC</glossterm>
1500 <glossdef>
1501 <para>
1502 If <filename>externalsrc.bbclass</filename> is inherited,
1503 this variable points to the source tree, which is
1504 outside of the OpenEmbedded build system.
1505 When set, this variable sets the
1506 <link linkend='var-S'><filename>S</filename></link>
1507 variable, which is what the OpenEmbedded build system uses
1508 to locate unpacked recipe source code.
1509 </para>
1510
1511 <para>
1512 For more information on
1513 <filename>externalsrc.bbclass</filename>, see the
1514 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
1515 section.
1516 You can also find information on how to use this variable
1517 in the
1518 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
1519 section in the Yocto Project Development Manual.
1520 </para>
1521 </glossdef>
1522 </glossentry>
1523
1524 <glossentry id='var-EXTERNALSRC_BUILD'><glossterm>EXTERNALSRC_BUILD</glossterm>
1525 <glossdef>
1526 <para>
1527 If <filename>externalsrc.bbclass</filename> is inherited,
1528 this variable points to the directory in which the recipe's
1529 source code is built,
1530 which is outside of the OpenEmbedded build system.
1531 When set, this variable sets the
1532 <link linkend='var-B'><filename>B</filename></link>
1533 variable, which is what the OpenEmbedded build system uses
1534 to locate the Build Directory.
1535 </para>
1536
1537 <para>
1538 For more information on
1539 <filename>externalsrc.bbclass</filename>, see the
1540 "<link linkend='ref-classes-externalsrc'><filename>externalsrc.bbclass</filename></link>"
1541 section.
1542 You can also find information on how to use this variable
1543 in the
1544 "<ulink url='&YOCTO_DOCS_DEV_URL;#building-software-from-an-external-source'>Building Software from an External Source</ulink>"
1545 section in the Yocto Project Development Manual.
1546 </para>
1547 </glossdef>
1548 </glossentry>
1549
1550 <glossentry id='var-EXTRA_IMAGE_FEATURES'><glossterm>EXTRA_IMAGE_FEATURES</glossterm>
1551 <glossdef>
1552 <para>
1553 The list of additional features to include in an image.
1554 Typically, you configure this variable in your
1555 <filename>local.conf</filename> file, which is found in the
1556 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
1557 Although you can use this variable from within a recipe,
1558 best practices dictate that you do not.
1559 <note>
1560 To enable primary features from within the image
1561 recipe, use the
1562 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>
1563 variable.
1564 </note>
1565 </para>
1566
1567 <para>
1568 Here are some examples of features you can add:
1569 <literallayout class='monospaced'>
1570"dbg-pkgs" - Adds -dbg packages for all installed packages
1571 including symbol information for debugging and
1572 profiling.
1573
1574"debug-tweaks" - Makes an image suitable for development.
1575 For example, ssh root access has a blank
1576 password. You should remove this feature
1577 before you produce a production image.
1578
1579"dev-pkgs" - Adds -dev packages for all installed packages.
1580 This is useful if you want to develop against
1581 the libraries in the image.
1582
1583"read-only-rootfs" - Creates an image whose root
1584 filesystem is read-only. See the
1585 "<ulink url='&YOCTO_DOCS_DEV_URL;#creating-a-read-only-root-filesystem'>Creating a Read-Only Root Filesystem</ulink>"
1586 section in the Yocto Project
1587 Development Manual for more
1588 information
1589
1590"tools-debug" - Adds debugging tools such as gdb and
1591 strace.
1592
1593"tools-profile" - Adds profiling tools such as oprofile,
1594 exmap, lttng and valgrind (x86 only).
1595
1596"tools-sdk" - Adds development tools such as gcc, make,
1597 pkgconfig and so forth.
1598
1599"tools-testapps" - Adds useful testing tools such as
1600 ts_print, aplay, arecord and so
1601 forth.
1602
1603 </literallayout>
1604 </para>
1605
1606 <para>
1607 For a complete list of image features that ships with the
1608 Yocto Project, see the
1609 "<link linkend="ref-features-image">Images</link>"
1610 section.
1611 </para>
1612
1613 <para>
1614 For an example that shows how to customize your image by
1615 using this variable, see the
1616 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-imagefeatures'>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and <filename>EXTRA_IMAGE_FEATURES</filename></ulink>"
1617 section in the Yocto Project Development Manual.
1618 </para>
1619 </glossdef>
1620 </glossentry>
1621
1622 <glossentry id='var-EXTRA_IMAGEDEPENDS'><glossterm>EXTRA_IMAGEDEPENDS</glossterm>
1623 <glossdef>
1624 <para>A list of recipes to build that do not provide packages
1625 for installing into the root filesystem.
1626 </para>
1627 <para>Sometimes a recipe is required to build the final image but is not
1628 needed in the root filesystem.
1629 You can use the <filename>EXTRA_IMAGEDEPENDS</filename> variable to
1630 list these recipes and thus specify the dependencies.
1631 A typical example is a required bootloader in a machine configuration.
1632 </para>
1633 <note>
1634 To add packages to the root filesystem, see the various
1635 <filename>*<link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
1636 and <filename>*<link linkend='var-RRECOMMENDS'>RRECOMMENDS</link></filename>
1637 variables.
1638 </note>
1639 </glossdef>
1640 </glossentry>
1641
1642 <glossentry id='var-EXTRA_OECMAKE'><glossterm>EXTRA_OECMAKE</glossterm>
1643 <glossdef>
1644 <para>Additional <filename>cmake</filename> options.</para>
1645 </glossdef>
1646 </glossentry>
1647
1648 <glossentry id='var-EXTRA_OECONF'><glossterm>EXTRA_OECONF</glossterm>
1649 <glossdef>
1650 <para>Additional <filename>configure</filename> script options.</para>
1651 </glossdef>
1652 </glossentry>
1653
1654 <glossentry id='var-EXTRA_OEMAKE'><glossterm>EXTRA_OEMAKE</glossterm>
1655 <glossdef>
1656 <para>Additional GNU <filename>make</filename> options.</para>
1657 </glossdef>
1658 </glossentry>
1659
1660 </glossdiv>
1661
1662 <glossdiv id='var-glossary-f'><title>F</title>
1663
1664 <glossentry id='var-FEED_DEPLOYDIR_BASE_URI'><glossterm>FEED_DEPLOYDIR_BASE_URI</glossterm>
1665 <glossdef>
1666 <para>
1667 Points to the base URL of the server and location within
1668 the document-root that provides the metadata and
1669 packages required by OPKG to support runtime package
1670 management of IPK packages.
1671 You set this variable in your
1672 <filename>local.conf</filename> file.
1673 </para>
1674
1675 <para>
1676 Consider the following example:
1677 <literallayout class='monospaced'>
1678 FEED_DEPLOYDIR_BASE_URI = "http://192.168.7.1/BOARD-dir"
1679 </literallayout>
1680 This example assumes you are serving your packages over
1681 HTTP and your databases are located in a directory
1682 named <filename>BOARD-dir</filename>, which is underneath
1683 your HTTP server's document-root.
1684 In this case, the OpenEmbedded build system generates a set
1685 of configuration files for you in your target that work
1686 with the feed.
1687 </para>
1688 </glossdef>
1689 </glossentry>
1690
1691 <glossentry id='var-FILES'><glossterm>FILES</glossterm>
1692 <glossdef>
1693 <para>
1694 The list of directories or files that are placed in packages.
1695 </para>
1696
1697 <para>
1698 To use the <filename>FILES</filename> variable, provide a package name
1699 override that identifies the resulting package.
1700 Then, provide a space-separated list of files or paths that identifies the
1701 files you want included as part of the resulting package.
1702 Here is an example:
1703 <literallayout class='monospaced'>
1704 FILES_${PN} += "${bindir}/mydir1/ ${bindir}/mydir2/myfile"
1705 </literallayout>
1706 </para>
1707
1708 <note>
1709 When specifying paths as part of the <filename>FILES</filename> variable,
1710 it is good practice to use appropriate path variables.
1711 For example, use <filename>${sysconfdir}</filename> rather than
1712 <filename>/etc</filename>, or <filename>${bindir}</filename> rather
1713 than <filename>/usr/bin</filename>.
1714 You can find a list of these variables at the top of the
1715 <filename>meta/conf/bitbake.conf</filename> file in the
1716 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1717 </note>
1718
1719 <para>
1720 If some of the files you provide with the <filename>FILES</filename> variable
1721 are editable and you know they should not be
1722 overwritten during the package update process by the Package Management
1723 System (PMS), you can identify these files so that the PMS will not
1724 overwrite them.
1725 See the <filename><link linkend='var-CONFFILES'>CONFFILES</link></filename>
1726 variable for information on how to identify these files to the PMS.
1727 </para>
1728
1729 </glossdef>
1730 </glossentry>
1731
1732 <glossentry id='var-FILESEXTRAPATHS'><glossterm>FILESEXTRAPATHS</glossterm>
1733 <glossdef>
1734 <para>
1735 Extends the search path the OpenEmbedded build system uses
1736 when looking for files and patches as it processes recipes
1737 and append files.
1738 The default directories BitBake uses when it processes
1739 recipes are initially defined by the
1740 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
1741 variable.
1742 You can extend <filename>FILESPATH</filename> variable
1743 by using <filename>FILESEXTRAPATHS</filename>.
1744 </para>
1745
1746 <para>
1747 Best practices dictate that you accomplish this by using
1748 <filename>FILESEXTRAPATHS</filename> from within a
1749 <filename>.bbappend</filename> file and that you prepend
1750 paths as follows:
1751 <literallayout class='monospaced'>
1752 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
1753 </literallayout>
1754 In the above example, the build system first looks for files
1755 in a directory that has the same name as the corresponding
1756 append file.
1757 <note>
1758 <para>When extending <filename>FILESEXTRAPATHS</filename>,
1759 be sure to use the immediate expansion
1760 (<filename>:=</filename>) operator.
1761 Immediate expansion makes sure that BitBake evaluates
1762 <link linkend='var-THISDIR'><filename>THISDIR</filename></link>
1763 at the time the directive is encountered rather than at
1764 some later time when expansion might result in a
1765 directory that does not contain the files you need.
1766 </para>
1767 <para>Also, include the trailing separating colon
1768 character if you are prepending.
1769 The trailing colon character is necessary because you
1770 are directing BitBake to extend the path by prepending
1771 directories to the search path.</para>
1772 </note>
1773 Here is another common use:
1774 <literallayout class='monospaced'>
1775 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
1776 </literallayout>
1777 In this example, the build system extends the
1778 <filename>FILESPATH</filename> variable to include a
1779 directory named <filename>files</filename> that is in the
1780 same directory as the corresponding append file.
1781 </para>
1782
1783 <para>
1784 Here is a final example that specifically adds three paths:
1785 <literallayout class='monospaced'>
1786 FILESEXTRAPATHS_prepend := "path_1:path_2:path_3:"
1787 </literallayout>
1788 </para>
1789
1790 <para>
1791 By prepending paths in <filename>.bbappend</filename>
1792 files, you allow multiple append files that reside in
1793 different layers but are used for the same recipe to
1794 correctly extend the path.
1795 </para>
1796 </glossdef>
1797 </glossentry>
1798
1799 <glossentry id='var-FILESOVERRIDES'><glossterm>FILESOVERRIDES</glossterm>
1800 <glossdef>
1801 <para>
1802 A subset of <link linkend='var-OVERRIDES'><filename>OVERRIDES</filename></link>
1803 used by the OpenEmbedded build system for creating
1804 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>.
1805 You can find more information on how overrides are handled
1806 in the BitBake Manual that is located at
1807 <filename>bitbake/doc/manual</filename> in the
1808 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1809 </para>
1810
1811 <para>
1812 By default, the <filename>FILESOVERRIDES</filename>
1813 variable is defined as:
1814 <literallayout class='monospaced'>
1815 FILESOVERRIDES = "${TRANSLATED_TARGET_ARCH}:${MACHINEOVERRIDES}:${DISTROOVERRIDES}"
1816 </literallayout>
1817
1818 <note>
1819 Do not hand-edit the <filename>FILESOVERRIDES</filename>
1820 variable.
1821 The values match up with expected overrides and are
1822 used in an expected manner by the build system.
1823 </note>
1824 </para>
1825 </glossdef>
1826 </glossentry>
1827
1828 <glossentry id='var-FILESPATH'><glossterm>FILESPATH</glossterm>
1829 <glossdef>
1830 <para>
1831 The default set of directories the OpenEmbedded build system
1832 uses when searching for patches and files.
1833 During the build process, BitBake searches each directory in
1834 <filename>FILESPATH</filename> in the specified order when
1835 looking for files and patches specified by each
1836 <filename>file://</filename> URI in a recipe.
1837 </para>
1838
1839 <para>
1840 The default value for the <filename>FILESPATH</filename>
1841 variable is defined in the <filename>base.bbclass</filename>
1842 class found in <filename>meta/classes</filename> in the
1843 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
1844 <literallayout class='monospaced'>
1845 FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", \
1846 "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
1847 </literallayout>
1848 <note>
1849 Do not hand-edit the <filename>FILESPATH</filename>
1850 variable.
1851 If you want the build system to look in directories
1852 other than the defaults, extend the
1853 <filename>FILESPATH</filename> variable by using the
1854 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
1855 variable.
1856 </note>
1857 Be aware that the default <filename>FILESPATH</filename>
1858 directories do not map to directories in custom layers
1859 where append files (<filename>.bbappend</filename>)
1860 are used.
1861 If you want the build system to find patches or files
1862 that reside with your append files, you need to extend
1863 the <filename>FILESPATH</filename> variable by using
1864 the
1865 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
1866 variable.
1867 </para>
1868 </glossdef>
1869 </glossentry>
1870
1871 <glossentry id='var-FILESYSTEM_PERMS_TABLES'><glossterm>FILESYSTEM_PERMS_TABLES</glossterm>
1872 <glossdef>
1873 <para>Allows you to define your own file permissions settings table as part of
1874 your configuration for the packaging process.
1875 For example, suppose you need a consistent set of custom permissions for
1876 a set of groups and users across an entire work project.
1877 It is best to do this in the packages themselves but this is not always
1878 possible.
1879 </para>
1880 <para>
1881 By default, the OpenEmbedded build system uses the <filename>fs-perms.txt</filename>, which
1882 is located in the <filename>meta/files</filename> folder in the
1883 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1884 If you create your own file permissions setting table, you should place it in your
1885 layer or the distro's layer.
1886 </para>
1887 <para>
1888 You define the <filename>FILESYSTEM_PERMS_TABLES</filename> variable in the
1889 <filename>conf/local.conf</filename> file, which is found in the
1890 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>, to
1891 point to your custom <filename>fs-perms.txt</filename>.
1892 You can specify more than a single file permissions setting table.
1893 The paths you specify to these files must be defined within the
1894 <link linkend='var-BBPATH'><filename>BBPATH</filename></link> variable.
1895 </para>
1896 <para>
1897 For guidance on how to create your own file permissions settings table file,
1898 examine the existing <filename>fs-perms.txt</filename>.
1899 </para>
1900 </glossdef>
1901 </glossentry>
1902
1903 <glossentry id='var-FULL_OPTIMIZATION'><glossterm>FULL_OPTIMIZATION</glossterm>
1904 <glossdef>
1905 <para>
1906 The options to pass in
1907 <filename><link linkend='var-TARGET_CFLAGS'>TARGET_CFLAGS</link></filename>
1908 and <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename>
1909 when compiling an optimized system.
1910 This variable defaults to
1911 "-O2 -pipe ${DEBUG_FLAGS}".
1912 </para>
1913 </glossdef>
1914 </glossentry>
1915
1916 </glossdiv>
1917
1918<!-- <glossdiv id='var-glossary-g'><title>G</title>-->
1919<!-- </glossdiv>-->
1920
1921 <glossdiv id='var-glossary-h'><title>H</title>
1922
1923 <glossentry id='var-HOMEPAGE'><glossterm>HOMEPAGE</glossterm>
1924 <glossdef>
1925 <para>Website where more information about the software the recipe is building
1926 can be found.</para>
1927 </glossdef>
1928 </glossentry>
1929
1930 <glossentry id='var-HOST_SYS'><glossterm>HOST_SYS</glossterm>
1931 <glossdef>
1932 <para>
1933 Specifies the system, including the architecture and the
1934 operating system, for with the build is occurring
1935 in the context of the current
1936 recipe.
1937 The OpenEmbedded build system automatically sets this
1938 variable.
1939 You do not need to set the variable yourself.
1940 </para>
1941
1942 <para>
1943 Here are two examples:
1944 <itemizedlist>
1945 <listitem><para>Given a native recipe on a 32-bit
1946 x86 machine running Linux, the value is
1947 "i686-linux".
1948 </para></listitem>
1949 <listitem><para>Given a recipe being built for a
1950 little-endian MIPS target running Linux,
1951 the value might be "mipsel-linux".
1952 </para></listitem>
1953 </itemizedlist>
1954 </para>
1955 </glossdef>
1956 </glossentry>
1957
1958 </glossdiv>
1959
1960 <glossdiv id='var-glossary-i'><title>I</title>
1961
1962 <glossentry id='var-IMAGE_BASENAME'><glossterm>IMAGE_BASENAME</glossterm>
1963 <glossdef>
1964 <para>
1965 The base name of image output files.
1966 This variable defaults to the recipe name
1967 (<filename>${</filename><link linkend='var-PN'><filename>PN</filename></link><filename>}</filename>).
1968 </para>
1969 </glossdef>
1970 </glossentry>
1971
1972 <glossentry id='var-IMAGE_CLASSES'><glossterm>IMAGE_CLASSES</glossterm>
1973 <glossdef>
1974 <para>
1975 A list of classes that all images should inherit.
1976 You typically use this variable to specify the list of
1977 classes that register the different types of images
1978 the OpenEmbedded build system creates.
1979 </para>
1980
1981 <para>
1982 The default value for <filename>IMAGE_CLASSES</filename> is
1983 <filename>image_types</filename>.
1984 You can set this variable in your
1985 <filename>local.conf</filename> or in a distribution
1986 configuration file.
1987 </para>
1988
1989 <para>
1990 For more information, see
1991 <filename>meta/classes/image_types.bbclass</filename> in the
1992 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
1993 </para>
1994 </glossdef>
1995 </glossentry>
1996
1997 <glossentry id='var-IMAGE_FEATURES'><glossterm>IMAGE_FEATURES</glossterm>
1998 <glossdef>
1999 <para>
2000 The primary list of features to include in an image.
2001 Typically, you configure this variable in an image recipe.
2002 Although you can use this variable from your
2003 <filename>local.conf</filename> file, which is found in the
2004 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
2005 best practices dictate that you do not.
2006 <note>
2007 To enable extra features from outside the image recipe,
2008 use the
2009 <filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES</link></filename> variable.
2010 </note>
2011 For a list of image features that ships with the Yocto
2012 Project, see the
2013 "<link linkend="ref-features-image">Images</link>"
2014 section.
2015 </para>
2016
2017 <para>
2018 For an example that shows how to customize your image by
2019 using this variable, see the
2020 "<ulink url='&YOCTO_DOCS_DEV_URL;#usingpoky-extend-customimage-imagefeatures'>Customizing Images Using Custom <filename>IMAGE_FEATURES</filename> and <filename>EXTRA_IMAGE_FEATURES</filename></ulink>"
2021 section in the Yocto Project Development Manual.
2022 </para>
2023 </glossdef>
2024 </glossentry>
2025
2026 <glossentry id='var-IMAGE_FSTYPES'><glossterm>IMAGE_FSTYPES</glossterm>
2027 <glossdef>
2028 <para>
2029 Specifies the formats the OpenEmbedded build system uses
2030 during the build when creating the root filesystem.
2031 For example, setting <filename>IMAGE_FSTYPES</filename>
2032 as follows causes the build system to create root
2033 filesystems using two formats: <filename>.ext3</filename>
2034 and <filename>.tar.bz2</filename>:
2035 <literallayout class='monospaced'>
2036 IMAGE_FSTYPES = "ext3 tar.bz2"
2037 </literallayout>
2038 For the complete list of supported image formats from which
2039 you can choose, see
2040 <link linkend='var-IMAGE_TYPES'><filename>IMAGE_TYPES</filename></link>.
2041 </para>
2042 </glossdef>
2043 </glossentry>
2044
2045 <glossentry id='var-IMAGE_INSTALL'><glossterm>IMAGE_INSTALL</glossterm>
2046 <glossdef>
2047 <para>
2048 Specifies the packages to install into an image.
2049 The <filename>IMAGE_INSTALL</filename> variable is a mechanism for an image
2050 recipe and you should use it with care to avoid ordering issues.
2051 </para>
2052
2053 <para>
2054 Image recipes set <filename>IMAGE_INSTALL</filename> to specify the
2055 packages to install into an image through <filename>image.bbclass</filename>.
2056 Additionally, "helper" classes exist, such as <filename>core-image.bbclass</filename>,
2057 that can take
2058 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename> lists
2059 and turn these into auto-generated entries in
2060 <filename>IMAGE_INSTALL</filename> in addition to its default contents.
2061 </para>
2062
2063 <para>
2064 Using <filename>IMAGE_INSTALL</filename> with the <filename>+=</filename>
2065 operator from the <filename>/conf/local.conf</filename> file or from within
2066 an image recipe is not recommended as it can cause ordering issues.
2067 Since <filename>core-image.bbclass</filename> sets <filename>IMAGE_INSTALL</filename>
2068 to a default value using the <filename>?=</filename> operator, using a
2069 <filename>+=</filename> operation against <filename>IMAGE_INSTALL</filename>
2070 will result in unexpected behavior when used in
2071 <filename>conf/local.conf</filename>.
2072 Furthermore, the same operation from within an image recipe may or may not
2073 succeed depending on the specific situation.
2074 In both these cases, the behavior is contrary to how most users expect
2075 the <filename>+=</filename> operator to work.
2076 </para>
2077
2078 <para>
2079 When you use this variable, it is best to use it as follows:
2080 <literallayout class='monospaced'>
2081 IMAGE_INSTALL_append = " package-name"
2082 </literallayout>
2083 Be sure to include the space between the quotation character and the start of the
2084 package name or names.
2085 </para>
2086 </glossdef>
2087 </glossentry>
2088
2089 <glossentry id='var-IMAGE_LINGUAS'><glossterm>IMAGE_LINGUAS</glossterm>
2090 <glossdef>
2091 <para>
2092 Specifies the list of locales to install into the image
2093 during the root filesystem construction process.
2094 The OpenEmbedded build system automatically splits locale
2095 files, which are used for localization, into separate
2096 packages.
2097 Setting the <filename>IMAGE_LINGUAS</filename> variable
2098 ensures that any locale packages that correspond to packages
2099 already selected for installation into the image are also
2100 installed.
2101 Here is an example:
2102 <literallayout class='monospaced'>
2103 IMAGE_LINGUAS = "pt-br de-de"
2104 </literallayout>
2105 In this example, the build system ensures any Brazilian
2106 Portuguese and German locale files that correspond to
2107 packages in the image are installed (i.e.
2108 <filename>*-locale-pt-br</filename>
2109 and <filename>*-locale-de-de</filename> as well as
2110 <filename>*-locale-pt</filename>
2111 and <filename>*-locale-de</filename>, since some software
2112 packages only provide locale files by language and not by
2113 country-specific language).
2114 </para>
2115 </glossdef>
2116 </glossentry>
2117
2118 <glossentry id='var-IMAGE_NAME'><glossterm>IMAGE_NAME</glossterm>
2119 <glossdef>
2120 <para>
2121 The name of the output image files minus the extension.
2122 This variable is derived using the
2123 <link linkend='var-IMAGE_BASENAME'><filename>IMAGE_BASENAME</filename></link>,
2124 <link linkend='var-MACHINE'><filename>MACHINE</filename></link>,
2125 and
2126 <link linkend='var-DATETIME'><filename>DATETIME</filename></link>
2127 variables:
2128 <literallayout class='monospaced'>
2129 IMAGE_NAME = "${IMAGE_BASENAME}-${MACHINE}-${DATETIME}"
2130 </literallayout>
2131 </para>
2132 </glossdef>
2133 </glossentry>
2134
2135 <glossentry id='var-IMAGE_OVERHEAD_FACTOR'><glossterm>IMAGE_OVERHEAD_FACTOR</glossterm>
2136 <glossdef>
2137 <para>
2138 Defines a multiplier that the build system applies to the initial image
2139 size for cases when the multiplier times the returned disk usage value
2140 for the image is greater than the sum of
2141 <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>
2142 and
2143 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>.
2144 The result of the multiplier applied to the initial image size creates
2145 free disk space in the image as overhead.
2146 By default, the build process uses a multiplier of 1.3 for this variable.
2147 This default value results in 30% free disk space added to the image when this
2148 method is used to determine the final generated image size.
2149 You should be aware that post install scripts and the package management
2150 system uses disk space inside this overhead area.
2151 Consequently, the multiplier does not produce an image with
2152 all the theoretical free disk space.
2153 See <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>
2154 for information on how the build system determines the overall image size.
2155 </para>
2156
2157 <para>
2158 The default 30% free disk space typically gives the image enough room to boot
2159 and allows for basic post installs while still leaving a small amount of
2160 free disk space.
2161 If 30% free space is inadequate, you can increase the default value.
2162 For example, the following setting gives you 50% free space added to the image:
2163 <literallayout class='monospaced'>
2164 IMAGE_OVERHEAD_FACTOR = "1.5"
2165 </literallayout>
2166 </para>
2167
2168 <para>
2169 Alternatively, you can ensure a specific amount of free disk space is added
2170 to the image by using the
2171 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>
2172 variable.
2173 </para>
2174 </glossdef>
2175 </glossentry>
2176
2177 <glossentry id='var-IMAGE_POSTPROCESS_COMMAND'><glossterm>IMAGE_POSTPROCESS_COMMAND</glossterm>
2178 <glossdef>
2179 <para>
2180 Added by classes to run post processing commands once the
2181 OpenEmbedded build system has created the image.
2182 You can specify shell commands separated by semicolons:
2183 <literallayout class='monospaced'>
2184 IMAGE_POSTPROCESS_COMMAND += "&lt;shell_command&gt;; ... "
2185 </literallayout>
2186 If you need to pass the path to the root filesystem within
2187 the command, you can use
2188 <filename>${IMAGE_ROOTFS}</filename>, which points to
2189 the root filesystem image.
2190 </para>
2191 </glossdef>
2192 </glossentry>
2193
2194 <glossentry id='var-IMAGE_ROOTFS'><glossterm>IMAGE_ROOTFS</glossterm>
2195 <glossdef>
2196 <para>
2197 The location of the root filesystem while it is under
2198 construction (i.e. during <filename>do_rootfs</filename>).
2199 This variable is not configurable.
2200 Do not change it.
2201 </para>
2202 </glossdef>
2203 </glossentry>
2204
2205 <glossentry id='var-IMAGE_ROOTFS_EXTRA_SPACE'><glossterm>IMAGE_ROOTFS_EXTRA_SPACE</glossterm>
2206 <glossdef>
2207 <para>
2208 Defines additional free disk space created in the image in Kbytes.
2209 By default, this variable is set to "0".
2210 This free disk space is added to the image after the build system determines
2211 the image size as described in
2212 <filename><link linkend='var-IMAGE_ROOTFS_SIZE'>IMAGE_ROOTFS_SIZE</link></filename>.
2213 </para>
2214
2215 <para>
2216 This variable is particularly useful when you want to ensure that a
2217 specific amount of free disk space is available on a device after an image
2218 is installed and running.
2219 For example, to be sure 5 Gbytes of free disk space is available, set the
2220 variable as follows:
2221 <literallayout class='monospaced'>
2222 IMAGE_ROOTFS_EXTRA_SPACE = "5242880"
2223 </literallayout>
2224 </para>
2225
2226 <para>
2227 For example, the Yocto Project Build Appliance specifically requests 40 Gbytes
2228 of extra space with the line:
2229 <literallayout class='monospaced'>
2230 IMAGE_ROOTFS_EXTRA_SPACE = "41943040"
2231 </literallayout>
2232 </para>
2233 </glossdef>
2234 </glossentry>
2235
2236 <glossentry id='var-IMAGE_ROOTFS_SIZE'><glossterm>IMAGE_ROOTFS_SIZE</glossterm>
2237 <glossdef>
2238 <para>
2239 Defines the size in Kbytes for the generated image.
2240 The OpenEmbedded build system determines the final size for the generated
2241 image using an algorithm that takes into account the initial disk space used
2242 for the generated image, a requested size for the image, and requested
2243 additional free disk space to be added to the image.
2244 Programatically, the build system determines the final size of the
2245 generated image as follows:
2246 <literallayout class='monospaced'>
2247 if (image-du * overhead) &lt; rootfs-size:
2248 internal-rootfs-size = rootfs-size + xspace
2249 else:
2250 internal-rootfs-size = (image-du * overhead) + xspace
2251
2252 where:
2253
2254 image-du = Returned value of the du command on
2255 the image.
2256
2257 overhead = IMAGE_OVERHEAD_FACTOR
2258
2259 rootfs-size = IMAGE_ROOTFS_SIZE
2260
2261 internal-rootfs-size = Initial root filesystem
2262 size before any modifications.
2263
2264 xspace = IMAGE_ROOTFS_EXTRA_SPACE
2265 </literallayout>
2266 See the <link linkend='var-IMAGE_OVERHEAD_FACTOR'><filename>IMAGE_OVERHEAD_FACTOR</filename></link>
2267 and <link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'><filename>IMAGE_ROOTFS_EXTRA_SPACE</filename></link>
2268 variables for related information.
2269<!-- In the above example, <filename>overhead</filename> is defined by the
2270 <filename><link linkend='var-IMAGE_OVERHEAD_FACTOR'>IMAGE_OVERHEAD_FACTOR</link></filename>
2271 variable, <filename>xspace</filename> is defined by the
2272 <filename><link linkend='var-IMAGE_ROOTFS_EXTRA_SPACE'>IMAGE_ROOTFS_EXTRA_SPACE</link></filename>
2273 variable, and <filename>du</filename> is the results of the disk usage command
2274 on the initially generated image. -->
2275 </para>
2276 </glossdef>
2277 </glossentry>
2278
2279 <glossentry id='var-IMAGE_TYPES'><glossterm>IMAGE_TYPES</glossterm>
2280 <glossdef>
2281 <para>
2282 Specifies the complete list of supported image types
2283 by default:
2284 <literallayout class='monospaced'>
2285 jffs2
2286 sum.jffs2
2287 cramfs
2288 ext2
2289 ext2.gz
2290 ext2.bz2
2291 ext3
2292 ext3.gz
2293 ext2.lzma
2294 btrfs
2295 live
2296 squashfs
2297 squashfs-xz
2298 ubi
2299 ubifs
2300 tar
2301 tar.gz
2302 tar.bz2
2303 tar.xz
2304 cpio
2305 cpio.gz
2306 cpio.xz
2307 cpio.lzma
2308 vmdk
2309 elf
2310 </literallayout>
2311 For more information on how these types of images, see
2312 <filename>meta/classes/image_types*.bbclass</filename>
2313 in the
2314 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
2315 </para>
2316 </glossdef>
2317 </glossentry>
2318
2319 <glossentry id='var-INC_PR'><glossterm>INC_PR</glossterm>
2320 <glossdef>
2321 <para>Helps define the recipe revision for recipes that share
2322 a common <filename>include</filename> file.
2323 You can think of this variable as part of the recipe revision
2324 as set from within an include file.</para>
2325 <para>Suppose, for example, you have a set of recipes that
2326 are used across several projects.
2327 And, within each of those recipes the revision
2328 (its <link linkend='var-PR'><filename>PR</filename></link>
2329 value) is set accordingly.
2330 In this case, when the revision of those recipes changes,
2331 the burden is on you to find all those recipes and
2332 be sure that they get changed to reflect the updated
2333 version of the recipe.
2334 In this scenario, it can get complicated when recipes
2335 that are used in many places and provide common functionality
2336 are upgraded to a new revision.</para>
2337 <para>A more efficient way of dealing with this situation is
2338 to set the <filename>INC_PR</filename> variable inside
2339 the <filename>include</filename> files that the recipes
2340 share and then expand the <filename>INC_PR</filename>
2341 variable within the recipes to help
2342 define the recipe revision.
2343 </para>
2344 <para>
2345 The following provides an example that shows how to use
2346 the <filename>INC_PR</filename> variable
2347 given a common <filename>include</filename> file that
2348 defines the variable.
2349 Once the variable is defined in the
2350 <filename>include</filename> file, you can use the
2351 variable to set the <filename>PR</filename> values in
2352 each recipe.
2353 You will notice that when you set a recipe's
2354 <filename>PR</filename> you can provide more granular
2355 revisioning by appending values to the
2356 <filename>INC_PR</filename> variable:
2357 <literallayout class='monospaced'>
2358recipes-graphics/xorg-font/xorg-font-common.inc:INC_PR = "r2"
2359recipes-graphics/xorg-font/encodings_1.0.4.bb:PR = "${INC_PR}.1"
2360recipes-graphics/xorg-font/font-util_1.3.0.bb:PR = "${INC_PR}.0"
2361recipes-graphics/xorg-font/font-alias_1.0.3.bb:PR = "${INC_PR}.3"
2362 </literallayout>
2363 The first line of the example establishes the baseline
2364 revision to be used for all recipes that use the
2365 <filename>include</filename> file.
2366 The remaining lines in the example are from individual
2367 recipes and show how the <filename>PR</filename> value
2368 is set.</para>
2369 </glossdef>
2370 </glossentry>
2371
2372 <glossentry id='var-INCOMPATIBLE_LICENSE'><glossterm>INCOMPATIBLE_LICENSE</glossterm>
2373 <glossdef>
2374 <para>
2375 Specifies a space-separated list of license names
2376 (as they would appear in
2377 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>)
2378 that should be excluded from the build.
2379 Recipes that provide no alternatives to listed incompatible
2380 licenses are not built.
2381 Packages that are individually licensed with the specified
2382 incompatible licenses will be deleted.
2383 </para>
2384
2385 <note>
2386 This functionality is only regularly tested using
2387 the following setting:
2388 <literallayout class='monospaced'>
2389 INCOMPATIBLE_LICENSE = "GPLv3"
2390 </literallayout>
2391 Although you can use other settings, you might be required
2392 to remove dependencies on or provide alternatives to
2393 components that are required to produce a functional system
2394 image.
2395 </note>
2396 </glossdef>
2397 </glossentry>
2398
2399 <glossentry id='var-INHIBIT_DEFAULT_DEPS'><glossterm>INHIBIT_DEFAULT_DEPS</glossterm>
2400 <glossdef>
2401 <para>
2402 Prevents the default dependencies, namely the C compiler
2403 and standard C library (libc), from being added to
2404 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>.
2405 This variable is usually used within recipes that do not
2406 require any compilation using the C compiler.
2407 </para>
2408
2409 <para>
2410 Set the variable to "1" to prevent the default dependencies
2411 from being added.
2412 </para>
2413 </glossdef>
2414 </glossentry>
2415
2416 <glossentry id='var-INHIBIT_PACKAGE_STRIP'><glossterm>INHIBIT_PACKAGE_STRIP</glossterm>
2417 <glossdef>
2418 <para>
2419 If set to "1", causes the build to not strip binaries in resulting packages.
2420 </para>
2421 </glossdef>
2422 </glossentry>
2423
2424 <glossentry id='var-INHERIT'><glossterm>INHERIT</glossterm>
2425 <glossdef>
2426 <para>
2427 Causes the named class to be inherited at
2428 this point during parsing.
2429 The variable is only valid in configuration files.
2430 </para>
2431 </glossdef>
2432 </glossentry>
2433
2434 <glossentry id='var-INITRAMFS_FSTYPES'><glossterm>INITRAMFS_FSTYPES</glossterm>
2435 <glossdef>
2436 <para>
2437 Defines the format for the output image of an initial
2438 RAM disk (initramfs), which is used during boot.
2439 Supported formats are the same as those supported by the
2440 <link linkend='var-IMAGE_FSTYPES'><filename>IMAGE_FSTYPES</filename></link>
2441 variable.
2442 </para>
2443 </glossdef>
2444 </glossentry>
2445
2446 <glossentry id='var-INITSCRIPT_NAME'><glossterm>INITSCRIPT_NAME</glossterm>
2447 <glossdef>
2448 <para>
2449 The filename of the initialization script as installed to
2450 <filename>${sysconfdir}/init.d</filename>.
2451 </para>
2452 <para>
2453 This variable is used in recipes when using <filename>update-rc.d.bbclass</filename>.
2454 The variable is mandatory.
2455 </para>
2456 </glossdef>
2457 </glossentry>
2458
2459 <glossentry id='var-INITSCRIPT_PACKAGES'><glossterm>INITSCRIPT_PACKAGES</glossterm>
2460 <glossdef>
2461 <para>
2462 A list of the packages that contain initscripts.
2463 If multiple packages are specified, you need to append the package name
2464 to the other <filename>INITSCRIPT_*</filename> as an override.</para>
2465 <para>
2466 This variable is used in recipes when using <filename>update-rc.d.bbclass</filename>.
2467 The variable is optional and defaults to the
2468 <link linkend='var-PN'><filename>PN</filename></link> variable.
2469 </para>
2470 </glossdef>
2471 </glossentry>
2472
2473 <glossentry id='var-INITSCRIPT_PARAMS'><glossterm>INITSCRIPT_PARAMS</glossterm>
2474 <glossdef>
2475 <para>
2476 Specifies the options to pass to <filename>update-rc.d</filename>.
2477 Here is an example:
2478 <literallayout class='monospaced'>
2479 INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
2480 </literallayout>
2481 In this example, the script has a runlevel of 99,
2482 starts the script in initlevels 2 and 5, and
2483 stops the script in levels 0, 1 and 6.
2484 </para>
2485 <para>
2486 The variable is mandatory and is used in recipes when using
2487 <filename>update-rc.d.bbclass</filename>.
2488 </para>
2489 </glossdef>
2490 </glossentry>
2491
2492 <glossentry id='var-INSANE_SKIP'><glossterm>INSANE_SKIP</glossterm>
2493 <glossdef>
2494 <para>
2495 Specifies the QA checks to skip for a specific package
2496 within a recipe.
2497 For example, to skip the check for symbolic link
2498 <filename>.so</filename> files in the main package of a
2499 recipe, add the following to the recipe.
2500 The package name override must be used, which in this
2501 example is <filename>${PN}</filename>:
2502 <literallayout class='monospaced'>
2503 INSANE_SKIP_${PN} += "dev-so"
2504 </literallayout>
2505 </para>
2506 <para>
2507 See the "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
2508 section for a list of the valid QA checks you can
2509 specify using this variable.
2510 </para>
2511 </glossdef>
2512 </glossentry>
2513
2514 <glossentry id='var-IPK_FEED_URIS'><glossterm>IPK_FEED_URIS</glossterm>
2515 <glossdef>
2516 <para>
2517 When the IPK backend is in use and package management
2518 is enabled on the target, you can use this variable to
2519 set up <filename>opkg</filename> in the target image
2520 to point to package feeds on a nominated server.
2521 Once the feed is established, you can perform
2522 installations or upgrades using the package manager
2523 at runtime.
2524 </para>
2525 </glossdef>
2526 </glossentry>
2527
2528<!--
2529 <glossentry id='var-INTERCEPT_DIR'><glossterm>INTERCEPT_DIR</glossterm>
2530 <glossdef>
2531 <para>
2532 An environment variable that defines the directory where
2533 post installation hooks are installed for the
2534 post install environment.
2535 This variable is fixed as follows:
2536 <literallayout class='monospaced'>
2537 ${WORKDIR}/intercept_scripts
2538 </literallayout>
2539 </para>
2540
2541 <para>
2542 After installation of a target's root filesystem,
2543 post installation scripts, which are essentially bash scripts,
2544 are all executed just a single time.
2545 Limiting execution of these scripts minimizes installation
2546 time that would be lengthened due to certain packages
2547 triggering redundant operations.
2548 For example, consider the installation of font packages
2549 as a common example.
2550 Without limiting the execution of post installation scripts,
2551 all font directories would be rescanned to create the
2552 cache after each individual font package was installed.
2553 </para>
2554
2555 <para>
2556 Do not edit the <filename>INTERCEPT_DIR</filename>
2557 variable.
2558 </para>
2559 </glossdef>
2560 </glossentry>
2561-->
2562
2563 </glossdiv>
2564
2565<!-- <glossdiv id='var-glossary-j'><title>J</title>-->
2566<!-- </glossdiv>-->
2567
2568 <glossdiv id='var-glossary-k'><title>K</title>
2569
2570 <glossentry id='var-KARCH'><glossterm>KARCH</glossterm>
2571 <glossdef>
2572 <para>
2573 Defines the kernel architecture used when assembling
2574 the configuration.
2575 Architectures supported for this release are:
2576 <literallayout class='monospaced'>
2577 powerpc
2578 i386
2579 x86_64
2580 arm
2581 qemu
2582 mips
2583 </literallayout>
2584 </para>
2585
2586 <para>
2587 You define the <filename>KARCH</filename> variable in the
2588 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions'>BSP Descriptions</ulink>.
2589 </para>
2590 </glossdef>
2591 </glossentry>
2592
2593 <glossentry id='var-KBRANCH'><glossterm>KBRANCH</glossterm>
2594 <glossdef>
2595 <para>
2596 A regular expression used by the build process to explicitly identify the kernel
2597 branch that is validated, patched and configured during a build.
2598 The <filename>KBRANCH</filename> variable is optional.
2599 You can use it to trigger checks to ensure the exact kernel branch you want is
2600 being used by the build process.
2601 </para>
2602
2603 <para>
2604 Values for this variable are set in the kernel's recipe file and the kernel's
2605 append file.
2606 For example, if you are using the Yocto Project kernel that is based on the
2607 Linux 3.4 kernel, the kernel recipe file is the
2608 <filename>meta/recipes-kernel/linux/linux-yocto_3.4.bb</filename> file.
2609 Following is the default value for <filename>KBRANCH</filename> and the default
2610 override for the architectures the Yocto Project supports:
2611 <literallayout class='monospaced'>
2612 KBRANCH_DEFAULT = "standard/base"
2613 KBRANCH = "${KBRANCH_DEFAULT}"
2614 </literallayout>
2615 This branch exists in the <filename>linux-yocto-3.4</filename> kernel Git
2616 repository <ulink url='&YOCTO_GIT_URL;/cgit.cgi/linux-yocto-3.4/refs/heads'></ulink>.
2617 </para>
2618
2619 <para>
2620 This variable is also used from the kernel's append file to identify the kernel
2621 branch specific to a particular machine or target hardware.
2622 The kernel's append file is located in the BSP layer for a given machine.
2623 For example, the kernel append file for the Crown Bay BSP is in the
2624 <filename>meta-intel</filename> Git repository and is named
2625 <filename>meta-crownbay/recipes-kernel/linux/linux-yocto_3.4.bbappend</filename>.
2626 Here are the related statements from the append file:
2627 <literallayout class='monospaced'>
2628 COMPATIBLE_MACHINE_crownbay = "crownbay"
2629 KMACHINE_crownbay = "crownbay"
2630 KBRANCH_crownbay = "standard/crownbay"
2631
2632 COMPATIBLE_MACHINE_crownbay-noemgd = "crownbay-noemgd"
2633 KMACHINE_crownbay-noemgd = "crownbay"
2634 KBRANCH_crownbay-noemgd = "standard/crownbay"
2635 </literallayout>
2636 The <filename>KBRANCH_*</filename> statements identify the kernel branch to
2637 use when building for the Crown Bay BSP.
2638 In this case there are two identical statements: one for each type of
2639 Crown Bay machine.
2640 </para>
2641 </glossdef>
2642 </glossentry>
2643
2644 <glossentry id='var-KBRANCH_DEFAULT'><glossterm>KBRANCH_DEFAULT</glossterm>
2645 <glossdef>
2646 <para>
2647 Defines the Linux kernel source repository's default
2648 branch used to build the Linux kernel.
2649 The <filename>KBRANCH_DEFAULT</filename> value is
2650 the default value for
2651 <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link>.
2652 Unless you specify otherwise,
2653 <filename>KBRANCH_DEFAULT</filename> initializes to
2654 "master".
2655 </para>
2656 </glossdef>
2657 </glossentry>
2658
2659 <glossentry id='var-KERNEL_EXTRA_ARGS'><glossterm>KERNEL_EXTRA_ARGS</glossterm>
2660 <glossdef>
2661 <para>
2662 Specifies additional <filename>make</filename>
2663 command-line arguments the OpenEmbedded build system
2664 passes on when compiling the kernel.
2665 </para>
2666 </glossdef>
2667 </glossentry>
2668
2669 <glossentry id='var-KERNEL_FEATURES'><glossterm>KERNEL_FEATURES</glossterm>
2670 <glossdef>
2671 <para>Includes additional metadata from the Yocto Project kernel Git repository.
2672 In the OpenEmbedded build system, the default Board Support Packages (BSPs)
2673 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
2674 is provided through
2675 the <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>
2676 and <link linkend='var-KBRANCH'><filename>KBRANCH</filename></link> variables.
2677 You can use the <filename>KERNEL_FEATURES</filename> variable to further
2678 add metadata for all BSPs.</para>
2679 <para>The metadata you add through this variable includes config fragments and
2680 features descriptions,
2681 which usually includes patches as well as config fragments.
2682 You typically override the <filename>KERNEL_FEATURES</filename> variable
2683 for a specific machine.
2684 In this way, you can provide validated, but optional, sets of kernel
2685 configurations and features.</para>
2686 <para>For example, the following adds <filename>netfilter</filename> to all
2687 the Yocto Project kernels and adds sound support to the <filename>qemux86</filename>
2688 machine:
2689 <literallayout class='monospaced'>
2690 # Add netfilter to all linux-yocto kernels
2691 KERNEL_FEATURES="features/netfilter"
2692
2693 # Add sound support to the qemux86 machine
2694 KERNEL_FEATURES_append_qemux86=" cfg/sound"
2695 </literallayout></para>
2696 </glossdef>
2697 </glossentry>
2698
2699 <glossentry id='var-KERNEL_IMAGETYPE'><glossterm>KERNEL_IMAGETYPE</glossterm>
2700 <glossdef>
2701 <para>The type of kernel to build for a device, usually set by the
2702 machine configuration files and defaults to "zImage".
2703 This variable is used
2704 when building the kernel and is passed to <filename>make</filename> as the target to
2705 build.</para>
2706 </glossdef>
2707 </glossentry>
2708
2709 <glossentry id='var-KERNEL_PATH'><glossterm>KERNEL_PATH</glossterm>
2710 <glossdef>
2711 <para>
2712 The location of the kernel sources.
2713 This variable is set to the value of the
2714 <link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
2715 within the <filename>module.bbclass</filename> class.
2716 For information on how this variable is used, see the
2717 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
2718 section.
2719 </para>
2720
2721 <para>
2722 The <link linkend='var-KERNEL_SRC'><filename>KERNEL_SRC</filename></link>
2723 variable is identical to the <filename>KERNEL_PATH</filename>
2724 variable.
2725 </para>
2726 </glossdef>
2727 </glossentry>
2728
2729 <glossentry id='var-KERNEL_SRC'><glossterm>KERNEL_SRC</glossterm>
2730 <glossdef>
2731 <para>
2732 The location of the kernel sources.
2733 This variable is set to the value of the
2734 <link linkend='var-STAGING_KERNEL_DIR'><filename>STAGING_KERNEL_DIR</filename></link>
2735 within the <filename>module.bbclass</filename> class.
2736 For information on how this variable is used, see the
2737 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#incorporating-out-of-tree-modules'>Incorporating Out-of-Tree Modules</ulink>"
2738 section.
2739 </para>
2740
2741 <para>
2742 The <link linkend='var-KERNEL_PATH'><filename>KERNEL_PATH</filename></link>
2743 variable is identical to the <filename>KERNEL_SRC</filename>
2744 variable.
2745 </para>
2746 </glossdef>
2747 </glossentry>
2748
2749 <glossentry id='var-KFEATURE_DESCRIPTION'><glossterm>KFEATURE_DESCRIPTION</glossterm>
2750 <glossdef>
2751 <para>
2752 Provides a short description of a configuration fragment.
2753 You use this variable in the <filename>.scc</filename>
2754 file that describes a configuration fragment file.
2755 Here is the variable used in a file named
2756 <filename>smp.scc</filename> to describe SMP being
2757 enabled:
2758 <literallayout class='monospaced'>
2759 define KFEATURE_DESCRIPTION "Enable SMP"
2760 </literallayout>
2761 </para>
2762 </glossdef>
2763 </glossentry>
2764
2765 <glossentry id='var-KMACHINE'><glossterm>KMACHINE</glossterm>
2766 <glossdef>
2767 <para>
2768 The machine as known by the kernel.
2769 Sometimes the machine name used by the kernel does not match the machine name
2770 used by the OpenEmbedded build system.
2771 For example, the machine name that the OpenEmbedded build system understands as
2772 <filename>qemuarm</filename> goes by a different name in the Linux Yocto kernel.
2773 The kernel understands that machine as <filename>arm_versatile926ejs</filename>.
2774 For cases like these, the <filename>KMACHINE</filename> variable maps the
2775 kernel machine name to the OpenEmbedded build system machine name.
2776 </para>
2777
2778 <para>
2779 Kernel machine names are initially defined in the
2780 Yocto Linux Kernel's <filename>meta</filename> branch.
2781 From the <filename>meta</filename> branch, look in
2782 the <filename>meta/cfg/kernel-cache/bsp/&lt;bsp_name&gt;/&lt;bsp-name&gt;-&lt;kernel-type&gt;.scc</filename> file.
2783 For example, from the <filename>meta</filename> branch in the
2784 <filename>linux-yocto-3.0</filename> kernel, the
2785 <filename>meta/cfg/kernel-cache/bsp/cedartrail/cedartrail-standard.scc</filename> file
2786 has the following:
2787 <literallayout class='monospaced'>
2788 define KMACHINE cedartrail
2789 define KTYPE standard
2790 define KARCH i386
2791
2792 include ktypes/standard
2793 branch cedartrail
2794
2795 include cedartrail.scc
2796 </literallayout>
2797 You can see that the kernel understands the machine name for
2798 the Cedar Trail Board Support Package (BSP) as
2799 <filename>cedartrail</filename>.
2800 </para>
2801
2802 <para>
2803 If you look in the Cedar Trail BSP layer in the
2804 <filename>meta-intel</filename>
2805 <ulink url='&YOCTO_DOCS_DEV_URL;#source-repositories'>Source Repositories</ulink>
2806 at <filename>meta-cedartrail/recipes-kernel/linux/linux-yocto_3.0.bbappend</filename>,
2807 you will find the following statements among others:
2808 <literallayout class='monospaced'>
2809 COMPATIBLE_MACHINE_cedartrail = "cedartrail"
2810 KMACHINE_cedartrail = "cedartrail"
2811 KBRANCH_cedartrail = "yocto/standard/cedartrail"
2812 KERNEL_FEATURES_append_cedartrail += "bsp/cedartrail/cedartrail-pvr-merge.scc"
2813 KERNEL_FEATURES_append_cedartrail += "cfg/efi-ext.scc"
2814
2815 COMPATIBLE_MACHINE_cedartrail-nopvr = "cedartrail"
2816 KMACHINE_cedartrail-nopvr = "cedartrail"
2817 KBRANCH_cedartrail-nopvr = "yocto/standard/cedartrail"
2818 KERNEL_FEATURES_append_cedartrail-nopvr += " cfg/smp.scc"
2819 </literallayout>
2820 The <filename>KMACHINE</filename> statements in the kernel's append file make sure that
2821 the OpenEmbedded build system and the Yocto Linux kernel understand the same machine
2822 names.
2823 </para>
2824
2825 <para>
2826 This append file uses two <filename>KMACHINE</filename> statements.
2827 The first is not really necessary but does ensure that the machine known to the
2828 OpenEmbedded build system as <filename>cedartrail</filename> maps to the machine
2829 in the kernel also known as <filename>cedartrail</filename>:
2830 <literallayout class='monospaced'>
2831 KMACHINE_cedartrail = "cedartrail"
2832 </literallayout>
2833 </para>
2834
2835 <para>
2836 The second statement is a good example of why the <filename>KMACHINE</filename> variable
2837 is needed.
2838 In this example, the OpenEmbedded build system uses the <filename>cedartrail-nopvr</filename>
2839 machine name to refer to the Cedar Trail BSP that does not support the proprietary
2840 PowerVR driver.
2841 The kernel, however, uses the machine name <filename>cedartrail</filename>.
2842 Thus, the append file must map the <filename>cedartrail-nopvr</filename> machine name to
2843 the kernel's <filename>cedartrail</filename> name:
2844 <literallayout class='monospaced'>
2845 KMACHINE_cedartrail-nopvr = "cedartrail"
2846 </literallayout>
2847 </para>
2848
2849 <para>
2850 BSPs that ship with the Yocto Project release provide all mappings between the Yocto
2851 Project kernel machine names and the OpenEmbedded machine names.
2852 Be sure to use the <filename>KMACHINE</filename> if you create a BSP and the machine
2853 name you use is different than that used in the kernel.
2854 </para>
2855 </glossdef>
2856 </glossentry>
2857
2858 <glossentry id='var-KTYPE'><glossterm>KTYPE</glossterm>
2859 <glossdef>
2860 <para>
2861 Defines the kernel type to be used in assembling the
2862 configuration.
2863 The linux-yocto recipes define "standard", "tiny",
2864 and "preempt-rt" kernel types.
2865 See the
2866 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types'>Kernel Types</ulink>"
2867 section in the Yocto Project Linux Kernel Development
2868 Manual for more information on kernel types.
2869 </para>
2870
2871 <para>
2872 You define the <filename>KTYPE</filename> variable in the
2873 <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#bsp-descriptions'>BSP Descriptions</ulink>.
2874 The value you use must match the value used for the
2875 <link linkend='var-LINUX_KERNEL_TYPE'><filename>LINUX_KERNEL_TYPE</filename></link>
2876 value used by the kernel recipe.
2877 </para>
2878 </glossdef>
2879 </glossentry>
2880 </glossdiv>
2881
2882 <glossdiv id='var-glossary-l'><title>L</title>
2883
2884 <glossentry id='var-LAYERDEPENDS'><glossterm>LAYERDEPENDS</glossterm>
2885 <glossdef>
2886 <para>Lists the layers that this recipe depends upon, separated by spaces.
2887 Optionally, you can specify a specific layer version for a dependency
2888 by adding it to the end of the layer name with a colon, (e.g. "anotherlayer:3"
2889 to be compared against
2890 <link linkend='var-LAYERVERSION'><filename>LAYERVERSION</filename></link><filename>_anotherlayer</filename>
2891 in this case).
2892 An error will be produced if any dependency is missing or
2893 the version numbers do not match exactly (if specified).
2894 This variable is used in the <filename>conf/layer.conf</filename> file
2895 and must be suffixed with the name of the specific layer (e.g.
2896 <filename>LAYERDEPENDS_mylayer</filename>).</para>
2897 </glossdef>
2898 </glossentry>
2899
2900 <glossentry id='var-LAYERDIR'><glossterm>LAYERDIR</glossterm>
2901 <glossdef>
2902 <para>When used inside the <filename>layer.conf</filename> configuration
2903 file, this variable provides the path of the current layer.
2904 This variable is not available outside of <filename>layer.conf</filename>
2905 and references are expanded immediately when parsing of the file completes.</para>
2906 </glossdef>
2907 </glossentry>
2908
2909 <glossentry id='var-LAYERVERSION'><glossterm>LAYERVERSION</glossterm>
2910 <glossdef>
2911 <para>Optionally specifies the version of a layer as a single number.
2912 You can use this within
2913 <link linkend='var-LAYERDEPENDS'><filename>LAYERDEPENDS</filename></link>
2914 for another layer in order to depend on a specific version
2915 of the layer.
2916 This variable is used in the <filename>conf/layer.conf</filename> file
2917 and must be suffixed with the name of the specific layer (e.g.
2918 <filename>LAYERVERSION_mylayer</filename>).</para>
2919 </glossdef>
2920 </glossentry>
2921
2922 <glossentry id='var-LIC_FILES_CHKSUM'><glossterm>LIC_FILES_CHKSUM</glossterm>
2923 <glossdef>
2924 <para>Checksums of the license text in the recipe source code.</para>
2925 <para>This variable tracks changes in license text of the source
2926 code files.
2927 If the license text is changed, it will trigger a build
2928 failure, which gives the developer an opportunity to review any
2929 license change.</para>
2930 <para>
2931 This variable must be defined for all recipes (unless
2932 <link linkend='var-LICENSE'><filename>LICENSE</filename></link>
2933 is set to "CLOSED")</para>
2934 <para>For more information, see the
2935 <link linkend='usingpoky-configuring-LIC_FILES_CHKSUM'>
2936 Tracking License Changes</link> section</para>
2937 </glossdef>
2938 </glossentry>
2939
2940 <glossentry id='var-LICENSE'><glossterm>LICENSE</glossterm>
2941 <glossdef>
2942 <para>
2943 The list of source licenses for the recipe.
2944 Follow these rules:
2945 <itemizedlist>
2946 <listitem><para>Do not use spaces within individual
2947 license names.</para></listitem>
2948 <listitem><para>Separate license names using
2949 | (pipe) when there is a choice between licenses.
2950 </para></listitem>
2951 <listitem><para>Separate license names using
2952 &amp; (ampersand) when multiple licenses exist
2953 that cover different parts of the source.
2954 </para></listitem>
2955 <listitem><para>You can use spaces between license
2956 names.</para></listitem>
2957 </itemizedlist>
2958 </para>
2959
2960 <para>
2961 Here are some examples:
2962 <literallayout class='monospaced'>
2963 LICENSE = "LGPLv2.1 | GPLv3"
2964 LICENSE = "MPL-1 &amp; LGPLv2.1"
2965 LICENSE = "GPLv2+"
2966 </literallayout>
2967 The first example is from the recipes for Qt, which the user
2968 may choose to distribute under either the LGPL version
2969 2.1 or GPL version 3.
2970 The second example is from Cairo where two licenses cover
2971 different parts of the source code.
2972 The final example is from <filename>sysstat</filename>,
2973 which presents a single license.
2974 </para>
2975
2976 <para>
2977 You can also specify licenses on a per-package basis to
2978 handle situations where components of the output have
2979 different licenses.
2980 For example, a piece of software whose code is
2981 licensed under GPLv2 but has accompanying documentation
2982 licensed under the GNU Free Documentation License 1.2 could
2983 be specified as follows:
2984 <literallayout class='monospaced'>
2985 LICENSE = "GFDL-1.2 &amp; GPLv2"
2986 LICENSE_${PN} = "GPLv2"
2987 LICENSE_${PN}-doc = "GFDL-1.2"
2988 </literallayout>
2989 </para>
2990 </glossdef>
2991 </glossentry>
2992
2993 <glossentry id='var-LICENSE_PATH'><glossterm>LICENSE_PATH</glossterm>
2994 <glossdef>
2995 <para>Path to additional licenses used during the build.
2996 By default, the OpenEmbedded build system uses <filename>COMMON_LICENSE_DIR</filename>
2997 to define the directory that holds common license text used during the build.
2998 The <filename>LICENSE_PATH</filename> variable allows you to extend that
2999 location to other areas that have additional licenses:
3000 <literallayout class='monospaced'>
3001 LICENSE_PATH += "/path/to/additional/common/licenses"
3002 </literallayout></para>
3003 </glossdef>
3004 </glossentry>
3005
3006 <glossentry id='var-LINUX_KERNEL_TYPE'><glossterm>LINUX_KERNEL_TYPE</glossterm>
3007 <glossdef>
3008 <para>
3009 Defines the kernel type to be used in assembling the
3010 configuration.
3011 The linux-yocto recipes define "standard", "tiny", and
3012 "preempt-rt" kernel types.
3013 See the
3014 "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#kernel-types'>Kernel Types</ulink>"
3015 section in the Yocto Project Linux Kernel Development
3016 Manual for more information on kernel types.
3017 </para>
3018
3019 <para>
3020 If you do not specify a
3021 <filename>LINUX_KERNEL_TYPE</filename>, it defaults to
3022 "standard".
3023 Together with
3024 <link linkend='var-KMACHINE'><filename>KMACHINE</filename></link>,
3025 the <filename>LINUX_KERNEL_TYPE</filename> variable
3026 defines the search
3027 arguments used by the kernel tools to find the appropriate
3028 description within the kernel
3029 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
3030 with which to build out the sources and configuration.
3031 </para>
3032 </glossdef>
3033 </glossentry>
3034
3035 <glossentry id='var-LINUX_VERSION'><glossterm>LINUX_VERSION</glossterm>
3036 <glossdef>
3037 <para>The Linux version from <filename>kernel.org</filename>
3038 on which the Linux kernel image being built using the
3039 OpenEmbedded build system is based.
3040 You define this variable in the kernel recipe.
3041 For example, the <filename>linux-yocto-3.4.bb</filename>
3042 kernel recipe found in
3043 <filename>meta/recipes-kernel/linux</filename>
3044 defines the variables as follows:
3045 <literallayout class='monospaced'>
3046 LINUX_VERSION ?= "3.4.24"
3047 </literallayout>
3048 The <filename>LINUX_VERSION</filename> variable is used to
3049 define <link linkend='var-PV'><filename>PV</filename></link>
3050 for the recipe:
3051 <literallayout class='monospaced'>
3052 PV = "${LINUX_VERSION}+git${SRCPV}"
3053 </literallayout></para>
3054 </glossdef>
3055 </glossentry>
3056
3057 <glossentry id='var-LINUX_VERSION_EXTENSION'><glossterm>LINUX_VERSION_EXTENSION</glossterm>
3058 <glossdef>
3059 <para>A string extension compiled into the version
3060 string of the Linux kernel built with the OpenEmbedded
3061 build system.
3062 You define this variable in the kernel recipe.
3063 For example, the linux-yocto kernel recipes all define
3064 the variable as follows:
3065 <literallayout class='monospaced'>
3066 LINUX_VERSION_EXTENSION ?= "-yocto-${<link linkend='var-LINUX_KERNEL_TYPE'>LINUX_KERNEL_TYPE</link>}"
3067 </literallayout>
3068 Defining this variable essentially sets the
3069 Linux kernel configuration item
3070 <filename>CONFIG_LOCALVERSION</filename>, which is visible
3071 through the <filename>uname</filename> command.
3072 Here is an example that shows the extension assuming it
3073 was set as previously shown:
3074 <literallayout class='monospaced'>
3075 $ uname -r
3076 3.7.0-rc8-custom
3077 </literallayout>
3078 </para>
3079 </glossdef>
3080 </glossentry>
3081
3082 <glossentry id='var-LOG_DIR'><glossterm>LOG_DIR</glossterm>
3083 <glossdef>
3084 <para>
3085 Specifies the directory to which the OpenEmbedded build
3086 system writes overall log files.
3087 The default directory is <filename>${TMPDIR}/log</filename>.
3088 </para>
3089 <para>
3090 For the directory containing logs specific to each task,
3091 see the <link linkend='var-T'><filename>T</filename></link>
3092 variable.
3093 </para>
3094 </glossdef>
3095 </glossentry>
3096
3097 </glossdiv>
3098
3099 <glossdiv id='var-glossary-m'><title>M</title>
3100
3101 <glossentry id='var-MACHINE'><glossterm>MACHINE</glossterm>
3102 <glossdef>
3103 <para>
3104 Specifies the target device for which the image is built.
3105 You define <filename>MACHINE</filename> in the
3106 <filename>local.conf</filename> file found in the
3107 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
3108 By default, <filename>MACHINE</filename> is set to
3109 "qemux86", which is an x86-based architecture machine to
3110 be emulated using QEMU:
3111 <literallayout class='monospaced'>
3112 MACHINE ?= "qemux86"
3113 </literallayout>
3114 The variable corresponds to a machine configuration file of the
3115 same name, through which machine-specific configurations are set.
3116 Thus, when <filename>MACHINE</filename> is set to "qemux86" there
3117 exists the corresponding <filename>qemux86.conf</filename> machine
3118 configuration file, which can be found in the
3119 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
3120 in <filename>meta/conf/machine</filename>.
3121 </para>
3122
3123 <para>
3124 The list of machines supported by the Yocto Project as
3125 shipped include the following:
3126 <literallayout class='monospaced'>
3127 MACHINE ?= "qemuarm"
3128 MACHINE ?= "qemumips"
3129 MACHINE ?= "qemuppc"
3130 MACHINE ?= "qemux86"
3131 MACHINE ?= "qemux86-64"
3132 MACHINE ?= "genericx86"
3133 MACHINE ?= "genericx86-64"
3134 MACHINE ?= "beagleboard"
3135 MACHINE ?= "mpc8315e-rdb"
3136 MACHINE ?= "routerstationpro"
3137 </literallayout>
3138 The last five are Yocto Project reference hardware boards, which
3139 are provided in the <filename>meta-yocto-bsp</filename> layer.
3140 <note>Adding additional Board Support Package (BSP) layers
3141 to your configuration adds new possible settings for
3142 <filename>MACHINE</filename>.
3143 </note>
3144 </para>
3145 </glossdef>
3146 </glossentry>
3147
3148 <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</glossterm>
3149 <glossdef>
3150 <para></para>
3151 <para>
3152 A list of required machine-specific packages to install as part of
3153 the image being built.
3154 The build process depends on these packages being present.
3155 Furthermore, because this is a "machine essential" variable, the list of
3156 packages are essential for the machine to boot.
3157 The impact of this variable affects images based on
3158 <filename>packagegroup-core-boot</filename>,
3159 including the <filename>core-image-minimal</filename> image.
3160 </para>
3161 <para>
3162 This variable is similar to the
3163 <filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</link></filename>
3164 variable with the exception that the image being built has a build
3165 dependency on the variable's list of packages.
3166 In other words, the image will not build if a file in this list is not found.
3167 </para>
3168 <para>
3169 As an example, suppose the machine for which you are building requires
3170 <filename>example-init</filename> to be run during boot to initialize the hardware.
3171 In this case, you would use the following in the machine's
3172 <filename>.conf</filename> configuration file:
3173 <literallayout class='monospaced'>
3174 MACHINE_ESSENTIAL_EXTRA_RDEPENDS += "example-init"
3175 </literallayout>
3176 </para>
3177 </glossdef>
3178 </glossentry>
3179
3180 <glossentry id='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'><glossterm>MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</glossterm>
3181 <glossdef>
3182 <para></para>
3183 <para>
3184 A list of recommended machine-specific packages to install as part of
3185 the image being built.
3186 The build process does not depend on these packages being present.
3187 However, because this is a "machine essential" variable, the list of
3188 packages are essential for the machine to boot.
3189 The impact of this variable affects images based on
3190 <filename>packagegroup-core-boot</filename>,
3191 including the <filename>core-image-minimal</filename> image.
3192 </para>
3193 <para>
3194 This variable is similar to the
3195 <filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'>MACHINE_ESSENTIAL_EXTRA_RDEPENDS</link></filename>
3196 variable with the exception that the image being built does not have a build
3197 dependency on the variable's list of packages.
3198 In other words, the image will still build if a package in this list is not found.
3199 Typically, this variable is used to handle essential kernel modules, whose
3200 functionality may be selected to be built into the kernel rather than as a module,
3201 in which case a package will not be produced.
3202 </para>
3203 <para>
3204 Consider an example where you have a custom kernel where a specific touchscreen
3205 driver is required for the machine to be usable.
3206 However, the driver can be built as a module or
3207 into the kernel depending on the kernel configuration.
3208 If the driver is built as a module, you want it to be installed.
3209 But, when the driver is built into the kernel, you still want the
3210 build to succeed.
3211 This variable sets up a "recommends" relationship so that in the latter case,
3212 the build will not fail due to the missing package.
3213 To accomplish this, assuming the package for the module was called
3214 <filename>kernel-module-ab123</filename>, you would use the
3215 following in the machine's <filename>.conf</filename> configuration
3216 file:
3217 <literallayout class='monospaced'>
3218 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS += "kernel-module-ab123"
3219 </literallayout>
3220 </para>
3221 <para>
3222 Some examples of these machine essentials are flash, screen, keyboard, mouse,
3223 or touchscreen drivers (depending on the machine).
3224 </para>
3225 </glossdef>
3226 </glossentry>
3227
3228 <glossentry id='var-MACHINE_EXTRA_RDEPENDS'><glossterm>MACHINE_EXTRA_RDEPENDS</glossterm>
3229 <glossdef>
3230 <para>
3231 A list of machine-specific packages to install as part of the
3232 image being built that are not essential for the machine to boot.
3233 However, the build process for more fully-featured images
3234 depends on the packages being present.
3235 </para>
3236 <para>
3237 This variable affects all images based on
3238 <filename>packagegroup-base</filename>, which does not include the
3239 <filename>core-image-minimal</filename> or <filename>core-image-basic</filename>
3240 images.
3241 </para>
3242 <para>
3243 The variable is similar to the
3244 <filename><link linkend='var-MACHINE_EXTRA_RRECOMMENDS'>MACHINE_EXTRA_RRECOMMENDS</link></filename>
3245 variable with the exception that the image being built has a build
3246 dependency on the variable's list of packages.
3247 In other words, the image will not build if a file in this list is not found.
3248 </para>
3249 <para>
3250 An example is a machine that has WiFi capability but is not
3251 essential for the machine to boot the image.
3252 However, if you are building a more fully-featured image, you want to enable
3253 the WiFi.
3254 The package containing the firmware for the WiFi hardware is always
3255 expected to exist, so it is acceptable for the build process to depend upon
3256 finding the package.
3257 In this case, assuming the package for the firmware was called
3258 <filename>wifidriver-firmware</filename>, you would use the following in the
3259 <filename>.conf</filename> file for the machine:
3260 <literallayout class='monospaced'>
3261 MACHINE_EXTRA_RDEPENDS += "wifidriver-firmware"
3262 </literallayout>
3263 </para>
3264 </glossdef>
3265 </glossentry>
3266
3267 <glossentry id='var-MACHINE_EXTRA_RRECOMMENDS'><glossterm>MACHINE_EXTRA_RRECOMMENDS</glossterm>
3268 <glossdef>
3269 <para></para>
3270 <para>
3271 A list of machine-specific packages to install as part of the
3272 image being built that are not essential for booting the machine.
3273 The image being built has no build dependency on this list of packages.
3274 </para>
3275 <para>
3276 This variable affects only images based on
3277 <filename>packagegroup-base</filename>, which does not include the
3278 <filename>core-image-minimal</filename> or <filename>core-image-basic</filename>
3279 images.
3280 </para>
3281 <para>
3282 This variable is similar to the
3283 <filename><link linkend='var-MACHINE_EXTRA_RDEPENDS'>MACHINE_EXTRA_RDEPENDS</link></filename>
3284 variable with the exception that the image being built does not have a build
3285 dependency on the variable's list of packages.
3286 In other words, the image will build if a file in this list is not found.
3287 </para>
3288 <para>
3289 An example is a machine that has WiFi capability but is not essential
3290 For the machine to boot the image.
3291 However, if you are building a more fully-featured image, you want to enable
3292 WiFi.
3293 In this case, the package containing the WiFi kernel module will not be produced
3294 if the WiFi driver is built into the kernel, in which case you still want the
3295 build to succeed instead of failing as a result of the package not being found.
3296 To accomplish this, assuming the package for the module was called
3297 <filename>kernel-module-examplewifi</filename>, you would use the
3298 following in the <filename>.conf</filename> file for the machine:
3299 <literallayout class='monospaced'>
3300 MACHINE_EXTRA_RRECOMMENDS += "kernel-module-examplewifi"
3301 </literallayout>
3302 </para>
3303 </glossdef>
3304 </glossentry>
3305
3306 <glossentry id='var-MACHINE_FEATURES'><glossterm>MACHINE_FEATURES</glossterm>
3307 <glossdef>
3308 <para>Specifies the list of hardware features the
3309 <link linkend='var-MACHINE'>MACHINE</link> supports.
3310 For example, including the "bluetooth" feature causes the
3311 <filename>bluez</filename> bluetooth daemon to be built and
3312 added to the image.
3313 It also causes the <filename>connman</filename> recipe
3314 to look at <filename>MACHINE_FEATURES</filename> and when it
3315 finds "bluetooth" there it enables the bluetooth
3316 support in ConnMan.
3317 </para>
3318
3319 <para>
3320 For a list of features supported by the Yocto Project as shipped,
3321 see the "<link linkend='ref-features-machine'>Machine</link>" section.
3322 </para>
3323 </glossdef>
3324 </glossentry>
3325
3326 <glossentry id='var-MACHINE_FEATURES_BACKFILL'><glossterm>MACHINE_FEATURES_BACKFILL</glossterm>
3327 <glossdef>
3328 <para>Features to be added to
3329 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>
3330 if not also present in
3331 <filename><link linkend='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'>MACHINE_FEATURES_BACKFILL_CONSIDERED</link></filename>.
3332 </para>
3333
3334 <para>
3335 This variable is set in the <filename>meta/conf/bitbake.conf</filename> file.
3336 It is not intended to be user-configurable.
3337 It is best to just reference the variable to see which machine features are
3338 being backfilled for all machine configurations.
3339 See the "<link linkend='ref-features-backfill'>Feature backfilling</link>" section for
3340 more information.
3341 </para>
3342 </glossdef>
3343 </glossentry>
3344
3345 <glossentry id='var-MACHINE_FEATURES_BACKFILL_CONSIDERED'><glossterm>MACHINE_FEATURES_BACKFILL_CONSIDERED</glossterm>
3346 <glossdef>
3347 <para>Features from
3348 <filename><link linkend='var-MACHINE_FEATURES_BACKFILL'>MACHINE_FEATURES_BACKFILL</link></filename>
3349 that should not be backfilled (i.e. added to
3350 <filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link></filename>)
3351 during the build.
3352 See the "<link linkend='ref-features-backfill'>Feature backfilling</link>" section for
3353 more information.
3354 </para>
3355 </glossdef>
3356 </glossentry>
3357
3358 <glossentry id='var-MACHINEOVERRIDES'><glossterm>MACHINEOVERRIDES</glossterm>
3359 <glossdef>
3360 <para>
3361 Lists overrides specific to the current machine.
3362 By default, this list includes the value
3363 of <filename><link linkend='var-MACHINE'>MACHINE</link></filename>.
3364 You can extend the list to apply variable overrides for
3365 classes of machines.
3366 For example, all QEMU emulated machines (e.g. qemuarm,
3367 qemux86, and so forth) include a common file named
3368 <filename>meta/conf/machine/include/qemu.inc</filename>
3369 that prepends <filename>MACHINEOVERRIDES</filename> with
3370 the following variable override:
3371 <literallayout class='monospaced'>
3372 MACHINEOVERRIDES =. "qemuall:"
3373 </literallayout>
3374 Applying an override like <filename>qemuall</filename>
3375 affects all QEMU emulated machines elsewhere.
3376 Here is an example from the
3377 <filename>connman-conf</filename> recipe:
3378 <literallayout class='monospaced'>
3379 SRC_URI_append_qemuall = "file://wired.config \
3380 file://wired-setup \
3381 "
3382 </literallayout>
3383 </para>
3384 </glossdef>
3385 </glossentry>
3386
3387 <glossentry id='var-MAINTAINER'><glossterm>MAINTAINER</glossterm>
3388 <glossdef>
3389 <para>The email address of the distribution maintainer.</para>
3390 </glossdef>
3391 </glossentry>
3392
3393 <glossentry id='var-MIRRORS'><glossterm>MIRRORS</glossterm>
3394 <glossdef>
3395 <para>
3396 Specifies additional paths from which the OpenEmbedded
3397 build system gets source code.
3398 When the build system searches for source code, it first
3399 tries the local download directory.
3400 If that location fails, the build system tries locations
3401 defined by
3402 <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>,
3403 the upstream source, and then locations specified by
3404 <filename>MIRRORS</filename> in that order.
3405 </para>
3406
3407 <para>
3408 Assuming your distribution
3409 (<link linkend='var-DISTRO'><filename>DISTRO</filename></link>)
3410 is "poky", the default value for
3411 <filename>MIRRORS</filename> is defined in the
3412 <filename>conf/distro/poky.conf</filename> file in the
3413 <filename>meta-yocto</filename> Git repository.
3414 </para>
3415 </glossdef>
3416 </glossentry>
3417
3418 <glossentry id='var-MLPREFIX'><glossterm>MLPREFIX</glossterm>
3419 <glossdef>
3420 <para>
3421 Specifies a prefix has been added to
3422 <link linkend='var-PN'><filename>PN</filename></link> to create a special version
3423 of a recipe or package, such as a Multilib version.
3424 The variable is used in places where the prefix needs to be
3425 added to or removed from a the name (e.g. the
3426 <link linkend='var-BPN'><filename>BPN</filename></link> variable).
3427 <filename>MLPREFIX</filename> gets set when a prefix has been
3428 added to <filename>PN</filename>.
3429 </para>
3430 </glossdef>
3431 </glossentry>
3432
3433 <glossentry id='var-MODULE_TARBALL_DEPLOY'><glossterm>MODULE_TARBALL_DEPLOY</glossterm>
3434 <glossdef>
3435 <para>
3436 Controls creation of the <filename>modules-*.tgz</filename>
3437 file.
3438 Set this variable to "0" to disable creation of this
3439 file, which contains all of the kernel modules resulting
3440 from a kernel build.
3441 </para>
3442 </glossdef>
3443 </glossentry>
3444
3445 <glossentry id='var-MULTIMACH_TARGET_SYS'><glossterm>MULTIMACH_TARGET_SYS</glossterm>
3446 <glossdef>
3447 <para>
3448 Separates files for different machines such that you can build
3449 for multiple target machines using the same output directories.
3450 See the <link linkend='var-STAMP'><filename>STAMP</filename></link> variable
3451 for an example.
3452 </para>
3453 </glossdef>
3454 </glossentry>
3455
3456 </glossdiv>
3457
3458 <glossdiv id='var-glossary-n'><title>N</title>
3459
3460 <glossentry id='var-NATIVELSBSTRING'><glossterm>NATIVELSBSTRING</glossterm>
3461 <glossdef>
3462 <para>
3463 A string identifying the host distribution.
3464 Strings consist of the host distributor ID
3465 followed by the release, as reported by the
3466 <filename>lsb_release</filename> tool
3467 or as read from <filename>/etc/lsb-release</filename>.
3468 For example, when running a build on Ubuntu 12.10, the value
3469 is "Ubuntu-12.10".
3470 If this information is unable to be determined, the value
3471 resolves to "Unknown".
3472 </para>
3473 <para>
3474 This variable is used by default to isolate native shared
3475 state packages for different distributions (e.g. to avoid
3476 problems with <filename>glibc</filename> version
3477 incompatibilities).
3478 Additionally, the variable is checked against
3479 <link linkend='var-SANITY_TESTED_DISTROS'><filename>SANITY_TESTED_DISTROS</filename></link>
3480 if that variable is set.
3481 </para>
3482 </glossdef>
3483 </glossentry>
3484
3485 <glossentry id='var-NO_RECOMMENDATIONS'><glossterm>NO_RECOMMENDATIONS</glossterm>
3486 <glossdef>
3487 <para>
3488 Prevents installation of all "recommended-only" packages.
3489 Recommended-only packages are packages installed only
3490 through the
3491 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
3492 variable).
3493 Setting the <filename>NO_RECOMMENDATIONS</filename> variable
3494 to "1" turns this feature on:
3495 <literallayout class='monospaced'>
3496 NO_RECOMMENDATIONS = "1"
3497 </literallayout>
3498 You can set this variable globally in your
3499 <filename>local.conf</filename> file or you can attach it to
3500 a specific image recipe by using the recipe name override:
3501 <literallayout class='monospaced'>
3502 NO_RECOMMENDATIONS_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
3503 </literallayout>
3504 </para>
3505
3506 <para>
3507 It is important to realize that if you choose to not install
3508 packages using this variable and some other packages are
3509 dependent on them (i.e. listed in a recipe's
3510 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
3511 variable), the OpenEmbedded build system ignores your
3512 request and will install the packages to avoid dependency
3513 errors.
3514 <note>
3515 Some recommended packages might be required for certain
3516 system functionality, such as kernel modules.
3517 It is up to you to add packages with the
3518 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
3519 variable.
3520 </note>
3521 </para>
3522
3523 <para>
3524 Support for this variable exists only when using the
3525 IPK and RPM packaging backend.
3526 Support does not exist for DEB.
3527 </para>
3528
3529 <para>
3530 See the
3531 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
3532 and the
3533 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
3534 variables for related information.
3535 </para>
3536 </glossdef>
3537 </glossentry>
3538 </glossdiv>
3539
3540 <glossdiv id='var-glossary-o'><title>O</title>
3541
3542 <glossentry id='var-OE_BINCONFIG_EXTRA_MANGLE'><glossterm>OE_BINCONFIG_EXTRA_MANGLE</glossterm>
3543 <glossdef>
3544 <para>
3545 When a recipe inherits the
3546 <filename>binconfig.bbclass</filename> class, this variable
3547 specifies additional arguments passed to the "sed" command.
3548 The sed command alters any paths in configuration scripts
3549 that have been set up during compilation.
3550 Inheriting this class results in all paths in these scripts
3551 being changed to point into the
3552 <filename>sysroots/</filename> directory so that all builds
3553 that use the script will use the correct directories
3554 for the cross compiling layout.
3555 </para>
3556
3557 <para>
3558 See the <filename>meta/classes/binconfig.bbclass</filename>
3559 in the
3560 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
3561 for details on how this class applies these additional
3562 sed command arguments.
3563 For general information on the
3564 <filename>binconfig.bbclass</filename> class, see the
3565 "<link linkend='ref-classes-binconfig'>Binary Configuration Scripts - <filename>binconfig.bbclass</filename></link>"
3566 section.
3567 </para>
3568 </glossdef>
3569 </glossentry>
3570
3571 <glossentry id='var-OE_IMPORTS'><glossterm>OE_IMPORTS</glossterm>
3572 <glossdef>
3573 <para>
3574 An internal variable used to tell the OpenEmbedded build
3575 system what Python modules to import for every Python
3576 function run by the system.
3577 </para>
3578
3579 <note>
3580 Do not set this variable.
3581 It is for internal use only.
3582 </note>
3583 </glossdef>
3584 </glossentry>
3585
3586 <glossentry id='var-OE_TERMINAL'><glossterm>OE_TERMINAL</glossterm>
3587 <glossdef>
3588 <para>
3589 Controls how the OpenEmbedded build system spawns
3590 interactive terminals on the host development system
3591 (e.g. using the BitBake command with the
3592 <filename>-c devshell</filename> command-line option).
3593 For more information, see the
3594 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-appdev-devshell'>Using a Development Shell</ulink>" section
3595 in the Yocto Project Development Manual.
3596 </para>
3597
3598 <para>
3599 You can use the following values for the
3600 <filename>OE_TERMINAL</filename> variable:
3601 <literallayout class='monospaced'>
3602 auto
3603 gnome
3604 xfce
3605 rxvt
3606 screen
3607 konsole
3608 none
3609 </literallayout>
3610 <note>Konsole support only works for KDE 3.x.
3611 Also, "auto" is the default behavior for
3612 <filename>OE_TERMINAL</filename></note>
3613 </para>
3614 </glossdef>
3615 </glossentry>
3616
3617 <glossentry id='var-OEROOT'><glossterm>OEROOT</glossterm>
3618 <glossdef>
3619 <para>
3620 The directory from which the top-level build environment
3621 setup script is sourced.
3622 The Yocto Project makes two top-level build environment
3623 setup scripts available:
3624 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
3625 and
3626 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>.
3627 When you run one of these scripts, the
3628 <filename>OEROOT</filename> variable resolves to the
3629 directory that holds the script.
3630 </para>
3631
3632 <para>
3633 For additional information on how this variable is used,
3634 see the initialization scripts.
3635 </para>
3636 </glossdef>
3637 </glossentry>
3638
3639 <glossentry id='var-OLDEST_KERNEL'><glossterm>OLDEST_KERNEL</glossterm>
3640 <glossdef>
3641 <para>
3642 Declares the oldest version of the Linux kernel that the
3643 produced binaries must support.
3644 This variable is passed into the build of the Embedded
3645 GNU C Library (<filename>eglibc</filename>).
3646 </para>
3647
3648 <para>
3649 The default for this variable comes from the
3650 <filename>meta/conf/bitbake.conf</filename> configuration
3651 file.
3652 You can override this default by setting the variable
3653 in a custom distribution configuration file.
3654 </para>
3655 </glossdef>
3656 </glossentry>
3657
3658 <glossentry id='var-OVERRIDES'><glossterm>OVERRIDES</glossterm>
3659 <glossdef>
3660 <para>
3661 BitBake uses <filename>OVERRIDES</filename> to control
3662 what variables are overridden after BitBake parses
3663 recipes and configuration files.
3664 You can find more information on how overrides are handled
3665 in the BitBake Manual that is located at
3666 <filename>bitbake/doc/manual</filename> in the
3667 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
3668 </para>
3669 </glossdef>
3670 </glossentry>
3671 </glossdiv>
3672
3673 <glossdiv id='var-glossary-p'><title>P</title>
3674
3675 <glossentry id='var-P'><glossterm>P</glossterm>
3676 <glossdef>
3677 <para>The recipe name and version.
3678 <filename>P</filename> is comprised of the following:
3679 <literallayout class='monospaced'>
3680 ${PN}-${PV}
3681 </literallayout></para>
3682 </glossdef>
3683 </glossentry>
3684
3685 <glossentry id='var-PACKAGE_ARCH'><glossterm>PACKAGE_ARCH</glossterm>
3686 <glossdef>
3687 <para>The architecture of the resulting package or packages.</para>
3688 </glossdef>
3689 </glossentry>
3690
3691 <glossentry id='var-PACKAGE_BEFORE_PN'><glossterm>PACKAGE_BEFORE_PN</glossterm>
3692 <glossdef>
3693 <para>Enables easily adding packages to
3694 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
3695 before <filename>${<link linkend='var-PN'>PN</link>}</filename>
3696 so that those added packages can pick up files that would normally be
3697 included in the default package.</para>
3698 </glossdef>
3699 </glossentry>
3700
3701 <glossentry id='var-PACKAGE_CLASSES'><glossterm>PACKAGE_CLASSES</glossterm>
3702 <glossdef>
3703 <para>This variable, which is set in the <filename>local.conf</filename> configuration
3704 file found in the <filename>conf</filename> folder of the
3705 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
3706 specifies the package manager to use when packaging data.
3707 You can provide one or more arguments for the variable with the first
3708 argument being the package manager used to create images:
3709 <literallayout class='monospaced'>
3710 PACKAGE_CLASSES ?= "package_rpm package_deb package_ipk"
3711 </literallayout>
3712 For information on build performance effects as a result of the
3713 package manager use, see
3714 <link linkend='ref-classes-package'>Packaging - <filename>package*.bbclass</filename></link>
3715 in this manual.
3716 </para>
3717 </glossdef>
3718 </glossentry>
3719
3720 <glossentry id='var-PACKAGE_EXCLUDE'><glossterm>PACKAGE_EXCLUDE</glossterm>
3721 <glossdef>
3722 <para>
3723 Lists packages that should not be installed into an image.
3724 For example:
3725 <literallayout class='monospaced'>
3726 PACKAGE_EXCLUDE = "&lt;package_name&gt; &lt;package_name&gt; &lt;package_name&gt; ..."
3727 </literallayout>
3728 You can set this variable globally in your
3729 <filename>local.conf</filename> file or you can attach it to
3730 a specific image recipe by using the recipe name override:
3731 <literallayout class='monospaced'>
3732 PACKAGE_EXCLUDE_pn-&lt;target_image&gt; = "&lt;package_name&gt;"
3733 </literallayout>
3734 </para>
3735
3736 <para>
3737 If you choose to not install
3738 a package using this variable and some other package is
3739 dependent on it (i.e. listed in a recipe's
3740 <link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>
3741 variable), the OpenEmbedded build system generates a fatal
3742 installation error.
3743 Because the build system halts the process with a fatal
3744 error, you can use the variable with an iterative
3745 development process to remove specific components from a
3746 system.
3747 </para>
3748
3749 <para>
3750 Support for this variable exists only when using the
3751 IPK and RPM packaging backend.
3752 Support does not exist for DEB.
3753 </para>
3754
3755 <para>
3756 See the
3757 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>
3758 and the
3759 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>
3760 variables for related information.
3761 </para>
3762 </glossdef>
3763 </glossentry>
3764
3765 <glossentry id='var-PACKAGE_EXTRA_ARCHS'><glossterm>PACKAGE_EXTRA_ARCHS</glossterm>
3766 <glossdef>
3767 <para>Specifies the list of architectures compatible with the device CPU.
3768 This variable is useful when you build for several different devices that use
3769 miscellaneous processors such as XScale and ARM926-EJS).</para>
3770 </glossdef>
3771 </glossentry>
3772
3773 <glossentry id='var-PACKAGE_GROUP'><glossterm>PACKAGE_GROUP</glossterm>
3774 <glossdef>
3775 <para>
3776 Defines one or more packages to include in an image when
3777 a specific item is included in
3778 <link linkend='var-IMAGE_FEATURES'><filename>IMAGE_FEATURES</filename></link>.
3779 When setting the value, <filename>PACKAGE_GROUP</filename>
3780 should have the name of the feature item as an override.
3781 Here is an example:
3782 <literallayout class='monospaced'>
3783 PACKAGE_GROUP_widget = "package1 package2"
3784 </literallayout>
3785 In this example, if "widget" were added to
3786 <filename>IMAGE_FEATURES</filename>, "package1" and
3787 "package2" would be included in the image.
3788 <note>
3789 Packages installed by features defined through
3790 <filename>PACKAGE_GROUP</filename> are often package
3791 groups.
3792 While similarly named, you should not confuse the
3793 <filename>PACKAGE_GROUP</filename> variable with
3794 package groups, which are discussed elsewhere in the
3795 documentation.
3796 </note>
3797 </para>
3798 </glossdef>
3799 </glossentry>
3800
3801 <glossentry id='var-PACKAGE_INSTALL'><glossterm>PACKAGE_INSTALL</glossterm>
3802 <glossdef>
3803 <para>
3804 The final list of packages passed to the package manager
3805 for installation into the image.
3806 Because the package manager controls actual installation
3807 of all packages, the list of packages passed using
3808 <filename>PACKAGE_INSTALL</filename> is not the final list
3809 of packages that are actually installed.
3810 </para>
3811
3812 <para>
3813 This variable is internal to the image construction
3814 code.
3815 Use the
3816 <link linkend='var-IMAGE_INSTALL'><filename>IMAGE_INSTALL</filename></link>
3817 variable to specify packages for installation.
3818 </para>
3819 </glossdef>
3820 </glossentry>
3821
3822 <glossentry id='var-PACKAGECONFIG'><glossterm>PACKAGECONFIG</glossterm>
3823 <glossdef>
3824 <para>
3825 This variable provides a means of enabling or disabling
3826 features of a recipe on a per-recipe basis.
3827 <filename>PACKAGECONFIG</filename> blocks are defined
3828 in recipes when you specify features and then arguments
3829 that define feature behaviors.
3830 Here is the basic block structure:
3831 <literallayout class='monospaced'>
3832 PACKAGECONFIG ??= "f1 f2 f3 ..."
3833 PACKAGECONFIG[f1] = "--with-f1,--without-f1,build-deps-f1,rt-deps-f1"
3834 PACKAGECONFIG[f2] = "--with-f2,--without-f2,build-deps-f2,rt-deps-f2"
3835 PACKAGECONFIG[f3] = "--with-f3,--without-f3,build-deps-f3,rt-deps-f3"
3836 </literallayout>
3837 The <filename>PACKAGECONFIG</filename>
3838 variable itself specifies a space-separated list of the
3839 features to enable.
3840 Following the features, you can determine the behavior of
3841 each feature by providing up to four order-dependent
3842 arguments, which are separated by commas.
3843 You can omit any argument you like but must retain the
3844 separating commas.
3845 The order is important and specifies the following:
3846 <orderedlist>
3847 <listitem><para>Extra arguments
3848 that should be added to the configure script
3849 argument list
3850 (<link linkend='var-EXTRA_OECONF'><filename>EXTRA_OECONF</filename></link>)
3851 if the feature is enabled.</para></listitem>
3852 <listitem><para>Extra arguments
3853 that should be added to <filename>EXTRA_OECONF</filename>
3854 if the feature is disabled.
3855 </para></listitem>
3856 <listitem><para>Additional build dependencies
3857 (<link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>)
3858 that should be added if the feature is enabled.
3859 </para></listitem>
3860 <listitem><para>Additional runtime dependencies
3861 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
3862 that should be added if the feature is enabled.
3863 </para></listitem>
3864 </orderedlist>
3865 </para>
3866
3867 <para>
3868 Consider the following
3869 <filename>PACKAGECONFIG</filename> block taken from the
3870 <filename>librsvg</filename> recipe.
3871 In this example the feature is <filename>croco</filename>,
3872 which has three arguments that determine the feature's
3873 behavior.
3874 <literallayout class='monospaced'>
3875 PACKAGECONFIG ??= "croco"
3876 PACKAGECONFIG[croco] = "--with-croco,--without-croco,libcroco"
3877 </literallayout>
3878 The <filename>--with-croco</filename> and
3879 <filename>libcroco</filename> arguments apply only if
3880 the feature is enabled.
3881 In this case, <filename>--with-croco</filename> is
3882 added to the configure script argument list and
3883 <filename>libcroco</filename> is added to
3884 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>.
3885 On the other hand, if the feature is disabled say through
3886 a <filename>.bbappend</filename> file in another layer, then
3887 the second argument <filename>--without-croco</filename> is
3888 added to the configure script rather than
3889 <filename>--with-croco</filename>.
3890 </para>
3891
3892 <para>
3893 The basic <filename>PACKAGECONFIG</filename> structure
3894 previously described holds true regardless of whether you
3895 are creating a block or changing a block.
3896 When creating a block, use the structure inside your
3897 recipe.
3898 </para>
3899
3900 <para>
3901 If you want to change an existing
3902 <filename>PACKAGECONFIG</filename> block, you can do so
3903 one of two ways:
3904 <itemizedlist>
3905 <listitem><para><emphasis>Append file:</emphasis>
3906 Create an append file named
3907 <filename>&lt;recipename&gt;.bbappend</filename> in your
3908 layer and override the value of
3909 <filename>PACKAGECONFIG</filename>.
3910 You can either completely override the variable:
3911 <literallayout class='monospaced'>
3912 PACKAGECONFIG="f4 f5"
3913 </literallayout>
3914 Or, you can just append the variable:
3915 <literallayout class='monospaced'>
3916 PACKAGECONFIG_append = " f4"
3917 </literallayout></para></listitem>
3918 <listitem><para><emphasis>Configuration file:</emphasis>
3919 This method is identical to changing the block
3920 through an append file except you edit your
3921 <filename>local.conf</filename> or
3922 <filename>&lt;mydistro&gt;.conf</filename> file.
3923 As with append files previously described,
3924 you can either completely override the variable:
3925 <literallayout class='monospaced'>
3926 PACKAGECONFIG_pn-&lt;recipename&gt;="f4 f5"
3927 </literallayout>
3928 Or, you can just amended the variable:
3929 <literallayout class='monospaced'>
3930 PACKAGECONFIG_append_pn-&lt;recipename&gt; = " f4"
3931 </literallayout></para></listitem>
3932 </itemizedlist>
3933 </para>
3934 </glossdef>
3935 </glossentry>
3936
3937 <glossentry id='var-PACKAGES'><glossterm>PACKAGES</glossterm>
3938 <glossdef>
3939 <para>The list of packages to be created from the recipe.
3940 The default value is the following:
3941 <literallayout class='monospaced'>
3942 ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}
3943 </literallayout></para>
3944 </glossdef>
3945 </glossentry>
3946
3947 <glossentry id='var-PACKAGES_DYNAMIC'><glossterm>PACKAGES_DYNAMIC</glossterm>
3948 <glossdef>
3949 <para>
3950 A promise that your recipe satisfies runtime dependencies
3951 for optional modules that are found in other recipes.
3952 <filename>PACKAGES_DYNAMIC</filename>
3953 does not actually satisfy the dependencies, it only states that
3954 they should be satisfied.
3955 For example, if a hard, runtime dependency
3956 (<link linkend='var-RDEPENDS'><filename>RDEPENDS</filename></link>)
3957 of another package is satisfied
3958 at build time through the <filename>PACKAGES_DYNAMIC</filename>
3959 variable, but a package with the module name is never actually
3960 produced, then the other package will be broken.
3961 Thus, if you attempt to include that package in an image,
3962 you will get a dependency failure from the packaging system
3963 during <filename>do_rootfs</filename>.
3964 </para>
3965 <para>
3966 Typically, if there is a chance that such a situation can
3967 occur and the package that is not created is valid
3968 without the dependency being satisfied, then you should use
3969 <link linkend='var-RRECOMMENDS'><filename>RRECOMMENDS</filename></link>
3970 (a soft runtime dependency) instead of
3971 <filename>RDEPENDS</filename>.
3972 </para>
3973
3974 <para>
3975 For an example of how to use the <filename>PACKAGES_DYNAMIC</filename>
3976 variable when you are splitting packages, see the
3977 "<ulink url='&YOCTO_DOCS_DEV_URL;#handling-optional-module-packaging'>Handling Optional Module Packaging</ulink>" section
3978 in the Yocto Project Development Manual.
3979 </para>
3980 </glossdef>
3981 </glossentry>
3982
3983 <glossentry id='var-PARALLEL_MAKE'><glossterm>PARALLEL_MAKE</glossterm>
3984 <glossdef>
3985 <para>
3986 Extra options that are passed to the
3987 <filename>make</filename> command during the
3988 <filename>do_compile</filename> task in order to specify
3989 parallel compilation.
3990 This variable is usually in the form
3991 <filename>-j 4</filename>, where the number
3992 represents the maximum number of parallel threads make can
3993 run.
3994 If you development host supports multiple cores a good
3995 rule of thumb is to set this variable to twice the number
3996 of cores on the host.
3997 <note>
3998 Individual recipes might clear out this variable if
3999 the software being built has problems running its
4000 <filename>make</filename> process in parallel.
4001 </note>
4002 </para>
4003 </glossdef>
4004 </glossentry>
4005
4006 <glossentry id='var-PARALLEL_MAKEINST'><glossterm>PARALLEL_MAKEINST</glossterm>
4007 <glossdef>
4008 <para>
4009 Extra options passed to the
4010 <filename>make install</filename> command during the
4011 <filename>do_install</filename> task in order to specify
4012 parallel installation.
4013 This variable defaults to the value of
4014 <link linkend='var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></link>.
4015 <note>
4016 Individual recipes might clear out this variable if
4017 the software being built has problems running its
4018 <filename>make install</filename> process in parallel.
4019 </note>
4020 </para>
4021 </glossdef>
4022 </glossentry>
4023
4024 <glossentry id='var-PATCHRESOLVE'><glossterm>PATCHRESOLVE</glossterm>
4025 <glossdef>
4026 <para>
4027 Determines the action to take when a patch fails.
4028 You can set this variable to one of two values: "noop" and
4029 "user".
4030 </para>
4031
4032 <para>
4033 The default value of "noop" causes the build to simply fail
4034 when the OpenEmbedded build system cannot successfully
4035 apply a patch.
4036 Setting the value to "user" causes the build system to
4037 launch a shell and places you in the right location so that
4038 you can manually resolve the conflicts.
4039 </para>
4040
4041 <para>
4042 Set this variable in your
4043 <filename>local.conf</filename> file.
4044 </para>
4045 </glossdef>
4046 </glossentry>
4047
4048 <glossentry id='var-PATCHTOOL'><glossterm>PATCHTOOL</glossterm>
4049 <glossdef>
4050 <para>
4051 Specifies the utility used to apply patches for a recipe
4052 during <filename>do_patch</filename>.
4053 You can specify one of three utilities: "patch", "quilt", or
4054 "git".
4055 The default utility used is "quilt" except for the
4056 quilt-native recipe itself.
4057 Because the quilt tool is not available at the
4058 time quilt-native is being patched, it uses "patch".
4059 </para>
4060
4061 <para>
4062 If you wish to use an alternative patching tool, set the
4063 variable in the recipe using one of the following:
4064 <literallayout class='monospaced'>
4065 PATCHTOOL = "patch"
4066 PATCHTOOL = "quilt"
4067 PATCHTOOL = "git"
4068 </literallayout>
4069 </para>
4070 </glossdef>
4071 </glossentry>
4072
4073 <glossentry id='var-PE'><glossterm>PE</glossterm>
4074 <glossdef>
4075 <para>
4076 the epoch of the recipe.
4077 By default, this variable is unset.
4078 The field is used to make upgrades possible when the
4079 versioning scheme changes in some backwards incompatible
4080 way.
4081 </para>
4082 </glossdef>
4083 </glossentry>
4084
4085 <glossentry id='var-PF'><glossterm>PF</glossterm>
4086 <glossdef>
4087 <para>Specifies the recipe or package name and includes all version and revision
4088 numbers (i.e. <filename>eglibc-2.13-r20+svnr15508/</filename> and
4089 <filename>bash-4.2-r1/</filename>).
4090 This variable is comprised of the following:
4091 <literallayout class='monospaced'>
4092 ${<link linkend='var-PN'>PN</link>}-${<link linkend='var-EXTENDPE'>EXTENDPE</link>}${<link linkend='var-PV'>PV</link>}-${<link linkend='var-PR'>PR</link>}
4093 </literallayout></para>
4094 </glossdef>
4095 </glossentry>
4096
4097 <glossentry id='var-PKGD'><glossterm>PKGD</glossterm>
4098 <glossdef>
4099 <para>
4100 Points to the destination directory for files to be
4101 packaged before they are split into individual packages.
4102 This directory defaults to the following:
4103 <literallayout class='monospaced'>
4104 ${WORKDIR}/package
4105 </literallayout>
4106 Do not change this default.
4107 </para>
4108 </glossdef>
4109 </glossentry>
4110
4111 <glossentry id='var-PKGDATA_DIR'><glossterm>PKGDATA_DIR</glossterm>
4112 <glossdef>
4113 <para>
4114 Points to a shared, global-state directory that holds data
4115 generated during the packaging process.
4116 During the packaging process, the
4117 <filename>do_packagedata</filename> task packages
4118 data for each recipe and installs it into this temporary,
4119 shared area.
4120 This directory defaults to the following:
4121 <literallayout class='monospaced'>
4122 ${STAGING_DIR_HOST}/pkgdata
4123 </literallayout>
4124 Do not change this default.
4125 </para>
4126 </glossdef>
4127 </glossentry>
4128
4129 <glossentry id='var-PKGDEST'><glossterm>PKGDEST</glossterm>
4130 <glossdef>
4131 <para>
4132 Points to the parent directory for files to be packaged
4133 after they have been split into individual packages.
4134 This directory defaults to the following:
4135 <literallayout class='monospaced'>
4136 ${WORKDIR}/packages-split
4137 </literallayout>
4138 Under this directory, the build system creates
4139 directories for each package specified in
4140 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>.
4141 Do not change this default.
4142 </para>
4143 </glossdef>
4144 </glossentry>
4145
4146 <glossentry id='var-PKGDESTWORK'><glossterm>PKGDESTWORK</glossterm>
4147 <glossdef>
4148 <para>
4149 Points to a temporary work area used by the
4150 <filename>do_package</filename> task to write output
4151 from the <filename>do_packagedata</filename> task.
4152 The <filename>PKGDESTWORK</filename> location defaults to
4153 the following:
4154 <literallayout class='monospaced'>
4155 ${WORKDIR}/pkgdata
4156 </literallayout>
4157 The <filename>do_packagedata</filename> task then packages
4158 the data in the temporary work area and installs it into a
4159 shared directory pointed to by
4160 <link linkend='var-PKGDATA_DIR'><filename>PKGDATA_DIR</filename></link>.
4161 </para>
4162
4163 <para>
4164 Do not change this default.
4165 </para>
4166 </glossdef>
4167 </glossentry>
4168
4169 <glossentry id='var-PN'><glossterm>PN</glossterm>
4170 <glossdef>
4171 <para>This variable can have two separate functions depending on the context: a recipe
4172 name or a resulting package name.</para>
4173 <para><filename>PN</filename> refers to a recipe name in the context of a file used
4174 by the OpenEmbedded build system as input to create a package.
4175 The name is normally extracted from the recipe file name.
4176 For example, if the recipe is named
4177 <filename>expat_2.0.1.bb</filename>, then the default value of <filename>PN</filename>
4178 will be "expat".</para>
4179 <para>
4180 The variable refers to a package name in the context of a file created or produced by the
4181 OpenEmbedded build system.</para>
4182 <para>If applicable, the <filename>PN</filename> variable also contains any special
4183 suffix or prefix.
4184 For example, using <filename>bash</filename> to build packages for the native
4185 machine, <filename>PN</filename> is <filename>bash-native</filename>.
4186 Using <filename>bash</filename> to build packages for the target and for Multilib,
4187 <filename>PN</filename> would be <filename>bash</filename> and
4188 <filename>lib64-bash</filename>, respectively.
4189 </para>
4190 </glossdef>
4191 </glossentry>
4192
4193 <glossentry id='var-PR'><glossterm>PR</glossterm>
4194 <glossdef>
4195 <para>The revision of the recipe.
4196 The default value for this variable is "r0".
4197 </para>
4198 </glossdef>
4199 </glossentry>
4200
4201 <glossentry id='var-PREFERRED_PROVIDER'><glossterm>PREFERRED_PROVIDER</glossterm>
4202 <glossdef>
4203 <para>
4204 If multiple recipes provide an item, this variable
4205 determines which recipe should be given preference.
4206 You should always suffix the variable with the name of the
4207 provided item, and you should set it to the
4208 <link linkend='var-PN'><filename>PN</filename></link>
4209 of the recipe to which you want to give precedence.
4210 Some examples:
4211 <literallayout class='monospaced'>
4212 PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto"
4213 PREFERRED_PROVIDER_virtual/xserver = "xserver-xf86"
4214 PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
4215 </literallayout>
4216 </para>
4217 </glossdef>
4218 </glossentry>
4219
4220 <glossentry id='var-PREFERRED_VERSION'><glossterm>PREFERRED_VERSION</glossterm>
4221 <glossdef>
4222 <para>
4223 If there are multiple versions of recipes available, this
4224 variable determines which recipe should be given preference.
4225 You must always suffix the variable with the
4226 <link linkend='var-PN'><filename>PN</filename></link>
4227 you want to select, and you should set the
4228 <link linkend='var-PV'><filename>PV</filename></link>
4229 accordingly for precedence.
4230 You can use the "<filename>%</filename>" character as a
4231 wildcard to match any number of characters, which can be
4232 useful when specifying versions that contain long revision
4233 numbers that could potentially change.
4234 Here are two examples:
4235 <literallayout class='monospaced'>
4236 PREFERRED_VERSION_python = "2.7.3"
4237 PREFERRED_VERSION_linux-yocto = "3.10%"
4238 </literallayout>
4239 </para>
4240 </glossdef>
4241 </glossentry>
4242
4243 <glossentry id='var-PREMIRRORS'><glossterm>PREMIRRORS</glossterm>
4244 <glossdef>
4245 <para>
4246 Specifies additional paths from which the OpenEmbedded
4247 build system gets source code.
4248 When the build system searches for source code, it first
4249 tries the local download directory.
4250 If that location fails, the build system tries locations
4251 defined by <filename>PREMIRRORS</filename>, the upstream
4252 source, and then locations specified by
4253 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
4254 in that order.
4255 </para>
4256
4257 <para>
4258 Assuming your distribution
4259 (<link linkend='var-DISTRO'><filename>DISTRO</filename></link>)
4260 is "poky", the default value for
4261 <filename>PREMIRRORS</filename> is defined in the
4262 <filename>conf/distro/poky.conf</filename> file in the
4263 <filename>meta-yocto</filename> Git repository.
4264 </para>
4265
4266 <para>
4267 Typically, you could add a specific server for the
4268 build system to attempt before any others by adding
4269 something like the following to the
4270 <filename>local.conf</filename> configuration file in the
4271 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
4272 <literallayout class='monospaced'>
4273 PREMIRRORS_prepend = "\
4274 git://.*/.* http://www.yoctoproject.org/sources/ \n \
4275 ftp://.*/.* http://www.yoctoproject.org/sources/ \n \
4276 http://.*/.* http://www.yoctoproject.org/sources/ \n \
4277 https://.*/.* http://www.yoctoproject.org/sources/ \n"
4278 </literallayout>
4279 These changes cause the build system to intercept
4280 Git, FTP, HTTP, and HTTPS requests and direct them to
4281 the <filename>http://</filename> sources mirror.
4282 You can use <filename>file://</filename> URLs to point
4283 to local directories or network shares as well.
4284 </para>
4285 </glossdef>
4286 </glossentry>
4287
4288 <glossentry id='var-PRINC'><glossterm>PRINC</glossterm>
4289 <glossdef>
4290 <para>Causes the <link linkend='var-PR'><filename>PR</filename></link>
4291 variable of <filename>.bbappend</filename> files to
4292 dynamically increment.
4293 This increment minimizes the impact of layer ordering.</para>
4294 <para>In order to ensure multiple <filename>.bbappend</filename> files can co-exist,
4295 <filename>PRINC</filename> should be self-referencing.
4296 This variable defaults to 0.</para>
4297 <para>Following is an example that increments <filename>PR</filename> by two:
4298 <literallayout class='monospaced'>
4299 PRINC := "${@int(PRINC) + 2}"
4300 </literallayout>
4301 It is advisable not to use strings such as ".= '.1'" with the variable because
4302 this usage is very sensitive to layer ordering.
4303 You should avoid explicit assignments as they cannot
4304 adequately represent multiple
4305 <filename>.bbappend</filename> files.</para>
4306 </glossdef>
4307 </glossentry>
4308
4309 <glossentry id='var-PROVIDES'><glossterm>PROVIDES</glossterm>
4310 <glossdef>
4311 <para>
4312 A list of aliases that a recipe also provides.
4313 These aliases are useful for satisfying dependencies of
4314 other recipes during the build (as specified by
4315 <filename><link linkend='var-DEPENDS'>DEPENDS</link></filename>).
4316 <note>
4317 A recipe's own
4318 <filename><link linkend='var-PN'>PN</link></filename>
4319 is implicitly already in its
4320 <filename>PROVIDES</filename> list.
4321 </note>
4322 </para>
4323 </glossdef>
4324 </glossentry>
4325
4326 <glossentry id='var-PV'><glossterm>PV</glossterm>
4327 <glossdef>
4328 <para>The version of the recipe.
4329 The version is normally extracted from the recipe filename.
4330 For example, if the recipe is named
4331 <filename>expat_2.0.1.bb</filename>, then the default value of <filename>PV</filename>
4332 will be "2.0.1".
4333 <filename>PV</filename> is generally not overridden within
4334 a recipe unless it is building an unstable (i.e. development) version from a source code repository
4335 (e.g. Git or Subversion).
4336 </para>
4337 </glossdef>
4338 </glossentry>
4339
4340 </glossdiv>
4341
4342<!-- <glossdiv id='var-glossary-q'><title>Q</title>-->
4343<!-- </glossdiv>-->
4344
4345 <glossdiv id='var-glossary-r'><title>R</title>
4346
4347 <glossentry id='var-RCONFLICTS'><glossterm>RCONFLICTS</glossterm>
4348 <glossdef>
4349 <para>
4350 The list of packages that conflict with packages.
4351 Note that packages will not be installed if conflicting
4352 packages are not first removed.
4353 </para>
4354
4355 <para>
4356 Like all package-controlling variables, you must always use
4357 them in conjunction with a package name override.
4358 Here is an example:
4359 <literallayout class='monospaced'>
4360 RCONFLICTS_${PN} = "another-conflicting-package-name"
4361 </literallayout>
4362 </para>
4363
4364 <para>
4365 BitBake, which the OpenEmbedded build system uses, supports
4366 specifying versioned dependencies.
4367 Although the syntax varies depending on the packaging
4368 format, BitBake hides these differences from you.
4369 Here is the general syntax to specify versions with
4370 the <filename>RCONFLICTS</filename> variable:
4371 <literallayout class='monospaced'>
4372 RCONFLICTS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
4373 </literallayout>
4374 For <filename>operator</filename>, you can specify the
4375 following:
4376 <literallayout class='monospaced'>
4377 =
4378 &lt;
4379 &gt;
4380 &lt;=
4381 &gt;=
4382 </literallayout>
4383 For example, the following sets up a dependency on version
4384 1.2 or greater of the package <filename>foo</filename>:
4385 <literallayout class='monospaced'>
4386 RCONFLICTS_${PN} = "foo (>= 1.2)"
4387 </literallayout>
4388 </para>
4389 </glossdef>
4390 </glossentry>
4391
4392 <glossentry id='var-RDEPENDS'><glossterm>RDEPENDS</glossterm>
4393 <glossdef>
4394 <para>
4395 Lists a package's runtime dependencies (i.e. other packages)
4396 that must be installed in order for the built package to run
4397 correctly.
4398 If a package in this list cannot be found during the build,
4399 you will get a build error.
4400 </para>
4401
4402 <para>
4403 When you use the <filename>RDEPENDS</filename> variable
4404 in a recipe, you are essentially stating that the recipe's
4405 <filename>do_build</filename> task depends on the existence
4406 of a specific package.
4407 Consider this simple example for two recipes named "a" and
4408 "b" that produce similarly named packages.
4409 In this example, the <filename>RDEPENDS</filename>
4410 statement appears in the "a" recipe:
4411 <literallayout class='monospaced'>
4412 RDEPENDS_${PN} = "b"
4413 </literallayout>
4414 Here, the dependency is such that the
4415 <filename>do_build</filename> task for recipe "a" depends
4416 on the <filename>do_package_write</filename> task
4417 of recipe "b".
4418 This means the package file for "b" must be available when
4419 the output for recipe "a" has been completely built.
4420 More importantly, package "a" will be marked as depending
4421 on package "b" in a manner that is understood by the
4422 package manager in use (i.e. rpm, opkg, or dpkg).
4423 </para>
4424
4425 <para>
4426 The names of the packages you list within
4427 <filename>RDEPENDS</filename> must be the names of other
4428 packages - they cannot be recipe names.
4429 Although package names and recipe names usually match,
4430 the important point here is that you are
4431 providing package names within the
4432 <filename>RDEPENDS</filename> variable.
4433 For an example of the default list of packages created from
4434 a recipe, see the
4435 <link linkend='var-PACKAGES'><filename>PACKAGES</filename></link>
4436 variable.
4437 </para>
4438
4439 <para>
4440 Because the <filename>RDEPENDS</filename> variable applies
4441 to packages being built, you should always use the variable
4442 in a form with an attached package name.
4443 For example, suppose you are building a development package
4444 that depends on the <filename>perl</filename> package.
4445 In this case, you would use the following
4446 <filename>RDEPENDS</filename> statement:
4447 <literallayout class='monospaced'>
4448 RDEPENDS_${PN}-dev += "perl"
4449 </literallayout>
4450 In the example, the development package depends on
4451 the <filename>perl</filename> package.
4452 Thus, the <filename>RDEPENDS</filename> variable has the
4453 <filename>${PN}-dev</filename> package name as part of the
4454 variable.
4455 </para>
4456
4457 <para>
4458 The package name you attach to the
4459 <filename>RDEPENDS</filename> variable must appear
4460 as it would in the <filename>PACKAGES</filename>
4461 namespace before any renaming of the output package by
4462 classes like <filename>debian.bbclass</filename>.
4463 </para>
4464
4465 <para>
4466 In many cases you do not need to explicitly add
4467 runtime dependencies using
4468 <filename>RDEPENDS</filename> since some automatic
4469 handling occurs:
4470 <itemizedlist>
4471 <listitem><para><emphasis><filename>shlibdeps</filename></emphasis>: If
4472 a runtime package contains a shared library
4473 (<filename>.so</filename>), the build
4474 processes the library in order to determine other
4475 libraries to which it is dynamically linked.
4476 The build process adds these libraries to
4477 <filename>RDEPENDS</filename> when creating the runtime
4478 package.</para></listitem>
4479 <listitem><para><emphasis><filename>pcdeps</filename></emphasis>: If
4480 the package ships a <filename>pkg-config</filename>
4481 information file, the build process uses this file
4482 to add items to the <filename>RDEPENDS</filename>
4483 variable to create the runtime packages.
4484 </para></listitem>
4485 </itemizedlist>
4486 </para>
4487
4488 <para>
4489 BitBake, which the OpenEmbedded build system uses, supports
4490 specifying versioned dependencies.
4491 Although the syntax varies depending on the packaging
4492 format, BitBake hides these differences from you.
4493 Here is the general syntax to specify versions with
4494 the <filename>RDEPENDS</filename> variable:
4495 <literallayout class='monospaced'>
4496 RDEPENDS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
4497 </literallayout>
4498 For <filename>operator</filename>, you can specify the
4499 following:
4500 <literallayout class='monospaced'>
4501 =
4502 &lt;
4503 &gt;
4504 &lt;=
4505 &gt;=
4506 </literallayout>
4507 For example, the following sets up a dependency on version
4508 1.2 or greater of the package <filename>foo</filename>:
4509 <literallayout class='monospaced'>
4510 RDEPENDS_${PN} = "foo (>= 1.2)"
4511 </literallayout>
4512 </para>
4513
4514 <para>
4515 For information on build-time dependencies, see the
4516 <link linkend='var-DEPENDS'><filename>DEPENDS</filename></link>
4517 variable.
4518 </para>
4519 </glossdef>
4520 </glossentry>
4521
4522 <glossentry id='var-RM_OLD_IMAGE'><glossterm>RM_OLD_IMAGE</glossterm>
4523 <glossdef>
4524 <para>
4525 Reclaims disk space by removing previously built
4526 versions of the same image from the
4527 <filename>images</filename> directory pointed to by the
4528 <link linkend='var-DEPLOY_DIR'><filename>DEPLOY_DIR</filename></link>
4529 variable.
4530 </para>
4531
4532 <para>
4533 Set this variable to "1" in your
4534 <filename>local.conf</filename> file to remove these
4535 images.
4536 </para>
4537 </glossdef>
4538 </glossentry>
4539
4540 <glossentry id='var-RM_WORK_EXCLUDE'><glossterm>RM_WORK_EXCLUDE</glossterm>
4541 <glossdef>
4542 <para>
4543 With <filename>rm_work</filename> enabled, this
4544 variable specifies a list of recipes whose work directories
4545 should not be removed.
4546 See the "<link linkend='ref-classes-rm-work'>Removing Work Files During the Build - <filename>rm_work.bbclass</filename></link>"
4547 section for more details.
4548 </para>
4549 </glossdef>
4550 </glossentry>
4551
4552 <glossentry id='var-ROOTFS_POSTPROCESS_COMMAND'><glossterm>ROOTFS_POSTPROCESS_COMMAND</glossterm>
4553 <glossdef>
4554 <para>
4555 Added by classes to run post processing commands once the
4556 OpenEmbedded build system has created the root filesystem.
4557 You can specify shell commands separated by semicolons:
4558 <literallayout class='monospaced'>
4559 ROOTFS_POSTPROCESS_COMMAND += "&lt;shell_command&gt;; ... "
4560 </literallayout>
4561 If you need to pass the path to the root filesystem within
4562 the command, you can use
4563 <filename>${IMAGE_ROOTFS}</filename>, which points to
4564 the root filesystem image.
4565 </para>
4566 </glossdef>
4567 </glossentry>
4568
4569 <glossentry id='var-RPROVIDES'><glossterm>RPROVIDES</glossterm>
4570 <glossdef>
4571 <para>
4572 A list of package name aliases that a package also provides.
4573 These aliases are useful for satisfying runtime dependencies
4574 of other packages both during the build and on the target
4575 (as specified by
4576 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>).
4577 <note>
4578 A package's own name is implicitly already in its
4579 <filename>RPROVIDES</filename> list.
4580 </note>
4581 </para>
4582 <para>
4583 As with all package-controlling variables, you must always
4584 use the variable in conjunction with a package name override.
4585 Here is an example:
4586 <literallayout class='monospaced'>
4587 RPROVIDES_${PN} = "widget-abi-2"
4588 </literallayout>
4589 </para>
4590 </glossdef>
4591 </glossentry>
4592
4593 <glossentry id='var-RRECOMMENDS'><glossterm>RRECOMMENDS</glossterm>
4594 <glossdef>
4595 <para>
4596 A list of packages that extends the usability of a package
4597 being built.
4598 The package being built does not depend on this list of
4599 packages in order to successfully build, but needs them for
4600 the extended usability.
4601 To specify runtime dependencies for packages, see the
4602 <filename><link linkend='var-RDEPENDS'>RDEPENDS</link></filename>
4603 variable.
4604 </para>
4605
4606 <para>
4607 The OpenEmbedded build process automatically installs the
4608 list of packages as part of the built package.
4609 However, you can remove these packages later if you want.
4610 If, during the build, a package from the
4611 <filename>RRECOMMENDS</filename> list cannot be
4612 found, the build process continues without an error.
4613 </para>
4614
4615 <para>
4616 You can also prevent packages in the list from being
4617 installed by using several variables.
4618 See the
4619 <link linkend='var-BAD_RECOMMENDATIONS'><filename>BAD_RECOMMENDATIONS</filename></link>,
4620 <link linkend='var-NO_RECOMMENDATIONS'><filename>NO_RECOMMENDATIONS</filename></link>,
4621 and
4622 <link linkend='var-PACKAGE_EXCLUDE'><filename>PACKAGE_EXCLUDE</filename></link>
4623 variables for more information.
4624 </para>
4625
4626 <para>
4627 Because the <filename>RRECOMMENDS</filename> variable
4628 applies to packages being built, you should always attach
4629 an override to the variable to specify the particular
4630 package whose usability is being extended.
4631 For example, suppose you are building a development package
4632 that is extended to support wireless functionality.
4633 In this case, you would use the following:
4634 <literallayout class='monospaced'>
4635 RRECOMMENDS_${PN}-dev += "&lt;wireless_package_name&gt;"
4636 </literallayout>
4637 In the example, the package name
4638 (<filename>${<link linkend='var-PN'>PN</link>}-dev</filename>)
4639 must appear as it would in the
4640 <filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
4641 namespace before any renaming of the output package by
4642 classes such as <filename>debian.bbclass</filename>.
4643 </para>
4644
4645 <para>
4646 BitBake, which the OpenEmbedded build system uses, supports
4647 specifying versioned recommends.
4648 Although the syntax varies depending on the packaging
4649 format, BitBake hides these differences from you.
4650 Here is the general syntax to specify versions with
4651 the <filename>RRECOMMENDS</filename> variable:
4652 <literallayout class='monospaced'>
4653 RRECOMMENDS_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
4654 </literallayout>
4655 For <filename>operator</filename>, you can specify the
4656 following:
4657 <literallayout class='monospaced'>
4658 =
4659 &lt;
4660 &gt;
4661 &lt;=
4662 &gt;=
4663 </literallayout>
4664 For example, the following sets up a recommend on version
4665 1.2 or greater of the package <filename>foo</filename>:
4666 <literallayout class='monospaced'>
4667 RRECOMMENDS_${PN} = "foo (>= 1.2)"
4668 </literallayout>
4669 </para>
4670 </glossdef>
4671 </glossentry>
4672
4673 <glossentry id='var-RREPLACES'><glossterm>RREPLACES</glossterm>
4674 <glossdef>
4675 <para>
4676 A list of packages replaced by a package.
4677 The package manager uses this variable to determine which
4678 package should be installed to replace other package(s)
4679 during an upgrade.
4680 In order to also have the other package(s) removed at the
4681 same time, you must add the name of the other
4682 package to the
4683 <filename><link linkend='var-RCONFLICTS'>RCONFLICTS</link></filename> variable.
4684 </para>
4685 <para>
4686 As with all package-controlling variables, you must use
4687 this variable in conjunction with a package name
4688 override.
4689 Here is an example:
4690 <literallayout class='monospaced'>
4691 RREPLACES_${PN} = "other-package-being-replaced"
4692 </literallayout>
4693 </para>
4694
4695 <para>
4696 BitBake, which the OpenEmbedded build system uses, supports
4697 specifying versioned replacements.
4698 Although the syntax varies depending on the packaging
4699 format, BitBake hides these differences from you.
4700 Here is the general syntax to specify versions with
4701 the <filename>RREPLACES</filename> variable:
4702 <literallayout class='monospaced'>
4703 RREPLACES_${PN} = "&lt;package&gt; (&lt;operator&gt; &lt;version&gt;)"
4704 </literallayout>
4705 For <filename>operator</filename>, you can specify the
4706 following:
4707 <literallayout class='monospaced'>
4708 =
4709 &lt;
4710 &gt;
4711 &lt;=
4712 &gt;=
4713 </literallayout>
4714 For example, the following sets up a replacement using
4715 version 1.2 or greater of the package
4716 <filename>foo</filename>:
4717 <literallayout class='monospaced'>
4718 RREPLACES_${PN} = "foo (>= 1.2)"
4719 </literallayout>
4720 </para>
4721 </glossdef>
4722 </glossentry>
4723
4724 <glossentry id='var-RSUGGESTS'><glossterm>RSUGGESTS</glossterm>
4725 <glossdef>
4726 <para>
4727 A list of additional packages that you can suggest for
4728 installation by the package manager at the time a package
4729 is installed.
4730 Not all package managers support this functionality.
4731 </para>
4732 <para>
4733 As with all package-controlling variables, you must always
4734 use this variable in conjunction with a package name
4735 override.
4736 Here is an example:
4737 <literallayout class='monospaced'>
4738 RSUGGESTS_${PN} = "useful-package another-package"
4739 </literallayout>
4740 </para>
4741 </glossdef>
4742 </glossentry>
4743
4744 </glossdiv>
4745
4746 <glossdiv id='var-glossary-s'><title>S</title>
4747
4748 <glossentry id='var-S'><glossterm>S</glossterm>
4749 <glossdef>
4750 <para>
4751 The location in the
4752 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
4753 where unpacked recipe source code resides.
4754 This location is within the working directory
4755 (<filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>),
4756 which is not static.
4757 The unpacked source location depends on the recipe name
4758 (<filename><link linkend='var-PN'>PN</link></filename>) and
4759 recipe version
4760 (<filename><link linkend='var-PV'>PV</link></filename>) as
4761 follows:
4762 <literallayout class='monospaced'>
4763 ${WORKDIR}/${PN}-${PV}
4764 </literallayout>
4765 As an example, assume a
4766 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
4767 top-level folder named <filename>poky</filename> and a
4768 default Build Directory at <filename>poky/build</filename>.
4769 In this case, the working directory the build system uses
4770 to keep the unpacked recipe for <filename>db</filename>
4771 is the following:
4772 <literallayout class='monospaced'>
4773 poky/build/tmp/work/qemux86-poky-linux/db/5.1.19-r3/db-5.1.19
4774 </literallayout>
4775 </para>
4776 </glossdef>
4777 </glossentry>
4778
4779 <glossentry id='var-SANITY_TESTED_DISTROS'><glossterm>SANITY_TESTED_DISTROS</glossterm>
4780 <glossdef>
4781 <para>
4782 A list of the host distribution identifiers that the
4783 build system has been tested against.
4784 Identifiers consist of the host distributor ID
4785 followed by the release,
4786 as reported by the <filename>lsb_release</filename> tool
4787 or as read from <filename>/etc/lsb-release</filename>.
4788 Separate the list items with explicit newline
4789 characters (<filename>\n</filename>).
4790 If <filename>SANITY_TESTED_DISTROS</filename> is not empty
4791 and the current value of
4792 <link linkend='var-NATIVELSBSTRING'><filename>NATIVELSBSTRING</filename></link>
4793 does not appear in the list, then the build system reports
4794 a warning that indicates the current host distribution has
4795 not been tested as a build host.
4796 </para>
4797 </glossdef>
4798 </glossentry>
4799
4800 <glossentry id='var-SDK_ARCH'><glossterm>SDK_ARCH</glossterm>
4801 <glossdef>
4802 <para>
4803 The target architecture for the SDK.
4804 Typically, you do not directly set this variable.
4805 Instead, use
4806 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>.
4807 </para>
4808 </glossdef>
4809 </glossentry>
4810
4811 <glossentry id='var-SDK_NAME'><glossterm>SDK_NAME</glossterm>
4812 <glossdef>
4813 <para>
4814 The base name for SDK output files.
4815 The name is derived from the
4816 <link linkend='var-DISTRO'><filename>DISTRO</filename></link>,
4817 <link linkend='var-TCLIBC'><filename>TCLIBC</filename></link>,
4818 <link linkend='var-SDK_ARCH'><filename>SDK_ARCH</filename></link>,
4819 <link linkend='var-IMAGE_BASENAME'><filename>IMAGE_BASENAME</filename></link>,
4820 and
4821 <link linkend='var-TUNE_PKGARCH'><filename>TUNE_PKGARCH</filename></link>
4822 variables:
4823 <literallayout class='monospaced'>
4824 SDK_NAME = "${DISTRO}-${TCLIBC}-${SDK_ARCH}-${IMAGE_BASENAME}-${TUNE_PKGARCH}"
4825 </literallayout>
4826 </para>
4827 </glossdef>
4828 </glossentry>
4829
4830 <glossentry id='var-SDKIMAGE_FEATURES'><glossterm>SDKIMAGE_FEATURES</glossterm>
4831 <glossdef>
4832 <para>Equivalent to
4833 <filename><link linkend='var-IMAGE_FEATURES'>IMAGE_FEATURES</link></filename>.
4834 However, this variable applies to the SDK generated from an
4835 image using the following command:
4836 <literallayout class='monospaced'>
4837 $ bitbake -c populate_sdk imagename
4838 </literallayout>
4839 </para>
4840 </glossdef>
4841 </glossentry>
4842
4843 <glossentry id='var-SDKMACHINE'><glossterm>SDKMACHINE</glossterm>
4844 <glossdef>
4845 <para>
4846 The architecture of the machine that runs Application
4847 Development Toolkit (ADT) items.
4848 In other words, packages are built so that they will run
4849 on the target you specify with the argument.
4850 This implies that you can build out ADT/SDK items that
4851 run on an architecture other than that of your build host.
4852 For example, you can use an x86_64-based build host to
4853 create packages that will run on an i686-based
4854 SDK Machine.
4855 </para>
4856
4857 <para>
4858 You can use "i686" and "x86_64" as possible values for this
4859 variable.
4860 The variable defaults to "i686" and is set in the
4861 <filename>local.conf</filename> file in the
4862 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
4863 <literallayout class='monospaced'>
4864 SDKMACHINE ?= "i686"
4865 </literallayout>
4866 </para>
4867 </glossdef>
4868 </glossentry>
4869
4870 <glossentry id='var-SECTION'><glossterm>SECTION</glossterm>
4871 <glossdef>
4872 <para>The section in which packages should be categorized.
4873 Package management utilities can make use of this variable.</para>
4874 </glossdef>
4875 </glossentry>
4876
4877 <glossentry id='var-SELECTED_OPTIMIZATION'><glossterm>SELECTED_OPTIMIZATION</glossterm>
4878 <glossdef>
4879 <para>
4880 The variable takes the value of
4881 <filename><link linkend='var-FULL_OPTIMIZATION'>FULL_OPTIMIZATION</link></filename>
4882 unless <filename><link linkend='var-DEBUG_BUILD'>DEBUG_BUILD</link></filename> = "1".
4883 In this case the value of
4884 <filename><link linkend='var-DEBUG_OPTIMIZATION'>DEBUG_OPTIMIZATION</link></filename> is used.
4885 </para>
4886 </glossdef>
4887 </glossentry>
4888
4889 <glossentry id='var-SERIAL_CONSOLE'><glossterm>SERIAL_CONSOLE</glossterm>
4890 <glossdef>
4891 <para>
4892 Defines a serial console (TTY) to enable using getty.
4893 Provide a value that specifies the baud rate followed by
4894 the TTY device name separated by a space.
4895 You cannot specify more than one TTY device:
4896 <literallayout class='monospaced'>
4897 SERIAL_CONSOLE = "115200 ttyS0"
4898 </literallayout>
4899 <note>
4900 The <filename>SERIAL_CONSOLE</filename> variable
4901 is deprecated.
4902 Please use the
4903 <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
4904 variable.
4905 </note>
4906 </para>
4907 </glossdef>
4908 </glossentry>
4909
4910 <glossentry id='var-SERIAL_CONSOLES'><glossterm>SERIAL_CONSOLES</glossterm>
4911 <glossdef>
4912 <para>
4913 Defines the serial consoles (TTYs) to enable using getty.
4914 Provide a value that specifies the baud rate followed by
4915 the TTY device name separated by a semicolon.
4916 Use spaces to separate multiple devices:
4917 <literallayout class='monospaced'>
4918 SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1"
4919 </literallayout>
4920 </para>
4921 </glossdef>
4922 </glossentry>
4923
4924 <glossentry id='var-SERIAL_CONSOLES_CHECK'><glossterm>SERIAL_CONSOLES_CHECK</glossterm>
4925 <glossdef>
4926 <para>
4927 Similar to
4928 <link linkend='var-SERIAL_CONSOLES'><filename>SERIAL_CONSOLES</filename></link>
4929 except the device is checked for existence before attempting
4930 to enable it.
4931 This variable is currently only supported with SysVinit
4932 (i.e. not with systemd).
4933 </para>
4934 </glossdef>
4935 </glossentry>
4936
4937 <glossentry id='var-SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS'><glossterm>SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS</glossterm>
4938 <glossdef>
4939 <para>
4940 A list of recipe dependencies that should not be used to
4941 determine signatures of tasks from one recipe when they
4942 depend on tasks from another recipe.
4943 For example:
4944 <literallayout class='monospaced'>
4945 SIGGEN_EXCLUDE_SAFE_RECIPE_DEPS += "intone->mplayer2"
4946 </literallayout>
4947 In this example, <filename>intone</filename> depends on
4948 <filename>mplayer2</filename>.
4949 </para>
4950
4951 <para>
4952 Use of this variable is one mechanism to remove dependencies
4953 that affect task signatures and thus force rebuilds when a
4954 recipe changes.
4955 <note><title>Caution</title>
4956 If you add an inappropriate dependency for a recipe
4957 relationship, the software might break during
4958 runtime if the interface of the second recipe was
4959 changed after the first recipe had been built.
4960 </note>
4961 </para>
4962 </glossdef>
4963 </glossentry>
4964
4965 <glossentry id='var-SIGGEN_EXCLUDERECIPES_ABISAFE'><glossterm>SIGGEN_EXCLUDERECIPES_ABISAFE</glossterm>
4966 <glossdef>
4967 <para>
4968 A list of recipes that are completely stable and will
4969 never change.
4970 The ABI for the recipes in the list are presented by
4971 output from the tasks run to build the recipe.
4972 Use of this variable is one way to remove dependencies from
4973 one recipe on another that affect task signatures and
4974 thus force rebuilds when the recipe changes.
4975 <note><title>Caution</title>
4976 If you add an inappropriate variable to this list,
4977 the software might break at runtime if the
4978 interface of the recipe was changed after the other
4979 had been built.
4980 </note>
4981 </para>
4982 </glossdef>
4983 </glossentry>
4984
4985 <glossentry id='var-SITEINFO_BITS'><glossterm>SITEINFO_BITS</glossterm>
4986 <glossdef>
4987 <para>
4988 Specifies the number of bits for the target system CPU.
4989 The value should be either "32" or "64".
4990 </para>
4991 </glossdef>
4992 </glossentry>
4993
4994 <glossentry id='var-SITEINFO_ENDIANNESS'><glossterm>SITEINFO_ENDIANNESS</glossterm>
4995 <glossdef>
4996 <para>
4997 Specifies the endian byte order of the target system.
4998 The value should be either "le" for little-endian or "be" for big-endian.
4999 </para>
5000 </glossdef>
5001 </glossentry>
5002
5003 <glossentry id='var-SOC_FAMILY'><glossterm>SOC_FAMILY</glossterm>
5004 <glossdef>
5005 <para>
5006 Groups together machines based upon the same family
5007 of SOC (System On Chip).
5008 You typically set this variable in a common
5009 <filename>.inc</filename> file that you include in the
5010 configuration files of all the machines.
5011 <note>
5012 You must include
5013 <filename>conf/machine/include/soc-family.inc</filename>
5014 for this variable to appear in
5015 <link linkend='var-MACHINEOVERRIDES'><filename>MACHINEOVERRIDES</filename></link>.
5016 </note>
5017 </para>
5018 </glossdef>
5019 </glossentry>
5020
5021 <glossentry id='var-SOLIBS'><glossterm>SOLIBS</glossterm>
5022 <glossdef>
5023 <para>
5024 Defines the suffix for shared libraries used on the
5025 target platform.
5026 By default, this suffix is ".so.*" for all Linux-based
5027 systems and is defined in the
5028 <filename>meta/conf/bitbake.conf</filename> configuration
5029 file.
5030 </para>
5031
5032 <para>
5033 You will see this variable referenced in the default values
5034 of <filename>FILES_${PN}</filename>.
5035 </para>
5036 </glossdef>
5037 </glossentry>
5038
5039 <glossentry id='var-SOLIBSDEV'><glossterm>SOLIBSDEV</glossterm>
5040 <glossdef>
5041 <para>
5042 Defines the suffix for the development symbolic link
5043 (symlink) for shared libraries on the target platform.
5044 By default, this suffix is ".so" for Linux-based
5045 systems and is defined in the
5046 <filename>meta/conf/bitbake.conf</filename> configuration
5047 file.
5048 </para>
5049
5050 <para>
5051 You will see this variable referenced in the default values
5052 of <filename>FILES_${PN}-dev</filename>.
5053 </para>
5054 </glossdef>
5055 </glossentry>
5056
5057 <glossentry id='var-SPECIAL_PKGSUFFIX'><glossterm>SPECIAL_PKGSUFFIX</glossterm>
5058 <glossdef>
5059 <para>
5060 A list of prefixes for <link linkend='var-PN'><filename>PN</filename></link> used by the
5061 OpenEmbedded build system to create variants of recipes or packages.
5062 The list specifies the prefixes to strip off during certain circumstances
5063 such as the generation of the <link linkend='var-BPN'><filename>BPN</filename></link> variable.
5064 </para>
5065 </glossdef>
5066 </glossentry>
5067
5068 <glossentry id='var-SRC_URI'><glossterm>SRC_URI</glossterm>
5069 <glossdef>
5070 <para>The list of source files - local or remote.
5071 This variable tells the OpenEmbedded build system which bits
5072 to pull in for the build and how to pull them in.
5073 For example, if the recipe or append file only needs to
5074 fetch a tarball from the Internet, the recipe or
5075 append file uses a single <filename>SRC_URI</filename>
5076 entry.
5077 On the other hand, if the recipe or append file needs to
5078 fetch a tarball, apply two patches, and include a custom
5079 file, the recipe or append file would include four
5080 instances of the variable.</para>
5081 <para>The following list explains the available URI protocols:
5082 <itemizedlist>
5083 <listitem><para><emphasis><filename>file://</filename> -</emphasis>
5084 Fetches files, which are usually files shipped with
5085 the
5086 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
5087 from the local machine.
5088 The path is relative to the
5089 <link linkend='var-FILESPATH'><filename>FILESPATH</filename></link>
5090 variable.
5091 Thus, the build system searches, in order, from the
5092 following directories, which are assumed to be a
5093 subdirectories of the directory in which the
5094 recipe file (<filename>.bb</filename>) or
5095 append file (<filename>.bbappend</filename>)
5096 resides:
5097 <itemizedlist>
5098 <listitem><para><emphasis><filename>${BPN}</filename> -</emphasis>
5099 The base recipe name without any special
5100 suffix or version numbers.
5101 </para></listitem>
5102 <listitem><para><emphasis><filename>${BP}</filename> -</emphasis>
5103 <filename>${<link linkend='var-BPN'>BPN</link>}-${PV}</filename>.
5104 The base recipe name and version but without
5105 any special package name suffix.
5106 </para></listitem>
5107 <listitem><para><emphasis>files -</emphasis>
5108 Files within a directory, which is named
5109 <filename>files</filename> and is also
5110 alongside the recipe or append file.
5111 </para></listitem>
5112 </itemizedlist>
5113 <note>
5114 If you want the build system to pick up files
5115 specified through a
5116 <filename>SRC_URI</filename>
5117 statement from your append file, you need to be
5118 sure to extend the
5119 <filename>FILESPATH</filename>
5120 variable by also using the
5121 <link linkend='var-FILESEXTRAPATHS'><filename>FILESEXTRAPATHS</filename></link>
5122 variable from within your append file.
5123 </note>
5124 </para></listitem>
5125 <listitem><para><emphasis><filename>bzr://</filename> -</emphasis> Fetches files from a
5126 Bazaar revision control repository.</para></listitem>
5127 <listitem><para><emphasis><filename>git://</filename> -</emphasis> Fetches files from a
5128 Git revision control repository.</para></listitem>
5129 <listitem><para><emphasis><filename>osc://</filename> -</emphasis> Fetches files from
5130 an OSC (OpenSUSE Build service) revision control repository.</para></listitem>
5131 <listitem><para><emphasis><filename>repo://</filename> -</emphasis> Fetches files from
5132 a repo (Git) repository.</para></listitem>
5133 <listitem><para><emphasis><filename>svk://</filename> -</emphasis> Fetches files from
5134 an SVK revision control repository.</para></listitem>
5135 <listitem><para><emphasis><filename>http://</filename> -</emphasis> Fetches files from
5136 the Internet using <filename>http</filename>.</para></listitem>
5137 <listitem><para><emphasis><filename>https://</filename> -</emphasis> Fetches files
5138 from the Internet using <filename>https</filename>.</para></listitem>
5139 <listitem><para><emphasis><filename>ftp://</filename> -</emphasis> Fetches files
5140 from the Internet using <filename>ftp</filename>.</para></listitem>
5141 <listitem><para><emphasis><filename>cvs://</filename> -</emphasis> Fetches files from
5142 a CVS revision control repository.</para></listitem>
5143 <listitem><para><emphasis><filename>hg://</filename> -</emphasis> Fetches files from
5144 a Mercurial (<filename>hg</filename>) revision control repository.</para></listitem>
5145 <listitem><para><emphasis><filename>p4://</filename> -</emphasis> Fetches files from
5146 a Perforce (<filename>p4</filename>) revision control repository.</para></listitem>
5147 <listitem><para><emphasis><filename>ssh://</filename> -</emphasis> Fetches files from
5148 a secure shell.</para></listitem>
5149 <listitem><para><emphasis><filename>svn://</filename> -</emphasis> Fetches files from
5150 a Subversion (<filename>svn</filename>) revision control repository.</para></listitem>
5151 </itemizedlist>
5152 </para>
5153 <para>Standard and recipe-specific options for <filename>SRC_URI</filename> exist.
5154 Here are standard options:
5155 <itemizedlist>
5156 <listitem><para><emphasis><filename>apply</filename> -</emphasis> Whether to apply
5157 the patch or not.
5158 The default action is to apply the patch.</para></listitem>
5159 <listitem><para><emphasis><filename>striplevel</filename> -</emphasis> Which
5160 striplevel to use when applying the patch.
5161 The default level is 1.</para></listitem>
5162 <listitem><para><emphasis><filename>patchdir</filename> -</emphasis> Specifies
5163 the directory in which the patch should be applied.
5164 The default is <filename>${</filename><link linkend='var-S'><filename>S</filename></link><filename>}</filename>.
5165 </para></listitem>
5166 </itemizedlist>
5167 </para>
5168 <para>Here are options specific to recipes building code from a revision control system:
5169 <itemizedlist>
5170 <listitem><para><emphasis><filename>mindate</filename> -</emphasis>
5171 Apply the patch only if
5172 <link linkend='var-SRCDATE'><filename>SRCDATE</filename></link>
5173 is equal to or greater than <filename>mindate</filename>.
5174 </para></listitem>
5175 <listitem><para><emphasis><filename>maxdate</filename> -</emphasis>
5176 Apply the patch only if <filename>SRCDATE</filename>
5177 is not later than <filename>mindate</filename>.
5178 </para></listitem>
5179 <listitem><para><emphasis><filename>minrev</filename> -</emphasis>
5180 Apply the patch only if <filename>SRCREV</filename>
5181 is equal to or greater than <filename>minrev</filename>.
5182 </para></listitem>
5183 <listitem><para><emphasis><filename>maxrev</filename> -</emphasis>
5184 Apply the patch only if <filename>SRCREV</filename>
5185 is not later than <filename>maxrev</filename>.
5186 </para></listitem>
5187 <listitem><para><emphasis><filename>rev</filename> -</emphasis>
5188 Apply the patch only if <filename>SRCREV</filename>
5189 is equal to <filename>rev</filename>.
5190 </para></listitem>
5191 <listitem><para><emphasis><filename>notrev</filename> -</emphasis>
5192 Apply the patch only if <filename>SRCREV</filename>
5193 is not equal to <filename>rev</filename>.
5194 </para></listitem>
5195 </itemizedlist>
5196 </para>
5197 <para>Here are some additional options worth mentioning:
5198 <itemizedlist>
5199 <listitem><para><emphasis><filename>unpack</filename> -</emphasis> Controls
5200 whether or not to unpack the file if it is an archive.
5201 The default action is to unpack the file.</para></listitem>
5202 <listitem><para><emphasis><filename>subdir</filename> -</emphasis> Places the file
5203 (or extracts its contents) into the specified
5204 subdirectory of <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
5205 This option is useful for unusual tarballs or other archives that
5206 do not have their files already in a subdirectory within the archive.
5207 </para></listitem>
5208 <listitem><para><emphasis><filename>name</filename> -</emphasis> Specifies a
5209 name to be used for association with <filename>SRC_URI</filename> checksums
5210 when you have more than one file specified in <filename>SRC_URI</filename>.
5211 </para></listitem>
5212 <listitem><para><emphasis><filename>downloadfilename</filename> -</emphasis> Specifies
5213 the filename used when storing the downloaded file.</para></listitem>
5214 </itemizedlist>
5215 </para>
5216 </glossdef>
5217 </glossentry>
5218
5219 <glossentry id='var-SRC_URI_OVERRIDES_PACKAGE_ARCH'><glossterm>SRC_URI_OVERRIDES_PACKAGE_ARCH</glossterm>
5220 <glossdef>
5221 <para></para>
5222 <para>
5223 By default, the OpenEmbedded build system automatically detects whether
5224 <filename><link linkend='var-SRC_URI'>SRC_URI</link></filename>
5225 contains files that are machine-specific.
5226 If so, the build system automatically changes
5227 <filename><link linkend='var-PACKAGE_ARCH'>PACKAGE_ARCH</link></filename>.
5228 Setting this variable to "0" disables this behavior.
5229 </para>
5230 </glossdef>
5231 </glossentry>
5232
5233 <glossentry id='var-SRCDATE'><glossterm>SRCDATE</glossterm>
5234 <glossdef>
5235 <para>
5236 The date of the source code used to build the package.
5237 This variable applies only if the source was fetched from a Source Code Manager (SCM).
5238 </para>
5239 </glossdef>
5240 </glossentry>
5241
5242 <glossentry id='var-SRCPV'><glossterm>SRCPV</glossterm>
5243 <glossdef>
5244 <para>
5245 Returns the version string of the current package.
5246 This string is used to help define the value of
5247 <link linkend='var-PV'><filename>PV</filename></link>.
5248 </para>
5249
5250 <para>
5251 The <filename>SRCPV</filename> variable is defined in the
5252 <filename>meta/conf/bitbake.conf</filename> configuration
5253 file in the
5254 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
5255 as follows:
5256 <literallayout class='monospaced'>
5257 SRCPV = "${@bb.fetch2.get_srcrev(d)}"
5258 </literallayout>
5259 </para>
5260
5261 <para>
5262 Recipes that need to define <filename>PV</filename> do so
5263 with the help of the <filename>SRCPV</filename>.
5264 For example, the <filename>ofono</filename> recipe
5265 (<filename>ofono_git.bb</filename>) located in
5266 <filename>meta/recipes-connectivity</filename> in the
5267 Source Directory defines <filename>PV</filename> as
5268 follows:
5269 <literallayout class='monospaced'>
5270 PV = "0.12-git${SRCPV}"
5271 </literallayout>
5272 </para>
5273 </glossdef>
5274 </glossentry>
5275
5276 <glossentry id='var-SRCREV'><glossterm>SRCREV</glossterm>
5277 <glossdef>
5278 <para>
5279 The revision of the source code used to build the package.
5280 This variable applies to Subversion, Git, Mercurial and Bazaar
5281 only.
5282 Note that if you wish to build a fixed revision and you wish
5283 to avoid performing a query on the remote repository every time
5284 BitBake parses your recipe, you should specify a <filename>SRCREV</filename> that is a
5285 full revision identifier and not just a tag.
5286 </para>
5287 </glossdef>
5288 </glossentry>
5289
5290 <glossentry id='var-SSTATE_DIR'><glossterm>SSTATE_DIR</glossterm>
5291 <glossdef>
5292 <para>The directory for the shared state cache.</para>
5293 </glossdef>
5294 </glossentry>
5295
5296 <glossentry id='var-SSTATE_MIRRORS'><glossterm>SSTATE_MIRRORS</glossterm>
5297 <glossdef>
5298 <para>
5299 Configures the OpenEmbedded build system to search other
5300 mirror locations for prebuilt cache data objects before
5301 building out the data.
5302 This variable works like fetcher
5303 <link linkend='var-MIRRORS'><filename>MIRRORS</filename></link>
5304 and <link linkend='var-PREMIRRORS'><filename>PREMIRRORS</filename></link>
5305 and points to the cache locations to check for the shared
5306 objects.
5307 </para>
5308
5309 <para>
5310 You can specify a filesystem directory or a remote URL such
5311 as HTTP or FTP.
5312 The locations you specify need to contain the shared state
5313 cache (sstate-cache) results from previous builds.
5314 The sstate-cache you point to can also be from builds on
5315 other machines.
5316 </para>
5317
5318 <para>
5319 If a mirror uses the same structure as
5320 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link>,
5321 you need to add
5322 "PATH" at the end as shown in the examples below.
5323 The build system substitutes the correct path within the
5324 directory structure.
5325 <literallayout class='monospaced'>
5326 SSTATE_MIRRORS ?= "\
5327 file://.* http://someserver.tld/share/sstate/PATH \n \
5328 file://.* file:///some/local/dir/sstate/PATH"
5329 </literallayout>
5330 </para>
5331 </glossdef>
5332 </glossentry>
5333
5334 <glossentry id='var-STAGING_KERNEL_DIR'><glossterm>STAGING_KERNEL_DIR</glossterm>
5335 <glossdef>
5336 <para>
5337 The directory with kernel headers that are required to build out-of-tree
5338 modules.
5339 </para>
5340 </glossdef>
5341 </glossentry>
5342
5343 <glossentry id='var-STAMP'><glossterm>STAMP</glossterm>
5344 <glossdef>
5345 <para>
5346 Specifies the base path used to create recipe stamp files.
5347 The path to an actual stamp file is constructed by evaluating this
5348 string and then appending additional information.
5349 Currently, the default assignment for <filename>STAMP</filename>
5350 as set in the <filename>meta/conf/bitbake.conf</filename> file
5351 is:
5352 <literallayout class='monospaced'>
5353 STAMP = "${STAMPS_DIR}/${MULTIMACH_TARGET_SYS}/${PN}/${EXTENDPE}${PV}-${PR}"
5354 </literallayout>
5355 See <link linkend='var-STAMPS_DIR'><filename>STAMPS_DIR</filename></link>,
5356 <link linkend='var-MULTIMACH_TARGET_SYS'><filename>MULTIMACH_TARGET_SYS</filename></link>,
5357 <link linkend='var-PN'><filename>PN</filename></link>,
5358 <link linkend='var-EXTENDPE'><filename>EXTENDPE</filename></link>,
5359 <link linkend='var-PV'><filename>PV</filename></link>, and
5360 <link linkend='var-PR'><filename>PR</filename></link> for related variable
5361 information.
5362 </para>
5363 </glossdef>
5364 </glossentry>
5365
5366 <glossentry id='var-STAMPS_DIR'><glossterm>STAMPS_DIR</glossterm>
5367 <glossdef>
5368 <para>
5369 Specifies the base directory in which the OpenEmbedded
5370 build system places stamps.
5371 The default directory is
5372 <filename>${TMPDIR}/stamps</filename>.
5373 </para>
5374 </glossdef>
5375 </glossentry>
5376
5377 <glossentry id='var-SUMMARY'><glossterm>SUMMARY</glossterm>
5378 <glossdef>
5379 <para>The short (72 characters or less) summary of the binary package for packaging
5380 systems such as <filename>opkg</filename>, <filename>rpm</filename> or
5381 <filename>dpkg</filename>.
5382 By default, <filename>SUMMARY</filename> is used to define
5383 the <link linkend='var-DESCRIPTION'><filename>DESCRIPTION</filename></link>
5384 variable if <filename>DESCRIPTION</filename> is not set
5385 in the recipe.
5386 </para>
5387 </glossdef>
5388 </glossentry>
5389
5390 <glossentry id='var-SYSROOT_PREPROCESS_FUNCS'><glossterm>SYSROOT_PREPROCESS_FUNCS</glossterm>
5391 <glossdef>
5392 <para>
5393 A list of functions to execute after files are staged into
5394 the sysroot.
5395 These functions are usually used to apply additional
5396 processing on the staged files, or to stage additional
5397 files.
5398 </para>
5399 </glossdef>
5400 </glossentry>
5401
5402 </glossdiv>
5403
5404 <glossdiv id='var-glossary-t'><title>T</title>
5405
5406 <glossentry id='var-T'><glossterm>T</glossterm>
5407 <glossdef>
5408 <para>This variable points to a directory were BitBake places
5409 temporary files, which consist mostly of task logs and
5410 scripts, when building a particular recipe.
5411 The variable is typically set as follows:
5412 <literallayout class='monospaced'>
5413 T = "${WORKDIR}/temp"
5414 </literallayout>
5415 The <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
5416 is the directory into which BitBake unpacks and builds the
5417 recipe.
5418 The default <filename>bitbake.conf</filename> file sets this variable.</para>
5419 <para>The <filename>T</filename> variable is not to be confused with
5420 the <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> variable,
5421 which points to the root of the directory tree where BitBake
5422 places the output of an entire build.
5423 </para>
5424 </glossdef>
5425 </glossentry>
5426
5427 <glossentry id='var-TARGET_ARCH'><glossterm>TARGET_ARCH</glossterm>
5428 <glossdef>
5429 <para>
5430 The target machine's architecture.
5431 The OpenEmbedded build system supports many
5432 architectures.
5433 Here is an example list of architectures supported.
5434 This list is by no means complete as the architecture
5435 is configurable:
5436 <literallayout class='monospaced'>
5437 arm
5438 i586
5439 x86_64
5440 powerpc
5441 powerpc64
5442 mips
5443 mipsel
5444 </literallayout>
5445 </para>
5446 </glossdef>
5447 </glossentry>
5448
5449 <glossentry id='var-TARGET_CFLAGS'><glossterm>TARGET_CFLAGS</glossterm>
5450 <glossdef>
5451 <para>
5452 Flags passed to the C compiler for the target system.
5453 This variable evaluates to the same as
5454 <filename><link linkend='var-CFLAGS'>CFLAGS</link></filename>.
5455 </para>
5456 </glossdef>
5457 </glossentry>
5458
5459
5460 <glossentry id='var-TARGET_FPU'><glossterm>TARGET_FPU</glossterm>
5461 <glossdef>
5462 <para>Specifies the method for handling FPU code.
5463 For FPU-less targets, which include most ARM CPUs, the variable must be
5464 set to "soft".
5465 If not, the kernel emulation gets used, which results in a performance penalty.</para>
5466 </glossdef>
5467 </glossentry>
5468
5469 <glossentry id='var-TARGET_OS'><glossterm>TARGET_OS</glossterm>
5470 <glossdef>
5471 <para>Specifies the target's operating system.
5472 The variable can be set to "linux" for <filename>eglibc</filename>-based systems and
5473 to "linux-uclibc" for <filename>uclibc</filename>.
5474 For ARM/EABI targets, there are also "linux-gnueabi" and
5475 "linux-uclibc-gnueabi" values possible.</para>
5476 </glossdef>
5477 </glossentry>
5478
5479 <glossentry id='var-TCLIBC'><glossterm>TCLIBC</glossterm>
5480 <glossdef>
5481 <para>
5482 Specifies which variant of the GNU standard C library (<filename>libc</filename>)
5483 to use during the build process.
5484 This variable replaces <filename>POKYLIBC</filename>, which is no longer
5485 supported.
5486 </para>
5487 <para>
5488 You can select <filename>eglibc</filename> or <filename>uclibc</filename>.
5489 <note>
5490 This release of the Yocto Project does not support the
5491 <filename>glibc</filename> implementation of <filename>libc</filename>.
5492 </note>
5493 </para>
5494 </glossdef>
5495 </glossentry>
5496
5497 <glossentry id='var-TCMODE'><glossterm>TCMODE</glossterm>
5498 <glossdef>
5499 <para>
5500 The toolchain selector.
5501 This variable replaces <filename>POKYMODE</filename>, which is no longer
5502 supported.
5503 </para>
5504 <para>
5505 The <filename>TCMODE</filename> variable selects the external toolchain
5506 built using the OpenEmbedded build system or a few supported combinations of
5507 the upstream GCC or CodeSourcery Labs toolchain.
5508 The variable identifies the <filename>tcmode-*</filename> files used in
5509 the <filename>meta/conf/distro/include</filename> directory, which is found in the
5510 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
5511 </para>
5512 <para>
5513 By default, <filename>TCMODE</filename> is set to "default", which
5514 chooses the <filename>tcmode-default.inc</filename> file.
5515 The variable is similar to
5516 <link linkend='var-TCLIBC'><filename>TCLIBC</filename></link>, which controls
5517 the variant of the GNU standard C library (<filename>libc</filename>)
5518 used during the build process: <filename>eglibc</filename> or <filename>uclibc</filename>.
5519 </para>
5520 </glossdef>
5521 </glossentry>
5522
5523 <glossentry id='var-TEST_IMAGE'><glossterm>TEST_IMAGE</glossterm>
5524 <glossdef>
5525 <para>
5526 Automatically runs the series of automated tests for
5527 images when an image is successfully built.
5528 <note>
5529 Currently, there is only support for running these tests
5530 under QEMU.
5531 </note>
5532 These tests are written in Python making use of the
5533 <filename>unittest</filename> module, and the majority of
5534 them run commands on the target system over
5535 <filename>ssh</filename>.
5536 You can set this variable to "1" in your
5537 <filename>local.conf</filename> file in the
5538 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
5539 to have the OpenEmbedded build system automatically run
5540 these tests after an image successfully builds:
5541 <literallayout class='monospaced'>
5542 TEST_IMAGE = "1"
5543 </literallayout>
5544 For more information on enabling, running, and writing
5545 these tests, see the
5546 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
5547 section in the Yocto Project Development Manual and the
5548 "<link linkend='ref-classes-testimage'><filename>testimage.bbclass</filename></link>"
5549 section.
5550 </para>
5551 </glossdef>
5552 </glossentry>
5553
5554 <glossentry id='var-TEST_QEMUBOOT_TIMEOUT'><glossterm>TEST_QEMUBOOT_TIMEOUT</glossterm>
5555 <glossdef>
5556 <para>
5557 The time in seconds allowed for an image to boot before
5558 automated runtime tests begin to run against an
5559 image.
5560 The default timeout period to allow the boot process to
5561 reach the login prompt is 500 seconds.
5562 You can specify a different value in the
5563 <filename>local.conf</filename> file.
5564 </para>
5565
5566 <para>
5567 For more information on testing images, see the
5568 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
5569 section in the Yocto Project Development Manual.
5570 </para>
5571 </glossdef>
5572 </glossentry>
5573
5574 <glossentry id='var-TEST_SUITES'><glossterm>TEST_SUITES</glossterm>
5575 <glossdef>
5576 <para>
5577 An ordered list of tests (modules) to run against
5578 an image when performing automated runtime testing.
5579 </para>
5580
5581 <para>
5582 The OpenEmbedded build system provides a core set of tests
5583 that can be used against images.
5584 <note>
5585 Currently, there is only support for running these tests
5586 under QEMU.
5587 </note>
5588 Tests include <filename>ping</filename>,
5589 <filename>ssh</filename>, <filename>df</filename> among
5590 others.
5591 You can add your own tests to the list of tests by
5592 appending <filename>TEST_SUITES</filename> as follows:
5593 <literallayout class='monospaced'>
5594 TEST_SUITES_append = " mytest"
5595 </literallayout>
5596 Alternatively, you can provide the "auto" option to
5597 have all applicable tests run against the image.
5598 <literallayout class='monospaced'>
5599 TEST_SUITES_append = " auto"
5600 </literallayout>
5601 Using this option causes the build system to automatically
5602 run tests that are applicable to the image.
5603 Tests that are not applicable are skipped.
5604 </para>
5605
5606 <para>
5607 The order in which tests are run is important.
5608 Tests that depend on another test must appear later in the
5609 list than the test on which they depend.
5610 For example, if you append the list of tests with two
5611 tests (<filename>test_A</filename> and
5612 <filename>test_B</filename>) where
5613 <filename>test_B</filename> is dependent on
5614 <filename>test_A</filename>, then you must order the tests
5615 as follows:
5616 <literallayout class='monospaced'>
5617 TEST_SUITES = " test_A test_B"
5618 </literallayout>
5619 </para>
5620
5621 <para>
5622 For more information on testing images, see the
5623 "<ulink url='&YOCTO_DOCS_DEV_URL;#performing-automated-runtime-testing'>Performing Automated Runtime Testing</ulink>"
5624 section in the Yocto Project Development Manual.
5625 </para>
5626 </glossdef>
5627 </glossentry>
5628
5629 <glossentry id='var-THISDIR'><glossterm>THISDIR</glossterm>
5630 <glossdef>
5631 <para>
5632 The directory in which the file BitBake is currently
5633 parsing is located.
5634 Do not manually set this variable.
5635 </para>
5636 </glossdef>
5637 </glossentry>
5638
5639 <glossentry id='var-TMPDIR'><glossterm>TMPDIR</glossterm>
5640 <glossdef>
5641 <para>
5642 This variable is the base directory the OpenEmbedded
5643 build system uses for all build output and intermediate
5644 files (other than the shared state cache).
5645 By default, the <filename>TMPDIR</filename> variable points
5646 to <filename>tmp</filename> within the
5647 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
5648 </para>
5649
5650 <para>
5651 If you want to establish this directory in a location other
5652 than the default, you can uncomment and edit the following
5653 statement in the
5654 <filename>conf/local.conf</filename> file in the
5655 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>:
5656 <literallayout class='monospaced'>
5657 #TMPDIR = "${TOPDIR}/tmp"
5658 </literallayout>
5659 </para>
5660 </glossdef>
5661 </glossentry>
5662
5663 <glossentry id='var-TOOLCHAIN_HOST_TASK'><glossterm>TOOLCHAIN_HOST_TASK</glossterm>
5664 <glossdef>
5665 <para>
5666 This variable lists packages the OpenEmbedded build system
5667 uses when building an SDK, which contains a
5668 cross-development environment.
5669 The packages specified by this variable are part of the
5670 toolchain set that runs on the
5671 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
5672 and each package should usually have the prefix
5673 "nativesdk-".
5674 When building an SDK using
5675 <filename>bitbake -c populate_sdk &lt;imagename&gt;</filename>,
5676 a default list of packages is set in this variable, but
5677 you can add additional packages to the list.
5678 </para>
5679
5680 <para>
5681 For background information on cross-development toolchains
5682 in the Yocto Project development environment, see the
5683 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
5684 section.
5685 For information on setting up a cross-development
5686 environment, see the
5687 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
5688 section in the Yocto Project Application Developer's Guide.
5689 </para>
5690 </glossdef>
5691 </glossentry>
5692
5693 <glossentry id='var-TOOLCHAIN_TARGET_TASK'><glossterm>TOOLCHAIN_TARGET_TASK</glossterm>
5694 <glossdef>
5695 <para>
5696 This variable lists packages the OpenEmbedded build system
5697 uses when it creates the target part of an SDK
5698 (i.e. the part built for the target hardware), which
5699 includes libraries and headers.
5700 </para>
5701
5702 <para>
5703 For background information on cross-development toolchains
5704 in the Yocto Project development environment, see the
5705 "<link linkend='cross-development-toolchain-generation'>Cross-Development Toolchain Generation</link>"
5706 section.
5707 For information on setting up a cross-development
5708 environment, see the
5709 "<ulink url='&YOCTO_DOCS_ADT_URL;#installing-the-adt'>Installing the ADT and Toolchains</ulink>"
5710 section in the Yocto Project Application Developer's Guide.
5711 </para>
5712 </glossdef>
5713 </glossentry>
5714
5715 <glossentry id='var-TOPDIR'><glossterm>TOPDIR</glossterm>
5716 <glossdef>
5717 <para>
5718 This variable points to the
5719 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
5720 BitBake automatically sets this variable.
5721 </para>
5722 </glossdef>
5723 </glossentry>
5724
5725 <glossentry id='var-TRANSLATED_TARGET_ARCH'><glossterm>TRANSLATED_TARGET_ARCH</glossterm>
5726 <glossdef>
5727 <para>
5728 A sanitized version of
5729 <link linkend='var-TARGET_ARCH'><filename>TARGET_ARCH</filename></link>.
5730 This variable is used where the architecture is needed in
5731 a value where underscores are not allowed, for example
5732 within package filenames.
5733 In this case, dash characters replace any underscore
5734 characters used in TARGET_ARCH.
5735 </para>
5736
5737 <para>
5738 Do not edit this variable.
5739 </para>
5740 </glossdef>
5741 </glossentry>
5742
5743 <glossentry id='var-TUNE_PKGARCH'><glossterm>TUNE_PKGARCH</glossterm>
5744 <glossdef>
5745 <para>
5746 The package architecture understood by the packaging
5747 system to define the architecture, ABI, and tuning of
5748 output packages.
5749 </para>
5750 </glossdef>
5751 </glossentry>
5752
5753 </glossdiv>
5754
5755 <glossdiv id='var-glossary-u'><title>U</title>
5756
5757 <glossentry id='var-UBOOT_ENTRYPOINT'><glossterm>UBOOT_ENTRYPOINT</glossterm>
5758 <glossdef>
5759 <para>
5760 Specifies the entry point for the U-Boot image.
5761 During U-Boot image creation, the
5762 <filename>UBOOT_ENTRYPOINT</filename> variable is passed
5763 as a command-line parameter to the
5764 <filename>uboot-mkimage</filename> utility.
5765 </para>
5766 </glossdef>
5767 </glossentry>
5768
5769 <glossentry id='var-UBOOT_LOADADDRESS'><glossterm>UBOOT_LOADADDRESS</glossterm>
5770 <glossdef>
5771 <para>
5772 Specifies the load address for the U-Boot image.
5773 During U-Boot image creation, the
5774 <filename>UBOOT_LOADADDRESS</filename> variable is passed
5775 as a command-line parameter to the
5776 <filename>uboot-mkimage</filename> utility.
5777 </para>
5778 </glossdef>
5779 </glossentry>
5780
5781 <glossentry id='var-UBOOT_MACHINE'><glossterm>UBOOT_MACHINE</glossterm>
5782 <glossdef>
5783 <para>
5784 Specifies the value passed on the
5785 <filename>make</filename> command line when building
5786 a U-Boot image.
5787 The value indicates the target platform configuration.
5788 You typically set this variable from the machine
5789 configuration file (i.e.
5790 <filename>conf/machine/&lt;machine_name&gt;.conf</filename>).
5791 </para>
5792 </glossdef>
5793 </glossentry>
5794
5795 <glossentry id='var-UBOOT_TARGET'><glossterm>UBOOT_TARGET</glossterm>
5796 <glossdef>
5797 <para>
5798 Specifies the target used for building U-Boot.
5799 The target is passed directly as part of the "make" command
5800 (e.g. SPL and AIS).
5801 If you do not specifically set this variable, the
5802 OpenEmbedded build process passes and uses "all" for the
5803 target during the U-Boot building process.
5804 </para>
5805 </glossdef>
5806 </glossentry>
5807
5808 <glossentry id='var-USER_CLASSES'><glossterm>USER_CLASSES</glossterm>
5809 <glossdef>
5810 <para>
5811 A list of classes to globally inherit.
5812 These classes are used by the OpenEmbedded build system
5813 to enable extra features (e.g.
5814 <filename>buildstats</filename>,
5815 <filename>image-mklibs</filename>, and so forth).
5816 </para>
5817
5818 <para>
5819 The default list is set in your
5820 <filename>local.conf</filename> file:
5821 <literallayout class='monospaced'>
5822 USER_CLASSES ?= "buildstats image-mklibs image-prelink"
5823 </literallayout>
5824 For more information, see
5825 <filename>meta-yocto/conf/local.conf.sample</filename> in
5826 the
5827 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
5828 </para>
5829 </glossdef>
5830 </glossentry>
5831
5832 </glossdiv>
5833
5834<!-- <glossdiv id='var-glossary-v'><title>V</title>-->
5835<!-- </glossdiv>-->
5836
5837 <glossdiv id='var-glossary-w'><title>W</title>
5838
5839 <glossentry id='var-WARN_QA'><glossterm>WARN_QA</glossterm>
5840 <glossdef>
5841 <para>
5842 Specifies the quality assurance checks whose failures are
5843 reported as warnings by the OpenEmbedded build system.
5844 You set this variable in your distribution configuration
5845 file.
5846 For a list of the checks you can control with this variable,
5847 see the
5848 "<link linkend='ref-classes-insane'><filename>insane.bbclass</filename></link>"
5849 section.
5850 </para>
5851 </glossdef>
5852 </glossentry>
5853
5854 <glossentry id='var-WORKDIR'><glossterm>WORKDIR</glossterm>
5855 <glossdef>
5856 <para>
5857 The pathname of the working directory in which the OpenEmbedded build system
5858 builds a recipe.
5859 This directory is located within the
5860 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link> directory structure and changes
5861 as different packages are built.
5862 </para>
5863
5864 <para>
5865 The actual <filename>WORKDIR</filename> directory depends on several things:
5866 <itemizedlist>
5867 <listitem>The temporary directory - <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link></listitem>
5868 <listitem>The package architecture - <link linkend='var-PACKAGE_ARCH'><filename>PACKAGE_ARCH</filename></link></listitem>
5869 <listitem>The target machine - <link linkend='var-MACHINE'><filename>MACHINE</filename></link></listitem>
5870 <listitem>The target operating system - <link linkend='var-TARGET_OS'><filename>TARGET_OS</filename></link></listitem>
5871 <listitem>The recipe name - <link linkend='var-PN'><filename>PN</filename></link></listitem>
5872 <listitem>The recipe version - <link linkend='var-PV'><filename>PV</filename></link></listitem>
5873 <listitem>The recipe revision - <link linkend='var-PR'><filename>PR</filename></link></listitem>
5874 </itemizedlist>
5875 </para>
5876
5877 <para>
5878 For packages that are not dependent on a particular machine,
5879 <filename>WORKDIR</filename> is defined as follows:
5880 <literallayout class='monospaced'>
5881 ${TMPDIR}/work/${PACKAGE_ARCH}-poky-${TARGET_OS}/${PN}/${PV}-${PR}
5882 </literallayout>
5883 As an example, assume a
5884 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink> top-level
5885 folder name <filename>poky</filename> and a default
5886 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
5887 at <filename>poky/build</filename>.
5888 In this case, the working directory the build system uses to build
5889 the <filename>v86d</filename> package is the following:
5890 <literallayout class='monospaced'>
5891 poky/build/tmp/work/qemux86-poky-linux/v86d/01.9-r0
5892 </literallayout>
5893 </para>
5894
5895 <para>
5896 For packages that are dependent on a particular machine, <filename>WORKDIR</filename>
5897 is defined slightly differently:
5898 <literallayout class='monospaced'>
5899 ${TMPDIR}/work/${MACHINE}-poky-${TARGET_OS}/${PN}/${PV}-${PR}
5900 </literallayout>
5901 As an example, again assume a Source Directory top-level folder
5902 named <filename>poky</filename> and a default Build Directory
5903 at <filename>poky/build</filename>.
5904 In this case, the working directory the build system uses to build
5905 the <filename>acl</filename> recipe, which is being built for a
5906 MIPS-based device, is the following:
5907 <literallayout class='monospaced'>
5908 poky/build/tmp/work/mips-poky-linux/acl/2.2.51-r2
5909 </literallayout>
5910 </para>
5911 </glossdef>
5912 </glossentry>
5913
5914 </glossdiv>
5915
5916<!-- <glossdiv id='var-glossary-x'><title>X</title>-->
5917<!-- </glossdiv>-->
5918
5919<!-- <glossdiv id='var-glossary-y'><title>Y</title>-->
5920<!-- </glossdiv>-->
5921
5922<!-- <glossdiv id='var-glossary-z'><title>Z</title>-->
5923<!-- </glossdiv>-->
5924
5925</glossary>
5926</chapter>
5927<!--
5928vim: expandtab tw=80 ts=4
5929-->
diff --git a/documentation/ref-manual/ref-varlocality.xml b/documentation/ref-manual/ref-varlocality.xml
new file mode 100644
index 0000000..d3f8732
--- /dev/null
+++ b/documentation/ref-manual/ref-varlocality.xml
@@ -0,0 +1,196 @@
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-varlocality'>
6 <title>Variable Context</title>
7
8 <para>
9 While you can use most variables in almost any context such as
10 <filename>.conf</filename>, <filename>.bbclass</filename>,
11 <filename>.inc</filename>, and <filename>.bb</filename> files,
12 some variables are often associated with a particular locality or context.
13 This chapter describes some common associations.
14 </para>
15
16 <section id='ref-varlocality-configuration'>
17 <title>Configuration</title>
18
19 <para>
20 The following subsections provide lists of variables whose context is
21 configuration: distribution, machine, and local.
22 </para>
23
24 <section id='ref-varlocality-config-distro'>
25 <title>Distribution (Distro)</title>
26
27 <para>
28 This section lists variables whose configuration context is the
29 distribution, or distro.
30 <itemizedlist>
31 <listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename></para></listitem>
32 <listitem><para><filename><link linkend='var-DISTRO_NAME'>DISTRO_NAME</link></filename>
33 </para></listitem>
34 <listitem><para><filename><link linkend='var-DISTRO_VERSION'>DISTRO_VERSION</link>
35 </filename></para></listitem>
36 <listitem><para><filename><link linkend='var-MAINTAINER'>MAINTAINER</link></filename>
37 </para></listitem>
38 <listitem><para><filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link>
39 </filename></para></listitem>
40 <listitem><para><filename><link linkend='var-TARGET_OS'>TARGET_OS</link></filename>
41 </para></listitem>
42 <listitem><para><filename><link linkend='var-TARGET_FPU'>TARGET_FPU</link></filename>
43 </para></listitem>
44 <listitem><para><filename><link linkend='var-TCMODE'>TCMODE</link></filename>
45 </para></listitem>
46 <listitem><para><filename><link linkend='var-TCLIBC'>TCLIBC</link></filename>
47 </para></listitem>
48 </itemizedlist>
49 </para>
50 </section>
51
52 <section id='ref-varlocality-config-machine'>
53 <title>Machine</title>
54
55 <para>
56 This section lists variables whose configuration context is the
57 machine.
58 <itemizedlist>
59 <listitem><para><filename><link linkend='var-TARGET_ARCH'>TARGET_ARCH</link></filename>
60 </para></listitem>
61 <listitem><para><filename><link linkend='var-SERIAL_CONSOLES'>SERIAL_CONSOLES</link>
62 </filename></para></listitem>
63 <listitem><para><filename><link linkend='var-PACKAGE_EXTRA_ARCHS'>PACKAGE_EXTRA_ARCHS</link>
64 </filename></para></listitem>
65 <listitem><para><filename><link linkend='var-IMAGE_FSTYPES'>IMAGE_FSTYPES</link>
66 </filename></para></listitem>
67 <listitem><para><filename><link linkend='var-MACHINE_FEATURES'>MACHINE_FEATURES</link>
68 </filename></para></listitem>
69 <listitem><para><filename><link linkend='var-MACHINE_EXTRA_RDEPENDS'>MACHINE_EXTRA_RDEPENDS
70 </link></filename></para></listitem>
71 <listitem><para><filename><link linkend='var-MACHINE_EXTRA_RRECOMMENDS'>MACHINE_EXTRA_RRECOMMENDS
72 </link></filename></para></listitem>
73 <listitem><para><filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RDEPENDS'>MACHINE_ESSENTIAL_EXTRA_RDEPENDS
74 </link></filename></para></listitem>
75 <listitem><para><filename><link linkend='var-MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS'>
76 MACHINE_ESSENTIAL_EXTRA_RRECOMMENDS</link></filename></para></listitem>
77 </itemizedlist>
78 </para>
79 </section>
80
81 <section id='ref-varlocality-config-local'>
82 <title>Local</title>
83
84 <para>
85 This section lists variables whose configuration context is the
86 local configuration through the <filename>local.conf</filename>
87 file.
88 <itemizedlist>
89 <listitem><para><filename><link linkend='var-DISTRO'>DISTRO</link></filename>
90 </para></listitem>
91 <listitem><para><filename><link linkend='var-MACHINE'>MACHINE</link></filename>
92 </para></listitem>
93 <listitem><para><filename><link linkend='var-DL_DIR'>DL_DIR</link></filename>
94 </para></listitem>
95 <listitem><para><filename><link linkend='var-BBFILES'>BBFILES</link></filename>
96 </para></listitem>
97 <listitem><para><filename><link linkend='var-EXTRA_IMAGE_FEATURES'>EXTRA_IMAGE_FEATURES
98 </link></filename></para></listitem>
99 <listitem><para><filename><link linkend='var-PACKAGE_CLASSES'>PACKAGE_CLASSES</link>
100 </filename></para></listitem>
101 <listitem><para><filename><link linkend='var-BB_NUMBER_THREADS'>BB_NUMBER_THREADS</link>
102 </filename></para></listitem>
103 <listitem><para><filename><link linkend='var-BBINCLUDELOGS'>BBINCLUDELOGS</link>
104 </filename></para></listitem>
105 <listitem><para><filename><link linkend='var-ENABLE_BINARY_LOCALE_GENERATION'>
106 ENABLE_BINARY_LOCALE_GENERATION</link></filename></para></listitem>
107 </itemizedlist>
108 </para>
109 </section>
110 </section>
111
112 <section id='ref-varlocality-recipes'>
113 <title>Recipes</title>
114
115 <para>
116 The following subsections provide lists of variables whose context is
117 recipes: required, dependencies, path, and extra build information.
118 </para>
119
120 <section id='ref-varlocality-recipe-required'>
121 <title>Required</title>
122
123 <para>
124 This section lists variables that are required for recipes.
125 <itemizedlist>
126 <listitem><para><filename><link linkend='var-LICENSE'>LICENSE</link>
127 </filename></para></listitem>
128 <listitem><para><filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link>
129 </filename></para></listitem>
130 <listitem><para><filename><link linkend='var-SRC_URI'>SRC_URI</link></filename> - used
131 in recipes that fetch local or remote files.
132 </para></listitem>
133 </itemizedlist>
134 </para>
135 </section>
136
137 <section id='ref-varlocality-recipe-dependencies'>
138 <title>Dependencies</title>
139
140 <para>
141 This section lists variables that define recipe dependencies.
142 <itemizedlist>
143 <listitem><para><filename><link linkend='var-DEPENDS'>DEPENDS</link>
144 </filename></para></listitem>
145 <listitem><para><filename><link linkend='var-RDEPENDS'>RDEPENDS</link>
146 </filename></para></listitem>
147 <listitem><para><filename><link linkend='var-RRECOMMENDS'>RRECOMMENDS</link>
148 </filename></para></listitem>
149 <listitem><para><filename><link linkend='var-RCONFLICTS'>RCONFLICTS</link>
150 </filename></para></listitem>
151 <listitem><para><filename><link linkend='var-RREPLACES'>RREPLACES</link>
152 </filename></para></listitem>
153 </itemizedlist>
154 </para>
155 </section>
156
157 <section id='ref-varlocality-recipe-paths'>
158 <title>Paths</title>
159
160 <para>
161 This section lists variables that define recipe paths.
162 <itemizedlist>
163 <listitem><para><filename><link linkend='var-WORKDIR'>WORKDIR</link>
164 </filename></para></listitem>
165 <listitem><para><filename><link linkend='var-S'>S</link>
166 </filename></para></listitem>
167 <listitem><para><filename><link linkend='var-FILES'>FILES</link>
168 </filename></para></listitem>
169 </itemizedlist>
170 </para>
171 </section>
172
173 <section id='ref-varlocality-recipe-build'>
174 <title>Extra Build Information</title>
175
176 <para>
177 This section lists variables that define extra build information for recipes.
178 <itemizedlist>
179 <listitem><para><filename><link linkend='var-EXTRA_OECMAKE'>EXTRA_OECMAKE</link>
180 </filename></para></listitem>
181 <listitem><para><filename><link linkend='var-EXTRA_OECONF'>EXTRA_OECONF</link>
182 </filename></para></listitem>
183 <listitem><para><filename><link linkend='var-EXTRA_OEMAKE'>EXTRA_OEMAKE</link>
184 </filename></para></listitem>
185 <listitem><para><filename><link linkend='var-PACKAGES'>PACKAGES</link></filename>
186 </para></listitem>
187 <listitem><para><filename><link linkend='var-DEFAULT_PREFERENCE'>DEFAULT_PREFERENCE
188 </link></filename></para></listitem>
189 </itemizedlist>
190 </para>
191 </section>
192 </section>
193</chapter>
194<!--
195vim: expandtab tw=80 ts=4 spell spelllang=en_gb
196-->
diff --git a/documentation/ref-manual/resources.xml b/documentation/ref-manual/resources.xml
new file mode 100644
index 0000000..c48951f
--- /dev/null
+++ b/documentation/ref-manual/resources.xml
@@ -0,0 +1,128 @@
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='resources'>
6<title>Contributing to the Yocto Project</title>
7
8<section id='resources-intro'>
9 <title>Introduction</title>
10 <para>
11 The Yocto Project team is happy for people to experiment with the Yocto Project.
12 A number of places exist to find help if you run into difficulties or find bugs.
13 To find out how to download source code,
14 see the "<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto Project Release</ulink>"
15 section in the Yocto Project Development Manual.
16 </para>
17</section>
18
19<section id='resources-bugtracker'>
20 <title>Tracking Bugs</title>
21
22 <para>
23 If you find problems with the Yocto Project, you should report them using the
24 Bugzilla application at <ulink url='&YOCTO_BUGZILLA_URL;'></ulink>.
25 </para>
26</section>
27
28<section id='resources-mailinglist'>
29 <title>Mailing lists</title>
30
31 <para>
32 A number of mailing lists maintained by the Yocto Project exist
33 as well as related OpenEmbedded mailing lists for discussion,
34 patch submission and announcements.
35 To subscribe to one of the following mailing lists, click on the
36 appropriate URL in the following list and follow the instructions:
37 <itemizedlist>
38 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'></ulink> -
39 General Yocto Project discussion mailing list. </para></listitem>
40 <listitem><para><ulink url='&OE_LISTS_URL;/listinfo/openembedded-core'></ulink> -
41 Discussion mailing list about OpenEmbedded-Core (the core metadata).</para></listitem>
42 <listitem><para><ulink url='&OE_LISTS_URL;/listinfo/openembedded-devel'></ulink> -
43 Discussion mailing list about OpenEmbedded.</para></listitem>
44 <listitem><para><ulink url='&OE_LISTS_URL;/listinfo/bitbake-devel'></ulink> -
45 Discussion mailing list about the
46 <ulink url='&YOCTO_DOCS_DEV_URL;#bitbake-term'>BitBake</ulink>
47 build tool.</para></listitem>
48 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/poky'></ulink> -
49 Discussion mailing list about
50 <ulink url='&YOCTO_DOCS_DEV_URL;#poky'>Poky</ulink>.
51 </para></listitem>
52 <listitem><para><ulink url='&YOCTO_LISTS_URL;/listinfo/yocto-announce'></ulink> -
53 Mailing list to receive official Yocto Project release and milestone
54 announcements.</para></listitem>
55 </itemizedlist>
56 </para>
57</section>
58
59<section id='resources-irc'>
60 <title>Internet Relay Chat (IRC)</title>
61
62 <para>
63 Two IRC channels on freenode are available for the Yocto Project and Poky discussions:
64 <itemizedlist>
65 <listitem><para><filename>#yocto</filename></para></listitem>
66 <listitem><para><filename>#poky</filename></para></listitem>
67 </itemizedlist>
68 </para>
69</section>
70
71<section id='resources-links'>
72 <title>Links</title>
73
74 <para>
75 Here is a list of resources you will find helpful:
76 <itemizedlist>
77 <listitem><para><emphasis>
78 <ulink url='&YOCTO_HOME_URL;'>The Yocto Project website</ulink>:
79 </emphasis> The home site for the Yocto
80 Project.</para></listitem>
81 <listitem><para><emphasis>
82 <ulink url='http://www.intel.com/'>Intel Corporation</ulink>:</emphasis>
83 The company who acquired OpenedHand in 2008 and began
84 development on the Yocto Project.</para></listitem>
85 <listitem><para><emphasis>
86 <ulink url='&OE_HOME_URL;'>OpenEmbedded</ulink>:</emphasis>
87 The upstream, generic, embedded distribution used as the basis
88 for the build system in the Yocto Project.
89 Poky derives from and contributes back to the OpenEmbedded
90 project.</para></listitem>
91 <listitem><para><emphasis>
92 <ulink url='http://developer.berlios.de/projects/bitbake/'>
93 BitBake</ulink>:</emphasis> The tool used to process metadata.</para></listitem>
94 <listitem><para><emphasis>
95 BitBake User Manual:</emphasis>
96 A comprehensive guide to the BitBake tool.
97 You can find the BitBake User Manual in the
98 <filename>bitbake/doc/manual</filename> directory, which is
99 found in the
100 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
101 </para></listitem>
102 <listitem><para><emphasis>
103 <ulink url='http://wiki.qemu.org/Index.html'>QEMU</ulink>:
104 </emphasis> An open source machine emulator and virtualizer.
105 </para></listitem>
106 </itemizedlist>
107 </para>
108</section>
109
110<section id='resources-contributions'>
111 <title>Contributions</title>
112
113 <para>
114 The Yocto Project gladly accepts contributions.
115 You can submit changes to the project either by creating and sending
116 pull requests,
117 or by submitting patches through email.
118 For information on how to do both as well as information on how
119 to find out who is the maintainer for areas of code, see the
120 "<ulink url='&YOCTO_DOCS_DEV_URL;#how-to-submit-a-change'>How to Submit a Change</ulink>"
121 section in the Yocto Project Development Manual.
122 </para>
123</section>
124
125</chapter>
126<!--
127vim: expandtab tw=80 ts=4
128-->
diff --git a/documentation/ref-manual/technical-details.xml b/documentation/ref-manual/technical-details.xml
new file mode 100644
index 0000000..6d4c6b7
--- /dev/null
+++ b/documentation/ref-manual/technical-details.xml
@@ -0,0 +1,1358 @@
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='technical-details'>
6<title>Technical Details</title>
7
8 <para>
9 This chapter provides technical details for various parts of the Yocto Project.
10 Currently, topics include Yocto Project components,
11 shared state (sstate) cache, x32, and Licenses.
12 </para>
13
14<section id='usingpoky-components'>
15 <title>Yocto Project Components</title>
16
17 <para>
18 The BitBake task executor together with various types of configuration files form the
19 OpenEmbedded Core.
20 This section overviews these by describing what they are used for
21 and how they interact.
22 </para>
23
24 <para>
25 BitBake handles the parsing and execution of the data files.
26 The data itself is of various types:
27 <itemizedlist>
28 <listitem><para><emphasis>Recipes:</emphasis> Provides details about particular
29 pieces of software.</para></listitem>
30 <listitem><para><emphasis>Class Data:</emphasis> Abstracts common build
31 information (e.g. how to build a Linux kernel).</para></listitem>
32 <listitem><para><emphasis>Configuration Data:</emphasis> Defines machine-specific settings,
33 policy decisions, and so forth.
34 Configuration data acts as the glue to bind everything together.</para></listitem>
35 </itemizedlist>
36 For more information on data, see the
37 "<ulink url='&YOCTO_DOCS_DEV_URL;#yocto-project-terms'>Yocto Project Terms</ulink>"
38 section in the Yocto Project Development Manual.
39 </para>
40
41 <para>
42 BitBake knows how to combine multiple data sources together and refers to each data source
43 as a layer.
44 For information on layers, see the
45 "<ulink url='&YOCTO_DOCS_DEV_URL;#understanding-and-creating-layers'>Understanding and
46 Creating Layers</ulink>" section of the Yocto Project Development Manual.
47 </para>
48
49 <para>
50 Following are some brief details on these core components.
51 For more detailed information on these components, see the
52 "<link linkend='ref-structure'>Source Directory Structure</link>" chapter.
53 </para>
54
55 <section id='usingpoky-components-bitbake'>
56 <title>BitBake</title>
57
58 <para>
59 BitBake is the tool at the heart of the OpenEmbedded build system
60 and is responsible for parsing the
61 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>,
62 generating a list of tasks from it, and then executing those tasks.
63 To see a list of the options BitBake supports, use either of
64 the following commands:
65 <literallayout class='monospaced'>
66 $ bitbake -h
67 $ bitbake --help
68 </literallayout>
69 </para>
70
71 <para>
72 The most common usage for BitBake is <filename>bitbake &lt;packagename&gt;</filename>, where
73 <filename>packagename</filename> is the name of the package you want to build
74 (referred to as the "target" in this manual).
75 The target often equates to the first part of a <filename>.bb</filename> filename.
76 So, to process the <filename>matchbox-desktop_1.2.3.bb</filename> recipe file, you
77 might type the following:
78 <literallayout class='monospaced'>
79 $ bitbake matchbox-desktop
80 </literallayout>
81 Several different versions of <filename>matchbox-desktop</filename> might exist.
82 BitBake chooses the one selected by the distribution configuration.
83 You can get more details about how BitBake chooses between different
84 target versions and providers in the
85 "<link linkend='ref-bitbake-providers'>Preferences and Providers</link>" section.
86 </para>
87
88 <para>
89 BitBake also tries to execute any dependent tasks first.
90 So for example, before building <filename>matchbox-desktop</filename>, BitBake
91 would build a cross compiler and <filename>eglibc</filename> if they had not already
92 been built.
93 <note>This release of the Yocto Project does not support the <filename>glibc</filename>
94 GNU version of the Unix standard C library. By default, the OpenEmbedded build system
95 builds with <filename>eglibc</filename>.</note>
96 </para>
97
98 <para>
99 A useful BitBake option to consider is the <filename>-k</filename> or
100 <filename>--continue</filename> option.
101 This option instructs BitBake to try and continue processing the job as much
102 as possible even after encountering an error.
103 When an error occurs, the target that
104 failed and those that depend on it cannot be remade.
105 However, when you use this option other dependencies can still be processed.
106 </para>
107 </section>
108
109 <section id='usingpoky-components-metadata'>
110 <title>Metadata (Recipes)</title>
111
112 <para>
113 The <filename>.bb</filename> files are usually referred to as "recipes."
114 In general, a recipe contains information about a single piece of software.
115 This information includes the location from which to download the
116 unaltered source, any source patches to be applied to that source
117 (if needed), which special configuration options to apply,
118 how to compile the source files, and how to package the compiled output.
119 </para>
120
121 <para>
122 The term "package" is sometimes used to refer to recipes. However,
123 since the word "package" is used for the packaged output from the OpenEmbedded
124 build system (i.e. <filename>.ipk</filename> or <filename>.deb</filename> files),
125 this document avoids using the term "package" when referring to recipes.
126 </para>
127 </section>
128
129 <section id='usingpoky-components-classes'>
130 <title>Classes</title>
131
132 <para>
133 Class files (<filename>.bbclass</filename>) contain information that
134 is useful to share between
135 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink> files.
136 An example is the Autotools class, which contains
137 common settings for any application that Autotools uses.
138 The "<link linkend='ref-classes'>Classes</link>" chapter provides details
139 about common classes and how to use them.
140 </para>
141 </section>
142
143 <section id='usingpoky-components-configuration'>
144 <title>Configuration</title>
145
146 <para>
147 The configuration files (<filename>.conf</filename>) define various configuration variables
148 that govern the OpenEmbedded build process.
149 These files fall into several areas that define machine configuration options,
150 distribution configuration options, compiler tuning options, general common configuration
151 options, and user configuration options in <filename>local.conf</filename>, which is found
152 in the
153 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
154 </para>
155 </section>
156</section>
157
158<section id="cross-development-toolchain-generation">
159 <title>Cross-Development Toolchain Generation</title>
160
161 <para>
162 The Yocto Project does most of the work for you when it comes to
163 creating
164 <ulink url='&YOCTO_DOCS_DEV_URL;#cross-development-toolchain'>cross-development toolchains</ulink>.
165 This section provides some technical background information on how
166 cross-development toolchains are created and used.
167 For more information on toolchains, you can also see the
168 <ulink url='&YOCTO_DOCS_ADT_URL;'>the Yocto Project Application Developer's Guide</ulink>.
169 </para>
170
171 <para>
172 In the Yocto Project development environment, cross-development
173 toolchains are used to build the image and applications that run on the
174 target hardware.
175 With just a few commands, the OpenEmbedded build system creates
176 these necessary toolchains for you.
177 </para>
178
179 <para>
180 The following figure shows a high-level build environment regarding
181 toolchain construction and use.
182 </para>
183
184 <para>
185 <imagedata fileref="figures/cross-development-toolchains.png" width="8in" depth="6in" align="center" />
186 </para>
187
188 <para>
189 Most of the work occurs on the Build Host.
190 This is the machine used to build images and generally work within the
191 the Yocto Project environment.
192 When you run BitBake to create an image, the OpenEmbedded build system
193 uses the host <filename>gcc</filename> compiler to bootstrap a
194 cross-compiler named <filename>gcc-cross</filename>.
195 The <filename>gcc-cross</filename> compiler is what BitBake uses to
196 compile source files when creating the target image.
197 You can think of <filename>gcc-cross</filename> simply as an
198 automatically generated cross-compiler that is used internally within
199 BitBake only.
200 </para>
201
202 <para>
203 The chain of events that occurs when <filename>gcc-cross</filename> is
204 bootstrapped is as follows:
205 <literallayout class='monospaced'>
206 gcc -> binutils-cross -> gcc-cross-initial -> linux-libc-headers -> eglibc-initial -> eglibc -> gcc-cross -> gcc-runtime
207 </literallayout>
208 <itemizedlist>
209 <listitem><para><filename>gcc</filename>:
210 The build host's GNU Compiler Collection (GCC).
211 </para></listitem>
212 <listitem><para><filename>binutils-cross</filename>:
213 The bare minimum binary utilities needed in order to run
214 the <filename>gcc-cross-initial</filename> phase of the
215 bootstrap operation.
216 </para></listitem>
217 <listitem><para><filename>gcc-cross-initial</filename>:
218 An early stage of the bootstrap process for creating
219 the cross-compiler.
220 This stage builds enough of the <filename>gcc-cross</filename>,
221 the C library, and other pieces needed to finish building the
222 final cross-compiler in later stages.
223 This tool is a "native" package (i.e. it is designed to run on
224 the build host).
225 </para></listitem>
226 <listitem><para><filename>linux-libc-headers</filename>:
227 Headers needed for the cross-compiler.
228 </para></listitem>
229 <listitem><para><filename>eglibc-initial</filename>:
230 An initial version of the Embedded GLIBC needed to bootstrap
231 <filename>eglibc</filename>.
232 </para></listitem>
233 <listitem><para><filename>gcc-cross</filename>:
234 The final stage of the bootstrap process for the
235 cross-compiler.
236 This stage results in the actual cross-compiler that
237 BitBake uses when it builds an image for a targeted
238 device.
239 <note>
240 If you are replacing this cross compiler toolchain
241 with a custom version, you must replace
242 <filename>gcc-cross</filename>.
243 </note>
244 This tool is also a "native" package (i.e. it is
245 designed to run on the build host).
246 </para></listitem>
247 <listitem><para><filename>gcc-runtime</filename>:
248 Runtime libraries resulting from the toolchain bootstrapping
249 process.
250 This tool produces a binary that consists of the
251 runtime libraries need for the targeted device.
252 </para></listitem>
253 </itemizedlist>
254 </para>
255
256 <para>
257 You can use the OpenEmbedded build system to build an installer for
258 the relocatable SDK used to develop applications.
259 When you run the installer, it installs the toolchain, which contains
260 the development tools (e.g., the
261 <filename>gcc-cross-canadian</filename>),
262 <filename>binutils-cross-canadian</filename>, and other
263 <filename>nativesdk-*</filename> tools you need to cross-compile and
264 test your software.
265 The figure shows the commands you use to easily build out this
266 toolchain.
267 This cross-development toolchain is built to execute on the
268 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
269 which might or might not be the same
270 machine as the Build Host.
271 <note>
272 If your target architecture is supported by the Yocto Project,
273 you can take advantage of pre-built images that ship with the
274 Yocto Project and already contain cross-development toolchain
275 installers.
276 </note>
277 </para>
278
279 <para>
280 Here is the bootstrap process for the relocatable toolchain:
281 <literallayout class='monospaced'>
282 gcc -> binutils-crosssdk -> gcc-crosssdk-initial -> linux-libc-headers -> eglibc-initial -> nativesdk-eglibc -> gcc-crosssdk -> gcc-cross-canadian
283 </literallayout>
284 <itemizedlist>
285 <listitem><para><filename>gcc</filename>:
286 The build host's GNU Compiler Collection (GCC).
287 </para></listitem>
288 <listitem><para><filename>binutils-crosssdk</filename>:
289 The bare minimum binary utilities needed in order to run
290 the <filename>gcc-crosssdk-initial</filename> phase of the
291 bootstrap operation.
292 </para></listitem>
293 <listitem><para><filename>gcc-crosssdk-initial</filename>:
294 An early stage of the bootstrap process for creating
295 the cross-compiler.
296 This stage builds enough of the
297 <filename>gcc-crosssdk</filename> and supporting pieces so that
298 the final stage of the bootstrap process can produce the
299 finished cross-compiler.
300 This tool is a "native" binary that runs on the build host.
301 </para></listitem>
302 <listitem><para><filename>linux-libc-headers</filename>:
303 Headers needed for the cross-compiler.
304 </para></listitem>
305 <listitem><para><filename>eglibc-initial</filename>:
306 An initial version of the Embedded GLIBC needed to bootstrap
307 <filename>nativesdk-eglibc</filename>.
308 </para></listitem>
309 <listitem><para><filename>nativesdk-eglibc</filename>:
310 The Embedded GLIBC needed to bootstrap the
311 <filename>gcc-crosssdk</filename>.
312 </para></listitem>
313 <listitem><para><filename>gcc-crosssdk</filename>:
314 The final stage of the bootstrap process for the
315 relocatable cross-compiler.
316 The <filename>gcc-crosssdk</filename> is a transitory compiler
317 and never leaves the build host.
318 Its purpose is to help in the bootstrap process to create the
319 eventual relocatable <filename>gcc-cross-canadian</filename>
320 compiler, which is relocatable.
321 This tool is also a "native" package (i.e. it is
322 designed to run on the build host).
323 </para></listitem>
324 <listitem><para><filename>gcc-cross-canadian</filename>:
325 The final relocatable cross-compiler.
326 When run on the
327 <link linkend='var-SDKMACHINE'><filename>SDKMACHINE</filename></link>,
328 this tool
329 produces executable code that runs on the target device.
330 </para></listitem>
331 </itemizedlist>
332 </para>
333</section>
334
335<section id="shared-state-cache">
336 <title>Shared State Cache</title>
337
338 <para>
339 By design, the OpenEmbedded build system builds everything from scratch unless
340 BitBake can determine that parts do not need to be rebuilt.
341 Fundamentally, building from scratch is attractive as it means all parts are
342 built fresh and there is no possibility of stale data causing problems.
343 When developers hit problems, they typically default back to building from scratch
344 so they know the state of things from the start.
345 </para>
346
347 <para>
348 Building an image from scratch is both an advantage and a disadvantage to the process.
349 As mentioned in the previous paragraph, building from scratch ensures that
350 everything is current and starts from a known state.
351 However, building from scratch also takes much longer as it generally means
352 rebuilding things that do not necessarily need to be rebuilt.
353 </para>
354
355 <para>
356 The Yocto Project implements shared state code that supports incremental builds.
357 The implementation of the shared state code answers the following questions that
358 were fundamental roadblocks within the OpenEmbedded incremental build support system:
359 <itemizedlist>
360 <listitem><para>What pieces of the system have changed and what pieces have
361 not changed?</para></listitem>
362 <listitem><para>How are changed pieces of software removed and replaced?</para></listitem>
363 <listitem><para>How are pre-built components that do not need to be rebuilt from scratch
364 used when they are available?</para></listitem>
365 </itemizedlist>
366 </para>
367
368 <para>
369 For the first question, the build system detects changes in the "inputs" to a given task by
370 creating a checksum (or signature) of the task's inputs.
371 If the checksum changes, the system assumes the inputs have changed and the task needs to be
372 rerun.
373 For the second question, the shared state (sstate) code tracks which tasks add which output
374 to the build process.
375 This means the output from a given task can be removed, upgraded or otherwise manipulated.
376 The third question is partly addressed by the solution for the second question
377 assuming the build system can fetch the sstate objects from remote locations and
378 install them if they are deemed to be valid.
379 </para>
380
381 <note>
382 The OpenEmbedded build system does not maintain
383 <link linkend='var-PR'><filename>PR</filename></link> information
384 as part of the shared state packages.
385 Consequently, considerations exist that affect maintaining shared
386 state feeds.
387 For information on how the OpenEmbedded works with packages and can
388 track incrementing <filename>PR</filename> information, see the
389 "<ulink url='&YOCTO_DOCS_DEV_URL;#incrementing-a-package-revision-number'>Incrementing a Package Revision Number</ulink>"
390 section.
391 </note>
392
393 <para>
394 The rest of this section goes into detail about the overall incremental build
395 architecture, the checksums (signatures), shared state, and some tips and tricks.
396 </para>
397
398 <section id='overall-architecture'>
399 <title>Overall Architecture</title>
400
401 <para>
402 When determining what parts of the system need to be built, BitBake
403 works on a per-task basis rather than a per-recipe basis.
404 You might wonder why using a per-task basis is preferred over a per-recipe basis.
405 To help explain, consider having the IPK packaging backend enabled and then switching to DEB.
406 In this case, <filename>do_install</filename> and <filename>do_package</filename>
407 outputs are still valid.
408 However, with a per-recipe approach, the build would not include the
409 <filename>.deb</filename> files.
410 Consequently, you would have to invalidate the whole build and rerun it.
411 Rerunning everything is not the best solution.
412 Also, in this case, the core must be "taught" much about specific tasks.
413 This methodology does not scale well and does not allow users to easily add new tasks
414 in layers or as external recipes without touching the packaged-staging core.
415 </para>
416 </section>
417
418 <section id='checksums'>
419 <title>Checksums (Signatures)</title>
420
421 <para>
422 The shared state code uses a checksum, which is a unique signature of a task's
423 inputs, to determine if a task needs to be run again.
424 Because it is a change in a task's inputs that triggers a rerun, the process
425 needs to detect all the inputs to a given task.
426 For shell tasks, this turns out to be fairly easy because
427 the build process generates a "run" shell script for each task and
428 it is possible to create a checksum that gives you a good idea of when
429 the task's data changes.
430 </para>
431
432 <para>
433 To complicate the problem, there are things that should not be included in
434 the checksum.
435 First, there is the actual specific build path of a given task -
436 the <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
437 It does not matter if the working directory changes because it should not
438 affect the output for target packages.
439 Also, the build process has the objective of making native or cross packages relocatable.
440 The checksum therefore needs to exclude <filename>WORKDIR</filename>.
441 The simplistic approach for excluding the working directory is to set
442 <filename>WORKDIR</filename> to some fixed value and create the checksum
443 for the "run" script.
444 </para>
445
446 <para>
447 Another problem results from the "run" scripts containing functions that
448 might or might not get called.
449 The incremental build solution contains code that figures out dependencies
450 between shell functions.
451 This code is used to prune the "run" scripts down to the minimum set,
452 thereby alleviating this problem and making the "run" scripts much more
453 readable as a bonus.
454 </para>
455
456 <para>
457 So far we have solutions for shell scripts.
458 What about Python tasks?
459 The same approach applies even though these tasks are more difficult.
460 The process needs to figure out what variables a Python function accesses
461 and what functions it calls.
462 Again, the incremental build solution contains code that first figures out
463 the variable and function dependencies, and then creates a checksum for the data
464 used as the input to the task.
465 </para>
466
467 <para>
468 Like the <filename>WORKDIR</filename> case, situations exist where dependencies
469 should be ignored.
470 For these cases, you can instruct the build process to ignore a dependency
471 by using a line like the following:
472 <literallayout class='monospaced'>
473 PACKAGE_ARCHS[vardepsexclude] = "MACHINE"
474 </literallayout>
475 This example ensures that the <filename>PACKAGE_ARCHS</filename> variable does not
476 depend on the value of <filename>MACHINE</filename>, even if it does reference it.
477 </para>
478
479 <para>
480 Equally, there are cases where we need to add dependencies BitBake is not able to find.
481 You can accomplish this by using a line like the following:
482 <literallayout class='monospaced'>
483 PACKAGE_ARCHS[vardeps] = "MACHINE"
484 </literallayout>
485 This example explicitly adds the <filename>MACHINE</filename> variable as a
486 dependency for <filename>PACKAGE_ARCHS</filename>.
487 </para>
488
489 <para>
490 Consider a case with in-line Python, for example, where BitBake is not
491 able to figure out dependencies.
492 When running in debug mode (i.e. using <filename>-DDD</filename>), BitBake
493 produces output when it discovers something for which it cannot figure out
494 dependencies.
495 The Yocto Project team has currently not managed to cover those dependencies
496 in detail and is aware of the need to fix this situation.
497 </para>
498
499 <para>
500 Thus far, this section has limited discussion to the direct inputs into a task.
501 Information based on direct inputs is referred to as the "basehash" in the
502 code.
503 However, there is still the question of a task's indirect inputs - the
504 things that were already built and present in the
505 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
506 The checksum (or signature) for a particular task needs to add the hashes
507 of all the tasks on which the particular task depends.
508 Choosing which dependencies to add is a policy decision.
509 However, the effect is to generate a master checksum that combines the basehash
510 and the hashes of the task's dependencies.
511 </para>
512
513 <para>
514 At the code level, there are a variety of ways both the basehash and the
515 dependent task hashes can be influenced.
516 Within the BitBake configuration file, we can give BitBake some extra information
517 to help it construct the basehash.
518 The following statement effectively results in a list of global variable
519 dependency excludes - variables never included in any checksum:
520 <literallayout class='monospaced'>
521 BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR \
522 SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM \
523 USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST \
524 PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE \
525 CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE CCACHE_DISABLE LICENSE_PATH SDKPKGSUFFIX"
526 </literallayout>
527 The previous example excludes
528 <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>
529 since that variable is actually constructed as a path within
530 <link linkend='var-TMPDIR'><filename>TMPDIR</filename></link>, which is on
531 the whitelist.
532 </para>
533
534 <para>
535 The rules for deciding which hashes of dependent tasks to include through
536 dependency chains are more complex and are generally accomplished with a
537 Python function.
538 The code in <filename>meta/lib/oe/sstatesig.py</filename> shows two examples
539 of this and also illustrates how you can insert your own policy into the system
540 if so desired.
541 This file defines the two basic signature generators <filename>OE-Core</filename>
542 uses: "OEBasic" and "OEBasicHash".
543 By default, there is a dummy "noop" signature handler enabled in BitBake.
544 This means that behavior is unchanged from previous versions.
545 <filename>OE-Core</filename> uses the "OEBasicHash" signature handler by default
546 through this setting in the <filename>bitbake.conf</filename> file:
547 <literallayout class='monospaced'>
548 BB_SIGNATURE_HANDLER ?= "OEBasicHash"
549 </literallayout>
550 The "OEBasicHash" <filename>BB_SIGNATURE_HANDLER</filename> is the same as the
551 "OEBasic" version but adds the task hash to the stamp files.
552 This results in any
553 <ulink url='&YOCTO_DOCS_DEV_URL;#metadata'>Metadata</ulink>
554 change that changes the task hash, automatically
555 causing the task to be run again.
556 This removes the need to bump <link linkend='var-PR'><filename>PR</filename></link>
557 values, and changes to Metadata automatically ripple across the build.
558 </para>
559
560 <para>
561 It is also worth noting that the end result of these signature generators is to
562 make some dependency and hash information available to the build.
563 This information includes:
564 <literallayout class='monospaced'>
565 BB_BASEHASH_task-&lt;taskname&gt; - the base hashes for each task in the recipe
566 BB_BASEHASH_&lt;filename:taskname&gt; - the base hashes for each dependent task
567 BBHASHDEPS_&lt;filename:taskname&gt; - The task dependencies for each task
568 BB_TASKHASH - the hash of the currently running task
569 </literallayout>
570 </para>
571 </section>
572
573 <section id='shared-state'>
574 <title>Shared State</title>
575
576 <para>
577 Checksums and dependencies, as discussed in the previous section, solve half the
578 problem of supporting a shared state.
579 The other part of the problem is being able to use checksum information during the build
580 and being able to reuse or rebuild specific components.
581 </para>
582
583 <para>
584 The shared state class (<filename>sstate.bbclass</filename>)
585 is a relatively generic implementation of how to "capture" a snapshot of a given task.
586 The idea is that the build process does not care about the source of a task's output.
587 Output could be freshly built or it could be downloaded and unpacked from
588 somewhere - the build process does not need to worry about its origin.
589 </para>
590
591 <para>
592 There are two types of output, one is just about creating a directory
593 in <link linkend='var-WORKDIR'><filename>WORKDIR</filename></link>.
594 A good example is the output of either <filename>do_install</filename> or
595 <filename>do_package</filename>.
596 The other type of output occurs when a set of data is merged into a shared directory
597 tree such as the sysroot.
598 </para>
599
600 <para>
601 The Yocto Project team has tried to keep the details of the implementation hidden in
602 <filename>sstate.bbclass</filename>.
603 From a user's perspective, adding shared state wrapping to a task
604 is as simple as this <filename>do_deploy</filename> example taken from
605 <filename>deploy.bbclass</filename>:
606 <literallayout class='monospaced'>
607 DEPLOYDIR = "${WORKDIR}/deploy-${PN}"
608 SSTATETASKS += "do_deploy"
609 do_deploy[sstate-name] = "deploy"
610 do_deploy[sstate-inputdirs] = "${DEPLOYDIR}"
611 do_deploy[sstate-outputdirs] = "${DEPLOY_DIR_IMAGE}"
612
613 python do_deploy_setscene () {
614 sstate_setscene(d)
615 }
616 addtask do_deploy_setscene
617 do_deploy[dirs] = "${DEPLOYDIR} ${B}"
618 </literallayout>
619 In this example, we add some extra flags to the task, a name field ("deploy"), an
620 input directory where the task sends data, and the output
621 directory where the data from the task should eventually be copied.
622 We also add a <filename>_setscene</filename> variant of the task and add the task
623 name to the <filename>SSTATETASKS</filename> list.
624 </para>
625
626 <para>
627 If you have a directory whose contents you need to preserve, you can do this with
628 a line like the following:
629 <literallayout class='monospaced'>
630 do_package[sstate-plaindirs] = "${PKGD} ${PKGDEST}"
631 </literallayout>
632 This method, as well as the following example, also works for multiple directories.
633 <literallayout class='monospaced'>
634 do_package[sstate-inputdirs] = "${PKGDESTWORK} ${SHLIBSWORKDIR}"
635 do_package[sstate-outputdirs] = "${PKGDATA_DIR} ${SHLIBSDIR}"
636 do_package[sstate-lockfile] = "${PACKAGELOCK}"
637 </literallayout>
638 These methods also include the ability to take a lockfile when manipulating
639 shared state directory structures since some cases are sensitive to file
640 additions or removals.
641 </para>
642
643 <para>
644 Behind the scenes, the shared state code works by looking in
645 <link linkend='var-SSTATE_DIR'><filename>SSTATE_DIR</filename></link> and
646 <link linkend='var-SSTATE_MIRRORS'><filename>SSTATE_MIRRORS</filename></link>
647 for shared state files.
648 Here is an example:
649 <literallayout class='monospaced'>
650 SSTATE_MIRRORS ?= "\
651 file://.* http://someserver.tld/share/sstate/PATH \n \
652 file://.* file:///some/local/dir/sstate/PATH"
653 </literallayout>
654 <note>
655 The shared state directory (<filename>SSTATE_DIR</filename>) is
656 organized into two-character subdirectories, where the subdirectory
657 names are based on the first two characters of the hash.
658 If the shared state directory structure for a mirror has the
659 same structure as <filename>SSTATE_DIR</filename>, you must
660 specify "PATH" as part of the URI to enable the build system
661 to map to the appropriate subdirectory.
662 </note>
663 </para>
664
665 <para>
666 The shared state package validity can be detected just by looking at the
667 filename since the filename contains the task checksum (or signature) as
668 described earlier in this section.
669 If a valid shared state package is found, the build process downloads it
670 and uses it to accelerate the task.
671 </para>
672
673 <para>
674 The build processes use the <filename>*_setscene</filename> tasks
675 for the task acceleration phase.
676 BitBake goes through this phase before the main execution code and tries
677 to accelerate any tasks for which it can find shared state packages.
678 If a shared state package for a task is available, the shared state
679 package is used.
680 This means the task and any tasks on which it is dependent are not
681 executed.
682 </para>
683
684 <para>
685 As a real world example, the aim is when building an IPK-based image,
686 only the <filename>do_package_write_ipk</filename> tasks would have their
687 shared state packages fetched and extracted.
688 Since the sysroot is not used, it would never get extracted.
689 This is another reason why a task-based approach is preferred over a
690 recipe-based approach, which would have to install the output from every task.
691 </para>
692 </section>
693
694 <section id='tips-and-tricks'>
695 <title>Tips and Tricks</title>
696
697 <para>
698 The code in the build system that supports incremental builds is not
699 simple code.
700 This section presents some tips and tricks that help you work around
701 issues related to shared state code.
702 </para>
703
704 <section id='debugging'>
705 <title>Debugging</title>
706
707 <para>
708 When things go wrong, debugging needs to be straightforward.
709 Because of this, the Yocto Project team included strong debugging
710 tools:
711 <itemizedlist>
712 <listitem><para>Whenever a shared state package is written out, so is a
713 corresponding <filename>.siginfo</filename> file.
714 This practice results in a pickled Python database of all
715 the metadata that went into creating the hash for a given shared state
716 package.</para></listitem>
717 <listitem><para>If you run BitBake with the <filename>--dump-signatures</filename>
718 (or <filename>-S</filename>) option, BitBake dumps out
719 <filename>.siginfo</filename> files in
720 the stamp directory for every task it would have executed instead of
721 building the specified target package.</para></listitem>
722 <listitem><para>There is a <filename>bitbake-diffsigs</filename> command that
723 can process <filename>.siginfo</filename> files.
724 If you specify one of these files, BitBake dumps out the dependency
725 information in the file.
726 If you specify two files, BitBake compares the two files and dumps out
727 the differences between the two.
728 This more easily helps answer the question of "What
729 changed between X and Y?"</para></listitem>
730 </itemizedlist>
731 </para>
732 </section>
733
734 <section id='invalidating-shared-state'>
735 <title>Invalidating Shared State</title>
736
737 <para>
738 The OpenEmbedded build system uses checksums and shared state
739 cache to avoid unnecessarily rebuilding tasks.
740 Collectively, this scheme is known as "shared state code."
741 </para>
742
743 <para>
744 As with all schemes, this one has some drawbacks.
745 It is possible that you could make implicit changes to your
746 code that the checksum calculations do not take into
747 account (i.e. implicit changes).
748 These implicit changes affect a task's output but do not trigger
749 the shared state code into rebuilding a recipe.
750 Consider an example during which a tool changes its output.
751 Assume that the output of <filename>rpmdeps</filename> changes.
752 The result of the change should be that all the
753 <filename>package</filename> and
754 <filename>package_write_rpm</filename> shared state cache
755 items become invalid.
756 However, because the change to the output is
757 external to the code and therefore implicit,
758 the associated shared state cache items do not become
759 invalidated.
760 In this case, the build process uses the cached items rather
761 than running the task again.
762 Obviously, these types of implicit changes can cause problems.
763 </para>
764
765 <para>
766 To avoid these problems during the build, you need to
767 understand the effects of any changes you make.
768 Realize that changes you make directly to a function
769 are automatically factored into the checksum calculation.
770 Thus, these explicit changes invalidate the associated area of
771 sstate cache.
772 However, you need to be aware of any implicit changes that
773 are not obvious changes to the code and could affect the output
774 of a given task.
775 </para>
776
777 <para>
778 When you identify an implicit change, you can easily take steps
779 to invalidate the cache and force the tasks to run.
780 The steps you can take are as simple as changing a function's
781 comments in the source code.
782 For example, to invalidate package shared state files, change
783 the comment statements of <filename>do_package</filename> or
784 the comments of one of the functions it calls.
785 Even though the change is purely cosmetic, it causes the
786 checksum to be recalculated and forces the OpenEmbedded build
787 system to run the task again.
788 </para>
789
790 <note>
791 For an example of a commit that makes a cosmetic change to
792 invalidate shared state, see this
793 <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/commit/meta/classes/package.bbclass?id=737f8bbb4f27b4837047cb9b4fbfe01dfde36d54'>commit</ulink>.
794 </note>
795 </section>
796 </section>
797</section>
798
799<section id='x32'>
800 <title>x32</title>
801
802 <para>
803 x32 is a processor-specific Application Binary Interface (psABI) for x86_64.
804 An ABI defines the calling conventions between functions in a processing environment.
805 The interface determines what registers are used and what the sizes are for various C data types.
806 </para>
807
808 <para>
809 Some processing environments prefer using 32-bit applications even when running
810 on Intel 64-bit platforms.
811 Consider the i386 psABI, which is a very old 32-bit ABI for Intel 64-bit platforms.
812 The i386 psABI does not provide efficient use and access of the Intel 64-bit processor resources,
813 leaving the system underutilized.
814 Now consider the x86_64 psABI.
815 This ABI is newer and uses 64-bits for data sizes and program pointers.
816 The extra bits increase the footprint size of the programs, libraries,
817 and also increases the memory and file system size requirements.
818 Executing under the x32 psABI enables user programs to utilize CPU and system resources
819 more efficiently while keeping the memory footprint of the applications low.
820 Extra bits are used for registers but not for addressing mechanisms.
821 </para>
822
823 <section id='support'>
824 <title>Support</title>
825
826 <para>
827 While the x32 psABI specifications are not fully finalized, this Yocto Project
828 release supports current development specifications of x32 psABI.
829 As of this release of the Yocto Project, x32 psABI support exists as follows:
830 <itemizedlist>
831 <listitem><para>You can create packages and images in x32 psABI format on x86_64 architecture targets.
832 </para></listitem>
833 <listitem><para>You can successfully build many recipes with the x32 toolchain.</para></listitem>
834 <listitem><para>You can create and boot <filename>core-image-minimal</filename> and
835 <filename>core-image-sato</filename> images.</para></listitem>
836 </itemizedlist>
837 </para>
838 </section>
839
840 <section id='stabilizing-and-completing-x32'>
841 <title>Stabilizing and Completing x32</title>
842
843 <para>
844 As of this Yocto Project release, the x32 psABI kernel and library
845 interfaces specifications are not finalized.
846 </para>
847
848 <para>
849 Future Plans for the x32 psABI in the Yocto Project include the following:
850 <itemizedlist>
851 <listitem><para>Enhance and fix the few remaining recipes so they
852 work with and support x32 toolchains.</para></listitem>
853 <listitem><para>Enhance RPM Package Manager (RPM) support for x32 binaries.</para></listitem>
854 <listitem><para>Support larger images.</para></listitem>
855 </itemizedlist>
856 </para>
857 </section>
858
859 <section id='using-x32-right-now'>
860 <title>Using x32 Right Now</title>
861
862 <para>
863 Follow these steps to use the x32 spABI:
864 <itemizedlist>
865 <listitem><para>Enable the x32 psABI tuning file for <filename>x86_64</filename>
866 machines by editing the <filename>conf/local.conf</filename> like this:
867 <literallayout class='monospaced'>
868 MACHINE = "qemux86-64"
869 DEFAULTTUNE = "x86-64-x32"
870 baselib = "${@d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) \
871 or 'INVALID'), True) or 'lib'}"
872 #MACHINE = "genericx86"
873 #DEFAULTTUNE = "core2-64-x32"
874 </literallayout></para></listitem>
875 <listitem><para>As usual, use BitBake to build an image that supports the x32 psABI.
876 Here is an example:
877 <literallayout class='monospaced'>
878 $ bitbake core-image-sato
879 </literallayout></para></listitem>
880 <listitem><para>As usual, run your image using QEMU:
881 <literallayout class='monospaced'>
882 $ runqemu qemux86-64 core-image-sato
883 </literallayout></para></listitem>
884 </itemizedlist>
885 </para>
886 </section>
887</section>
888
889<section id="wayland">
890 <title>Wayland</title>
891
892 <para>
893 <ulink url='http://en.wikipedia.org/wiki/Wayland_(display_server_protocol)#Weston'>Wayland</ulink>
894 is a computer display server protocol that
895 provides a method for compositing window managers to communicate
896 directly with applications and video hardware and expects them to
897 communicate with input hardware using other libraries.
898 Using Wayland with supporting targets can result in better control
899 over graphics frame rendering than an application might otherwise
900 achieve.
901 </para>
902
903 <para>
904 The Yocto Project provides the Wayland protocol libraries and the
905 reference Weston compositor as part of its release.
906 This section describes what you need to do to implement Wayland and
907 use the compositor when building an image for a supporting target.
908 </para>
909
910 <section id="wayland-support">
911 <title>Support</title>
912
913 <para>
914 The Wayland protocol libraries and the reference Weston compositor
915 ship as integrated packages in the <filename>meta</filename> layer
916 of the
917 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
918 Specifically, you can find the recipes that build both Wayland
919 and Weston at <filename>meta/recipes-graphics/wayland</filename>.
920 </para>
921
922 <para>
923 You can build both the Wayland and Weston packages for use only
924 with targets that accept the
925 <ulink url='http://dri.freedesktop.org/wiki/'>Mesa 3D and Direct Rendering Infrastructure</ulink>,
926 which is also known as Mesa DRI.
927 This implies that you cannot build and use the packages if your
928 target uses, for example, the
929 <trademark class='registered'>Intel</trademark> Embedded Media and
930 Graphics Driver (<trademark class='registered'>Intel</trademark>
931 EMGD) that overrides Mesa DRI.
932 </para>
933
934 <note>
935 Due to lack of EGL support, Weston 1.0.3 will not run directly on
936 the emulated QEMU hardware.
937 However, this version of Weston will run under X emulation without
938 issues.
939 </note>
940 </section>
941
942 <section id="enabling-wayland-in-an-image">
943 <title>Enabling Wayland in an Image</title>
944
945 <para>
946 To enable Wayland, you need to enable it to be built and enable
947 it to be included in the image.
948 </para>
949
950 <section id="enable-building">
951 <title>Building</title>
952
953 <para>
954 To cause Mesa to build the <filename>wayland-egl</filename>
955 platform and Weston to build Wayland with Kernel Mode
956 Setting
957 (<ulink url='https://wiki.archlinux.org/index.php/Kernel_Mode_Setting'>KMS</ulink>)
958 support, include the "wayland" flag in the
959 <link linkend="var-DISTRO_FEATURES"><filename>DISTRO_FEATURES</filename></link>
960 statement in your <filename>local.conf</filename> file:
961 <literallayout class='monospaced'>
962 DISTRO_FEATURES_append = " wayland"
963 </literallayout>
964 </para>
965
966 <note>
967 If X11 has been enabled elsewhere, Weston will build Wayland
968 with X11 support
969 </note>
970 </section>
971
972 <section id="enable-installation-in-an-image">
973 <title>Installing</title>
974
975 <para>
976 To install the Wayland feature into an image, you must
977 include the following
978 <link linkend='var-CORE_IMAGE_EXTRA_INSTALL'><filename>CORE_IMAGE_EXTRA_INSTALL</filename></link>
979 statement in your <filename>local.conf</filename> file:
980 <literallayout class='monospaced'>
981 CORE_IMAGE_EXTRA_INSTALL += "wayland weston"
982 </literallayout>
983 </para>
984 </section>
985 </section>
986
987 <section id="running-weston">
988 <title>Running Weston</title>
989
990 <para>
991 To run Weston inside X11, enabling it as described earlier and
992 building a Sato image is sufficient.
993 If you are running your image under Sato, a Weston Launcher appears
994 in the "Utility" category.
995 </para>
996
997 <para>
998 Alternatively, you can run Weston through the command-line
999 interpretor (CLI), which is better suited for development work.
1000 To run Weston under the CLI, you need to do the following after
1001 your image is built:
1002 <orderedlist>
1003 <listitem><para>Run these commands to export
1004 <filename>XDG_RUNTIME_DIR</filename>:
1005 <literallayout class='monospaced'>
1006 mkdir -p /tmp/$USER-weston
1007 chmod 0700 /tmp/$USER-weston
1008 export XDG_RUNTIME_DIR=/tmp/$USER=weston
1009 </literallayout></para></listitem>
1010 <listitem><para>Launch Weston in the shell:
1011 <literallayout class='monospaced'>
1012 weston
1013 </literallayout></para></listitem>
1014 </orderedlist>
1015 </para>
1016 </section>
1017</section>
1018
1019<section id="licenses">
1020 <title>Licenses</title>
1021
1022 <para>
1023 This section describes the mechanism by which the OpenEmbedded build system
1024 tracks changes to licensing text.
1025 The section also describes how to enable commercially licensed recipes,
1026 which by default are disabled.
1027 </para>
1028
1029 <para>
1030 For information that can help you maintain compliance with various open
1031 source licensing during the lifecycle of the product, see the
1032 "<ulink url='&YOCTO_DOCS_DEV_URL;#maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Project's Lifecycle</ulink>" section
1033 in the Yocto Project Development Manual.
1034 </para>
1035
1036 <section id="usingpoky-configuring-LIC_FILES_CHKSUM">
1037 <title>Tracking License Changes</title>
1038
1039 <para>
1040 The license of an upstream project might change in the future.
1041 In order to prevent these changes going unnoticed, the
1042 <filename><link linkend='var-LIC_FILES_CHKSUM'>LIC_FILES_CHKSUM</link></filename>
1043 variable tracks changes to the license text. The checksums are validated at the end of the
1044 configure step, and if the checksums do not match, the build will fail.
1045 </para>
1046
1047 <section id="usingpoky-specifying-LIC_FILES_CHKSUM">
1048 <title>Specifying the <filename>LIC_FILES_CHKSUM</filename> Variable</title>
1049
1050 <para>
1051 The <filename>LIC_FILES_CHKSUM</filename>
1052 variable contains checksums of the license text in the source code for the recipe.
1053 Following is an example of how to specify <filename>LIC_FILES_CHKSUM</filename>:
1054 <literallayout class='monospaced'>
1055 LIC_FILES_CHKSUM = "file://COPYING;md5=xxxx \
1056 file://licfile1.txt;beginline=5;endline=29;md5=yyyy \
1057 file://licfile2.txt;endline=50;md5=zzzz \
1058 ..."
1059 </literallayout>
1060 </para>
1061
1062 <para>
1063 The build system uses the
1064 <filename><link linkend='var-S'>S</link></filename> variable as
1065 the default directory used when searching files listed in
1066 <filename>LIC_FILES_CHKSUM</filename>.
1067 The previous example employs the default directory.
1068 </para>
1069
1070 <para>
1071 Consider this next example:
1072 <literallayout class='monospaced'>
1073 LIC_FILES_CHKSUM = "file://src/ls.c;beginline=5;endline=16;\
1074 md5=bb14ed3c4cda583abc85401304b5cd4e"
1075 LIC_FILES_CHKSUM = "file://${WORKDIR}/license.html;md5=5c94767cedb5d6987c902ac850ded2c6"
1076 </literallayout>
1077 </para>
1078
1079 <para>
1080 The first line locates a file in
1081 <filename>${S}/src/ls.c</filename>.
1082 The second line refers to a file in
1083 <filename><link linkend='var-WORKDIR'>WORKDIR</link></filename>.
1084 </para>
1085 <para>
1086 Note that <filename>LIC_FILES_CHKSUM</filename> variable is
1087 mandatory for all recipes, unless the
1088 <filename>LICENSE</filename> variable is set to "CLOSED".
1089 </para>
1090 </section>
1091
1092 <section id="usingpoky-LIC_FILES_CHKSUM-explanation-of-syntax">
1093 <title>Explanation of Syntax</title>
1094 <para>
1095 As mentioned in the previous section, the
1096 <filename>LIC_FILES_CHKSUM</filename> variable lists all the
1097 important files that contain the license text for the source code.
1098 It is possible to specify a checksum for an entire file, or a specific section of a
1099 file (specified by beginning and ending line numbers with the "beginline" and "endline"
1100 parameters, respectively).
1101 The latter is useful for source files with a license notice header,
1102 README documents, and so forth.
1103 If you do not use the "beginline" parameter, then it is assumed that the text begins on the
1104 first line of the file.
1105 Similarly, if you do not use the "endline" parameter, it is assumed that the license text
1106 ends with the last line of the file.
1107 </para>
1108
1109 <para>
1110 The "md5" parameter stores the md5 checksum of the license text.
1111 If the license text changes in any way as compared to this parameter
1112 then a mismatch occurs.
1113 This mismatch triggers a build failure and notifies the developer.
1114 Notification allows the developer to review and address the license text changes.
1115 Also note that if a mismatch occurs during the build, the correct md5
1116 checksum is placed in the build log and can be easily copied to the recipe.
1117 </para>
1118
1119 <para>
1120 There is no limit to how many files you can specify using the
1121 <filename>LIC_FILES_CHKSUM</filename> variable.
1122 Generally, however, every project requires a few specifications for license tracking.
1123 Many projects have a "COPYING" file that stores the license information for all the source
1124 code files.
1125 This practice allows you to just track the "COPYING" file as long as it is kept up to date.
1126 </para>
1127
1128 <tip>
1129 If you specify an empty or invalid "md5" parameter, BitBake returns an md5 mis-match
1130 error and displays the correct "md5" parameter value during the build.
1131 The correct parameter is also captured in the build log.
1132 </tip>
1133
1134 <tip>
1135 If the whole file contains only license text, you do not need to use the "beginline" and
1136 "endline" parameters.
1137 </tip>
1138 </section>
1139 </section>
1140
1141 <section id="enabling-commercially-licensed-recipes">
1142 <title>Enabling Commercially Licensed Recipes</title>
1143
1144 <para>
1145 By default, the OpenEmbedded build system disables
1146 components that have commercial or other special licensing
1147 requirements.
1148 Such requirements are defined on a
1149 recipe-by-recipe basis through the <filename>LICENSE_FLAGS</filename> variable
1150 definition in the affected recipe.
1151 For instance, the
1152 <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
1153 recipe contains the following statement:
1154 <literallayout class='monospaced'>
1155 LICENSE_FLAGS = "commercial"
1156 </literallayout>
1157 Here is a slightly more complicated example that contains both an
1158 explicit recipe name and version (after variable expansion):
1159 <literallayout class='monospaced'>
1160 LICENSE_FLAGS = "license_${PN}_${PV}"
1161 </literallayout>
1162 In order for a component restricted by a <filename>LICENSE_FLAGS</filename>
1163 definition to be enabled and included in an image, it
1164 needs to have a matching entry in the global
1165 <filename>LICENSE_FLAGS_WHITELIST</filename> variable, which is a variable
1166 typically defined in your <filename>local.conf</filename> file.
1167 For example, to enable
1168 the <filename>poky/meta/recipes-multimedia/gstreamer/gst-plugins-ugly</filename>
1169 package, you could add either the string
1170 "commercial_gst-plugins-ugly" or the more general string
1171 "commercial" to <filename>LICENSE_FLAGS_WHITELIST</filename>.
1172 See the
1173 "<link linkend='license-flag-matching'>License Flag Matching</link>" section
1174 for a full explanation of how <filename>LICENSE_FLAGS</filename> matching works.
1175 Here is the example:
1176 <literallayout class='monospaced'>
1177 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly"
1178 </literallayout>
1179 Likewise, to additionally enable the package built from the recipe containing
1180 <filename>LICENSE_FLAGS = "license_${PN}_${PV}"</filename>, and assuming
1181 that the actual recipe name was <filename>emgd_1.10.bb</filename>,
1182 the following string would enable that package as well as
1183 the original <filename>gst-plugins-ugly</filename> package:
1184 <literallayout class='monospaced'>
1185 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly license_emgd_1.10"
1186 </literallayout>
1187 As a convenience, you do not need to specify the complete license string
1188 in the whitelist for every package.
1189 You can use an abbreviated form, which consists
1190 of just the first portion or portions of the license string before
1191 the initial underscore character or characters.
1192 A partial string will match
1193 any license that contains the given string as the first
1194 portion of its license.
1195 For example, the following
1196 whitelist string will also match both of the packages
1197 previously mentioned as well as any other packages that have
1198 licenses starting with "commercial" or "license".
1199 <literallayout class='monospaced'>
1200 LICENSE_FLAGS_WHITELIST = "commercial license"
1201 </literallayout>
1202 </para>
1203
1204 <section id="license-flag-matching">
1205 <title>License Flag Matching</title>
1206
1207 <para>
1208 License flag matching allows you to control what recipes the
1209 OpenEmbedded build system includes in the build.
1210 Fundamentally, the build system attempts to match
1211 <filename>LICENSE_FLAGS</filename> strings found in
1212 recipes against <filename>LICENSE_FLAGS_WHITELIST</filename>
1213 strings found in the whitelist.
1214 A match causes the build system to include a recipe in the
1215 build, while failure to find a match causes the build system to
1216 exclude a recipe.
1217 </para>
1218
1219 <para>
1220 In general, license flag matching is simple.
1221 However, understanding some concepts will help you
1222 correctly and effectively use matching.
1223 </para>
1224
1225 <para>
1226 Before a flag
1227 defined by a particular recipe is tested against the
1228 contents of the whitelist, the expanded string
1229 <filename>_${PN}</filename> is appended to the flag.
1230 This expansion makes each <filename>LICENSE_FLAGS</filename>
1231 value recipe-specific.
1232 After expansion, the string is then matched against the
1233 whitelist.
1234 Thus, specifying
1235 <filename>LICENSE_FLAGS = "commercial"</filename>
1236 in recipe "foo", for example, results in the string
1237 <filename>"commercial_foo"</filename>.
1238 And, to create a match, that string must appear in the
1239 whitelist.
1240 </para>
1241
1242 <para>
1243 Judicious use of the <filename>LICENSE_FLAGS</filename>
1244 strings and the contents of the
1245 <filename>LICENSE_FLAGS_WHITELIST</filename> variable
1246 allows you a lot of flexibility for including or excluding
1247 recipes based on licensing.
1248 For example, you can broaden the matching capabilities by
1249 using license flags string subsets in the whitelist.
1250 <note>When using a string subset, be sure to use the part of
1251 the expanded string that precedes the appended underscore
1252 character (e.g. <filename>usethispart_1.3</filename>,
1253 <filename>usethispart_1.4</filename>, and so forth).
1254 </note>
1255 For example, simply specifying the string "commercial" in
1256 the whitelist matches any expanded
1257 <filename>LICENSE_FLAGS</filename> definition that starts with
1258 the string "commercial" such as "commercial_foo" and
1259 "commercial_bar", which are the strings the build system
1260 automatically generates for hypothetical recipes named
1261 "foo" and "bar" assuming those recipes simply specify the
1262 following:
1263 <literallayout class='monospaced'>
1264 LICENSE_FLAGS = "commercial"
1265 </literallayout>
1266 Thus, you can choose to exhaustively
1267 enumerate each license flag in the whitelist and
1268 allow only specific recipes into the image, or
1269 you can use a string subset that causes a broader range of
1270 matches to allow a range of recipes into the image.
1271 </para>
1272
1273 <para>
1274 This scheme works even if the
1275 <filename>LICENSE_FLAGS</filename> string already
1276 has <filename>_${PN}</filename> appended.
1277 For example, the build system turns the license flag
1278 "commercial_1.2_foo" into "commercial_1.2_foo_foo" and would
1279 match both the general "commercial" and the specific
1280 "commercial_1.2_foo" strings found in the whitelist, as
1281 expected.
1282 </para>
1283
1284 <para>
1285 Here are some other scenarios:
1286 <itemizedlist>
1287 <listitem><para>You can specify a versioned string in the
1288 recipe such as "commercial_foo_1.2" in a "foo" recipe.
1289 The build system expands this string to
1290 "commercial_foo_1.2_foo".
1291 Combine this license flag with a whitelist that has
1292 the string "commercial" and you match the flag along
1293 with any other flag that starts with the string
1294 "commercial".</para></listitem>
1295 <listitem><para>Under the same circumstances, you can
1296 use "commercial_foo" in the whitelist and the
1297 build system not only matches "commercial_foo_1.2" but
1298 also matches any license flag with the string
1299 "commercial_foo", regardless of the version.
1300 </para></listitem>
1301 <listitem><para>You can be very specific and use both the
1302 package and version parts in the whitelist (e.g.
1303 "commercial_foo_1.2") to specifically match a
1304 versioned recipe.</para></listitem>
1305 </itemizedlist>
1306 </para>
1307 </section>
1308
1309 <section id="other-variables-related-to-commercial-licenses">
1310 <title>Other Variables Related to Commercial Licenses</title>
1311
1312 <para>
1313 Other helpful variables related to commercial
1314 license handling exist and are defined in the
1315 <filename>poky/meta/conf/distro/include/default-distrovars.inc</filename> file:
1316 <literallayout class='monospaced'>
1317 COMMERCIAL_AUDIO_PLUGINS ?= ""
1318 COMMERCIAL_VIDEO_PLUGINS ?= ""
1319 COMMERCIAL_QT = ""
1320 </literallayout>
1321 If you want to enable these components, you can do so by making sure you have
1322 statements similar to the following
1323 in your <filename>local.conf</filename> configuration file:
1324 <literallayout class='monospaced'>
1325 COMMERCIAL_AUDIO_PLUGINS = "gst-plugins-ugly-mad \
1326 gst-plugins-ugly-mpegaudioparse"
1327 COMMERCIAL_VIDEO_PLUGINS = "gst-plugins-ugly-mpeg2dec \
1328 gst-plugins-ugly-mpegstream gst-plugins-bad-mpegvideoparse"
1329 COMMERCIAL_QT ?= "qmmp"
1330 LICENSE_FLAGS_WHITELIST = "commercial_gst-plugins-ugly commercial_gst-plugins-bad commercial_qmmp"
1331 </literallayout>
1332 Of course, you could also create a matching whitelist
1333 for those components using the more general "commercial"
1334 in the whitelist, but that would also enable all the
1335 other packages with <filename>LICENSE_FLAGS</filename> containing
1336 "commercial", which you may or may not want:
1337 <literallayout class='monospaced'>
1338 LICENSE_FLAGS_WHITELIST = "commercial"
1339 </literallayout>
1340 </para>
1341
1342 <para>
1343 Specifying audio and video plug-ins as part of the
1344 <filename>COMMERCIAL_AUDIO_PLUGINS</filename> and
1345 <filename>COMMERCIAL_VIDEO_PLUGINS</filename> statements
1346 or commercial Qt components as part of
1347 the <filename>COMMERCIAL_QT</filename> statement (along
1348 with the enabling <filename>LICENSE_FLAGS_WHITELIST</filename>) includes the
1349 plug-ins or components into built images, thus adding
1350 support for media formats or components.
1351 </para>
1352 </section>
1353 </section>
1354</section>
1355</chapter>
1356<!--
1357vim: expandtab tw=80 ts=4
1358-->
diff --git a/documentation/ref-manual/usingpoky.xml b/documentation/ref-manual/usingpoky.xml
new file mode 100644
index 0000000..b9df733
--- /dev/null
+++ b/documentation/ref-manual/usingpoky.xml
@@ -0,0 +1,859 @@
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='usingpoky'>
6<title>Using the Yocto Project</title>
7
8 <para>
9 This chapter describes common usage for the Yocto Project.
10 The information is introductory in nature as other manuals in the Yocto Project
11 documentation set provide more details on how to use the Yocto Project.
12 </para>
13
14<section id='usingpoky-build'>
15 <title>Running a Build</title>
16
17 <para>
18 This section provides a summary of the build process and provides information
19 for less obvious aspects of the build process.
20 For general information on how to build an image using the OpenEmbedded build
21 system, see the
22 "<ulink url='&YOCTO_DOCS_QS_URL;#building-image'>Building an Image</ulink>"
23 section of the Yocto Project Quick Start.
24 </para>
25
26 <section id='build-overview'>
27 <title>Build Overview</title>
28
29 <para>
30 The first thing you need to do is set up the OpenEmbedded build
31 environment by sourcing an environment setup script
32 (i.e.
33 <link linkend='structure-core-script'><filename>&OE_INIT_FILE;</filename></link>
34 or
35 <link linkend='structure-memres-core-script'><filename>oe-init-build-env-memres</filename></link>).
36 Here is an example:
37 <literallayout class='monospaced'>
38 $ source &OE_INIT_FILE; [&lt;build_dir&gt;]
39 </literallayout>
40 </para>
41
42 <para>
43 The <filename>build_dir</filename> argument is optional and specifies the directory the
44 OpenEmbedded build system uses for the build -
45 the <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>.
46 If you do not specify a Build Directory, it defaults to a directory
47 named <filename>build</filename> in your current working directory.
48 A common practice is to use a different Build Directory for different targets.
49 For example, <filename>~/build/x86</filename> for a <filename>qemux86</filename>
50 target, and <filename>~/build/arm</filename> for a <filename>qemuarm</filename> target.
51 See the "<link linkend="structure-core-script"><filename>&OE_INIT_FILE;</filename></link>"
52 section for more information on this script.
53 </para>
54
55 <para>
56 Once the build environment is set up, you can build a target using:
57 <literallayout class='monospaced'>
58 $ bitbake &lt;target&gt;
59 </literallayout>
60 </para>
61
62 <para>
63 The <filename>target</filename> is the name of the recipe you want to build.
64 Common targets are the images in <filename>meta/recipes-core/images</filename>,
65 <filename>meta/recipes-sato/images</filename>, etc. all found in the
66 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
67 Or, the target can be the name of a recipe for a specific piece of software such as
68 BusyBox.
69 For more details about the images the OpenEmbedded build system supports, see the
70 "<link linkend="ref-images">Images</link>" chapter.
71 </para>
72
73 <note>
74 Building an image without GNU General Public License Version 3 (GPLv3) components
75 is supported for only minimal and base images.
76 See the "<link linkend='ref-images'>Images</link>" chapter for more information.
77 </note>
78 </section>
79
80 <section id='building-an-image-using-gpl-components'>
81 <title>Building an Image Using GPL Components</title>
82
83 <para>
84 When building an image using GPL components, you need to maintain your original
85 settings and not switch back and forth applying different versions of the GNU
86 General Public License.
87 If you rebuild using different versions of GPL, dependency errors might occur
88 due to some components not being rebuilt.
89 </para>
90 </section>
91</section>
92
93<section id='usingpoky-install'>
94 <title>Installing and Using the Result</title>
95
96 <para>
97 Once an image has been built, it often needs to be installed.
98 The images and kernels built by the OpenEmbedded build system are placed in the
99 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink> in
100 <filename class="directory">tmp/deploy/images</filename>.
101 For information on how to run pre-built images such as <filename>qemux86</filename>
102 and <filename>qemuarm</filename>, see the
103 "<ulink url='&YOCTO_DOCS_QS_URL;#using-pre-built'>Using Pre-Built Binaries and QEMU</ulink>"
104 section in the Yocto Project Quick Start.
105 For information about how to install these images, see the documentation for your
106 particular board or machine.
107 </para>
108</section>
109
110<section id='usingpoky-debugging'>
111 <title>Debugging Build Failures</title>
112
113 <para>
114 The exact method for debugging build failures depends on the nature of the
115 problem and on the system's area from which the bug originates.
116 Standard debugging practices such as comparison against the last
117 known working version with examination of the changes and the re-application of steps
118 to identify the one causing the problem are
119 valid for the Yocto Project just as they are for any other system.
120 Even though it is impossible to detail every possible potential failure,
121 this section provides some general tips to aid in debugging.
122 </para>
123
124 <para>
125 For discussions on debugging, see the
126 "<ulink url='&YOCTO_DOCS_DEV_URL;#platdev-gdb-remotedebug'>Debugging With the GNU Project Debugger (GDB) Remotely</ulink>"
127 and
128 "<ulink url='&YOCTO_DOCS_DEV_URL;#adt-eclipse'>Working within Eclipse</ulink>"
129 sections in the Yocto Project Development Manual.
130 </para>
131
132 <section id='usingpoky-debugging-taskfailures'>
133 <title>Task Failures</title>
134
135 <para>The log file for shell tasks is available in
136 <filename>${WORKDIR}/temp/log.do_taskname.pid</filename>.
137 For example, the <filename>compile</filename> task for the QEMU minimal image for the x86
138 machine (<filename>qemux86</filename>) might be
139 <filename>tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/temp/log.do_compile.20830</filename>.
140 To see what BitBake runs to generate that log, look at the corresponding
141 <filename>run.do_taskname.pid</filename> file located in the same directory.
142 </para>
143
144 <para>
145 Presently, the output from Python tasks is sent directly to the console.
146 </para>
147 </section>
148
149 <section id='usingpoky-debugging-taskrunning'>
150 <title>Running Specific Tasks</title>
151
152 <para>
153 Any given package consists of a set of tasks.
154 The standard BitBake behavior in most cases is: <filename>fetch</filename>,
155 <filename>unpack</filename>,
156 <filename>patch</filename>, <filename>configure</filename>,
157 <filename>compile</filename>, <filename>install</filename>, <filename>package</filename>,
158 <filename>package_write</filename>, and <filename>build</filename>.
159 The default task is <filename>build</filename> and any tasks on which it depends
160 build first.
161 Some tasks, such as <filename>devshell</filename>, are not part of the
162 default build chain.
163 If you wish to run a task that is not part of the default build chain, you can use the
164 <filename>-c</filename> option in BitBake.
165 Here is an example:
166 <literallayout class='monospaced'>
167 $ bitbake matchbox-desktop -c devshell
168 </literallayout>
169 </para>
170
171 <para>
172 If you wish to rerun a task, use the <filename>-f</filename> force option.
173 For example, the following sequence forces recompilation after changing files in the
174 working directory.
175 <literallayout class='monospaced'>
176 $ bitbake matchbox-desktop
177 .
178 .
179 [make some changes to the source code in the working directory]
180 .
181 .
182 $ bitbake matchbox-desktop -c compile -f
183 $ bitbake matchbox-desktop
184 </literallayout>
185 </para>
186
187 <para>
188 This sequence first builds and then recompiles
189 <filename>matchbox-desktop</filename>.
190 The last command reruns all tasks (basically the packaging tasks) after the compile.
191 BitBake recognizes that the <filename>compile</filename> task was rerun and therefore
192 understands that the other tasks also need to be run again.
193 </para>
194
195 <para>
196 You can view a list of tasks in a given package by running the
197 <filename>listtasks</filename> task as follows:
198 <literallayout class='monospaced'>
199 $ bitbake matchbox-desktop -c listtasks
200 </literallayout>
201 The results are in the file <filename>${WORKDIR}/temp/log.do_listtasks</filename>.
202 </para>
203 </section>
204
205 <section id='usingpoky-debugging-dependencies'>
206 <title>Dependency Graphs</title>
207
208 <para>
209 Sometimes it can be hard to see why BitBake wants to build some other packages before a given
210 package you have specified.
211 The <filename>bitbake -g targetname</filename> command creates the
212 <filename>depends.dot</filename>, <filename>package-depends.dot</filename>,
213 and <filename>task-depends.dot</filename> files in the current directory.
214 These files show the package and task dependencies and are useful for debugging problems.
215 You can use the <filename>bitbake -g -u depexp targetname</filename> command to
216 display the results in a more human-readable form.
217 </para>
218 </section>
219
220 <section id='usingpoky-debugging-bitbake'>
221 <title>General BitBake Problems</title>
222
223 <para>
224 You can see debug output from BitBake by using the <filename>-D</filename> option.
225 The debug output gives more information about what BitBake
226 is doing and the reason behind it.
227 Each <filename>-D</filename> option you use increases the logging level.
228 The most common usage is <filename>-DDD</filename>.
229 </para>
230
231 <para>
232 The output from <filename>bitbake -DDD -v targetname</filename> can reveal why
233 BitBake chose a certain version of a package or why BitBake
234 picked a certain provider.
235 This command could also help you in a situation where you think BitBake did something
236 unexpected.
237 </para>
238 </section>
239
240 <section id='development-host-system-issues'>
241 <title>Development Host System Issues</title>
242
243 <para>
244 Sometimes issues on the host development system can cause your
245 build to fail.
246 Following are known, host-specific problems.
247 Be sure to always consult the
248 <ulink url='&YOCTO_RELEASE_NOTES;'>Release Notes</ulink>
249 for a look at all release-related issues.
250 <itemizedlist>
251 <listitem><para><emphasis><filename>eglibc-initial</filename> fails to build</emphasis>:
252 If your development host system has the unpatched
253 <filename>GNU Make 3.82</filename>,
254 the <filename>do_install</filename> task
255 fails for <filename>eglibc-initial</filename> during the
256 build.</para>
257 <para>Typically, every distribution that ships
258 <filename>GNU Make 3.82</filename> as
259 the default already has the patched version.
260 However, some distributions, such as Debian, have
261 <filename>GNU Make 3.82</filename> as an option, which
262 is unpatched.
263 You will see this error on these types of distributions.
264 Switch to <filename>GNU Make 3.81</filename> or patch
265 your <filename>make</filename> to solve the problem.
266 </para></listitem>
267 </itemizedlist>
268 </para>
269 </section>
270
271 <section id='usingpoky-debugging-buildfile'>
272 <title>Building with No Dependencies</title>
273 <para>
274 To build a specific recipe (<filename>.bb</filename> file),
275 you can use the following command form:
276 <literallayout class='monospaced'>
277 $ bitbake -b &lt;somepath/somerecipe.bb&gt;
278 </literallayout>
279 This command form does not check for dependencies.
280 Consequently, you should use it
281 only when you know dependencies already exist.
282 <note>
283 You can also specify fragments of the filename.
284 In this case, BitBake checks for a unique match.
285 </note>
286 </para>
287 </section>
288
289 <section id='usingpoky-debugging-variables'>
290 <title>Variables</title>
291 <para>
292 You can use the <filename>-e</filename> BitBake option to
293 display the parsing environment for a configuration.
294 The following displays the general parsing environment:
295 <literallayout class='monospaced'>
296 $ bitbake -e
297 </literallayout>
298 This next example shows the parsing environment for a specific
299 recipe:
300 <literallayout class='monospaced'>
301 $ bitbake -e &lt;recipename&gt;
302 </literallayout>
303 </para>
304 </section>
305
306 <section id='recipe-logging-mechanisms'>
307 <title>Recipe Logging Mechanisms</title>
308 <para>
309 Best practices exist while writing recipes that both log build progress and
310 act on build conditions such as warnings and errors.
311 Both Python and Bash language bindings exist for the logging mechanism:
312 <itemizedlist>
313 <listitem><para><emphasis>Python:</emphasis> For Python functions, BitBake
314 supports several loglevels: <filename>bb.fatal</filename>,
315 <filename>bb.error</filename>, <filename>bb.warn</filename>,
316 <filename>bb.note</filename>, <filename>bb.plain</filename>,
317 and <filename>bb.debug</filename>.</para></listitem>
318 <listitem><para><emphasis>Bash:</emphasis> For Bash functions, the same set
319 of loglevels exist and are accessed with a similar syntax:
320 <filename>bbfatal</filename>, <filename>bberror</filename>,
321 <filename>bbwarn</filename>, <filename>bbnote</filename>,
322 <filename>bbplain</filename>, and <filename>bbdebug</filename>.</para></listitem>
323 </itemizedlist>
324 </para>
325
326 <para>
327 For guidance on how logging is handled in both Python and Bash recipes, see the
328 <filename>logging.bbclass</filename> file in the
329 <filename>meta/classes</filename> folder of the
330 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>.
331 </para>
332
333 <section id='logging-with-python'>
334 <title>Logging With Python</title>
335 <para>
336 When creating recipes using Python and inserting code that handles build logs,
337 keep in mind the goal is to have informative logs while keeping the console as
338 "silent" as possible.
339 Also, if you want status messages in the log, use the "debug" loglevel.
340 </para>
341
342 <para>
343 Following is an example written in Python.
344 The code handles logging for a function that determines the number of tasks
345 needed to be run:
346 <literallayout class='monospaced'>
347 python do_listtasks() {
348 bb.debug(2, "Starting to figure out the task list")
349 if noteworthy_condition:
350 bb.note("There are 47 tasks to run")
351 bb.debug(2, "Got to point xyz")
352 if warning_trigger:
353 bb.warn("Detected warning_trigger, this might be a problem later.")
354 if recoverable_error:
355 bb.error("Hit recoverable_error, you really need to fix this!")
356 if fatal_error:
357 bb.fatal("fatal_error detected, unable to print the task list")
358 bb.plain("The tasks present are abc")
359 bb.debug(2, "Finished figuring out the tasklist")
360 }
361 </literallayout>
362 </para>
363 </section>
364
365 <section id='logging-with-bash'>
366 <title>Logging With Bash</title>
367 <para>
368 When creating recipes using Bash and inserting code that handles build
369 logs, you have the same goals - informative with minimal console output.
370 The syntax you use for recipes written in Bash is similar to that of
371 recipes written in Python described in the previous section.
372 </para>
373
374 <para>
375 Following is an example written in Bash.
376 The code logs the progress of the <filename>do_my_function</filename> function.
377 <literallayout class='monospaced'>
378 do_my_function() {
379 bbdebug 2 "Running do_my_function"
380 if [ exceptional_condition ]; then
381 bbnote "Hit exceptional_condition"
382 fi
383 bbdebug 2 "Got to point xyz"
384 if [ warning_trigger ]; then
385 bbwarn "Detected warning_trigger, this might cause a problem later."
386 fi
387 if [ recoverable_error ]; then
388 bberror "Hit recoverable_error, correcting"
389 fi
390 if [ fatal_error ]; then
391 bbfatal "fatal_error detected"
392 fi
393 bbdebug 2 "Completed do_my_function"
394 }
395 </literallayout>
396 </para>
397 </section>
398 </section>
399
400 <section id='usingpoky-debugging-others'>
401 <title>Other Tips</title>
402
403 <para>
404 Here are some other tips that you might find useful:
405 <itemizedlist>
406 <listitem><para>When adding new packages, it is worth watching for
407 undesirable items making their way into compiler command lines.
408 For example, you do not want references to local system files like
409 <filename>/usr/lib/</filename> or <filename>/usr/include/</filename>.
410 </para></listitem>
411 <listitem><para>If you want to remove the <filename>psplash</filename>
412 boot splashscreen,
413 add <filename>psplash=false</filename> to the kernel command line.
414 Doing so prevents <filename>psplash</filename> from loading
415 and thus allows you to see the console.
416 It is also possible to switch out of the splashscreen by
417 switching the virtual console (e.g. Fn+Left or Fn+Right on a Zaurus).
418 </para></listitem>
419 </itemizedlist>
420 </para>
421 </section>
422</section>
423
424<section id='maintaining-build-output-quality'>
425 <title>Maintaining Build Output Quality</title>
426
427 <para>
428 Many factors can influence the quality of a build.
429 For example, if you upgrade a recipe to use a new version of an upstream software
430 package or you experiment with some new configuration options, subtle changes
431 can occur that you might not detect until later.
432 Consider the case where your recipe is using a newer version of an upstream package.
433 In this case, a new version of a piece of software might introduce an optional
434 dependency on another library, which is auto-detected.
435 If that library has already been built when the software is building,
436 the software will link to the built library and that library will be pulled
437 into your image along with the new software even if you did not want the
438 library.
439 </para>
440
441 <para>
442 The <filename>buildhistory</filename> class exists to help you maintain
443 the quality of your build output.
444 You can use the class to highlight unexpected and possibly unwanted
445 changes in the build output.
446 When you enable build history, it records information about the contents of
447 each package and image and then commits that information to a local Git
448 repository where you can examine the information.
449 </para>
450
451 <para>
452 The remainder of this section describes the following:
453 <itemizedlist>
454 <listitem><para>How you can enable and disable
455 build history</para></listitem>
456 <listitem><para>How to understand what the build history contains
457 </para></listitem>
458 <listitem><para>How to limit the information used for build history
459 </para></listitem>
460 <listitem><para>How to examine the build history from both a
461 command-line and web interface</para></listitem>
462 </itemizedlist>
463 </para>
464
465 <section id='enabling-and-disabling-build-history'>
466 <title>Enabling and Disabling Build History</title>
467
468 <para>
469 Build history is disabled by default.
470 To enable it, add the following statements to the end of your
471 <filename>conf/local.conf</filename> file found in the
472 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
473 <literallayout class='monospaced'>
474 INHERIT += "buildhistory"
475 BUILDHISTORY_COMMIT = "1"
476 </literallayout>
477 Enabling build history as previously described
478 causes the build process to collect build
479 output information and commit it to a local
480 <ulink url='&YOCTO_DOCS_DEV_URL;#git'>Git</ulink> repository.
481 <note>
482 Enabling build history increases your build times slightly,
483 particularly for images, and increases the amount of disk
484 space used during the build.
485 </note>
486 </para>
487
488 <para>
489 You can disable build history by removing the previous statements
490 from your <filename>conf/local.conf</filename> file.
491 However, you should realize that enabling and disabling
492 build history in this manner can change the
493 <filename>do_package</filename> task checksums which, if you
494 are using the OEBasicHash signature generator (the default
495 for many current distro configurations including
496 <filename>DISTRO = "poky"</filename> and
497 <filename>DISTRO = ""</filename>) will result in the packaging
498 tasks being re-run during the subsequent build.
499 </para>
500
501 <para>
502 To disable the build history functionality without causing the
503 packaging tasks to be re-run, add this statement to your
504 <filename>conf/local.conf</filename> file:
505 <literallayout class='monospaced'>
506 BUILDHISTORY_FEATURES = ""
507 </literallayout>
508 </para>
509 </section>
510
511 <section id='understanding-what-the-build-history-contains'>
512 <title>Understanding What the Build History Contains</title>
513
514 <para>
515 Build history information is kept in
516 <filename>$</filename><link linkend='var-TMPDIR'><filename>TMPDIR</filename></link><filename>/buildhistory</filename>
517 in the Build Directory.
518 The following is an example abbreviated listing:
519 <imagedata fileref="figures/buildhistory.png" align="center" width="6in" depth="4in" />
520 </para>
521
522 <para>
523 At the top level, there is a <filename>metadata-revs</filename> file
524 that lists the revisions of the repositories for the layers enabled
525 when the build was produced.
526 The rest of the data splits into separate
527 <filename>packages</filename>, <filename>images</filename> and
528 <filename>sdk</filename> directories, the contents of which are
529 described below.
530 </para>
531
532 <section id='build-history-package-information'>
533 <title>Build History Package Information</title>
534
535 <para>
536 The history for each package contains a text file that has
537 name-value pairs with information about the package.
538 For example, <filename>buildhistory/packages/core2-poky-linux/busybox/busybox/latest</filename>
539 contains the following:
540 <literallayout class='monospaced'>
541 PV = 1.19.3
542 PR = r3
543 RDEPENDS = update-rc.d eglibc (>= 2.13)
544 RRECOMMENDS = busybox-syslog busybox-udhcpc
545 PKGSIZE = 564701
546 FILES = /usr/bin/* /usr/sbin/* /usr/libexec/* /usr/lib/lib*.so.* \
547 /etc /com /var /bin/* /sbin/* /lib/*.so.* /usr/share/busybox \
548 /usr/lib/busybox/* /usr/share/pixmaps /usr/share/applications \
549 /usr/share/idl /usr/share/omf /usr/share/sounds /usr/lib/bonobo/servers
550 FILELIST = /etc/busybox.links /etc/init.d/hwclock.sh /bin/busybox /bin/sh
551 </literallayout>
552 Most of these name-value pairs correspond to variables used
553 to produce the package.
554 The exceptions are <filename>FILELIST</filename>, which is the
555 actual list of files in the package, and
556 <filename>PKGSIZE</filename>, which is the total size of files
557 in the package in bytes.
558 </para>
559
560 <para>
561 There is also a file corresponding to the recipe from which the
562 package came (e.g.
563 <filename>buildhistory/packages/core2-poky-linux/busybox/latest</filename>):
564 <literallayout class='monospaced'>
565 PV = 1.19.3
566 PR = r3
567 DEPENDS = virtual/i586-poky-linux-gcc virtual/i586-poky-linux-compilerlibs \
568 virtual/libc update-rc.d-native
569 PACKAGES = busybox-httpd busybox-udhcpd busybox-udhcpc busybox-syslog \
570 busybox-mdev busybox-dbg busybox busybox-doc busybox-dev \
571 busybox-staticdev busybox-locale
572 </literallayout>
573 </para>
574
575 <para>
576 Finally, for those recipes fetched from a version control
577 system (e.g., Git), a file exists that lists source revisions
578 that are specified in the recipe and lists the actual revisions
579 used during the build.
580 Listed and actual revisions might differ when
581 <link linkend='var-SRCREV'><filename>SRCREV</filename></link>
582 is set to
583 <filename>${<link linkend='var-AUTOREV'>AUTOREV</link>}</filename>.
584 Here is an example assuming
585 <filename>buildhistory/packages/emenlow-poky-linux/linux-yocto/latest_srcrev</filename>):
586 <literallayout class='monospaced'>
587 # SRCREV_machine = "b5c37fe6e24eec194bb29d22fdd55d73bcc709bf"
588 SRCREV_machine = "b5c37fe6e24eec194bb29d22fdd55d73bcc709bf"
589 # SRCREV_emgd = "caea08c988e0f41103bbe18eafca20348f95da02"
590 SRCREV_emgd = "caea08c988e0f41103bbe18eafca20348f95da02"
591 # SRCREV_meta = "c2ed0f16fdec628242a682897d5d86df4547cf24"
592 SRCREV_meta = "c2ed0f16fdec628242a682897d5d86df4547cf24"
593 </literallayout>
594 You can use the <filename>buildhistory-collect-srcrevs</filename>
595 command to collect the stored <filename>SRCREV</filename> values
596 from build history and report them in a format suitable for use in
597 global configuration (e.g., <filename>local.conf</filename>
598 or a distro include file) to override floating
599 <filename>AUTOREV</filename> values to a fixed set of revisions.
600 Here is some example output from this command:
601 <literallayout class='monospaced'>
602 # emenlow-poky-linux
603 SRCREV_machine_pn-linux-yocto = "b5c37fe6e24eec194bb29d22fdd55d73bcc709bf"
604 SRCREV_emgd_pn-linux-yocto = "caea08c988e0f41103bbe18eafca20348f95da02"
605 SRCREV_meta_pn-linux-yocto = "c2ed0f16fdec628242a682897d5d86df4547cf24"
606 # core2-poky-linux
607 SRCREV_pn-kmod = "62081c0f68905b22f375156d4532fd37fa5c8d33"
608 SRCREV_pn-blktrace = "d6918c8832793b4205ed3bfede78c2f915c23385"
609 SRCREV_pn-opkg = "649"
610 </literallayout>
611 <note>
612 Here are some notes on using the
613 <filename>buildhistory-collect-srcrevs</filename> command:
614 <itemizedlist>
615 <listitem><para>By default, only values where the
616 <filename>SRCREV</filename> was
617 not hardcoded (usually when <filename>AUTOREV</filename>
618 was used) are reported.
619 Use the <filename>-a</filename> option to see all
620 <filename>SRCREV</filename> values.
621 </para></listitem>
622 <listitem><para>The output statements might not have any effect
623 if overrides are applied elsewhere in the build system
624 configuration.
625 Use the <filename>-f</filename> option to add the
626 <filename>forcevariable</filename> override to each output line
627 if you need to work around this restriction.
628 </para></listitem>
629 <listitem><para>The script does apply special handling when
630 building for multiple machines.
631 However, the script does place a
632 comment before each set of values that specifies
633 which triplet to which they belong as shown above
634 (e.g., <filename>emenlow-poky-linux</filename>).
635 </para></listitem>
636 </itemizedlist>
637 </note>
638 </para>
639 </section>
640
641 <section id='build-history-image-information'>
642 <title>Build History Image Information</title>
643
644 <para>
645 The files produced for each image are as follows:
646 <itemizedlist>
647 <listitem><para><filename>image-files:</filename>
648 A directory containing selected files from the root
649 filesystem.
650 The files are defined by
651 <filename>BUILDHISTORY_IMAGE_FILES</filename>.
652 </para></listitem>
653 <listitem><para><filename>build-id:</filename>
654 Human-readable information about the build configuration
655 and metadata source revisions.</para></listitem>
656 <listitem><para><filename>*.dot:</filename>
657 Dependency graphs for the image that are
658 compatible with <filename>graphviz</filename>.
659 </para></listitem>
660 <listitem><para><filename>files-in-image.txt:</filename>
661 A list of files in the image with permissions,
662 owner, group, size, and symlink information.
663 </para></listitem>
664 <listitem><para><filename>image-info.txt:</filename>
665 A text file containing name-value pairs with information
666 about the image.
667 See the following listing example for more information.
668 </para></listitem>
669 <listitem><para><filename>installed-package-names.txt:</filename>
670 A list of installed packages by name only.</para></listitem>
671 <listitem><para><filename>installed-package-sizes.txt:</filename>
672 A list of installed packages ordered by size.
673 </para></listitem>
674 <listitem><para><filename>installed-packages.txt:</filename>
675 A list of installed packages with full package
676 filenames.</para></listitem>
677 </itemizedlist>
678 <note>
679 Installed package information is able to be gathered and
680 produced even if package management is disabled for the final
681 image.
682 </note>
683 </para>
684
685 <para>
686 Here is an example of <filename>image-info.txt</filename>:
687 <literallayout class='monospaced'>
688 DISTRO = poky
689 DISTRO_VERSION = 1.1+snapshot-20120207
690 USER_CLASSES = image-mklibs image-prelink
691 IMAGE_CLASSES = image_types
692 IMAGE_FEATURES = debug-tweaks x11-base apps-x11-core \
693 package-management ssh-server-dropbear package-management
694 IMAGE_LINGUAS = en-us en-gb
695 IMAGE_INSTALL = task-core-boot task-base-extended
696 BAD_RECOMMENDATIONS =
697 ROOTFS_POSTPROCESS_COMMAND = buildhistory_get_image_installed ; rootfs_update_timestamp ;
698 IMAGE_POSTPROCESS_COMMAND = buildhistory_get_imageinfo ;
699 IMAGESIZE = 171816
700 </literallayout>
701 Other than <filename>IMAGESIZE</filename>, which is the
702 total size of the files in the image in Kbytes, the
703 name-value pairs are variables that may have influenced the
704 content of the image.
705 This information is often useful when you are trying to determine
706 why a change in the package or file listings has occurred.
707 </para>
708 </section>
709
710 <section id='using-build-history-to-gather-image-information-only'>
711 <title>Using Build History to Gather Image Information Only</title>
712
713 <para>
714 As you can see, build history produces image information,
715 including dependency graphs, so you can see why something
716 was pulled into the image.
717 If you are just interested in this information and not
718 interested in collecting history or any package information,
719 you can enable writing only image information without
720 any history by adding the following
721 to your <filename>conf/local.conf</filename> file found in the
722 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>:
723 <literallayout class='monospaced'>
724 INHERIT += "buildhistory"
725 BUILDHISTORY_COMMIT = "0"
726 BUILDHISTORY_FEATURES = "image"
727 </literallayout>
728 </para>
729 </section>
730
731 <section id='build-history-sdk-information'>
732 <title>Build History SDK Information</title>
733 <para>
734 Build history collects similar information on the contents
735 of SDKs (e.g., <filename>meta-toolchain</filename>
736 or <filename>bitbake -c populate_sdk imagename</filename>)
737 as compared to information it collects for images.
738 The following list shows the files produced for each SDK:
739 <itemizedlist>
740 <listitem><para><filename>files-in-sdk.txt:</filename>
741 A list of files in the SDK with permissions,
742 owner, group, size, and symlink information.
743 This list includes both the host and target parts
744 of the SDK.
745 </para></listitem>
746 <listitem><para><filename>sdk-info.txt:</filename>
747 A text file containing name-value pairs with information
748 about the SDK.
749 See the following listing example for more information.
750 </para></listitem>
751 <listitem><para>The following information appears under
752 each of the <filename>host</filename>
753 and <filename>target</filename> directories
754 for the portions of the SDK that run on the host and
755 on the target, respectively:
756 <itemizedlist>
757 <listitem><para><filename>depends.dot:</filename>
758 Dependency graph for the SDK that is
759 compatible with <filename>graphviz</filename>.
760 </para></listitem>
761 <listitem><para><filename>installed-package-names.txt:</filename>
762 A list of installed packages by name only.
763 </para></listitem>
764 <listitem><para><filename>installed-package-sizes.txt:</filename>
765 A list of installed packages ordered by size.
766 </para></listitem>
767 <listitem><para><filename>installed-packages.txt:</filename>
768 A list of installed packages with full package
769 filenames.</para></listitem>
770 </itemizedlist>
771 </para></listitem>
772 </itemizedlist>
773 </para>
774
775 <para>
776 Here is an example of <filename>sdk-info.txt</filename>:
777 <literallayout class='monospaced'>
778 DISTRO = poky
779 DISTRO_VERSION = 1.3+snapshot-20130327
780 SDK_NAME = poky-eglibc-i686-arm
781 SDK_VERSION = 1.3+snapshot
782 SDKMACHINE =
783 SDKIMAGE_FEATURES = dev-pkgs dbg-pkgs
784 BAD_RECOMMENDATIONS =
785 SDKSIZE = 352712
786 </literallayout>
787 Other than <filename>SDKSIZE</filename>, which is the
788 total size of the files in the SDK in Kbytes, the
789 name-value pairs are variables that might have influenced the
790 content of the SDK.
791 This information is often useful when you are trying to
792 determine why a change in the package or file listings
793 has occurred.
794 </para>
795 </section>
796
797 <section id='examining-build-history-information'>
798 <title>Examining Build History Information</title>
799
800 <para>
801 You can examine build history output from the command line or
802 from a web interface.
803 </para>
804
805 <para>
806 To see any changes that have occurred (assuming you have
807 <filename>BUILDHISTORY_COMMIT = "1"</filename>), you can simply
808 use any Git command that allows you to view the history of
809 a repository.
810 Here is one method:
811 <literallayout class='monospaced'>
812 $ git log -p
813 </literallayout>
814 You need to realize, however, that this method does show
815 changes that are not significant (e.g. a package's size
816 changing by a few bytes).
817 </para>
818
819 <para>
820 A command-line tool called <filename>buildhistory-diff</filename>
821 does exist, though, that queries the Git repository and prints just
822 the differences that might be significant in human-readable form.
823 Here is an example:
824 <literallayout class='monospaced'>
825 $ ~/poky/poky/scripts/buildhistory-diff . HEAD^
826 Changes to images/qemux86_64/eglibc/core-image-minimal (files-in-image.txt):
827 /etc/anotherpkg.conf was added
828 /sbin/anotherpkg was added
829 * (installed-package-names.txt):
830 * anotherpkg was added
831 Changes to images/qemux86_64/eglibc/core-image-minimal (installed-package-names.txt):
832 anotherpkg was added
833 packages/qemux86_64-poky-linux/v86d: PACKAGES: added "v86d-extras"
834 * PR changed from "r0" to "r1"
835 * PV changed from "0.1.10" to "0.1.12"
836 packages/qemux86_64-poky-linux/v86d/v86d: PKGSIZE changed from 110579 to 144381 (+30%)
837 * PR changed from "r0" to "r1"
838 * PV changed from "0.1.10" to "0.1.12"
839 </literallayout>
840 </para>
841
842 <para>
843 To see changes to the build history using a web interface, follow
844 the instruction in the <filename>README</filename> file here.
845 <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/buildhistory-web/'></ulink>.
846 </para>
847
848 <para>
849 Here is a sample screenshot of the interface:
850 <imagedata fileref="figures/buildhistory-web.png" align="center" scalefit="1" width="130%" contentdepth="130%" />
851 </para>
852 </section>
853 </section>
854</section>
855
856</chapter>
857<!--
858vim: expandtab tw=80 ts=4
859-->
diff --git a/documentation/template/Vera.ttf b/documentation/template/Vera.ttf
new file mode 100644
index 0000000..58cd6b5
--- /dev/null
+++ b/documentation/template/Vera.ttf
Binary files differ
diff --git a/documentation/template/Vera.xml b/documentation/template/Vera.xml
new file mode 100644
index 0000000..3c82043
--- /dev/null
+++ b/documentation/template/Vera.xml
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><font-metrics type="TYPE0"><font-name>BitstreamVeraSans</font-name><embed/><cap-height>729</cap-height><x-height>546</x-height><ascender>928</ascender><descender>-235</descender><bbox><left>-183</left><bottom>-235</bottom><right>1287</right><top>928</top></bbox><flags>32</flags><stemv>0</stemv><italicangle>0</italicangle><subtype>TYPE0</subtype><multibyte-extras><cid-type>CIDFontType2</cid-type><default-width>0</default-width><bfranges><bf gi="3" ue="126" us="32"/><bf gi="172" ue="160" us="160"/><bf gi="163" ue="161" us="161"/><bf gi="132" ue="163" us="162"/><bf gi="189" ue="164" us="164"/><bf gi="150" ue="165" us="165"/><bf gi="231" ue="166" us="166"/><bf gi="134" ue="167" us="167"/><bf gi="142" ue="168" us="168"/><bf gi="139" ue="169" us="169"/><bf gi="157" ue="170" us="170"/><bf gi="169" ue="171" us="171"/><bf gi="164" ue="172" us="172"/><bf gi="256" ue="173" us="173"/><bf gi="138" ue="174" us="174"/><bf gi="217" ue="175" us="175"/><bf gi="131" ue="176" us="176"/><bf gi="147" ue="177" us="177"/><bf gi="241" ue="179" us="178"/><bf gi="141" ue="180" us="180"/><bf gi="151" ue="181" us="181"/><bf gi="136" ue="182" us="182"/><bf gi="195" ue="183" us="183"/><bf gi="221" ue="184" us="184"/><bf gi="240" ue="185" us="185"/><bf gi="158" ue="186" us="186"/><bf gi="170" ue="187" us="187"/><bf gi="243" ue="190" us="188"/><bf gi="162" ue="191" us="191"/><bf gi="173" ue="192" us="192"/><bf gi="201" ue="193" us="193"/><bf gi="199" ue="194" us="194"/><bf gi="174" ue="195" us="195"/><bf gi="98" ue="197" us="196"/><bf gi="144" ue="198" us="198"/><bf gi="100" ue="199" us="199"/><bf gi="203" ue="200" us="200"/><bf gi="101" ue="201" us="201"/><bf gi="200" ue="202" us="202"/><bf gi="202" ue="203" us="203"/><bf gi="207" ue="204" us="204"/><bf gi="204" ue="207" us="205"/><bf gi="232" ue="208" us="208"/><bf gi="102" ue="209" us="209"/><bf gi="210" ue="210" us="210"/><bf gi="208" ue="212" us="211"/><bf gi="175" ue="213" us="213"/><bf gi="103" ue="214" us="214"/><bf gi="239" ue="215" us="215"/><bf gi="145" ue="216" us="216"/><bf gi="213" ue="217" us="217"/><bf gi="211" ue="219" us="218"/><bf gi="104" ue="220" us="220"/><bf gi="234" ue="221" us="221"/><bf gi="236" ue="222" us="222"/><bf gi="137" ue="223" us="223"/><bf gi="106" ue="224" us="224"/><bf gi="105" ue="225" us="225"/><bf gi="107" ue="226" us="226"/><bf gi="109" ue="227" us="227"/><bf gi="108" ue="228" us="228"/><bf gi="110" ue="229" us="229"/><bf gi="160" ue="230" us="230"/><bf gi="111" ue="231" us="231"/><bf gi="113" ue="232" us="232"/><bf gi="112" ue="233" us="233"/><bf gi="114" ue="235" us="234"/><bf gi="117" ue="236" us="236"/><bf gi="116" ue="237" us="237"/><bf gi="118" ue="239" us="238"/><bf gi="233" ue="240" us="240"/><bf gi="120" ue="241" us="241"/><bf gi="122" ue="242" us="242"/><bf gi="121" ue="243" us="243"/><bf gi="123" ue="244" us="244"/><bf gi="125" ue="245" us="245"/><bf gi="124" ue="246" us="246"/><bf gi="184" ue="247" us="247"/><bf gi="161" ue="248" us="248"/><bf gi="127" ue="249" us="249"/><bf gi="126" ue="250" us="250"/><bf gi="128" ue="252" us="251"/><bf gi="235" ue="253" us="253"/><bf gi="237" ue="254" us="254"/><bf gi="186" ue="255" us="255"/><bf gi="251" ue="263" us="262"/><bf gi="253" ue="269" us="268"/><bf gi="0" ue="270" us="270"/><bf gi="0" ue="271" us="271"/><bf gi="0" ue="272" us="272"/><bf gi="255" ue="273" us="273"/><bf gi="246" ue="287" us="286"/><bf gi="248" ue="304" us="304"/><bf gi="214" ue="305" us="305"/><bf gi="225" ue="322" us="321"/><bf gi="176" ue="339" us="338"/><bf gi="249" ue="351" us="350"/><bf gi="227" ue="353" us="352"/><bf gi="187" ue="376" us="376"/><bf gi="229" ue="382" us="381"/><bf gi="166" ue="402" us="402"/><bf gi="215" ue="710" us="710"/><bf gi="224" ue="711" us="711"/><bf gi="218" ue="730" us="728"/><bf gi="223" ue="731" us="731"/><bf gi="216" ue="732" us="732"/><bf gi="222" ue="733" us="733"/><bf gi="159" ue="937" us="937"/><bf gi="155" ue="960" us="960"/><bf gi="178" ue="8212" us="8211"/><bf gi="0" ue="8213" us="8213"/><bf gi="0" ue="8214" us="8214"/><bf gi="0" ue="8215" us="8215"/><bf gi="182" ue="8217" us="8216"/><bf gi="196" ue="8218" us="8218"/><bf gi="0" ue="8219" us="8219"/><bf gi="180" ue="8221" us="8220"/><bf gi="197" ue="8222" us="8222"/><bf gi="0" ue="8223" us="8223"/><bf gi="130" ue="8224" us="8224"/><bf gi="194" ue="8225" us="8225"/><bf gi="135" ue="8226" us="8226"/><bf gi="0" ue="8227" us="8227"/><bf gi="0" ue="8228" us="8228"/><bf gi="0" ue="8229" us="8229"/><bf gi="171" ue="8230" us="8230"/><bf gi="198" ue="8240" us="8240"/><bf gi="190" ue="8250" us="8249"/><bf gi="258" ue="8364" us="8364"/><bf gi="140" ue="8482" us="8482"/><bf gi="152" ue="8706" us="8706"/><bf gi="0" ue="8707" us="8707"/><bf gi="0" ue="8708" us="8708"/><bf gi="0" ue="8709" us="8709"/><bf gi="168" ue="8710" us="8710"/><bf gi="154" ue="8719" us="8719"/><bf gi="0" ue="8720" us="8720"/><bf gi="153" ue="8721" us="8721"/><bf gi="238" ue="8722" us="8722"/><bf gi="0" ue="8723" us="8723"/><bf gi="0" ue="8724" us="8724"/><bf gi="188" ue="8725" us="8725"/><bf gi="0" ue="8726" us="8726"/><bf gi="0" ue="8727" us="8727"/><bf gi="0" ue="8728" us="8728"/><bf gi="257" ue="8729" us="8729"/><bf gi="165" ue="8730" us="8730"/><bf gi="0" ue="8731" us="8731"/><bf gi="0" ue="8732" us="8732"/><bf gi="0" ue="8733" us="8733"/><bf gi="146" ue="8734" us="8734"/><bf gi="156" ue="8747" us="8747"/><bf gi="167" ue="8776" us="8776"/><bf gi="143" ue="8800" us="8800"/><bf gi="0" ue="8801" us="8801"/><bf gi="0" ue="8802" us="8802"/><bf gi="0" ue="8803" us="8803"/><bf gi="148" ue="8805" us="8804"/><bf gi="185" ue="9674" us="9674"/><bf gi="192" ue="64258" us="64257"/><bf gi="0" ue="65535" us="65535"/></bfranges><cid-widths start-index="0"><wx w="600"/><wx w="0"/><wx w="317"/><wx w="317"/><wx w="400"/><wx w="459"/><wx w="837"/><wx w="636"/><wx w="950"/><wx w="779"/><wx w="274"/><wx w="390"/><wx w="390"/><wx w="500"/><wx w="837"/><wx w="317"/><wx w="360"/><wx w="317"/><wx w="336"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="636"/><wx w="336"/><wx w="336"/><wx w="837"/><wx w="837"/><wx w="837"/><wx w="530"/><wx w="1000"/><wx w="684"/><wx w="686"/><wx w="698"/><wx w="770"/><wx w="631"/><wx w="575"/><wx w="774"/><wx w="751"/><wx w="294"/><wx w="294"/><wx w="655"/><wx w="557"/><wx w="862"/><wx w="748"/><wx w="787"/><wx w="603"/><wx w="787"/><wx w="694"/><wx w="634"/><wx w="610"/><wx w="731"/><wx w="684"/><wx w="988"/><wx w="685"/><wx w="610"/><wx w="685"/><wx w="390"/><wx w="336"/><wx w="390"/><wx w="837"/><wx w="500"/><wx w="500"/><wx w="612"/><wx w="634"/><wx w="549"/><wx w="634"/><wx w="615"/><wx w="352"/><wx w="634"/><wx w="633"/><wx w="277"/><wx w="277"/><wx w="579"/><wx w="277"/><wx w="974"/><wx w="633"/><wx w="611"/><wx w="634"/><wx w="634"/><wx w="411"/><wx w="520"/><wx w="392"/><wx w="633"/><wx w="591"/><wx w="817"/><wx w="591"/><wx w="591"/><wx w="524"/><wx w="636"/><wx w="336"/><wx w="636"/><wx w="837"/><wx w="684"/><wx w="684"/><wx w="698"/><wx w="631"/><wx w="748"/><wx w="787"/><wx w="731"/><wx w="612"/><wx w="612"/><wx w="612"/><wx w="612"/><wx w="612"/><wx w="612"/><wx w="549"/><wx w="615"/><wx w="615"/><wx w="615"/><wx w="615"/><wx w="277"/><wx w="277"/><wx w="277"/><wx w="277"/><wx w="633"/><wx w="611"/><wx w="611"/><wx w="611"/><wx w="611"/><wx w="611"/><wx w="633"/><wx w="633"/><wx w="633"/><wx w="633"/><wx w="500"/><wx w="500"/><wx w="636"/><wx w="636"/><wx w="500"/><wx w="589"/><wx w="636"/><wx w="629"/><wx w="1000"/><wx w="1000"/><wx w="1000"/><wx w="500"/><wx w="500"/><wx w="837"/><wx w="974"/><wx w="787"/><wx w="833"/><wx w="837"/><wx w="837"/><wx w="837"/><wx w="636"/><wx w="636"/><wx w="517"/><wx w="673"/><wx w="756"/><wx w="588"/><wx w="520"/><wx w="471"/><wx w="471"/><wx w="764"/><wx w="981"/><wx w="611"/><wx w="530"/><wx w="400"/><wx w="837"/><wx w="637"/><wx w="636"/><wx w="837"/><wx w="668"/><wx w="611"/><wx w="611"/><wx w="1000"/><wx w="636"/><wx w="684"/><wx w="684"/><wx w="787"/><wx w="1069"/><wx w="1022"/><wx w="500"/><wx w="1000"/><wx w="518"/><wx w="518"/><wx w="317"/><wx w="317"/><wx w="837"/><wx w="494"/><wx w="591"/><wx w="610"/><wx w="166"/><wx w="636"/><wx w="399"/><wx w="399"/><wx w="629"/><wx w="629"/><wx w="500"/><wx w="317"/><wx w="317"/><wx w="518"/><wx w="1341"/><wx w="684"/><wx w="631"/><wx w="684"/><wx w="631"/><wx w="631"/><wx w="294"/><wx w="294"/><wx w="294"/><wx w="294"/><wx w="787"/><wx w="787"/><wx w="787"/><wx w="731"/><wx w="731"/><wx w="731"/><wx w="277"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="562"/><wx w="284"/><wx w="634"/><wx w="520"/><wx w="685"/><wx w="524"/><wx w="336"/><wx w="774"/><wx w="611"/><wx w="610"/><wx w="591"/><wx w="604"/><wx w="634"/><wx w="837"/><wx w="837"/><wx w="400"/><wx w="400"/><wx w="400"/><wx w="969"/><wx w="969"/><wx w="969"/><wx w="774"/><wx w="634"/><wx w="294"/><wx w="634"/><wx w="520"/><wx w="698"/><wx w="549"/><wx w="698"/><wx w="549"/><wx w="634"/><wx w="360"/><wx w="317"/><wx w="636"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="500"/><wx w="400"/><wx w="500"/><wx w="500"/></cid-widths></multibyte-extras><kerning kpx1="246"><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="169"/><pair kern="-26" kpx2="197"/><pair kern="-35" kpx2="55"/><pair kern="-49" kpx2="60"/><pair kern="-49" kpx2="187"/><pair kern="-21" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-49" kpx2="234"/></kerning><kerning kpx1="235"><pair kern="-142" kpx2="17"/><pair kern="-17" kpx2="169"/><pair kern="-146" kpx2="197"/><pair kern="-17" kpx2="16"/><pair kern="-72" kpx2="29"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="43"><pair kern="-35" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-35" kpx2="197"/><pair kern="-30" kpx2="181"/></kerning><kerning kpx1="16"><pair kern="36" kpx2="246"/><pair kern="-17" kpx2="235"/><pair kern="-21" kpx2="199"/><pair kern="18" kpx2="123"/><pair kern="27" kpx2="208"/><pair kern="-118" kpx2="187"/><pair kern="-49" kpx2="59"/><pair kern="18" kpx2="124"/><pair kern="-21" kpx2="201"/><pair kern="-118" kpx2="60"/><pair kern="36" kpx2="52"/><pair kern="18" kpx2="125"/><pair kern="36" kpx2="42"/><pair kern="-118" kpx2="234"/><pair kern="18" kpx2="122"/><pair kern="27" kpx2="210"/><pair kern="-21" kpx2="36"/><pair kern="18" kpx2="82"/><pair kern="-40" kpx2="58"/><pair kern="-91" kpx2="55"/><pair kern="-17" kpx2="186"/><pair kern="27" kpx2="175"/><pair kern="27" kpx2="50"/><pair kern="27" kpx2="209"/><pair kern="27" kpx2="103"/><pair kern="-21" kpx2="98"/><pair kern="55" kpx2="45"/><pair kern="-21" kpx2="173"/><pair kern="-17" kpx2="92"/><pair kern="-26" kpx2="89"/><pair kern="18" kpx2="121"/><pair kern="-58" kpx2="57"/><pair kern="-35" kpx2="37"/><pair kern="-21" kpx2="174"/></kerning><kerning kpx1="112"><pair kern="-17" kpx2="91"/></kerning><kerning kpx1="123"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="251"><pair kern="-17" kpx2="169"/><pair kern="-17" kpx2="60"/><pair kern="-17" kpx2="187"/><pair kern="18" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-17" kpx2="234"/></kerning><kerning kpx1="213"><pair kern="-17" kpx2="229"/><pair kern="-17" kpx2="61"/></kerning><kerning kpx1="208"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="187"><pair kern="-114" kpx2="126"/><pair kern="-137" kpx2="107"/><pair kern="-132" kpx2="72"/><pair kern="-77" kpx2="199"/><pair kern="-118" kpx2="16"/><pair kern="-132" kpx2="123"/><pair kern="-132" kpx2="112"/><pair kern="-54" kpx2="251"/><pair kern="-54" kpx2="208"/><pair kern="-132" kpx2="113"/><pair kern="-54" kpx2="180"/><pair kern="-137" kpx2="105"/><pair kern="-114" kpx2="129"/><pair kern="-132" kpx2="124"/><pair kern="-109" kpx2="169"/><pair kern="-77" kpx2="201"/><pair kern="-54" kpx2="253"/><pair kern="-137" kpx2="106"/><pair kern="-132" kpx2="29"/><pair kern="-132" kpx2="125"/><pair kern="-72" kpx2="170"/><pair kern="-132" kpx2="115"/><pair kern="-114" kpx2="88"/><pair kern="-132" kpx2="122"/><pair kern="-54" kpx2="100"/><pair kern="-137" kpx2="68"/><pair kern="-54" kpx2="210"/><pair kern="-77" kpx2="36"/><pair kern="-132" kpx2="82"/><pair kern="-132" kpx2="114"/><pair kern="-54" kpx2="175"/><pair kern="-114" kpx2="127"/><pair kern="-54" kpx2="50"/><pair kern="-54" kpx2="209"/><pair kern="-54" kpx2="103"/><pair kern="-137" kpx2="108"/><pair kern="-77" kpx2="98"/><pair kern="-35" kpx2="76"/><pair kern="-17" kpx2="181"/><pair kern="-202" kpx2="17"/><pair kern="-114" kpx2="128"/><pair kern="-77" kpx2="173"/><pair kern="-137" kpx2="109"/><pair kern="-128" kpx2="197"/><pair kern="-54" kpx2="38"/><pair kern="-132" kpx2="121"/><pair kern="-137" kpx2="110"/><pair kern="-77" kpx2="174"/></kerning><kerning kpx1="113"><pair kern="-17" kpx2="91"/></kerning><kerning kpx1="144"><pair kern="-40" kpx2="180"/><pair kern="-54" kpx2="197"/><pair kern="-44" kpx2="181"/></kerning><kerning kpx1="59"><pair kern="-72" kpx2="100"/><pair kern="-63" kpx2="210"/><pair kern="-17" kpx2="55"/><pair kern="-44" kpx2="114"/><pair kern="-44" kpx2="72"/><pair kern="-63" kpx2="175"/><pair kern="-49" kpx2="16"/><pair kern="-63" kpx2="50"/><pair kern="-63" kpx2="209"/><pair kern="-44" kpx2="112"/><pair kern="-72" kpx2="251"/><pair kern="-63" kpx2="103"/><pair kern="-63" kpx2="208"/><pair kern="-44" kpx2="113"/><pair kern="-40" kpx2="181"/><pair kern="-77" kpx2="180"/><pair kern="-54" kpx2="169"/><pair kern="-21" kpx2="197"/><pair kern="-72" kpx2="38"/><pair kern="-72" kpx2="253"/><pair kern="-44" kpx2="115"/></kerning><kerning kpx1="73"><pair kern="31" kpx2="180"/><pair kern="-17" kpx2="90"/><pair kern="-72" kpx2="17"/><pair kern="-17" kpx2="235"/><pair kern="-35" kpx2="169"/><pair kern="-114" kpx2="197"/><pair kern="-17" kpx2="186"/><pair kern="-17" kpx2="92"/><pair kern="-17" kpx2="87"/><pair kern="-54" kpx2="16"/><pair kern="-35" kpx2="29"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="41"><pair kern="-17" kpx2="227"/><pair kern="-54" kpx2="126"/><pair kern="-91" kpx2="107"/><pair kern="-91" kpx2="235"/><pair kern="-54" kpx2="72"/><pair kern="-91" kpx2="199"/><pair kern="-35" kpx2="123"/><pair kern="-54" kpx2="112"/><pair kern="-54" kpx2="113"/><pair kern="-17" kpx2="54"/><pair kern="-21" kpx2="180"/><pair kern="-91" kpx2="105"/><pair kern="-54" kpx2="129"/><pair kern="-35" kpx2="124"/><pair kern="-91" kpx2="201"/><pair kern="-72" kpx2="85"/><pair kern="-91" kpx2="106"/><pair kern="-77" kpx2="29"/><pair kern="-35" kpx2="125"/><pair kern="-54" kpx2="115"/><pair kern="-54" kpx2="88"/><pair kern="-35" kpx2="122"/><pair kern="-91" kpx2="68"/><pair kern="-91" kpx2="36"/><pair kern="-35" kpx2="82"/><pair kern="-91" kpx2="186"/><pair kern="-17" kpx2="55"/><pair kern="-54" kpx2="114"/><pair kern="-54" kpx2="127"/><pair kern="-91" kpx2="108"/><pair kern="-91" kpx2="98"/><pair kern="-72" kpx2="76"/><pair kern="-160" kpx2="17"/><pair kern="-54" kpx2="128"/><pair kern="-91" kpx2="173"/><pair kern="-91" kpx2="109"/><pair kern="-183" kpx2="197"/><pair kern="-91" kpx2="92"/><pair kern="-35" kpx2="121"/><pair kern="-91" kpx2="110"/><pair kern="-91" kpx2="174"/><pair kern="-17" kpx2="249"/></kerning><kerning kpx1="124"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="169"><pair kern="-17" kpx2="90"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="246"/><pair kern="-17" kpx2="235"/><pair kern="-17" kpx2="58"/><pair kern="-17" kpx2="186"/><pair kern="-54" kpx2="55"/><pair kern="-17" kpx2="251"/><pair kern="-72" kpx2="187"/><pair kern="-17" kpx2="39"/><pair kern="73" kpx2="144"/><pair kern="-17" kpx2="45"/><pair kern="-17" kpx2="92"/><pair kern="-17" kpx2="38"/><pair kern="-72" kpx2="60"/><pair kern="-17" kpx2="89"/><pair kern="-17" kpx2="253"/><pair kern="-54" kpx2="57"/><pair kern="-17" kpx2="37"/><pair kern="-17" kpx2="42"/><pair kern="-72" kpx2="234"/></kerning><kerning kpx1="201"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="60"><pair kern="-114" kpx2="126"/><pair kern="-137" kpx2="107"/><pair kern="-132" kpx2="72"/><pair kern="-77" kpx2="199"/><pair kern="-118" kpx2="16"/><pair kern="-132" kpx2="123"/><pair kern="-132" kpx2="112"/><pair kern="-54" kpx2="251"/><pair kern="-54" kpx2="208"/><pair kern="-132" kpx2="113"/><pair kern="-54" kpx2="180"/><pair kern="-137" kpx2="105"/><pair kern="-114" kpx2="129"/><pair kern="-132" kpx2="124"/><pair kern="-109" kpx2="169"/><pair kern="-77" kpx2="201"/><pair kern="-54" kpx2="253"/><pair kern="-137" kpx2="106"/><pair kern="-132" kpx2="29"/><pair kern="-132" kpx2="125"/><pair kern="-72" kpx2="170"/><pair kern="-132" kpx2="115"/><pair kern="-114" kpx2="88"/><pair kern="-132" kpx2="122"/><pair kern="-54" kpx2="100"/><pair kern="-137" kpx2="68"/><pair kern="-54" kpx2="210"/><pair kern="-77" kpx2="36"/><pair kern="-132" kpx2="82"/><pair kern="-132" kpx2="114"/><pair kern="-54" kpx2="175"/><pair kern="-114" kpx2="127"/><pair kern="-54" kpx2="50"/><pair kern="-54" kpx2="209"/><pair kern="-54" kpx2="103"/><pair kern="-137" kpx2="108"/><pair kern="-77" kpx2="98"/><pair kern="-35" kpx2="76"/><pair kern="-17" kpx2="181"/><pair kern="-202" kpx2="17"/><pair kern="-114" kpx2="128"/><pair kern="-77" kpx2="173"/><pair kern="-137" kpx2="109"/><pair kern="-128" kpx2="197"/><pair kern="-54" kpx2="38"/><pair kern="-132" kpx2="121"/><pair kern="-137" kpx2="110"/><pair kern="-77" kpx2="174"/></kerning><kerning kpx1="85"><pair kern="-21" kpx2="254"/><pair kern="-21" kpx2="72"/><pair kern="-63" kpx2="16"/><pair kern="-21" kpx2="112"/><pair kern="-21" kpx2="123"/><pair kern="-17" kpx2="80"/><pair kern="-21" kpx2="113"/><pair kern="-17" kpx2="71"/><pair kern="-21" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-21" kpx2="252"/><pair kern="-21" kpx2="70"/><pair kern="-17" kpx2="85"/><pair kern="-17" kpx2="29"/><pair kern="-21" kpx2="125"/><pair kern="-21" kpx2="115"/><pair kern="-21" kpx2="111"/><pair kern="-21" kpx2="122"/><pair kern="-21" kpx2="82"/><pair kern="-17" kpx2="75"/><pair kern="-21" kpx2="114"/><pair kern="-26" kpx2="91"/><pair kern="-17" kpx2="81"/><pair kern="41" kpx2="181"/><pair kern="-91" kpx2="17"/><pair kern="-151" kpx2="197"/><pair kern="-17" kpx2="74"/><pair kern="-17" kpx2="84"/><pair kern="-21" kpx2="121"/><pair kern="-17" kpx2="247"/><pair kern="-17" kpx2="120"/></kerning><kerning kpx1="61"><pair kern="-17" kpx2="180"/><pair kern="-17" kpx2="197"/><pair kern="-17" kpx2="16"/><pair kern="-17" kpx2="181"/></kerning><kerning kpx1="234"><pair kern="-114" kpx2="126"/><pair kern="-137" kpx2="107"/><pair kern="-132" kpx2="72"/><pair kern="-77" kpx2="199"/><pair kern="-118" kpx2="16"/><pair kern="-132" kpx2="123"/><pair kern="-132" kpx2="112"/><pair kern="-54" kpx2="251"/><pair kern="-54" kpx2="208"/><pair kern="-132" kpx2="113"/><pair kern="-54" kpx2="180"/><pair kern="-137" kpx2="105"/><pair kern="-114" kpx2="129"/><pair kern="-132" kpx2="124"/><pair kern="-109" kpx2="169"/><pair kern="-77" kpx2="201"/><pair kern="-54" kpx2="253"/><pair kern="-137" kpx2="106"/><pair kern="-132" kpx2="29"/><pair kern="-132" kpx2="125"/><pair kern="-72" kpx2="170"/><pair kern="-132" kpx2="115"/><pair kern="-114" kpx2="88"/><pair kern="-132" kpx2="122"/><pair kern="-54" kpx2="100"/><pair kern="-137" kpx2="68"/><pair kern="-54" kpx2="210"/><pair kern="-77" kpx2="36"/><pair kern="-132" kpx2="82"/><pair kern="-132" kpx2="114"/><pair kern="-54" kpx2="175"/><pair kern="-114" kpx2="127"/><pair kern="-54" kpx2="50"/><pair kern="-54" kpx2="209"/><pair kern="-54" kpx2="103"/><pair kern="-137" kpx2="108"/><pair kern="-77" kpx2="98"/><pair kern="-35" kpx2="76"/><pair kern="-17" kpx2="181"/><pair kern="-202" kpx2="17"/><pair kern="-114" kpx2="128"/><pair kern="-77" kpx2="173"/><pair kern="-137" kpx2="109"/><pair kern="-128" kpx2="197"/><pair kern="-54" kpx2="38"/><pair kern="-132" kpx2="121"/><pair kern="-137" kpx2="110"/><pair kern="-77" kpx2="174"/></kerning><kerning kpx1="100"><pair kern="-17" kpx2="169"/><pair kern="-17" kpx2="60"/><pair kern="-17" kpx2="187"/><pair kern="18" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-17" kpx2="234"/></kerning><kerning kpx1="122"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="47"><pair kern="-17" kpx2="126"/><pair kern="-91" kpx2="235"/><pair kern="-49" kpx2="104"/><pair kern="-17" kpx2="72"/><pair kern="22" kpx2="199"/><pair kern="-17" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-49" kpx2="213"/><pair kern="-35" kpx2="208"/><pair kern="-132" kpx2="187"/><pair kern="-17" kpx2="113"/><pair kern="-202" kpx2="180"/><pair kern="-17" kpx2="129"/><pair kern="-17" kpx2="124"/><pair kern="22" kpx2="201"/><pair kern="-132" kpx2="60"/><pair kern="-49" kpx2="211"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="115"/><pair kern="-132" kpx2="234"/><pair kern="-17" kpx2="88"/><pair kern="-17" kpx2="122"/><pair kern="-35" kpx2="210"/><pair kern="22" kpx2="36"/><pair kern="-17" kpx2="82"/><pair kern="-91" kpx2="58"/><pair kern="-91" kpx2="186"/><pair kern="-137" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-35" kpx2="175"/><pair kern="-17" kpx2="127"/><pair kern="-35" kpx2="50"/><pair kern="-35" kpx2="209"/><pair kern="-35" kpx2="103"/><pair kern="22" kpx2="98"/><pair kern="-262" kpx2="181"/><pair kern="-17" kpx2="128"/><pair kern="22" kpx2="173"/><pair kern="-49" kpx2="212"/><pair kern="-91" kpx2="92"/><pair kern="-17" kpx2="121"/><pair kern="-109" kpx2="57"/><pair kern="22" kpx2="174"/><pair kern="-49" kpx2="56"/></kerning><kerning kpx1="210"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="58"><pair kern="-35" kpx2="126"/><pair kern="-63" kpx2="107"/><pair kern="-17" kpx2="235"/><pair kern="-58" kpx2="72"/><pair kern="-54" kpx2="199"/><pair kern="-40" kpx2="16"/><pair kern="-58" kpx2="112"/><pair kern="-58" kpx2="123"/><pair kern="-58" kpx2="113"/><pair kern="-17" kpx2="180"/><pair kern="-63" kpx2="105"/><pair kern="-35" kpx2="129"/><pair kern="-58" kpx2="124"/><pair kern="-54" kpx2="169"/><pair kern="-54" kpx2="201"/><pair kern="-44" kpx2="85"/><pair kern="-63" kpx2="106"/><pair kern="-58" kpx2="29"/><pair kern="-58" kpx2="125"/><pair kern="-17" kpx2="170"/><pair kern="-58" kpx2="115"/><pair kern="-35" kpx2="88"/><pair kern="-58" kpx2="122"/><pair kern="-63" kpx2="68"/><pair kern="-54" kpx2="36"/><pair kern="-58" kpx2="82"/><pair kern="-17" kpx2="186"/><pair kern="-58" kpx2="114"/><pair kern="-35" kpx2="127"/><pair kern="-63" kpx2="108"/><pair kern="-54" kpx2="98"/><pair kern="-21" kpx2="76"/><pair kern="-114" kpx2="17"/><pair kern="-35" kpx2="128"/><pair kern="-54" kpx2="173"/><pair kern="-63" kpx2="109"/><pair kern="-128" kpx2="197"/><pair kern="-17" kpx2="92"/><pair kern="-58" kpx2="121"/><pair kern="-63" kpx2="110"/><pair kern="-54" kpx2="174"/></kerning><kerning kpx1="82"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="186"><pair kern="-142" kpx2="17"/><pair kern="-17" kpx2="169"/><pair kern="-146" kpx2="197"/><pair kern="-17" kpx2="16"/><pair kern="-72" kpx2="29"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="175"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="209"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="103"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="81"><pair kern="-72" kpx2="180"/><pair kern="-44" kpx2="197"/><pair kern="-54" kpx2="181"/></kerning><kerning kpx1="98"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="212"><pair kern="-17" kpx2="229"/><pair kern="-17" kpx2="61"/></kerning><kerning kpx1="229"><pair kern="-17" kpx2="180"/><pair kern="-17" kpx2="197"/><pair kern="-17" kpx2="16"/><pair kern="-17" kpx2="181"/></kerning><kerning kpx1="38"><pair kern="-17" kpx2="169"/><pair kern="-17" kpx2="60"/><pair kern="-17" kpx2="187"/><pair kern="18" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-17" kpx2="234"/></kerning><kerning kpx1="121"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="57"><pair kern="-67" kpx2="126"/><pair kern="-77" kpx2="107"/><pair kern="-26" kpx2="235"/><pair kern="-77" kpx2="72"/><pair kern="-63" kpx2="199"/><pair kern="-58" kpx2="16"/><pair kern="-77" kpx2="123"/><pair kern="-77" kpx2="112"/><pair kern="-17" kpx2="208"/><pair kern="-77" kpx2="113"/><pair kern="-77" kpx2="105"/><pair kern="-67" kpx2="129"/><pair kern="-77" kpx2="124"/><pair kern="-86" kpx2="169"/><pair kern="-63" kpx2="201"/><pair kern="-77" kpx2="106"/><pair kern="-81" kpx2="29"/><pair kern="-77" kpx2="125"/><pair kern="-54" kpx2="170"/><pair kern="-77" kpx2="115"/><pair kern="-67" kpx2="88"/><pair kern="-77" kpx2="122"/><pair kern="-77" kpx2="68"/><pair kern="-17" kpx2="210"/><pair kern="-63" kpx2="36"/><pair kern="-77" kpx2="82"/><pair kern="-26" kpx2="186"/><pair kern="-77" kpx2="114"/><pair kern="-17" kpx2="175"/><pair kern="-67" kpx2="127"/><pair kern="-17" kpx2="50"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="-77" kpx2="108"/><pair kern="-63" kpx2="98"/><pair kern="-21" kpx2="76"/><pair kern="-128" kpx2="17"/><pair kern="-67" kpx2="128"/><pair kern="-63" kpx2="173"/><pair kern="-77" kpx2="109"/><pair kern="-137" kpx2="197"/><pair kern="-26" kpx2="92"/><pair kern="-77" kpx2="121"/><pair kern="-77" kpx2="110"/><pair kern="-63" kpx2="174"/></kerning><kerning kpx1="37"><pair kern="-17" kpx2="227"/><pair kern="-17" kpx2="246"/><pair kern="-17" kpx2="251"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-17" kpx2="54"/><pair kern="-54" kpx2="180"/><pair kern="-30" kpx2="169"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="170"/><pair kern="-54" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="210"/><pair kern="-35" kpx2="58"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="50"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="-54" kpx2="181"/><pair kern="-40" kpx2="197"/><pair kern="-17" kpx2="38"/><pair kern="-30" kpx2="57"/><pair kern="-17" kpx2="249"/></kerning><kerning kpx1="120"><pair kern="-72" kpx2="180"/><pair kern="-44" kpx2="197"/><pair kern="-54" kpx2="181"/></kerning><kerning kpx1="249"><pair kern="18" kpx2="173"/><pair kern="18" kpx2="36"/><pair kern="18" kpx2="201"/><pair kern="18" kpx2="199"/><pair kern="18" kpx2="174"/><pair kern="18" kpx2="98"/></kerning><kerning kpx1="227"><pair kern="18" kpx2="173"/><pair kern="18" kpx2="36"/><pair kern="18" kpx2="201"/><pair kern="18" kpx2="199"/><pair kern="18" kpx2="174"/><pair kern="18" kpx2="98"/></kerning><kerning kpx1="51"><pair kern="-17" kpx2="126"/><pair kern="-44" kpx2="107"/><pair kern="-35" kpx2="72"/><pair kern="-63" kpx2="199"/><pair kern="-21" kpx2="16"/><pair kern="-35" kpx2="123"/><pair kern="-35" kpx2="112"/><pair kern="-21" kpx2="187"/><pair kern="-35" kpx2="113"/><pair kern="-17" kpx2="86"/><pair kern="18" kpx2="180"/><pair kern="-44" kpx2="105"/><pair kern="-17" kpx2="129"/><pair kern="-35" kpx2="124"/><pair kern="-17" kpx2="169"/><pair kern="-63" kpx2="201"/><pair kern="-17" kpx2="85"/><pair kern="-21" kpx2="60"/><pair kern="-44" kpx2="106"/><pair kern="-35" kpx2="125"/><pair kern="-35" kpx2="115"/><pair kern="-21" kpx2="234"/><pair kern="-17" kpx2="88"/><pair kern="-35" kpx2="122"/><pair kern="-44" kpx2="68"/><pair kern="-63" kpx2="36"/><pair kern="-35" kpx2="82"/><pair kern="-35" kpx2="114"/><pair kern="-17" kpx2="250"/><pair kern="-17" kpx2="127"/><pair kern="-44" kpx2="108"/><pair kern="-63" kpx2="98"/><pair kern="-17" kpx2="81"/><pair kern="-21" kpx2="76"/><pair kern="18" kpx2="181"/><pair kern="-155" kpx2="17"/><pair kern="-17" kpx2="128"/><pair kern="-63" kpx2="173"/><pair kern="-44" kpx2="109"/><pair kern="-160" kpx2="197"/><pair kern="-35" kpx2="121"/><pair kern="-17" kpx2="228"/><pair kern="-44" kpx2="110"/><pair kern="-63" kpx2="174"/><pair kern="-17" kpx2="120"/></kerning><kerning kpx1="104"><pair kern="-17" kpx2="229"/><pair kern="-17" kpx2="61"/></kerning><kerning kpx1="72"><pair kern="-17" kpx2="91"/></kerning><kerning kpx1="199"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="54"><pair kern="18" kpx2="173"/><pair kern="18" kpx2="36"/><pair kern="18" kpx2="201"/><pair kern="18" kpx2="199"/><pair kern="18" kpx2="174"/><pair kern="18" kpx2="98"/></kerning><kerning kpx1="180"><pair kern="-35" kpx2="235"/><pair kern="-35" kpx2="246"/><pair kern="-30" kpx2="43"/><pair kern="-72" kpx2="123"/><pair kern="-35" kpx2="251"/><pair kern="-35" kpx2="208"/><pair kern="-188" kpx2="144"/><pair kern="-58" kpx2="59"/><pair kern="-35" kpx2="73"/><pair kern="-30" kpx2="41"/><pair kern="-72" kpx2="124"/><pair kern="-54" kpx2="85"/><pair kern="-128" kpx2="201"/><pair kern="-17" kpx2="61"/><pair kern="-35" kpx2="100"/><pair kern="-72" kpx2="122"/><pair kern="-30" kpx2="47"/><pair kern="-35" kpx2="210"/><pair kern="-72" kpx2="82"/><pair kern="-35" kpx2="186"/><pair kern="-35" kpx2="175"/><pair kern="-35" kpx2="209"/><pair kern="-35" kpx2="103"/><pair kern="-128" kpx2="98"/><pair kern="-54" kpx2="81"/><pair kern="-17" kpx2="229"/><pair kern="-35" kpx2="38"/><pair kern="-72" kpx2="121"/><pair kern="-30" kpx2="37"/><pair kern="-54" kpx2="120"/><pair kern="-30" kpx2="51"/><pair kern="-128" kpx2="199"/><pair kern="-30" kpx2="53"/><pair kern="-30" kpx2="137"/><pair kern="-35" kpx2="233"/><pair kern="-35" kpx2="253"/><pair kern="-35" kpx2="52"/><pair kern="-72" kpx2="125"/><pair kern="-35" kpx2="42"/><pair kern="-35" kpx2="90"/><pair kern="-128" kpx2="36"/><pair kern="-35" kpx2="50"/><pair kern="-30" kpx2="39"/><pair kern="-30" kpx2="236"/><pair kern="-30" kpx2="45"/><pair kern="-128" kpx2="173"/><pair kern="-35" kpx2="92"/><pair kern="-35" kpx2="89"/><pair kern="-30" kpx2="46"/><pair kern="-128" kpx2="174"/></kerning><kerning kpx1="53"><pair kern="-21" kpx2="107"/><pair kern="-54" kpx2="235"/><pair kern="-40" kpx2="16"/><pair kern="-44" kpx2="112"/><pair kern="-44" kpx2="123"/><pair kern="-49" kpx2="251"/><pair kern="-44" kpx2="113"/><pair kern="-63" kpx2="187"/><pair kern="-44" kpx2="129"/><pair kern="-44" kpx2="124"/><pair kern="-54" kpx2="169"/><pair kern="-63" kpx2="60"/><pair kern="-40" kpx2="201"/><pair kern="-21" kpx2="106"/><pair kern="-30" kpx2="29"/><pair kern="-63" kpx2="234"/><pair kern="-49" kpx2="100"/><pair kern="-44" kpx2="122"/><pair kern="-21" kpx2="68"/><pair kern="-40" kpx2="58"/><pair kern="-44" kpx2="82"/><pair kern="-54" kpx2="186"/><pair kern="-40" kpx2="98"/><pair kern="-63" kpx2="181"/><pair kern="-35" kpx2="17"/><pair kern="-49" kpx2="38"/><pair kern="-44" kpx2="121"/><pair kern="-54" kpx2="57"/><pair kern="-44" kpx2="126"/><pair kern="-44" kpx2="72"/><pair kern="-40" kpx2="199"/><pair kern="-72" kpx2="180"/><pair kern="-21" kpx2="105"/><pair kern="-49" kpx2="253"/><pair kern="-44" kpx2="125"/><pair kern="-44" kpx2="115"/><pair kern="-17" kpx2="170"/><pair kern="-44" kpx2="88"/><pair kern="-40" kpx2="36"/><pair kern="-44" kpx2="114"/><pair kern="-72" kpx2="55"/><pair kern="-44" kpx2="127"/><pair kern="-21" kpx2="108"/><pair kern="-44" kpx2="128"/><pair kern="-40" kpx2="173"/><pair kern="-21" kpx2="109"/><pair kern="-54" kpx2="92"/><pair kern="-17" kpx2="197"/><pair kern="-21" kpx2="110"/><pair kern="-40" kpx2="174"/></kerning><kerning kpx1="137"><pair kern="-54" kpx2="180"/><pair kern="-40" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-54" kpx2="181"/></kerning><kerning kpx1="233"><pair kern="-44" kpx2="180"/><pair kern="-35" kpx2="197"/><pair kern="-54" kpx2="181"/></kerning><kerning kpx1="253"><pair kern="-17" kpx2="169"/><pair kern="-17" kpx2="60"/><pair kern="-17" kpx2="187"/><pair kern="18" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-17" kpx2="234"/></kerning><kerning kpx1="211"><pair kern="-17" kpx2="229"/><pair kern="-17" kpx2="61"/></kerning><kerning kpx1="78"><pair kern="-17" kpx2="107"/><pair kern="-30" kpx2="126"/><pair kern="-35" kpx2="235"/><pair kern="-35" kpx2="72"/><pair kern="-35" kpx2="112"/><pair kern="-35" kpx2="123"/><pair kern="-35" kpx2="113"/><pair kern="-17" kpx2="105"/><pair kern="-30" kpx2="129"/><pair kern="-35" kpx2="124"/><pair kern="-17" kpx2="106"/><pair kern="-35" kpx2="125"/><pair kern="-35" kpx2="115"/><pair kern="-30" kpx2="88"/><pair kern="-35" kpx2="122"/><pair kern="-17" kpx2="68"/><pair kern="-35" kpx2="82"/><pair kern="-35" kpx2="114"/><pair kern="-35" kpx2="186"/><pair kern="-30" kpx2="127"/><pair kern="-17" kpx2="108"/><pair kern="-30" kpx2="128"/><pair kern="-17" kpx2="109"/><pair kern="-35" kpx2="92"/><pair kern="-35" kpx2="121"/><pair kern="-17" kpx2="110"/></kerning><kerning kpx1="52"><pair kern="-21" kpx2="180"/><pair kern="-63" kpx2="197"/><pair kern="27" kpx2="16"/><pair kern="-17" kpx2="181"/></kerning><kerning kpx1="125"><pair kern="-72" kpx2="180"/><pair kern="-17" kpx2="17"/><pair kern="-63" kpx2="197"/><pair kern="18" kpx2="16"/><pair kern="-30" kpx2="91"/><pair kern="-35" kpx2="181"/></kerning><kerning kpx1="42"><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="169"/><pair kern="-26" kpx2="197"/><pair kern="-35" kpx2="55"/><pair kern="-49" kpx2="60"/><pair kern="-49" kpx2="187"/><pair kern="-21" kpx2="181"/><pair kern="-17" kpx2="170"/><pair kern="-49" kpx2="234"/></kerning><kerning kpx1="170"><pair kern="-17" kpx2="235"/><pair kern="-35" kpx2="199"/><pair kern="-17" kpx2="251"/><pair kern="-109" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-54" kpx2="59"/><pair kern="-109" kpx2="60"/><pair kern="-35" kpx2="201"/><pair kern="-17" kpx2="253"/><pair kern="-109" kpx2="234"/><pair kern="-17" kpx2="90"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="210"/><pair kern="-35" kpx2="36"/><pair kern="-54" kpx2="58"/><pair kern="-91" kpx2="55"/><pair kern="-17" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="50"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="-17" kpx2="39"/><pair kern="-35" kpx2="98"/><pair kern="-17" kpx2="45"/><pair kern="-35" kpx2="173"/><pair kern="-17" kpx2="92"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="89"/><pair kern="-86" kpx2="57"/><pair kern="-35" kpx2="37"/><pair kern="-35" kpx2="174"/></kerning><kerning kpx1="115"><pair kern="-17" kpx2="91"/></kerning><kerning kpx1="90"><pair kern="-91" kpx2="17"/><pair kern="-17" kpx2="169"/><pair kern="-104" kpx2="197"/><pair kern="-54" kpx2="29"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="36"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="55"><pair kern="-165" kpx2="107"/><pair kern="-155" kpx2="235"/><pair kern="-91" kpx2="16"/><pair kern="-169" kpx2="112"/><pair kern="-169" kpx2="123"/><pair kern="-58" kpx2="251"/><pair kern="-169" kpx2="113"/><pair kern="-165" kpx2="86"/><pair kern="-151" kpx2="129"/><pair kern="-169" kpx2="124"/><pair kern="-91" kpx2="169"/><pair kern="-169" kpx2="252"/><pair kern="-169" kpx2="70"/><pair kern="-146" kpx2="85"/><pair kern="-77" kpx2="201"/><pair kern="-165" kpx2="106"/><pair kern="-109" kpx2="29"/><pair kern="-58" kpx2="100"/><pair kern="-169" kpx2="122"/><pair kern="-165" kpx2="68"/><pair kern="-169" kpx2="82"/><pair kern="-155" kpx2="186"/><pair kern="-165" kpx2="250"/><pair kern="-77" kpx2="98"/><pair kern="-21" kpx2="181"/><pair kern="-118" kpx2="17"/><pair kern="-58" kpx2="38"/><pair kern="-169" kpx2="121"/><pair kern="-165" kpx2="228"/><pair kern="-169" kpx2="254"/><pair kern="-151" kpx2="126"/><pair kern="-169" kpx2="72"/><pair kern="-77" kpx2="199"/><pair kern="-165" kpx2="105"/><pair kern="-58" kpx2="253"/><pair kern="-169" kpx2="125"/><pair kern="-169" kpx2="115"/><pair kern="-54" kpx2="170"/><pair kern="-151" kpx2="88"/><pair kern="-169" kpx2="111"/><pair kern="-165" kpx2="90"/><pair kern="-77" kpx2="36"/><pair kern="-17" kpx2="55"/><pair kern="-169" kpx2="114"/><pair kern="-151" kpx2="127"/><pair kern="-165" kpx2="108"/><pair kern="-30" kpx2="76"/><pair kern="-151" kpx2="128"/><pair kern="-77" kpx2="173"/><pair kern="-165" kpx2="109"/><pair kern="-155" kpx2="92"/><pair kern="-128" kpx2="197"/><pair kern="-165" kpx2="110"/><pair kern="-77" kpx2="174"/></kerning><kerning kpx1="114"><pair kern="-17" kpx2="91"/></kerning><kerning kpx1="50"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="27" kpx2="16"/><pair kern="-54" kpx2="187"/><pair kern="-17" kpx2="98"/><pair kern="-17" kpx2="181"/><pair kern="-63" kpx2="59"/><pair kern="-40" kpx2="17"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="29"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="91"><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="111"/><pair kern="-30" kpx2="122"/><pair kern="-30" kpx2="82"/><pair kern="-30" kpx2="114"/><pair kern="-30" kpx2="72"/><pair kern="-30" kpx2="112"/><pair kern="-30" kpx2="123"/><pair kern="-30" kpx2="113"/><pair kern="-30" kpx2="124"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-30" kpx2="121"/><pair kern="-30" kpx2="125"/><pair kern="-30" kpx2="115"/></kerning><kerning kpx1="39"><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="199"/><pair kern="-17" kpx2="98"/><pair kern="-54" kpx2="187"/><pair kern="-26" kpx2="181"/><pair kern="-21" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="169"/><pair kern="-91" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-54" kpx2="60"/><pair kern="-17" kpx2="57"/><pair kern="-17" kpx2="174"/><pair kern="-17" kpx2="170"/><pair kern="-54" kpx2="234"/></kerning><kerning kpx1="236"><pair kern="-17" kpx2="180"/><pair kern="-72" kpx2="17"/><pair kern="-91" kpx2="197"/><pair kern="-35" kpx2="29"/></kerning><kerning kpx1="45"><pair kern="-35" kpx2="180"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="36"/><pair kern="-17" kpx2="169"/><pair kern="-54" kpx2="197"/><pair kern="-17" kpx2="201"/><pair kern="-17" kpx2="199"/><pair kern="-35" kpx2="16"/><pair kern="-17" kpx2="174"/><pair kern="-17" kpx2="98"/><pair kern="-30" kpx2="181"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="173"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="197"><pair kern="-35" kpx2="246"/><pair kern="-54" kpx2="235"/><pair kern="-35" kpx2="43"/><pair kern="-35" kpx2="123"/><pair kern="-54" kpx2="251"/><pair kern="-183" kpx2="187"/><pair kern="-54" kpx2="208"/><pair kern="18" kpx2="144"/><pair kern="-35" kpx2="59"/><pair kern="-17" kpx2="73"/><pair kern="-35" kpx2="41"/><pair kern="-35" kpx2="124"/><pair kern="-35" kpx2="85"/><pair kern="-183" kpx2="60"/><pair kern="18" kpx2="201"/><pair kern="-183" kpx2="234"/><pair kern="-54" kpx2="100"/><pair kern="-35" kpx2="122"/><pair kern="-35" kpx2="47"/><pair kern="-54" kpx2="210"/><pair kern="-35" kpx2="82"/><pair kern="-123" kpx2="58"/><pair kern="-54" kpx2="186"/><pair kern="-54" kpx2="175"/><pair kern="-54" kpx2="209"/><pair kern="-54" kpx2="103"/><pair kern="-35" kpx2="81"/><pair kern="18" kpx2="98"/><pair kern="-54" kpx2="38"/><pair kern="-35" kpx2="121"/><pair kern="-183" kpx2="57"/><pair kern="-35" kpx2="37"/><pair kern="-35" kpx2="120"/><pair kern="-35" kpx2="51"/><pair kern="18" kpx2="199"/><pair kern="-35" kpx2="53"/><pair kern="-35" kpx2="137"/><pair kern="-35" kpx2="233"/><pair kern="-54" kpx2="253"/><pair kern="-54" kpx2="52"/><pair kern="-35" kpx2="125"/><pair kern="-35" kpx2="42"/><pair kern="-95" kpx2="90"/><pair kern="18" kpx2="36"/><pair kern="-137" kpx2="55"/><pair kern="-54" kpx2="50"/><pair kern="-35" kpx2="39"/><pair kern="-35" kpx2="236"/><pair kern="22" kpx2="45"/><pair kern="18" kpx2="173"/><pair kern="-54" kpx2="92"/><pair kern="-114" kpx2="89"/><pair kern="-35" kpx2="46"/><pair kern="18" kpx2="174"/></kerning><kerning kpx1="92"><pair kern="-142" kpx2="17"/><pair kern="-17" kpx2="169"/><pair kern="-146" kpx2="197"/><pair kern="-17" kpx2="16"/><pair kern="-72" kpx2="29"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="89"><pair kern="-77" kpx2="17"/><pair kern="-17" kpx2="169"/><pair kern="-132" kpx2="197"/><pair kern="-26" kpx2="16"/><pair kern="-54" kpx2="29"/><pair kern="-17" kpx2="181"/><pair kern="-17" kpx2="170"/></kerning><kerning kpx1="46"><pair kern="-17" kpx2="107"/><pair kern="-72" kpx2="235"/><pair kern="-104" kpx2="16"/><pair kern="-49" kpx2="112"/><pair kern="-49" kpx2="123"/><pair kern="-54" kpx2="251"/><pair kern="-26" kpx2="213"/><pair kern="-49" kpx2="113"/><pair kern="-35" kpx2="187"/><pair kern="-54" kpx2="208"/><pair kern="-49" kpx2="129"/><pair kern="-49" kpx2="124"/><pair kern="-63" kpx2="169"/><pair kern="-35" kpx2="60"/><pair kern="-17" kpx2="201"/><pair kern="-17" kpx2="106"/><pair kern="-35" kpx2="234"/><pair kern="-54" kpx2="100"/><pair kern="-49" kpx2="122"/><pair kern="-17" kpx2="68"/><pair kern="-54" kpx2="210"/><pair kern="-35" kpx2="58"/><pair kern="-49" kpx2="82"/><pair kern="-72" kpx2="186"/><pair kern="-54" kpx2="175"/><pair kern="-54" kpx2="209"/><pair kern="-54" kpx2="103"/><pair kern="-17" kpx2="98"/><pair kern="-30" kpx2="181"/><pair kern="-26" kpx2="212"/><pair kern="-54" kpx2="38"/><pair kern="-49" kpx2="121"/><pair kern="-49" kpx2="126"/><pair kern="-26" kpx2="104"/><pair kern="-49" kpx2="72"/><pair kern="-17" kpx2="199"/><pair kern="-30" kpx2="180"/><pair kern="-17" kpx2="105"/><pair kern="-54" kpx2="253"/><pair kern="-26" kpx2="211"/><pair kern="-49" kpx2="125"/><pair kern="-49" kpx2="115"/><pair kern="-49" kpx2="88"/><pair kern="-17" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-49" kpx2="114"/><pair kern="-54" kpx2="50"/><pair kern="-49" kpx2="127"/><pair kern="-17" kpx2="108"/><pair kern="-49" kpx2="128"/><pair kern="-17" kpx2="173"/><pair kern="-17" kpx2="109"/><pair kern="-72" kpx2="92"/><pair kern="-17" kpx2="110"/><pair kern="-17" kpx2="174"/><pair kern="-26" kpx2="56"/></kerning><kerning kpx1="174"><pair kern="-17" kpx2="246"/><pair kern="-67" kpx2="235"/><pair kern="-21" kpx2="16"/><pair kern="-17" kpx2="112"/><pair kern="-17" kpx2="123"/><pair kern="-17" kpx2="251"/><pair kern="-17" kpx2="113"/><pair kern="-77" kpx2="187"/><pair kern="-17" kpx2="208"/><pair kern="-35" kpx2="73"/><pair kern="-17" kpx2="124"/><pair kern="-35" kpx2="169"/><pair kern="-17" kpx2="252"/><pair kern="-17" kpx2="70"/><pair kern="-77" kpx2="60"/><pair kern="27" kpx2="201"/><pair kern="-17" kpx2="29"/><pair kern="-77" kpx2="234"/><pair kern="-17" kpx2="100"/><pair kern="-17" kpx2="122"/><pair kern="-17" kpx2="210"/><pair kern="-17" kpx2="82"/><pair kern="-54" kpx2="58"/><pair kern="-67" kpx2="186"/><pair kern="-17" kpx2="175"/><pair kern="-17" kpx2="209"/><pair kern="-17" kpx2="103"/><pair kern="27" kpx2="98"/><pair kern="-123" kpx2="181"/><pair kern="-17" kpx2="17"/><pair kern="-17" kpx2="38"/><pair kern="-17" kpx2="84"/><pair kern="-17" kpx2="121"/><pair kern="-63" kpx2="57"/><pair kern="-17" kpx2="254"/><pair kern="-17" kpx2="87"/><pair kern="-17" kpx2="72"/><pair kern="27" kpx2="199"/><pair kern="-17" kpx2="71"/><pair kern="-128" kpx2="180"/><pair kern="-17" kpx2="253"/><pair kern="-17" kpx2="52"/><pair kern="-17" kpx2="125"/><pair kern="-17" kpx2="42"/><pair kern="-17" kpx2="115"/><pair kern="-40" kpx2="90"/><pair kern="-17" kpx2="111"/><pair kern="27" kpx2="36"/><pair kern="-77" kpx2="55"/><pair kern="-17" kpx2="114"/><pair kern="-17" kpx2="50"/><pair kern="27" kpx2="173"/><pair kern="-67" kpx2="92"/><pair kern="22" kpx2="197"/><pair kern="-58" kpx2="89"/><pair kern="27" kpx2="174"/></kerning><kerning kpx1="56"><pair kern="-17" kpx2="229"/><pair kern="-17" kpx2="61"/></kerning></font-metrics> \ No newline at end of file
diff --git a/documentation/template/VeraMoBd.ttf b/documentation/template/VeraMoBd.ttf
new file mode 100644
index 0000000..9be6547
--- /dev/null
+++ b/documentation/template/VeraMoBd.ttf
Binary files differ
diff --git a/documentation/template/VeraMoBd.xml b/documentation/template/VeraMoBd.xml
new file mode 100644
index 0000000..9b33107
--- /dev/null
+++ b/documentation/template/VeraMoBd.xml
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><font-metrics metrics-version="2" type="TYPE0"><font-name>BitstreamVeraSansMono-Bold</font-name><full-name>Bitstream Vera Sans Mono Bold</full-name><family-name>Bitstream Vera Sans Mono</family-name><embed/><cap-height>729</cap-height><x-height>546</x-height><ascender>759</ascender><descender>-240</descender><bbox><left>-19</left><bottom>-235</bottom><right>605</right><top>928</top></bbox><flags>34</flags><stemv>0</stemv><italicangle>0</italicangle><subtype>TYPE0</subtype><multibyte-extras><cid-type>CIDFontType2</cid-type><default-width>0</default-width><bfranges><bf gi="3" ue="126" us="32"/><bf gi="172" ue="160" us="160"/><bf gi="163" ue="161" us="161"/><bf gi="132" ue="163" us="162"/><bf gi="189" ue="164" us="164"/><bf gi="150" ue="165" us="165"/><bf gi="231" ue="166" us="166"/><bf gi="134" ue="167" us="167"/><bf gi="142" ue="168" us="168"/><bf gi="139" ue="169" us="169"/><bf gi="157" ue="170" us="170"/><bf gi="169" ue="171" us="171"/><bf gi="164" ue="172" us="172"/><bf gi="256" ue="173" us="173"/><bf gi="138" ue="174" us="174"/><bf gi="217" ue="175" us="175"/><bf gi="131" ue="176" us="176"/><bf gi="147" ue="177" us="177"/><bf gi="241" ue="179" us="178"/><bf gi="141" ue="180" us="180"/><bf gi="151" ue="181" us="181"/><bf gi="136" ue="182" us="182"/><bf gi="195" ue="183" us="183"/><bf gi="221" ue="184" us="184"/><bf gi="240" ue="185" us="185"/><bf gi="158" ue="186" us="186"/><bf gi="170" ue="187" us="187"/><bf gi="243" ue="190" us="188"/><bf gi="162" ue="191" us="191"/><bf gi="173" ue="192" us="192"/><bf gi="201" ue="193" us="193"/><bf gi="199" ue="194" us="194"/><bf gi="174" ue="195" us="195"/><bf gi="98" ue="197" us="196"/><bf gi="144" ue="198" us="198"/><bf gi="100" ue="199" us="199"/><bf gi="203" ue="200" us="200"/><bf gi="101" ue="201" us="201"/><bf gi="200" ue="202" us="202"/><bf gi="202" ue="203" us="203"/><bf gi="207" ue="204" us="204"/><bf gi="204" ue="207" us="205"/><bf gi="232" ue="208" us="208"/><bf gi="102" ue="209" us="209"/><bf gi="210" ue="210" us="210"/><bf gi="208" ue="212" us="211"/><bf gi="175" ue="213" us="213"/><bf gi="103" ue="214" us="214"/><bf gi="239" ue="215" us="215"/><bf gi="145" ue="216" us="216"/><bf gi="213" ue="217" us="217"/><bf gi="211" ue="219" us="218"/><bf gi="104" ue="220" us="220"/><bf gi="234" ue="221" us="221"/><bf gi="236" ue="222" us="222"/><bf gi="137" ue="223" us="223"/><bf gi="106" ue="224" us="224"/><bf gi="105" ue="225" us="225"/><bf gi="107" ue="226" us="226"/><bf gi="109" ue="227" us="227"/><bf gi="108" ue="228" us="228"/><bf gi="110" ue="229" us="229"/><bf gi="160" ue="230" us="230"/><bf gi="111" ue="231" us="231"/><bf gi="113" ue="232" us="232"/><bf gi="112" ue="233" us="233"/><bf gi="114" ue="235" us="234"/><bf gi="117" ue="236" us="236"/><bf gi="116" ue="237" us="237"/><bf gi="118" ue="239" us="238"/><bf gi="233" ue="240" us="240"/><bf gi="120" ue="241" us="241"/><bf gi="122" ue="242" us="242"/><bf gi="121" ue="243" us="243"/><bf gi="123" ue="244" us="244"/><bf gi="125" ue="245" us="245"/><bf gi="124" ue="246" us="246"/><bf gi="184" ue="247" us="247"/><bf gi="161" ue="248" us="248"/><bf gi="127" ue="249" us="249"/><bf gi="126" ue="250" us="250"/><bf gi="128" ue="252" us="251"/><bf gi="235" ue="253" us="253"/><bf gi="237" ue="254" us="254"/><bf gi="186" ue="255" us="255"/><bf gi="251" ue="263" us="262"/><bf gi="253" ue="269" us="268"/><bf gi="0" ue="270" us="270"/><bf gi="0" ue="271" us="271"/><bf gi="0" ue="272" us="272"/><bf gi="255" ue="273" us="273"/><bf gi="246" ue="287" us="286"/><bf gi="248" ue="304" us="304"/><bf gi="214" ue="305" us="305"/><bf gi="225" ue="322" us="321"/><bf gi="176" ue="339" us="338"/><bf gi="249" ue="351" us="350"/><bf gi="227" ue="353" us="352"/><bf gi="187" ue="376" us="376"/><bf gi="229" ue="382" us="381"/><bf gi="166" ue="402" us="402"/><bf gi="215" ue="710" us="710"/><bf gi="224" ue="711" us="711"/><bf gi="218" ue="730" us="728"/><bf gi="223" ue="731" us="731"/><bf gi="216" ue="732" us="732"/><bf gi="222" ue="733" us="733"/><bf gi="159" ue="937" us="937"/><bf gi="155" ue="960" us="960"/><bf gi="178" ue="8212" us="8211"/><bf gi="0" ue="8213" us="8213"/><bf gi="0" ue="8214" us="8214"/><bf gi="0" ue="8215" us="8215"/><bf gi="182" ue="8217" us="8216"/><bf gi="196" ue="8218" us="8218"/><bf gi="0" ue="8219" us="8219"/><bf gi="180" ue="8221" us="8220"/><bf gi="197" ue="8222" us="8222"/><bf gi="0" ue="8223" us="8223"/><bf gi="130" ue="8224" us="8224"/><bf gi="194" ue="8225" us="8225"/><bf gi="135" ue="8226" us="8226"/><bf gi="0" ue="8227" us="8227"/><bf gi="0" ue="8228" us="8228"/><bf gi="0" ue="8229" us="8229"/><bf gi="171" ue="8230" us="8230"/><bf gi="198" ue="8240" us="8240"/><bf gi="190" ue="8250" us="8249"/><bf gi="258" ue="8364" us="8364"/><bf gi="140" ue="8482" us="8482"/><bf gi="152" ue="8706" us="8706"/><bf gi="0" ue="8707" us="8707"/><bf gi="0" ue="8708" us="8708"/><bf gi="0" ue="8709" us="8709"/><bf gi="168" ue="8710" us="8710"/><bf gi="154" ue="8719" us="8719"/><bf gi="0" ue="8720" us="8720"/><bf gi="153" ue="8721" us="8721"/><bf gi="238" ue="8722" us="8722"/><bf gi="0" ue="8723" us="8723"/><bf gi="0" ue="8724" us="8724"/><bf gi="188" ue="8725" us="8725"/><bf gi="0" ue="8726" us="8726"/><bf gi="0" ue="8727" us="8727"/><bf gi="0" ue="8728" us="8728"/><bf gi="257" ue="8729" us="8729"/><bf gi="165" ue="8730" us="8730"/><bf gi="0" ue="8731" us="8731"/><bf gi="0" ue="8732" us="8732"/><bf gi="0" ue="8733" us="8733"/><bf gi="146" ue="8734" us="8734"/><bf gi="156" ue="8747" us="8747"/><bf gi="167" ue="8776" us="8776"/><bf gi="143" ue="8800" us="8800"/><bf gi="0" ue="8801" us="8801"/><bf gi="0" ue="8802" us="8802"/><bf gi="0" ue="8803" us="8803"/><bf gi="148" ue="8805" us="8804"/><bf gi="185" ue="9674" us="9674"/><bf gi="192" ue="64258" us="64257"/><bf gi="0" ue="65535" us="65535"/></bfranges><cid-widths start-index="0"><wx w="602"/><wx w="0"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/></cid-widths></multibyte-extras></font-metrics> \ No newline at end of file
diff --git a/documentation/template/VeraMono.ttf b/documentation/template/VeraMono.ttf
new file mode 100644
index 0000000..139f0b4
--- /dev/null
+++ b/documentation/template/VeraMono.ttf
Binary files differ
diff --git a/documentation/template/VeraMono.xml b/documentation/template/VeraMono.xml
new file mode 100644
index 0000000..3a0a866
--- /dev/null
+++ b/documentation/template/VeraMono.xml
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8"?><font-metrics metrics-version="2" type="TYPE0"><font-name>BitstreamVeraSansMono-Roman</font-name><full-name>Bitstream Vera Sans Mono</full-name><family-name>Bitstream Vera Sans Mono</family-name><embed/><cap-height>729</cap-height><x-height>546</x-height><ascender>759</ascender><descender>-240</descender><bbox><left>-4</left><bottom>-235</bottom><right>605</right><top>928</top></bbox><flags>34</flags><stemv>0</stemv><italicangle>0</italicangle><subtype>TYPE0</subtype><multibyte-extras><cid-type>CIDFontType2</cid-type><default-width>0</default-width><bfranges><bf gi="3" ue="126" us="32"/><bf gi="172" ue="160" us="160"/><bf gi="163" ue="161" us="161"/><bf gi="132" ue="163" us="162"/><bf gi="189" ue="164" us="164"/><bf gi="150" ue="165" us="165"/><bf gi="231" ue="166" us="166"/><bf gi="134" ue="167" us="167"/><bf gi="142" ue="168" us="168"/><bf gi="139" ue="169" us="169"/><bf gi="157" ue="170" us="170"/><bf gi="169" ue="171" us="171"/><bf gi="164" ue="172" us="172"/><bf gi="256" ue="173" us="173"/><bf gi="138" ue="174" us="174"/><bf gi="217" ue="175" us="175"/><bf gi="131" ue="176" us="176"/><bf gi="147" ue="177" us="177"/><bf gi="241" ue="179" us="178"/><bf gi="141" ue="180" us="180"/><bf gi="151" ue="181" us="181"/><bf gi="136" ue="182" us="182"/><bf gi="195" ue="183" us="183"/><bf gi="221" ue="184" us="184"/><bf gi="240" ue="185" us="185"/><bf gi="158" ue="186" us="186"/><bf gi="170" ue="187" us="187"/><bf gi="243" ue="190" us="188"/><bf gi="162" ue="191" us="191"/><bf gi="173" ue="192" us="192"/><bf gi="201" ue="193" us="193"/><bf gi="199" ue="194" us="194"/><bf gi="174" ue="195" us="195"/><bf gi="98" ue="197" us="196"/><bf gi="144" ue="198" us="198"/><bf gi="100" ue="199" us="199"/><bf gi="203" ue="200" us="200"/><bf gi="101" ue="201" us="201"/><bf gi="200" ue="202" us="202"/><bf gi="202" ue="203" us="203"/><bf gi="207" ue="204" us="204"/><bf gi="204" ue="207" us="205"/><bf gi="232" ue="208" us="208"/><bf gi="102" ue="209" us="209"/><bf gi="210" ue="210" us="210"/><bf gi="208" ue="212" us="211"/><bf gi="175" ue="213" us="213"/><bf gi="103" ue="214" us="214"/><bf gi="239" ue="215" us="215"/><bf gi="145" ue="216" us="216"/><bf gi="213" ue="217" us="217"/><bf gi="211" ue="219" us="218"/><bf gi="104" ue="220" us="220"/><bf gi="234" ue="221" us="221"/><bf gi="236" ue="222" us="222"/><bf gi="137" ue="223" us="223"/><bf gi="106" ue="224" us="224"/><bf gi="105" ue="225" us="225"/><bf gi="107" ue="226" us="226"/><bf gi="109" ue="227" us="227"/><bf gi="108" ue="228" us="228"/><bf gi="110" ue="229" us="229"/><bf gi="160" ue="230" us="230"/><bf gi="111" ue="231" us="231"/><bf gi="113" ue="232" us="232"/><bf gi="112" ue="233" us="233"/><bf gi="114" ue="235" us="234"/><bf gi="117" ue="236" us="236"/><bf gi="116" ue="237" us="237"/><bf gi="118" ue="239" us="238"/><bf gi="233" ue="240" us="240"/><bf gi="120" ue="241" us="241"/><bf gi="122" ue="242" us="242"/><bf gi="121" ue="243" us="243"/><bf gi="123" ue="244" us="244"/><bf gi="125" ue="245" us="245"/><bf gi="124" ue="246" us="246"/><bf gi="184" ue="247" us="247"/><bf gi="161" ue="248" us="248"/><bf gi="127" ue="249" us="249"/><bf gi="126" ue="250" us="250"/><bf gi="128" ue="252" us="251"/><bf gi="235" ue="253" us="253"/><bf gi="237" ue="254" us="254"/><bf gi="186" ue="255" us="255"/><bf gi="251" ue="263" us="262"/><bf gi="253" ue="269" us="268"/><bf gi="0" ue="270" us="270"/><bf gi="0" ue="271" us="271"/><bf gi="0" ue="272" us="272"/><bf gi="255" ue="273" us="273"/><bf gi="246" ue="287" us="286"/><bf gi="248" ue="304" us="304"/><bf gi="214" ue="305" us="305"/><bf gi="225" ue="322" us="321"/><bf gi="176" ue="339" us="338"/><bf gi="249" ue="351" us="350"/><bf gi="227" ue="353" us="352"/><bf gi="187" ue="376" us="376"/><bf gi="229" ue="382" us="381"/><bf gi="166" ue="402" us="402"/><bf gi="215" ue="710" us="710"/><bf gi="224" ue="711" us="711"/><bf gi="218" ue="730" us="728"/><bf gi="223" ue="731" us="731"/><bf gi="216" ue="732" us="732"/><bf gi="222" ue="733" us="733"/><bf gi="159" ue="937" us="937"/><bf gi="155" ue="960" us="960"/><bf gi="178" ue="8212" us="8211"/><bf gi="0" ue="8213" us="8213"/><bf gi="0" ue="8214" us="8214"/><bf gi="0" ue="8215" us="8215"/><bf gi="182" ue="8217" us="8216"/><bf gi="196" ue="8218" us="8218"/><bf gi="0" ue="8219" us="8219"/><bf gi="180" ue="8221" us="8220"/><bf gi="197" ue="8222" us="8222"/><bf gi="0" ue="8223" us="8223"/><bf gi="130" ue="8224" us="8224"/><bf gi="194" ue="8225" us="8225"/><bf gi="135" ue="8226" us="8226"/><bf gi="0" ue="8227" us="8227"/><bf gi="0" ue="8228" us="8228"/><bf gi="0" ue="8229" us="8229"/><bf gi="171" ue="8230" us="8230"/><bf gi="198" ue="8240" us="8240"/><bf gi="190" ue="8250" us="8249"/><bf gi="258" ue="8364" us="8364"/><bf gi="140" ue="8482" us="8482"/><bf gi="152" ue="8706" us="8706"/><bf gi="0" ue="8707" us="8707"/><bf gi="0" ue="8708" us="8708"/><bf gi="0" ue="8709" us="8709"/><bf gi="168" ue="8710" us="8710"/><bf gi="154" ue="8719" us="8719"/><bf gi="0" ue="8720" us="8720"/><bf gi="153" ue="8721" us="8721"/><bf gi="238" ue="8722" us="8722"/><bf gi="0" ue="8723" us="8723"/><bf gi="0" ue="8724" us="8724"/><bf gi="188" ue="8725" us="8725"/><bf gi="0" ue="8726" us="8726"/><bf gi="0" ue="8727" us="8727"/><bf gi="0" ue="8728" us="8728"/><bf gi="257" ue="8729" us="8729"/><bf gi="165" ue="8730" us="8730"/><bf gi="0" ue="8731" us="8731"/><bf gi="0" ue="8732" us="8732"/><bf gi="0" ue="8733" us="8733"/><bf gi="146" ue="8734" us="8734"/><bf gi="156" ue="8747" us="8747"/><bf gi="167" ue="8776" us="8776"/><bf gi="143" ue="8800" us="8800"/><bf gi="0" ue="8801" us="8801"/><bf gi="0" ue="8802" us="8802"/><bf gi="0" ue="8803" us="8803"/><bf gi="148" ue="8805" us="8804"/><bf gi="185" ue="9674" us="9674"/><bf gi="192" ue="64258" us="64257"/><bf gi="0" ue="65535" us="65535"/></bfranges><cid-widths start-index="0"><wx w="602"/><wx w="0"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/><wx w="602"/></cid-widths></multibyte-extras></font-metrics> \ No newline at end of file
diff --git a/documentation/template/draft.png b/documentation/template/draft.png
new file mode 100644
index 0000000..53051a9
--- /dev/null
+++ b/documentation/template/draft.png
Binary files differ
diff --git a/documentation/template/fop-config.xml b/documentation/template/fop-config.xml
new file mode 100644
index 0000000..09cc5ca
--- /dev/null
+++ b/documentation/template/fop-config.xml
@@ -0,0 +1,58 @@
1<fop version="1.0">
2
3 <!-- Strict user configuration -->
4 <strict-configuration>true</strict-configuration>
5
6 <!-- Strict FO validation -->
7 <strict-validation>true</strict-validation>
8
9 <!--
10 Set the baseDir so common/openedhand.svg references in plans still
11 work ok. Note, relative file references to current dir should still work.
12 -->
13 <base>../template</base>
14 <font-base>../template</font-base>
15
16 <!-- Source resolution in dpi (dots/pixels per inch) for determining the
17 size of pixels in SVG and bitmap images, default: 72dpi -->
18 <!-- <source-resolution>72</source-resolution> -->
19 <!-- Target resolution in dpi (dots/pixels per inch) for specifying the
20 target resolution for generated bitmaps, default: 72dpi -->
21 <!-- <target-resolution>72</target-resolution> -->
22
23 <!-- default page-height and page-width, in case
24 value is specified as auto -->
25 <default-page-settings height="11in" width="8.26in"/>
26
27 <!-- <use-cache>false</use-cache> -->
28
29 <renderers>
30 <renderer mime="application/pdf">
31 <fonts>
32 <font metrics-file="VeraMono.xml"
33 kerning="yes"
34 embed-url="VeraMono.ttf">
35 <font-triplet name="veramono" style="normal" weight="normal"/>
36 </font>
37
38 <font metrics-file="VeraMoBd.xml"
39 kerning="yes"
40 embed-url="VeraMoBd.ttf">
41 <font-triplet name="veramono" style="normal" weight="bold"/>
42 </font>
43
44 <font metrics-file="Vera.xml"
45 kerning="yes"
46 embed-url="Vera.ttf">
47 <font-triplet name="verasans" style="normal" weight="normal"/>
48 <font-triplet name="verasans" style="normal" weight="bold"/>
49 <font-triplet name="verasans" style="italic" weight="normal"/>
50 <font-triplet name="verasans" style="italic" weight="bold"/>
51 </font>
52
53 <auto-detect/>
54 </fonts>
55 </renderer>
56 </renderers>
57</fop>
58
diff --git a/documentation/template/ohand-color.svg b/documentation/template/ohand-color.svg
new file mode 100644
index 0000000..e42ff9c
--- /dev/null
+++ b/documentation/template/ohand-color.svg
@@ -0,0 +1,150 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3<svg
4 xmlns:dc="http://purl.org/dc/elements/1.1/"
5 xmlns:cc="http://web.resource.org/cc/"
6 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
7 xmlns:svg="http://www.w3.org/2000/svg"
8 xmlns="http://www.w3.org/2000/svg"
9 xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
10 xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
11 width="141.17999"
12 height="55.34"
13 id="svg2207"
14 sodipodi:version="0.32"
15 inkscape:version="0.45"
16 version="1.0"
17 sodipodi:docname="ohand-color.svg"
18 inkscape:output_extension="org.inkscape.output.svg.inkscape"
19 sodipodi:docbase="/home/mallum/Projects/admin/oh-doc-tools/common"
20 sodipodi:modified="true">
21 <defs
22 id="defs3" />
23 <sodipodi:namedview
24 id="base"
25 pagecolor="#ffffff"
26 bordercolor="#666666"
27 borderopacity="1.0"
28 inkscape:pageopacity="0.0"
29 inkscape:pageshadow="2"
30 inkscape:zoom="1.2"
31 inkscape:cx="160"
32 inkscape:cy="146.21189"
33 inkscape:document-units="mm"
34 inkscape:current-layer="layer1"
35 height="55.34px"
36 width="141.18px"
37 inkscape:window-width="772"
38 inkscape:window-height="581"
39 inkscape:window-x="5"
40 inkscape:window-y="48" />
41 <metadata
42 id="metadata2211">
43 <rdf:RDF>
44 <cc:Work
45 rdf:about="">
46 <dc:format>image/svg+xml</dc:format>
47 <dc:type
48 rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
49 </cc:Work>
50 </rdf:RDF>
51 </metadata>
52 <g
53 inkscape:label="Layer 1"
54 inkscape:groupmode="layer"
55 id="layer1">
56 <g
57 id="g2094"
58 style="fill:#6d6d70;fill-opacity:1"
59 inkscape:export-filename="/home/mallum/Desktop/g2126.png"
60 inkscape:export-xdpi="312.71841"
61 inkscape:export-ydpi="312.71841"
62 transform="matrix(0.5954767,0,0,0.5954767,31.793058,-18.471052)">
63 <g
64 id="g19"
65 style="fill:#6d6d70;fill-opacity:1">
66 <path
67 style="fill:#6d6d70;fill-opacity:1"
68 id="path21"
69 d="M 48.693,50.633 C 40.282,50.633 33.439,57.477 33.439,65.888 L 33.439,81.142 L 41.066,81.142 L 41.066,65.888 C 41.066,61.684 44.486,58.261 48.692,58.261 C 52.897,58.261 56.32,61.684 56.32,65.888 C 56.32,70.093 52.897,73.516 48.692,73.516 C 45.677,73.516 43.065,71.756 41.828,69.211 L 41.828,79.504 C 43.892,80.549 46.224,81.142 48.692,81.142 C 57.103,81.142 63.947,74.3 63.947,65.888 C 63.948,57.477 57.104,50.633 48.693,50.633 z " />
70 </g>
71 <path
72 style="fill:#6d6d70;fill-opacity:1"
73 id="path23"
74 d="M 18.486,50.557 C 26.942,50.557 33.819,57.435 33.819,65.888 C 33.819,74.344 26.942,81.223 18.486,81.223 C 10.032,81.223 3.152,74.344 3.152,65.888 C 3.152,57.435 10.032,50.557 18.486,50.557 z M 18.486,73.556 C 22.713,73.556 26.153,70.118 26.153,65.888 C 26.153,61.661 22.713,58.222 18.486,58.222 C 14.258,58.222 10.819,61.661 10.819,65.888 C 10.82,70.117 14.259,73.556 18.486,73.556 z " />
75 <path
76 style="fill:#6d6d70;fill-opacity:1"
77 id="path25"
78 d="M 94.074,107.465 L 94.074,96.016 C 94.074,87.605 87.233,80.763 78.822,80.763 C 70.41,80.763 63.567,87.605 63.567,96.016 C 63.567,104.427 70.41,111.269 78.822,111.269 C 81.289,111.269 83.621,110.676 85.685,109.631 L 85.685,99.339 C 84.448,101.885 81.836,103.644 78.822,103.644 C 74.615,103.644 71.194,100.221 71.194,96.016 C 71.194,91.81 74.615,88.388 78.822,88.388 C 83.026,88.388 86.448,91.81 86.448,96.016 L 86.448,107.456 C 86.448,109.562 88.156,111.268 90.262,111.268 C 92.364,111.269 94.068,109.566 94.074,107.465 z " />
79 <path
80 style="fill:#6d6d70;fill-opacity:1"
81 id="path27"
82 d="M 124.197,95.814 C 124.088,87.496 117.293,80.762 108.949,80.762 C 100.59,80.762 93.783,87.52 93.697,95.856 L 93.693,95.856 L 93.695,107.456 C 93.695,109.562 95.402,111.268 97.509,111.268 C 99.611,111.268 101.316,109.566 101.321,107.464 L 101.321,95.994 L 101.321,95.994 C 101.333,91.798 104.747,88.388 108.948,88.388 C 113.147,88.388 116.563,91.798 116.575,95.994 L 116.575,107.456 C 116.575,109.562 118.282,111.268 120.387,111.268 C 122.492,111.268 124.201,109.562 124.201,107.456 L 124.201,95.814 L 124.197,95.814 z " />
83 <path
84 style="fill:#6d6d70;fill-opacity:1"
85 id="path29"
86 d="M 63.946,96.005 L 63.946,95.854 L 63.943,95.854 L 63.943,95.815 L 63.942,95.815 C 63.833,87.497 57.037,80.761 48.693,80.761 C 48.682,80.761 48.671,80.763 48.658,80.763 C 48.382,80.763 48.107,80.772 47.833,80.786 C 47.75,80.791 47.668,80.799 47.586,80.806 C 47.378,80.822 47.172,80.838 46.968,80.862 C 46.884,80.873 46.801,80.882 46.719,80.893 C 46.508,80.92 46.298,80.952 46.091,80.987 C 46.024,80.999 45.958,81.01 45.891,81.024 C 45.649,81.068 45.406,81.119 45.168,81.175 C 45.14,81.183 45.112,81.189 45.085,81.195 C 43.656,81.542 42.306,82.092 41.065,82.812 L 41.065,80.761 L 33.438,80.761 L 33.438,95.857 L 33.435,95.857 L 33.435,107.457 C 33.435,109.563 35.142,111.269 37.248,111.269 C 39.093,111.269 40.632,109.958 40.984,108.217 C 41.036,107.963 41.065,107.702 41.065,107.435 L 41.065,95.873 C 41.086,94.732 41.357,93.65 41.828,92.685 L 41.828,92.693 C 42.598,91.106 43.905,89.824 45.511,89.085 C 45.519,89.08 45.529,89.076 45.536,89.073 C 45.849,88.928 46.174,88.807 46.508,88.707 C 46.523,88.704 46.536,88.699 46.55,88.696 C 46.699,88.651 46.85,88.614 47.004,88.576 C 47.025,88.575 47.046,88.567 47.069,88.562 C 47.234,88.527 47.402,88.495 47.572,88.469 C 47.586,88.468 47.6,88.466 47.615,88.463 C 47.763,88.443 47.916,88.427 48.067,88.415 C 48.106,88.41 48.145,88.407 48.186,88.404 C 48.352,88.393 48.52,88.386 48.691,88.386 C 52.888,88.387 56.304,91.797 56.316,95.992 L 56.316,107.454 C 56.316,109.56 58.023,111.266 60.13,111.266 C 61.976,111.266 63.516,109.954 63.867,108.211 C 63.919,107.963 63.946,107.706 63.946,107.442 L 63.946,96.024 C 63.946,96.021 63.947,96.018 63.947,96.015 C 63.948,96.011 63.946,96.008 63.946,96.005 z " />
87 <path
88 style="fill:#6d6d70;fill-opacity:1"
89 id="path31"
90 d="M 180.644,50.633 C 178.539,50.633 176.832,52.341 176.832,54.447 L 176.832,65.887 C 176.832,70.092 173.41,73.513 169.203,73.513 C 164.998,73.513 161.576,70.092 161.576,65.887 C 161.576,61.683 164.998,58.26 169.203,58.26 C 172.219,58.26 174.83,60.019 176.068,62.565 L 176.068,52.271 C 174.004,51.225 171.673,50.632 169.203,50.632 C 160.793,50.632 153.951,57.476 153.951,65.887 C 153.951,74.298 160.793,81.141 169.203,81.141 C 177.615,81.141 184.459,74.298 184.459,65.887 L 184.459,54.447 C 184.458,52.341 182.751,50.633 180.644,50.633 z " />
91 <path
92 style="fill:#6d6d70;fill-opacity:1"
93 id="path33"
94 d="M 124.203,77.339 L 124.203,65.687 L 124.197,65.687 C 124.088,57.371 117.293,50.633 108.949,50.633 C 100.592,50.633 93.783,57.393 93.697,65.731 L 93.695,65.731 L 93.695,65.877 C 93.695,65.882 93.693,65.885 93.693,65.888 C 93.693,65.891 93.695,65.896 93.695,65.899 L 93.695,77.33 C 93.695,79.435 95.402,81.142 97.509,81.142 C 99.614,81.142 101.321,79.435 101.321,77.33 L 101.321,65.868 C 101.333,61.672 104.747,58.261 108.948,58.261 C 113.147,58.261 116.563,61.672 116.575,65.868 L 116.575,65.868 L 116.575,77.329 C 116.575,79.434 118.282,81.141 120.389,81.141 C 122.492,81.142 124.197,79.44 124.203,77.339 z " />
95 <path
96 style="fill:#6d6d70;fill-opacity:1"
97 id="path35"
98 d="M 150.517,80.761 C 148.41,80.761 146.703,82.469 146.703,84.575 L 146.703,96.015 C 146.703,100.22 143.283,103.643 139.076,103.643 C 134.871,103.643 131.449,100.22 131.449,96.015 C 131.449,91.808 134.871,88.387 139.076,88.387 C 142.092,88.387 144.703,90.145 145.941,92.692 L 145.941,82.397 C 143.875,81.353 141.545,80.76 139.076,80.76 C 130.666,80.76 123.822,87.604 123.822,96.015 C 123.822,104.426 130.666,111.268 139.076,111.268 C 147.486,111.268 154.33,104.426 154.33,96.015 L 154.33,84.575 C 154.33,82.469 152.623,80.761 150.517,80.761 z " />
99 <path
100 style="fill:#6d6d70;fill-opacity:1"
101 id="path37"
102 d="M 82.625,77.345 C 82.625,75.247 80.923,73.547 78.826,73.547 L 78.826,81.142 C 80.922,81.142 82.625,79.442 82.625,77.345 z " />
103 <path
104 style="fill:#6d6d70;fill-opacity:1"
105 id="path39"
106 d="M 90.252,69.685 C 92.35,69.685 94.048,67.987 94.048,65.888 L 86.453,65.888 C 86.453,67.986 88.154,69.685 90.252,69.685 z " />
107 <path
108 style="fill:#6d6d70;fill-opacity:1"
109 id="path41"
110 d="M 93.832,77.329 C 93.832,75.223 92.125,73.516 90.018,73.516 L 78.825,73.516 C 74.619,73.516 71.199,70.093 71.199,65.888 C 71.199,61.684 74.619,58.261 78.825,58.261 C 83.032,58.261 86.453,61.684 86.453,65.888 C 86.453,68.904 84.694,71.514 82.149,72.752 L 92.442,72.752 C 93.488,70.689 94.08,68.356 94.08,65.888 C 94.08,57.477 87.237,50.633 78.826,50.633 C 70.415,50.633 63.571,57.477 63.571,65.888 C 63.571,74.3 70.415,81.142 78.826,81.142 L 90.018,81.142 C 92.125,81.142 93.832,79.435 93.832,77.329 z " />
111 <path
112 style="fill:#6d6d70;fill-opacity:1"
113 id="path43"
114 d="M 142.869,77.345 C 142.869,75.247 141.168,73.547 139.07,73.547 L 139.07,81.142 C 141.167,81.142 142.869,79.442 142.869,77.345 z " />
115 <path
116 style="fill:#6d6d70;fill-opacity:1"
117 id="path45"
118 d="M 150.496,69.685 C 152.594,69.685 154.293,67.987 154.293,65.888 L 146.699,65.888 C 146.699,67.986 148.398,69.685 150.496,69.685 z " />
119 <path
120 style="fill:#6d6d70;fill-opacity:1"
121 id="path47"
122 d="M 154.076,77.329 C 154.076,75.223 152.367,73.516 150.262,73.516 L 139.07,73.516 C 134.865,73.516 131.443,70.093 131.443,65.888 C 131.443,61.684 134.865,58.261 139.07,58.261 C 143.275,58.261 146.699,61.684 146.699,65.888 C 146.699,68.904 144.939,71.514 142.392,72.752 L 152.687,72.752 C 153.73,70.689 154.324,68.356 154.324,65.888 C 154.324,57.477 147.48,50.633 139.07,50.633 C 130.66,50.633 123.816,57.477 123.816,65.888 C 123.816,74.3 130.66,81.142 139.07,81.142 L 150.261,81.142 C 152.367,81.142 154.076,79.435 154.076,77.329 z " />
123 </g>
124 <g
125 id="g2126"
126 transform="matrix(0.7679564,0,0,0.7679564,-66.520631,11.42903)"
127 inkscape:export-xdpi="312.71841"
128 inkscape:export-ydpi="312.71841"
129 style="fill:#35992a;fill-opacity:1">
130 <g
131 transform="translate(86.33975,4.23985e-2)"
132 style="fill:#35992a;fill-opacity:1"
133 id="g2114">
134 <g
135 style="fill:#35992a;fill-opacity:1"
136 id="g2116">
137 <path
138 id="path2118"
139 transform="translate(-86.33975,-4.239934e-2)"
140 d="M 89.96875,0.03125 C 87.962748,0.031250001 86.34375,1.6815001 86.34375,3.6875 L 86.34375,17.71875 L 86.34375,19.6875 L 86.34375,28.90625 C 86.343752,39.06825 94.61925,47.34375 104.78125,47.34375 L 113.375,47.34375 L 123.1875,47.34375 L 127.15625,47.34375 C 129.16325,47.343749 130.8125,45.72475 130.8125,43.71875 C 130.8125,41.71275 129.16325,40.09375 127.15625,40.09375 L 123.1875,40.09375 L 123.1875,19.6875 L 123.1875,14.65625 L 123.1875,3.6875 C 123.1875,1.6815 121.5675,0.03125 119.5625,0.03125 C 117.5555,0.031250001 115.9375,1.6815001 115.9375,3.6875 L 115.9375,14.28125 C 115.1185,13.65425 114.26275,13.109 113.34375,12.625 L 113.34375,3.6875 C 113.34475,1.6815 111.6925,0.03125 109.6875,0.03125 C 107.6825,0.031250001 106.0625,1.6815001 106.0625,3.6875 L 106.0625,10.5625 C 105.6305,10.5325 105.22025,10.5 104.78125,10.5 C 104.34125,10.5 103.90075,10.5325 103.46875,10.5625 L 103.46875,3.6875 C 103.46975,1.6815 101.84975,0.03125 99.84375,0.03125 C 97.837749,0.031250001 96.21875,1.6815001 96.21875,3.6875 L 96.21875,12.625 C 95.299754,13.109 94.41375,13.65425 93.59375,14.28125 L 93.59375,3.6875 C 93.59475,1.6815 91.97475,0.03125 89.96875,0.03125 z M 104.78125,14.34375 C 112.80825,14.34375 119.3125,20.87925 119.3125,28.90625 C 119.3125,36.93325 112.80825,43.46875 104.78125,43.46875 C 96.754254,43.46875 90.21875,36.93425 90.21875,28.90625 C 90.218752,20.87825 96.753253,14.34375 104.78125,14.34375 z "
141 style="fill:#35992a;fill-opacity:1" />
142 </g>
143 </g>
144 <path
145 style="fill:#35992a;fill-opacity:1"
146 id="path2122"
147 d="M 112.04875,28.913399 C 112.04875,24.899399 108.78275,21.634399 104.76975,21.634399 C 100.75675,21.634399 97.490753,24.900399 97.490753,28.913399 C 97.490753,32.926399 100.75675,36.192399 104.76975,36.192399 C 108.78275,36.192399 112.04875,32.927399 112.04875,28.913399 z " />
148 </g>
149 </g>
150</svg>
diff --git a/documentation/template/poky-db-pdf.xsl b/documentation/template/poky-db-pdf.xsl
new file mode 100644
index 0000000..f8a3df1
--- /dev/null
+++ b/documentation/template/poky-db-pdf.xsl
@@ -0,0 +1,64 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/fo/docbook.xsl" />
5
6 <!-- check project-plan.sh for how this is generated, needed to tweak
7 the cover page
8 -->
9 <xsl:include href="/tmp/titlepage.xsl"/>
10
11 <!-- To force a page break in document, i.e per section add a
12 <?hard-pagebreak?> tag.
13 -->
14 <xsl:template match="processing-instruction('hard-pagebreak')">
15 <fo:block break-before='page' />
16 </xsl:template>
17
18 <!--Fix for defualt indent getting TOC all wierd..
19 See http://sources.redhat.com/ml/docbook-apps/2005-q1/msg00455.html
20 FIXME: must be a better fix
21 -->
22 <xsl:param name="body.start.indent" select="'0'"/>
23 <!--<xsl:param name="title.margin.left" select="'0'"/>-->
24
25 <!-- stop long-ish header titles getting wrapped -->
26 <xsl:param name="header.column.widths">1 10 1</xsl:param>
27
28 <!-- customise headers and footers a little -->
29
30 <xsl:template name="head.sep.rule">
31 <xsl:if test="$header.rule != 0">
32 <xsl:attribute name="border-bottom-width">0.5pt</xsl:attribute>
33 <xsl:attribute name="border-bottom-style">solid</xsl:attribute>
34 <xsl:attribute name="border-bottom-color">#999999</xsl:attribute>
35 </xsl:if>
36 </xsl:template>
37
38 <xsl:template name="foot.sep.rule">
39 <xsl:if test="$footer.rule != 0">
40 <xsl:attribute name="border-top-width">0.5pt</xsl:attribute>
41 <xsl:attribute name="border-top-style">solid</xsl:attribute>
42 <xsl:attribute name="border-top-color">#999999</xsl:attribute>
43 </xsl:if>
44 </xsl:template>
45
46 <xsl:attribute-set name="header.content.properties">
47 <xsl:attribute name="color">#999999</xsl:attribute>
48 </xsl:attribute-set>
49
50 <xsl:attribute-set name="footer.content.properties">
51 <xsl:attribute name="color">#999999</xsl:attribute>
52 </xsl:attribute-set>
53
54
55 <!-- general settings -->
56
57 <xsl:param name="fop1.extensions" select="1"></xsl:param>
58 <xsl:param name="paper.type" select="'A4'"></xsl:param>
59 <xsl:param name="section.autolabel" select="1"></xsl:param>
60 <xsl:param name="body.font.family" select="'verasans'"></xsl:param>
61 <xsl:param name="title.font.family" select="'verasans'"></xsl:param>
62 <xsl:param name="monospace.font.family" select="'veramono'"></xsl:param>
63
64</xsl:stylesheet>
diff --git a/documentation/template/poky-ref-manual.png b/documentation/template/poky-ref-manual.png
new file mode 100644
index 0000000..2085edb
--- /dev/null
+++ b/documentation/template/poky-ref-manual.png
Binary files differ
diff --git a/documentation/template/poky.svg b/documentation/template/poky.svg
new file mode 100644
index 0000000..a4ea5e2
--- /dev/null
+++ b/documentation/template/poky.svg
@@ -0,0 +1,163 @@
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2<!-- Created with Inkscape (http://www.inkscape.org/) -->
3<svg
4 xmlns:svg="http://www.w3.org/2000/svg"
5 xmlns="http://www.w3.org/2000/svg"
6 version="1.0"
7 width="158.56076"
8 height="79.284424"
9 viewBox="-40.981 -92.592 300 300"
10 id="svg2"
11 xml:space="preserve">
12<defs
13 id="defs4">
14</defs>
15<path
16 d="M -36.585379,54.412576 L -36.585379,54.421305 L -36.582469,54.421305 L -36.582469,54.243829 C -36.57956,54.302018 -36.585379,54.357297 -36.585379,54.412576 z "
17 style="fill:#6ac7bd"
18 id="path6" />
19<g
20 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
21 style="opacity:0.65"
22 id="g8">
23 <g
24 id="g10">
25 <path
26 d="M 24.482,23.998 L 24.482,23.995 C 10.961,23.994 0,34.955 0,48.476 L 0.001,48.479 L 0.001,48.482 C 0.003,62.001 10.962,72.96 24.482,72.96 L 24.482,72.96 L 0,72.96 L 0,97.442 L 0.003,97.442 C 13.523,97.44 24.482,86.48 24.482,72.961 L 24.485,72.961 C 38.005,72.959 48.963,62 48.963,48.479 L 48.963,48.476 C 48.962,34.957 38.001,23.998 24.482,23.998 z M 24.482,50.928 C 23.13,50.928 22.034,49.832 22.034,48.48 C 22.034,47.128 23.13,46.032 24.482,46.032 C 25.834,46.032 26.93,47.128 26.93,48.48 C 26.93,49.832 25.834,50.928 24.482,50.928 z "
27 style="fill:#ef412a"
28 id="path12" />
29 </g>
30</g>
31<g
32 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
33 style="opacity:0.65"
34 id="g14">
35 <g
36 id="g16">
37 <path
38 d="M 119.96,48.842 C 120.024,47.548 121.086,46.516 122.397,46.516 C 123.707,46.516 124.768,47.548 124.833,48.843 C 137.211,47.62 146.879,37.181 146.879,24.483 L 122.397,24.483 C 122.396,10.961 111.435,0 97.915,0 L 97.915,24.485 C 97.917,37.183 107.584,47.619 119.96,48.842 z M 124.833,49.084 C 124.769,50.379 123.707,51.411 122.397,51.411 L 122.396,51.411 L 122.396,73.444 L 146.878,73.444 L 146.878,73.441 C 146.876,60.745 137.208,50.308 124.833,49.084 z M 119.949,48.963 L 97.915,48.963 L 97.915,73.442 L 97.915,73.442 C 110.613,73.442 121.052,63.774 122.275,51.399 C 120.981,51.334 119.949,50.274 119.949,48.963 z "
39 style="fill:#a9c542"
40 id="path18" />
41 </g>
42</g>
43<g
44 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
45 style="opacity:0.65"
46 id="g20">
47 <g
48 id="g22">
49 <path
50 d="M 168.912,48.967 C 168.912,47.656 169.945,46.596 171.24,46.531 C 170.018,34.152 159.579,24.482 146.879,24.482 L 146.879,48.963 C 146.879,62.484 157.84,73.444 171.361,73.444 L 171.361,51.414 C 170.007,51.415 168.912,50.319 168.912,48.967 z M 195.841,48.978 C 195.841,48.973 195.842,48.969 195.842,48.964 L 195.842,24.482 L 195.838,24.482 C 183.14,24.484 172.702,34.154 171.482,46.531 C 172.776,46.595 173.808,47.656 173.808,48.967 C 173.808,50.278 172.776,51.339 171.481,51.403 C 172.679,63.59 182.814,73.146 195.244,73.445 L 171.361,73.445 L 171.361,97.927 L 171.364,97.927 C 184.879,97.925 195.834,86.973 195.842,73.46 L 195.844,73.46 L 195.844,48.979 L 195.841,48.978 z M 195.832,48.964 L 195.842,48.964 L 195.842,48.978 L 195.832,48.964 z "
51 style="fill:#f9c759"
52 id="path24" />
53 </g>
54</g>
55<g
56 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
57 style="opacity:0.65"
58 id="g26">
59 <g
60 id="g28">
61 <path
62 d="M 70.994,48.479 L 48.962,48.479 L 48.962,48.481 L 70.995,48.481 C 70.995,48.481 70.994,48.48 70.994,48.479 z M 73.44,24.001 L 73.437,24.001 L 73.437,46.032 C 73.439,46.032 73.44,46.032 73.442,46.032 C 74.794,46.032 75.89,47.128 75.89,48.48 C 75.89,49.832 74.794,50.928 73.442,50.928 C 72.091,50.928 70.996,49.834 70.994,48.483 L 48.958,48.483 L 48.958,48.486 C 48.96,62.005 59.919,72.964 73.437,72.964 C 86.955,72.964 97.914,62.005 97.916,48.486 L 97.916,48.483 C 97.916,34.963 86.958,24.003 73.44,24.001 z "
63 style="fill:#6ac7bd"
64 id="path30" />
65 </g>
66</g>
67<g
68 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
69 style="opacity:0.65"
70 id="g32">
71 <g
72 id="g34">
73 <path
74 d="M 24.482,23.998 L 24.482,23.995 C 10.961,23.994 0,34.955 0,48.476 L 22.034,48.476 C 22.036,47.125 23.131,46.031 24.482,46.031 C 25.834,46.031 26.93,47.127 26.93,48.479 C 26.93,49.831 25.834,50.927 24.482,50.927 L 24.482,72.937 C 24.469,59.427 13.514,48.479 0,48.479 L 0,72.96 L 24.481,72.96 L 24.481,72.96 L 0,72.96 L 0,97.442 L 0.003,97.442 C 13.523,97.44 24.482,86.48 24.482,72.961 L 24.485,72.961 C 38.005,72.959 48.963,62 48.963,48.479 L 48.963,48.476 C 48.962,34.957 38.001,23.998 24.482,23.998 z "
75 style="fill:#ef412a"
76 id="path36" />
77 </g>
78</g>
79<g
80 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
81 style="opacity:0.65"
82 id="g38">
83 <g
84 id="g40">
85 <path
86 d="M 122.397,46.516 C 123.707,46.516 124.768,47.548 124.833,48.843 C 137.211,47.62 146.879,37.181 146.879,24.483 L 122.397,24.483 L 122.397,46.516 L 122.397,46.516 z M 97.915,0 L 97.915,24.482 L 122.396,24.482 C 122.396,10.961 111.435,0 97.915,0 z M 122.275,46.528 C 121.052,34.151 110.613,24.482 97.914,24.482 L 97.914,48.964 L 97.914,48.964 L 97.914,73.443 L 97.914,73.443 C 110.612,73.443 121.051,63.775 122.274,51.4 C 120.98,51.335 119.948,50.275 119.948,48.964 C 119.949,47.653 120.98,46.593 122.275,46.528 z M 124.833,49.084 C 124.769,50.379 123.707,51.411 122.397,51.411 L 122.396,51.411 L 122.396,73.444 L 146.878,73.444 L 146.878,73.441 C 146.876,60.745 137.208,50.308 124.833,49.084 z "
87 style="fill:#a9c542"
88 id="path42" />
89 </g>
90</g>
91<g
92 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
93 style="opacity:0.65"
94 id="g44">
95 <g
96 id="g46">
97 <path
98 d="M 173.795,49.1 C 173.724,50.389 172.666,51.415 171.36,51.415 C 170.006,51.415 168.911,50.319 168.911,48.967 C 168.911,47.656 169.944,46.596 171.239,46.531 C 170.017,34.152 159.578,24.482 146.878,24.482 L 146.878,48.963 C 146.878,62.484 157.839,73.444 171.36,73.444 L 171.36,97.926 L 171.363,97.926 C 184.878,97.924 195.833,86.972 195.841,73.459 L 195.842,73.459 L 195.842,73.443 L 195.841,73.443 C 195.833,60.753 186.167,50.322 173.795,49.1 z M 195.838,24.482 C 183.14,24.484 172.702,34.154 171.482,46.531 C 172.775,46.595 173.806,47.655 173.808,48.964 L 195.841,48.964 L 195.841,48.979 C 195.841,48.974 195.842,48.969 195.842,48.964 L 195.842,24.482 L 195.838,24.482 z "
99 style="fill:#f9c759"
100 id="path48" />
101 </g>
102</g>
103<g
104 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
105 style="opacity:0.65"
106 id="g50">
107 <g
108 id="g52">
109 <path
110 d="M 71.007,48.347 C 71.075,47.105 72.062,46.117 73.304,46.046 C 72.509,38.02 67.85,31.133 61.201,27.284 C 57.601,25.2 53.424,24 48.965,24 L 48.962,24 C 48.962,28.46 50.161,32.638 52.245,36.24 C 56.093,42.891 62.98,47.552 71.007,48.347 z M 48.962,48.418 C 48.962,48.438 48.961,48.456 48.961,48.476 L 48.961,48.479 L 48.962,48.479 L 48.962,48.418 z M 70.995,48.482 C 70.995,48.481 70.995,48.481 70.995,48.48 L 48.962,48.48 L 48.962,48.482 L 70.995,48.482 z M 73.44,24.001 L 73.437,24.001 L 73.437,46.032 C 73.439,46.032 73.44,46.032 73.442,46.032 C 74.794,46.032 75.89,47.128 75.89,48.48 C 75.89,49.832 74.794,50.928 73.442,50.928 C 72.091,50.928 70.996,49.834 70.994,48.483 L 48.958,48.483 L 48.958,48.486 C 48.96,62.005 59.919,72.964 73.437,72.964 C 86.955,72.964 97.914,62.005 97.916,48.486 L 97.916,48.483 C 97.916,34.963 86.958,24.003 73.44,24.001 z "
111 style="fill:#6ac7bd"
112 id="path54" />
113 </g>
114</g>
115<g
116 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
117 style="opacity:0.65"
118 id="g56">
119 <g
120 id="g58">
121 <path
122 d="M 24.482,23.998 L 24.482,23.995 C 10.961,23.994 0,34.955 0,48.476 L 22.034,48.476 C 22.036,47.125 23.131,46.031 24.482,46.031 C 25.834,46.031 26.93,47.127 26.93,48.479 C 26.93,49.831 25.834,50.927 24.482,50.927 C 23.171,50.927 22.11,49.894 22.046,48.6 C 9.669,49.824 0.001,60.262 0.001,72.96 L 0,72.96 L 0,97.442 L 0.003,97.442 C 13.523,97.44 24.482,86.48 24.482,72.961 L 24.485,72.961 C 38.005,72.959 48.963,62 48.963,48.479 L 48.963,48.476 C 48.962,34.957 38.001,23.998 24.482,23.998 z "
123 style="fill:#ef412a"
124 id="path60" />
125 </g>
126</g>
127<g
128 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
129 style="opacity:0.65"
130 id="g62">
131 <g
132 id="g64">
133 <path
134 d="M 119.949,48.963 C 119.949,47.611 121.045,46.515 122.397,46.515 C 123.707,46.515 124.768,47.547 124.833,48.842 C 137.211,47.619 146.879,37.18 146.879,24.482 L 122.397,24.482 C 122.396,10.961 111.435,0 97.915,0 L 97.915,24.482 L 122.394,24.482 C 108.874,24.484 97.916,35.444 97.916,48.963 L 97.916,48.963 L 97.916,73.442 L 97.916,73.442 C 110.614,73.442 121.053,63.774 122.276,51.399 C 120.981,51.334 119.949,50.274 119.949,48.963 z M 124.833,49.084 C 124.769,50.379 123.707,51.411 122.397,51.411 L 122.396,51.411 L 122.396,73.444 L 146.878,73.444 L 146.878,73.441 C 146.876,60.745 137.208,50.308 124.833,49.084 z "
135 style="fill:#a9c542"
136 id="path66" />
137 </g>
138</g>
139<g
140 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
141 style="opacity:0.65"
142 id="g68">
143 <g
144 id="g70">
145 <path
146 d="M 195.841,48.979 L 195.835,48.964 L 195.841,48.964 L 195.841,48.979 C 195.841,48.974 195.842,48.969 195.842,48.964 L 195.842,24.482 L 195.838,24.482 C 183.14,24.484 172.702,34.154 171.482,46.531 C 172.776,46.595 173.808,47.656 173.808,48.967 C 173.808,50.319 172.712,51.415 171.361,51.415 C 170.007,51.415 168.912,50.319 168.912,48.967 C 168.912,47.656 169.945,46.596 171.24,46.531 C 170.018,34.152 159.579,24.482 146.879,24.482 L 146.879,48.963 C 146.879,62.484 157.84,73.444 171.361,73.444 L 171.361,97.926 L 171.364,97.926 C 184.883,97.924 195.843,86.963 195.843,73.444 L 171.959,73.444 C 185.203,73.126 195.841,62.299 195.841,48.979 z "
147 style="fill:#f9c759"
148 id="path72" />
149 </g>
150</g>
151<g
152 transform="matrix(2.9094193,0,0,2.9094193,-179.03055,-86.624435)"
153 style="opacity:0.65"
154 id="g74">
155 <g
156 id="g76">
157 <path
158 d="M 73.44,24.001 L 73.437,24.001 C 59.919,24.003 48.96,34.959 48.958,48.476 L 48.958,48.479 L 48.961,48.479 L 48.961,48.481 L 48.957,48.482 L 48.957,48.485 C 48.959,62.004 59.918,72.963 73.436,72.963 C 86.954,72.963 97.913,62.004 97.915,48.485 L 97.915,48.482 C 97.916,34.963 86.958,24.003 73.44,24.001 z M 73.442,50.928 C 72.09,50.928 70.994,49.832 70.994,48.48 C 70.994,47.128 72.09,46.032 73.442,46.032 C 74.794,46.032 75.89,47.128 75.89,48.48 C 75.89,49.832 74.794,50.928 73.442,50.928 z "
159 style="fill:#6ac7bd"
160 id="path78" />
161 </g>
162</g>
163</svg> \ No newline at end of file
diff --git a/documentation/template/titlepage.templates.xml b/documentation/template/titlepage.templates.xml
new file mode 100644
index 0000000..f53f147
--- /dev/null
+++ b/documentation/template/titlepage.templates.xml
@@ -0,0 +1,1227 @@
1<!DOCTYPE t:templates [
2<!ENTITY hsize0 "10pt">
3<!ENTITY hsize1 "12pt">
4<!ENTITY hsize2 "14.4pt">
5<!ENTITY hsize3 "17.28pt">
6<!ENTITY hsize4 "20.736pt">
7<!ENTITY hsize5 "24.8832pt">
8<!ENTITY hsize0space "7.5pt"> <!-- 0.75 * hsize0 -->
9<!ENTITY hsize1space "9pt"> <!-- 0.75 * hsize1 -->
10<!ENTITY hsize2space "10.8pt"> <!-- 0.75 * hsize2 -->
11<!ENTITY hsize3space "12.96pt"> <!-- 0.75 * hsize3 -->
12<!ENTITY hsize4space "15.552pt"> <!-- 0.75 * hsize4 -->
13<!ENTITY hsize5space "18.6624pt"> <!-- 0.75 * hsize5 -->
14]>
15<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
16 xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
17 xmlns:fo="http://www.w3.org/1999/XSL/Format"
18 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
19
20<!-- ********************************************************************
21 $Id: titlepage.templates.xml,v 1.23 2003/12/16 00:30:49 bobstayton Exp $
22 ********************************************************************
23
24 This file is part of the DocBook XSL Stylesheet distribution.
25 See ../README or http://docbook.sf.net/ for copyright
26 and other information.
27
28 ******************************************************************** -->
29
30<!-- ==================================================================== -->
31
32<t:titlepage t:element="article" t:wrapper="fo:block"
33 font-family="{$title.fontset}">
34
35 <t:titlepage-content t:side="recto"
36 text-align="center">
37
38 <mediaobject/>
39
40 <title t:named-template="component.title"
41 param:node="ancestor-or-self::article[1]"
42 keep-with-next="always"
43 font-size="&hsize5;"
44 font-weight="bold"/>
45
46 <subtitle param:node="ancestor-or-self::article[1]"
47 keep-with-next="always"
48 font-size="&hsize3;"
49 font-weight="bold"
50 space-after="0.8em"/>
51
52 <corpauthor space-before="0.5em"
53 font-size="&hsize3;"/>
54 <authorgroup space-before="0.5em"
55 font-size="&hsize2;"/>
56 <author space-before="0.5em"
57 font-size="&hsize2;"
58 space-after="0.8em"/>
59
60 <email font-size="&hsize2;"/>
61
62 <othercredit space-before="0.5em"/>
63 <releaseinfo space-before="0.5em"/>
64 <copyright space-before="0.5em"/>
65 <legalnotice text-align="start"
66 margin-left="0.5in"
67 margin-right="0.5in"
68 font-family="{$body.fontset}"/>
69 <pubdate space-before="0.5em"/>
70 <para></para>
71 <revision space-before="0.5em"/>
72 <revhistory space-before="0.5em"/>
73 <abstract space-before="0.5em"
74 text-align="start"
75 margin-left="0.5in"
76 margin-right="0.5in"
77 font-family="{$body.fontset}"/>
78
79 <para></para>
80 </t:titlepage-content>
81
82 <t:titlepage-content t:side="verso">
83 </t:titlepage-content>
84
85 <t:titlepage-separator>
86 </t:titlepage-separator>
87
88 <t:titlepage-before t:side="recto">
89 </t:titlepage-before>
90
91 <t:titlepage-before t:side="verso">
92 </t:titlepage-before>
93</t:titlepage>
94
95<!-- ==================================================================== -->
96
97<t:titlepage t:element="set" t:wrapper="fo:block">
98 <t:titlepage-content t:side="recto">
99 <title
100 t:named-template="division.title"
101 param:node="ancestor-or-self::set[1]"
102 text-align="center"
103 font-size="&hsize5;"
104 space-before="&hsize5space;"
105 font-weight="bold"
106 font-family="{$title.fontset}"/>
107 <subtitle
108 font-family="{$title.fontset}"
109 text-align="center"/>
110 <corpauthor/>
111 <authorgroup/>
112 <author/>
113 <othercredit/>
114 <releaseinfo/>
115 <copyright/>
116 <legalnotice/>
117 <pubdate/>
118 <revision/>
119 <revhistory/>
120 <abstract/>
121 </t:titlepage-content>
122
123 <t:titlepage-content t:side="verso">
124 </t:titlepage-content>
125
126 <t:titlepage-separator>
127 </t:titlepage-separator>
128
129 <t:titlepage-before t:side="recto">
130 </t:titlepage-before>
131
132 <t:titlepage-before t:side="verso">
133 </t:titlepage-before>
134</t:titlepage>
135
136<!-- ==================================================================== -->
137
138 <t:titlepage t:element="book" t:wrapper="fo:block">
139 <t:titlepage-content t:side="recto">
140
141 <mediaobject/>
142
143 <subtitle
144 text-align="center"
145 font-size="&hsize4;"
146 space-before="&hsize4space;"
147 font-family="{$title.fontset}"/>
148 <corpauthor font-size="&hsize3;"
149 keep-with-next="always"
150 space-before="2in"/>
151 <authorgroup space-before="2in"/>
152 <author font-size="&hsize3;"
153 space-before="&hsize2space;"
154 keep-with-next="always"/>
155 </t:titlepage-content>
156
157 <t:titlepage-content t:side="verso">
158 <corpauthor/>
159 <authorgroup t:named-template="verso.authorgroup"/>
160 <author/>
161 <othercredit/>
162 <pubdate space-before="1em"/>
163 <copyright/>
164 <abstract/>
165 <legalnotice font-size="8pt"/>
166 </t:titlepage-content>
167
168 <t:titlepage-separator>
169 <fo:block break-after="page"/>
170 </t:titlepage-separator>
171
172 <t:titlepage-before t:side="recto">
173 </t:titlepage-before>
174
175 <t:titlepage-before t:side="verso">
176 <fo:block break-after="page"/>
177 </t:titlepage-before>
178</t:titlepage>
179
180<!-- ==================================================================== -->
181
182<t:titlepage t:element="part" t:wrapper="fo:block">
183 <t:titlepage-content t:side="recto">
184 <title
185 t:named-template="division.title"
186 param:node="ancestor-or-self::part[1]"
187 text-align="center"
188 font-size="&hsize5;"
189 space-before="&hsize5space;"
190 font-weight="bold"
191 font-family="{$title.fontset}"/>
192 <subtitle
193 text-align="center"
194 font-size="&hsize4;"
195 space-before="&hsize4space;"
196 font-weight='bold'
197 font-style='italic'
198 font-family="{$title.fontset}"/>
199 </t:titlepage-content>
200
201 <t:titlepage-content t:side="verso">
202 </t:titlepage-content>
203
204 <t:titlepage-separator>
205 </t:titlepage-separator>
206
207 <t:titlepage-before t:side="recto">
208 </t:titlepage-before>
209
210 <t:titlepage-before t:side="verso">
211 </t:titlepage-before>
212</t:titlepage>
213
214<t:titlepage t:element="partintro" t:wrapper="fo:block">
215 <t:titlepage-content t:side="recto">
216 <title
217 text-align="center"
218 font-size="&hsize5;"
219 font-weight="bold"
220 space-before="1em"
221 font-family="{$title.fontset}"/>
222 <subtitle
223 text-align="center"
224 font-size="&hsize2;"
225 font-weight="bold"
226 font-style="italic"
227 font-family="{$title.fontset}"/>
228 <corpauthor/>
229 <authorgroup/>
230 <author/>
231 <othercredit/>
232 <releaseinfo/>
233 <copyright/>
234 <legalnotice/>
235 <pubdate/>
236 <revision/>
237 <revhistory/>
238 <abstract/>
239 </t:titlepage-content>
240
241 <t:titlepage-content t:side="verso">
242 </t:titlepage-content>
243
244 <t:titlepage-separator>
245 </t:titlepage-separator>
246
247 <t:titlepage-before t:side="recto">
248 </t:titlepage-before>
249
250 <t:titlepage-before t:side="verso">
251 </t:titlepage-before>
252</t:titlepage>
253
254<!-- ==================================================================== -->
255
256<t:titlepage t:element="reference" t:wrapper="fo:block">
257 <t:titlepage-content t:side="recto">
258 <title
259 t:named-template="division.title"
260 param:node="ancestor-or-self::reference[1]"
261 text-align="center"
262 font-size="&hsize5;"
263 space-before="&hsize5space;"
264 font-weight="bold"
265 font-family="{$title.fontset}"/>
266 <subtitle
267 font-family="{$title.fontset}"
268 text-align="center"/>
269 <corpauthor/>
270 <authorgroup/>
271 <author/>
272 <othercredit/>
273 <releaseinfo/>
274 <copyright/>
275 <legalnotice/>
276 <pubdate/>
277 <revision/>
278 <revhistory/>
279 <abstract/>
280 </t:titlepage-content>
281
282 <t:titlepage-content t:side="verso">
283 </t:titlepage-content>
284
285 <t:titlepage-separator>
286 </t:titlepage-separator>
287
288 <t:titlepage-before t:side="recto">
289 </t:titlepage-before>
290
291 <t:titlepage-before t:side="verso">
292 </t:titlepage-before>
293</t:titlepage>
294
295<!-- ==================================================================== -->
296
297<t:titlepage t:element="refsynopsisdiv" t:wrapper="fo:block">
298 <t:titlepage-content t:side="recto">
299 <title
300 font-family="{$title.fontset}"/>
301 </t:titlepage-content>
302
303 <t:titlepage-content t:side="verso">
304 </t:titlepage-content>
305
306 <t:titlepage-separator>
307 </t:titlepage-separator>
308
309 <t:titlepage-before t:side="recto">
310 </t:titlepage-before>
311
312 <t:titlepage-before t:side="verso">
313 </t:titlepage-before>
314</t:titlepage>
315
316<!-- ==================================================================== -->
317
318<t:titlepage t:element="refsection" t:wrapper="fo:block">
319 <t:titlepage-content t:side="recto">
320 <title
321 font-family="{$title.fontset}"/>
322 </t:titlepage-content>
323
324 <t:titlepage-content t:side="verso">
325 </t:titlepage-content>
326
327 <t:titlepage-separator>
328 </t:titlepage-separator>
329
330 <t:titlepage-before t:side="recto">
331 </t:titlepage-before>
332
333 <t:titlepage-before t:side="verso">
334 </t:titlepage-before>
335</t:titlepage>
336
337<!-- ==================================================================== -->
338
339<t:titlepage t:element="refsect1" t:wrapper="fo:block">
340 <t:titlepage-content t:side="recto">
341 <title
342 font-family="{$title.fontset}"/>
343 </t:titlepage-content>
344
345 <t:titlepage-content t:side="verso">
346 </t:titlepage-content>
347
348 <t:titlepage-separator>
349 </t:titlepage-separator>
350
351 <t:titlepage-before t:side="recto">
352 </t:titlepage-before>
353
354 <t:titlepage-before t:side="verso">
355 </t:titlepage-before>
356</t:titlepage>
357
358<!-- ==================================================================== -->
359
360<t:titlepage t:element="refsect2" t:wrapper="fo:block">
361 <t:titlepage-content t:side="recto">
362 <title
363 font-family="{$title.fontset}"/>
364 </t:titlepage-content>
365
366 <t:titlepage-content t:side="verso">
367 </t:titlepage-content>
368
369 <t:titlepage-separator>
370 </t:titlepage-separator>
371
372 <t:titlepage-before t:side="recto">
373 </t:titlepage-before>
374
375 <t:titlepage-before t:side="verso">
376 </t:titlepage-before>
377</t:titlepage>
378
379<!-- ==================================================================== -->
380
381<t:titlepage t:element="refsect3" t:wrapper="fo:block">
382 <t:titlepage-content t:side="recto">
383 <title
384 font-family="{$title.fontset}"/>
385 </t:titlepage-content>
386
387 <t:titlepage-content t:side="verso">
388 </t:titlepage-content>
389
390 <t:titlepage-separator>
391 </t:titlepage-separator>
392
393 <t:titlepage-before t:side="recto">
394 </t:titlepage-before>
395
396 <t:titlepage-before t:side="verso">
397 </t:titlepage-before>
398</t:titlepage>
399
400<!-- ==================================================================== -->
401
402 <t:titlepage t:element="dedication" t:wrapper="fo:block">
403 <t:titlepage-content t:side="recto">
404 <title
405 t:force="1"
406 t:named-template="component.title"
407 param:node="ancestor-or-self::dedication[1]"
408 margin-left="{$title.margin.left}"
409 font-size="&hsize5;"
410 font-family="{$title.fontset}"
411 font-weight="bold"/>
412 <subtitle
413 font-family="{$title.fontset}"/>
414 </t:titlepage-content>
415
416 <t:titlepage-content t:side="verso">
417 </t:titlepage-content>
418
419 <t:titlepage-separator>
420 </t:titlepage-separator>
421
422 <t:titlepage-before t:side="recto">
423 </t:titlepage-before>
424
425 <t:titlepage-before t:side="verso">
426 </t:titlepage-before>
427</t:titlepage>
428
429<!-- ==================================================================== -->
430
431 <t:titlepage t:element="preface" t:wrapper="fo:block">
432 <t:titlepage-content t:side="recto">
433 <title
434 t:force="1"
435 t:named-template="component.title"
436 param:node="ancestor-or-self::preface[1]"
437 margin-left="{$title.margin.left}"
438 font-size="&hsize5;"
439 font-family="{$title.fontset}"
440 font-weight="bold"/>
441 <subtitle
442 font-family="{$title.fontset}"/>
443 <corpauthor/>
444 <authorgroup/>
445 <author/>
446 <othercredit/>
447 <releaseinfo/>
448 <copyright/>
449 <legalnotice/>
450 <pubdate/>
451 <revision/>
452 <revhistory/>
453 <abstract/>
454 </t:titlepage-content>
455
456 <t:titlepage-content t:side="verso">
457 </t:titlepage-content>
458
459 <t:titlepage-separator>
460 </t:titlepage-separator>
461
462 <t:titlepage-before t:side="recto">
463 </t:titlepage-before>
464
465 <t:titlepage-before t:side="verso">
466 </t:titlepage-before>
467</t:titlepage>
468
469<!-- ==================================================================== -->
470
471 <t:titlepage t:element="chapter" t:wrapper="fo:block"
472 font-family="{$title.fontset}">
473 <t:titlepage-content t:side="recto" margin-left="{$title.margin.left}">
474 <title t:named-template="component.title"
475 param:node="ancestor-or-self::chapter[1]"
476 font-size="&hsize5;"
477 font-weight="bold"/>
478
479 <subtitle space-before="0.5em"
480 font-style="italic"
481 font-size="&hsize2;"
482 font-weight="bold"/>
483
484 <corpauthor space-before="0.5em"
485 space-after="0.5em"
486 font-size="&hsize2;"/>
487
488 <authorgroup space-before="0.5em"
489 space-after="0.5em"
490 font-size="&hsize2;"/>
491
492 <author space-before="0.5em"
493 space-after="0.5em"
494 font-size="&hsize2;"/>
495
496 <othercredit/>
497 <releaseinfo/>
498 <copyright/>
499 <legalnotice/>
500 <pubdate/>
501 <revision/>
502 <revhistory/>
503 <abstract/>
504 </t:titlepage-content>
505
506 <t:titlepage-content t:side="verso">
507 </t:titlepage-content>
508
509 <t:titlepage-separator>
510 </t:titlepage-separator>
511
512 <t:titlepage-before t:side="recto">
513 </t:titlepage-before>
514
515 <t:titlepage-before t:side="verso">
516 </t:titlepage-before>
517</t:titlepage>
518
519<!-- ==================================================================== -->
520
521 <t:titlepage t:element="appendix" t:wrapper="fo:block">
522 <t:titlepage-content t:side="recto">
523 <title
524 t:named-template="component.title"
525 param:node="ancestor-or-self::appendix[1]"
526 margin-left="{$title.margin.left}"
527 font-size="&hsize5;"
528 font-weight="bold"
529 font-family="{$title.fontset}"/>
530 <subtitle
531 font-family="{$title.fontset}"/>
532 <corpauthor/>
533 <authorgroup/>
534 <author/>
535 <othercredit/>
536 <releaseinfo/>
537 <copyright/>
538 <legalnotice/>
539 <pubdate/>
540 <revision/>
541 <revhistory/>
542 <abstract/>
543 </t:titlepage-content>
544
545 <t:titlepage-content t:side="verso">
546 </t:titlepage-content>
547
548 <t:titlepage-separator>
549 </t:titlepage-separator>
550
551 <t:titlepage-before t:side="recto">
552 </t:titlepage-before>
553
554 <t:titlepage-before t:side="verso">
555 </t:titlepage-before>
556</t:titlepage>
557
558<!-- ==================================================================== -->
559
560<t:titlepage t:element="section" t:wrapper="fo:block">
561 <t:titlepage-content t:side="recto">
562 <title
563 margin-left="{$title.margin.left}"
564 font-family="{$title.fontset}"/>
565 <subtitle
566 font-family="{$title.fontset}"/>
567 <corpauthor/>
568 <authorgroup/>
569 <author/>
570 <othercredit/>
571 <releaseinfo/>
572 <copyright/>
573 <legalnotice/>
574 <pubdate/>
575 <revision/>
576 <revhistory/>
577 <abstract/>
578 </t:titlepage-content>
579
580 <t:titlepage-content t:side="verso">
581 </t:titlepage-content>
582
583 <t:titlepage-separator>
584 </t:titlepage-separator>
585
586 <t:titlepage-before t:side="recto">
587 </t:titlepage-before>
588
589 <t:titlepage-before t:side="verso">
590 </t:titlepage-before>
591</t:titlepage>
592
593<t:titlepage t:element="sect1" t:wrapper="fo:block">
594 <t:titlepage-content t:side="recto">
595 <title
596 margin-left="{$title.margin.left}"
597 font-family="{$title.fontset}"/>
598 <subtitle
599 font-family="{$title.fontset}"/>
600 <corpauthor/>
601 <authorgroup/>
602 <author/>
603 <othercredit/>
604 <releaseinfo/>
605 <copyright/>
606 <legalnotice/>
607 <pubdate/>
608 <revision/>
609 <revhistory/>
610 <abstract/>
611 </t:titlepage-content>
612
613 <t:titlepage-content t:side="verso">
614 </t:titlepage-content>
615
616 <t:titlepage-separator>
617 </t:titlepage-separator>
618
619 <t:titlepage-before t:side="recto">
620 </t:titlepage-before>
621
622 <t:titlepage-before t:side="verso">
623 </t:titlepage-before>
624</t:titlepage>
625
626<t:titlepage t:element="sect2" t:wrapper="fo:block">
627 <t:titlepage-content t:side="recto">
628 <title
629 margin-left="{$title.margin.left}"
630 font-family="{$title.fontset}"/>
631 <subtitle
632 font-family="{$title.fontset}"/>
633 <corpauthor/>
634 <authorgroup/>
635 <author/>
636 <othercredit/>
637 <releaseinfo/>
638 <copyright/>
639 <legalnotice/>
640 <pubdate/>
641 <revision/>
642 <revhistory/>
643 <abstract/>
644 </t:titlepage-content>
645
646 <t:titlepage-content t:side="verso">
647 </t:titlepage-content>
648
649 <t:titlepage-separator>
650 </t:titlepage-separator>
651
652 <t:titlepage-before t:side="recto">
653 </t:titlepage-before>
654
655 <t:titlepage-before t:side="verso">
656 </t:titlepage-before>
657</t:titlepage>
658
659<t:titlepage t:element="sect3" t:wrapper="fo:block">
660 <t:titlepage-content t:side="recto">
661 <title
662 margin-left="{$title.margin.left}"
663 font-family="{$title.fontset}"/>
664 <subtitle
665 font-family="{$title.fontset}"/>
666 <corpauthor/>
667 <authorgroup/>
668 <author/>
669 <othercredit/>
670 <releaseinfo/>
671 <copyright/>
672 <legalnotice/>
673 <pubdate/>
674 <revision/>
675 <revhistory/>
676 <abstract/>
677 </t:titlepage-content>
678
679 <t:titlepage-content t:side="verso">
680 </t:titlepage-content>
681
682 <t:titlepage-separator>
683 </t:titlepage-separator>
684
685 <t:titlepage-before t:side="recto">
686 </t:titlepage-before>
687
688 <t:titlepage-before t:side="verso">
689 </t:titlepage-before>
690</t:titlepage>
691
692<t:titlepage t:element="sect4" t:wrapper="fo:block">
693 <t:titlepage-content t:side="recto">
694 <title
695 margin-left="{$title.margin.left}"
696 font-family="{$title.fontset}"/>
697 <subtitle
698 font-family="{$title.fontset}"/>
699 <corpauthor/>
700 <authorgroup/>
701 <author/>
702 <othercredit/>
703 <releaseinfo/>
704 <copyright/>
705 <legalnotice/>
706 <pubdate/>
707 <revision/>
708 <revhistory/>
709 <abstract/>
710 </t:titlepage-content>
711
712 <t:titlepage-content t:side="verso">
713 </t:titlepage-content>
714
715 <t:titlepage-separator>
716 </t:titlepage-separator>
717
718 <t:titlepage-before t:side="recto">
719 </t:titlepage-before>
720
721 <t:titlepage-before t:side="verso">
722 </t:titlepage-before>
723</t:titlepage>
724
725<t:titlepage t:element="sect5" t:wrapper="fo:block">
726 <t:titlepage-content t:side="recto">
727 <title
728 margin-left="{$title.margin.left}"
729 font-family="{$title.fontset}"/>
730 <subtitle
731 font-family="{$title.fontset}"/>
732 <corpauthor/>
733 <authorgroup/>
734 <author/>
735 <othercredit/>
736 <releaseinfo/>
737 <copyright/>
738 <legalnotice/>
739 <pubdate/>
740 <revision/>
741 <revhistory/>
742 <abstract/>
743 </t:titlepage-content>
744
745 <t:titlepage-content t:side="verso">
746 </t:titlepage-content>
747
748 <t:titlepage-separator>
749 </t:titlepage-separator>
750
751 <t:titlepage-before t:side="recto">
752 </t:titlepage-before>
753
754 <t:titlepage-before t:side="verso">
755 </t:titlepage-before>
756</t:titlepage>
757
758<t:titlepage t:element="simplesect" t:wrapper="fo:block">
759 <t:titlepage-content t:side="recto">
760 <title
761 margin-left="{$title.margin.left}"
762 font-family="{$title.fontset}"/>
763 <subtitle
764 font-family="{$title.fontset}"/>
765 <corpauthor/>
766 <authorgroup/>
767 <author/>
768 <othercredit/>
769 <releaseinfo/>
770 <copyright/>
771 <legalnotice/>
772 <pubdate/>
773 <revision/>
774 <revhistory/>
775 <abstract/>
776 </t:titlepage-content>
777
778 <t:titlepage-content t:side="verso">
779 </t:titlepage-content>
780
781 <t:titlepage-separator>
782 </t:titlepage-separator>
783
784 <t:titlepage-before t:side="recto">
785 </t:titlepage-before>
786
787 <t:titlepage-before t:side="verso">
788 </t:titlepage-before>
789</t:titlepage>
790
791<!-- ==================================================================== -->
792
793 <t:titlepage t:element="bibliography" t:wrapper="fo:block">
794 <t:titlepage-content t:side="recto">
795 <title
796 t:force="1"
797 t:named-template="component.title"
798 param:node="ancestor-or-self::bibliography[1]"
799 margin-left="{$title.margin.left}"
800 font-size="&hsize5;"
801 font-family="{$title.fontset}"
802 font-weight="bold"/>
803 <subtitle
804 font-family="{$title.fontset}"/>
805 </t:titlepage-content>
806
807 <t:titlepage-content t:side="verso">
808 </t:titlepage-content>
809
810 <t:titlepage-separator>
811 </t:titlepage-separator>
812
813 <t:titlepage-before t:side="recto">
814 </t:titlepage-before>
815
816 <t:titlepage-before t:side="verso">
817 </t:titlepage-before>
818 </t:titlepage>
819
820<!-- ==================================================================== -->
821
822 <t:titlepage t:element="bibliodiv" t:wrapper="fo:block">
823 <t:titlepage-content t:side="recto">
824 <title t:named-template="component.title"
825 param:node="ancestor-or-self::bibliodiv[1]"
826 margin-left="{$title.margin.left}"
827 font-size="&hsize4;"
828 font-family="{$title.fontset}"
829 font-weight="bold"/>
830 <subtitle
831 font-family="{$title.fontset}"/>
832 </t:titlepage-content>
833
834 <t:titlepage-content t:side="verso">
835 </t:titlepage-content>
836
837 <t:titlepage-separator>
838 </t:titlepage-separator>
839
840 <t:titlepage-before t:side="recto">
841 </t:titlepage-before>
842
843 <t:titlepage-before t:side="verso">
844 </t:titlepage-before>
845 </t:titlepage>
846
847<!-- ==================================================================== -->
848
849 <t:titlepage t:element="glossary" t:wrapper="fo:block">
850 <t:titlepage-content t:side="recto">
851 <title
852 t:force="1"
853 t:named-template="component.title"
854 param:node="ancestor-or-self::glossary[1]"
855 margin-left="{$title.margin.left}"
856 font-size="&hsize5;"
857 font-family="{$title.fontset}"
858 font-weight="bold"/>
859 <subtitle
860 font-family="{$title.fontset}"/>
861 </t:titlepage-content>
862
863 <t:titlepage-content t:side="verso">
864 </t:titlepage-content>
865
866 <t:titlepage-separator>
867 </t:titlepage-separator>
868
869 <t:titlepage-before t:side="recto">
870 </t:titlepage-before>
871
872 <t:titlepage-before t:side="verso">
873 </t:titlepage-before>
874 </t:titlepage>
875
876<!-- ==================================================================== -->
877
878 <t:titlepage t:element="glossdiv" t:wrapper="fo:block">
879 <t:titlepage-content t:side="recto">
880 <title t:named-template="component.title"
881 param:node="ancestor-or-self::glossdiv[1]"
882 margin-left="{$title.margin.left}"
883 font-size="&hsize4;"
884 font-family="{$title.fontset}"
885 font-weight="bold"/>
886 <subtitle
887 font-family="{$title.fontset}"/>
888 </t:titlepage-content>
889
890 <t:titlepage-content t:side="verso">
891 </t:titlepage-content>
892
893 <t:titlepage-separator>
894 </t:titlepage-separator>
895
896 <t:titlepage-before t:side="recto">
897 </t:titlepage-before>
898
899 <t:titlepage-before t:side="verso">
900 </t:titlepage-before>
901 </t:titlepage>
902
903<!-- ==================================================================== -->
904
905 <t:titlepage t:element="index" t:wrapper="fo:block">
906 <t:titlepage-content t:side="recto">
907 <title
908 t:force="1"
909 t:named-template="component.title"
910 param:node="ancestor-or-self::index[1]"
911 param:pagewide="1"
912 margin-left="0pt"
913 font-size="&hsize5;"
914 font-family="{$title.fontset}"
915 font-weight="bold"/>
916 <subtitle
917 font-family="{$title.fontset}"/>
918 </t:titlepage-content>
919
920 <t:titlepage-content t:side="verso">
921 </t:titlepage-content>
922
923 <t:titlepage-separator>
924 </t:titlepage-separator>
925
926 <t:titlepage-before t:side="recto">
927 </t:titlepage-before>
928
929 <t:titlepage-before t:side="verso">
930 </t:titlepage-before>
931 </t:titlepage>
932
933<!-- ==================================================================== -->
934
935 <!-- The indexdiv.title template is used so that manual and -->
936 <!-- automatically generated indexdiv titles get the same -->
937 <!-- formatting. -->
938
939 <t:titlepage t:element="indexdiv" t:wrapper="fo:block">
940 <t:titlepage-content t:side="recto">
941 <title t:force="1"
942 t:named-template="indexdiv.title"
943 param:title="title"/>
944 <subtitle
945 font-family="{$title.fontset}"/>
946 </t:titlepage-content>
947
948 <t:titlepage-content t:side="verso">
949 </t:titlepage-content>
950
951 <t:titlepage-separator>
952 </t:titlepage-separator>
953
954 <t:titlepage-before t:side="recto">
955 </t:titlepage-before>
956
957 <t:titlepage-before t:side="verso">
958 </t:titlepage-before>
959 </t:titlepage>
960
961<!-- ==================================================================== -->
962
963 <t:titlepage t:element="setindex" t:wrapper="fo:block">
964 <t:titlepage-content t:side="recto">
965 <title
966 t:force="1"
967 t:named-template="component.title"
968 param:node="ancestor-or-self::setindex[1]"
969 param:pagewide="1"
970 margin-left="0pt"
971 font-size="&hsize5;"
972 font-family="{$title.fontset}"
973 font-weight="bold"/>
974 <subtitle
975 font-family="{$title.fontset}"/>
976 </t:titlepage-content>
977
978 <t:titlepage-content t:side="verso">
979 </t:titlepage-content>
980
981 <t:titlepage-separator>
982 </t:titlepage-separator>
983
984 <t:titlepage-before t:side="recto">
985 </t:titlepage-before>
986
987 <t:titlepage-before t:side="verso">
988 </t:titlepage-before>
989 </t:titlepage>
990
991<!-- ==================================================================== -->
992
993 <t:titlepage t:element="colophon" t:wrapper="fo:block">
994 <t:titlepage-content t:side="recto">
995 <title
996 t:force="1"
997 t:named-template="component.title"
998 param:node="ancestor-or-self::colophon[1]"
999 margin-left="{$title.margin.left}"
1000 font-size="&hsize5;"
1001 font-family="{$title.fontset}"
1002 font-weight="bold"/>
1003 <subtitle
1004 font-family="{$title.fontset}"/>
1005 </t:titlepage-content>
1006
1007 <t:titlepage-content t:side="verso">
1008 </t:titlepage-content>
1009
1010 <t:titlepage-separator>
1011 </t:titlepage-separator>
1012
1013 <t:titlepage-before t:side="recto">
1014 </t:titlepage-before>
1015
1016 <t:titlepage-before t:side="verso">
1017 </t:titlepage-before>
1018</t:titlepage>
1019
1020<!-- ==================================================================== -->
1021
1022 <t:titlepage t:element="table.of.contents" t:wrapper="fo:block">
1023 <t:titlepage-content t:side="recto">
1024 <title
1025 t:force="1"
1026 t:named-template="gentext"
1027 param:key="'TableofContents'"
1028 space-before.minimum="1em"
1029 space-before.optimum="1.5em"
1030 space-before.maximum="2em"
1031 space-after="0.5em"
1032 margin-left="{$title.margin.left}"
1033 font-size="&hsize3;"
1034 font-weight="bold"
1035 font-family="{$title.fontset}"/>
1036 </t:titlepage-content>
1037
1038 <t:titlepage-content t:side="verso">
1039 </t:titlepage-content>
1040
1041 <t:titlepage-separator>
1042 </t:titlepage-separator>
1043
1044 <t:titlepage-before t:side="recto">
1045 </t:titlepage-before>
1046
1047 <t:titlepage-before t:side="verso">
1048 </t:titlepage-before>
1049 </t:titlepage>
1050
1051 <t:titlepage t:element="list.of.tables" t:wrapper="fo:block">
1052 <t:titlepage-content t:side="recto">
1053 <title
1054 t:force="1"
1055 t:named-template="gentext"
1056 param:key="'ListofTables'"
1057 space-before.minimum="1em"
1058 space-before.optimum="1.5em"
1059 space-before.maximum="2em"
1060 space-after="0.5em"
1061 margin-left="{$title.margin.left}"
1062 font-size="&hsize3;"
1063 font-weight="bold"
1064 font-family="{$title.fontset}"/>
1065 </t:titlepage-content>
1066
1067 <t:titlepage-content t:side="verso">
1068 </t:titlepage-content>
1069
1070 <t:titlepage-separator>
1071 </t:titlepage-separator>
1072
1073 <t:titlepage-before t:side="recto">
1074 </t:titlepage-before>
1075
1076 <t:titlepage-before t:side="verso">
1077 </t:titlepage-before>
1078 </t:titlepage>
1079
1080 <t:titlepage t:element="list.of.figures" t:wrapper="fo:block">
1081 <t:titlepage-content t:side="recto">
1082 <title
1083 t:force="1"
1084 t:named-template="gentext"
1085 param:key="'ListofFigures'"
1086 space-before.minimum="1em"
1087 space-before.optimum="1.5em"
1088 space-before.maximum="2em"
1089 space-after="0.5em"
1090 margin-left="{$title.margin.left}"
1091 font-size="&hsize3;"
1092 font-weight="bold"
1093 font-family="{$title.fontset}"/>
1094 </t:titlepage-content>
1095
1096 <t:titlepage-content t:side="verso">
1097 </t:titlepage-content>
1098
1099 <t:titlepage-separator>
1100 </t:titlepage-separator>
1101
1102 <t:titlepage-before t:side="recto">
1103 </t:titlepage-before>
1104
1105 <t:titlepage-before t:side="verso">
1106 </t:titlepage-before>
1107 </t:titlepage>
1108
1109 <t:titlepage t:element="list.of.examples" t:wrapper="fo:block">
1110 <t:titlepage-content t:side="recto">
1111 <title
1112 t:force="1"
1113 t:named-template="gentext"
1114 param:key="'ListofExamples'"
1115 space-before.minimum="1em"
1116 space-before.optimum="1.5em"
1117 space-before.maximum="2em"
1118 space-after="0.5em"
1119 margin-left="{$title.margin.left}"
1120 font-size="&hsize3;"
1121 font-weight="bold"
1122 font-family="{$title.fontset}"/>
1123 </t:titlepage-content>
1124
1125 <t:titlepage-content t:side="verso">
1126 </t:titlepage-content>
1127
1128 <t:titlepage-separator>
1129 </t:titlepage-separator>
1130
1131 <t:titlepage-before t:side="recto">
1132 </t:titlepage-before>
1133
1134 <t:titlepage-before t:side="verso">
1135 </t:titlepage-before>
1136 </t:titlepage>
1137
1138 <t:titlepage t:element="list.of.equations" t:wrapper="fo:block">
1139 <t:titlepage-content t:side="recto">
1140 <title
1141 t:force="1"
1142 t:named-template="gentext"
1143 param:key="'ListofEquations'"
1144 space-before.minimum="1em"
1145 space-before.optimum="1.5em"
1146 space-before.maximum="2em"
1147 space-after="0.5em"
1148 margin-left="{$title.margin.left}"
1149 font-size="&hsize3;"
1150 font-weight="bold"
1151 font-family="{$title.fontset}"/>
1152 </t:titlepage-content>
1153
1154 <t:titlepage-content t:side="verso">
1155 </t:titlepage-content>
1156
1157 <t:titlepage-separator>
1158 </t:titlepage-separator>
1159
1160 <t:titlepage-before t:side="recto">
1161 </t:titlepage-before>
1162
1163 <t:titlepage-before t:side="verso">
1164 </t:titlepage-before>
1165 </t:titlepage>
1166
1167 <t:titlepage t:element="list.of.procedures" t:wrapper="fo:block">
1168 <t:titlepage-content t:side="recto">
1169 <title
1170 t:force="1"
1171 t:named-template="gentext"
1172 param:key="'ListofProcedures'"
1173 space-before.minimum="1em"
1174 space-before.optimum="1.5em"
1175 space-before.maximum="2em"
1176 space-after="0.5em"
1177 margin-left="{$title.margin.left}"
1178 font-size="&hsize3;"
1179 font-weight="bold"
1180 font-family="{$title.fontset}"/>
1181 </t:titlepage-content>
1182
1183 <t:titlepage-content t:side="verso">
1184 </t:titlepage-content>
1185
1186 <t:titlepage-separator>
1187 </t:titlepage-separator>
1188
1189 <t:titlepage-before t:side="recto">
1190 </t:titlepage-before>
1191
1192 <t:titlepage-before t:side="verso">
1193 </t:titlepage-before>
1194 </t:titlepage>
1195
1196 <t:titlepage t:element="list.of.unknowns" t:wrapper="fo:block">
1197 <t:titlepage-content t:side="recto">
1198 <title
1199 t:force="1"
1200 t:named-template="gentext"
1201 param:key="'ListofUnknown'"
1202 space-before.minimum="1em"
1203 space-before.optimum="1.5em"
1204 space-before.maximum="2em"
1205 space-after="0.5em"
1206 margin-left="{$title.margin.left}"
1207 font-size="&hsize3;"
1208 font-weight="bold"
1209 font-family="{$title.fontset}"/>
1210 </t:titlepage-content>
1211
1212 <t:titlepage-content t:side="verso">
1213 </t:titlepage-content>
1214
1215 <t:titlepage-separator>
1216 </t:titlepage-separator>
1217
1218 <t:titlepage-before t:side="recto">
1219 </t:titlepage-before>
1220
1221 <t:titlepage-before t:side="verso">
1222 </t:titlepage-before>
1223 </t:titlepage>
1224
1225<!-- ==================================================================== -->
1226
1227</t:templates>
diff --git a/documentation/template/yocto-project-qs.png b/documentation/template/yocto-project-qs.png
new file mode 100644
index 0000000..333442e
--- /dev/null
+++ b/documentation/template/yocto-project-qs.png
Binary files differ
diff --git a/documentation/tools/eclipse-help.sed b/documentation/tools/eclipse-help.sed
new file mode 100644
index 0000000..38690bc
--- /dev/null
+++ b/documentation/tools/eclipse-help.sed
@@ -0,0 +1,18 @@
1# Processes poky-ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
2# For example:
3# "ulink" href="http://www.yoctoproject.org/docs/1.3/poky-ref-manual/poky-ref-manual.html#faq"
4# -> "link" href="../poky-ref-manual/faq.html"
5s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*-[a-z]*\)\/[a-z]*-[a-z]*-[a-z]*.html#\([^\"]*\)\"/\"link\" href=\"\.\.\/\1\/\2.html\"/g
6
7# Processes all other manuals (<word>-<word> style)
8# For example:
9# "ulink" href="http://www.yoctoproject.org/docs/1.3/kernel-manual/kernel-manual.html#faq"
10# -> "link" href="../kernel-manual/faq.html"
11s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*\)\/[a-z]*-[a-z]*.html#\([^\"]*\)\"/\"link\" href=\"\.\.\/\1\/\2.html\"/g
12
13# Process cases where just an external manual is referenced without an id anchor
14# For example:
15# "ulink" href="http://www.yoctoproject.org/docs/1.3/kernel-manual/kernel-manual.html
16# -> "link" href="../kernel-manual/index.html"
17s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*-[a-z]*\)\/[a-z]*-[a-z]*-[a-z]*.html\"/\"link\" href=\"\.\.\/\1\/index.html\"/g
18s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/[^\/]*\/\([a-z]*-[a-z]*\)\/[a-z]*-[a-z]*.html\"/\"link\" href=\"\.\.\/\1\/index.html\"/g
diff --git a/documentation/tools/mega-manual.sed b/documentation/tools/mega-manual.sed
new file mode 100644
index 0000000..d3142ec
--- /dev/null
+++ b/documentation/tools/mega-manual.sed
@@ -0,0 +1,13 @@
1# Processes ref-manual and yocto-project-qs manual (<word>-<word>-<word> style)
2s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.1\/[a-z]*-[a-z]*-[a-z]*\/[a-z]*-[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
3
4# Processes all other manuals (<word>-<word> style)
5s/\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.1\/[a-z]*-[a-z]*\/[a-z]*-[a-z]*.html#/\"link\" href=\"#/g
6
7# Process cases where just an external manual is referenced without an id anchor
8s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.1\/yocto-project-qs\/yocto-project-qs.html\" target=\"_top\">Yocto Project Quick Start<\/a>/Yocto Project Quick Start/g
9s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.1\/dev-manual\/dev-manual.html\" target=\"_top\">Yocto Project Development Manual<\/a>/Yocto Project Development Manual/g
10s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.1\/adt-manual\/adt-manual.html\" target=\"_top\">Yocto Project Application Developer's Guide<\/a>/Yocto Project Application Developer's Guide/g
11s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.1\/bsp-guide\/bsp-guide.html\" target=\"_top\">Yocto Project Board Support Package (BSP) Developer's Guide<\/a>/Yocto Project Board Support Package (BSP) Developer's Guide/g
12s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.1\/kernel-dev\/kernel-dev.html\" target=\"_top\">Yocto Project Linux Kernel Development Manual<\/a>/Yocto Project Linux Kernel Development Manual/g
13s/<a class=\"ulink\" href=\"http:\/\/www.yoctoproject.org\/docs\/1.5.1\/ref-manual\/ref-manual.html\" target=\"_top\">Yocto Project Reference Manual<\/a>/Yocto Project Reference Manual/g
diff --git a/documentation/tools/poky-docbook-to-pdf b/documentation/tools/poky-docbook-to-pdf
new file mode 100755
index 0000000..f55fd27
--- /dev/null
+++ b/documentation/tools/poky-docbook-to-pdf
@@ -0,0 +1,51 @@
1#!/bin/sh
2
3if [ -z "$1" -o -z "$2" ]; then
4 echo "usage: [-v] $0 <docbook file> <templatedir>"
5 echo
6 echo "*NOTE* you need xsltproc, fop and nwalsh docbook stylesheets"
7 echo " installed for this to work!"
8 echo
9 exit 0
10fi
11
12FO=`echo $1 | sed s/.xml/.fo/` || exit 1
13PDF=`echo $1 | sed s/.xml/.pdf/` || exit 1
14TEMPLATEDIR=$2
15
16##
17# These URI should be rewritten by your distribution's xml catalog to
18# match your localy installed XSL stylesheets.
19XSL_BASE_URI="http://docbook.sourceforge.net/release/xsl/current"
20
21# Creates a temporary XSL stylesheet based on titlepage.xsl
22xsltproc -o /tmp/titlepage.xsl \
23 --xinclude \
24 $XSL_BASE_URI/template/titlepage.xsl \
25 $TEMPLATEDIR/titlepage.templates.xml || exit 1
26
27# Creates the file needed for FOP
28xsltproc --xinclude \
29 --stringparam hyphenate false \
30 --stringparam formal.title.placement "figure after" \
31 --stringparam ulink.show 1 \
32 --stringparam body.font.master 9 \
33 --stringparam title.font.master 11 \
34 --stringparam draft.watermark.image "$TEMPLATEDIR/draft.png" \
35 --stringparam chapter.autolabel 1 \
36 --stringparam appendix.autolabel A \
37 --stringparam section.autolabel 1 \
38 --stringparam section.label.includes.component.label 1 \
39 --output $FO \
40 $TEMPLATEDIR/poky-db-pdf.xsl \
41 $1 || exit 1
42
43# Invokes the Java version of FOP. Uses the additional configuration file common/fop-config.xml
44fop -c $TEMPLATEDIR/fop-config.xml -fo $FO -pdf $PDF || exit 1
45
46rm -f $FO
47rm -f /tmp/titlepage.xsl
48
49echo
50echo " #### Success! $PDF ready. ####"
51echo
diff --git a/documentation/yocto-project-qs/figures/building-an-image.png b/documentation/yocto-project-qs/figures/building-an-image.png
new file mode 100755
index 0000000..1fbea5a
--- /dev/null
+++ b/documentation/yocto-project-qs/figures/building-an-image.png
Binary files differ
diff --git a/documentation/yocto-project-qs/figures/using-a-pre-built-image.png b/documentation/yocto-project-qs/figures/using-a-pre-built-image.png
new file mode 100644
index 0000000..b03130d
--- /dev/null
+++ b/documentation/yocto-project-qs/figures/using-a-pre-built-image.png
Binary files differ
diff --git a/documentation/yocto-project-qs/figures/yocto-environment.png b/documentation/yocto-project-qs/figures/yocto-environment.png
new file mode 100644
index 0000000..82b7a55
--- /dev/null
+++ b/documentation/yocto-project-qs/figures/yocto-environment.png
Binary files differ
diff --git a/documentation/yocto-project-qs/figures/yocto-project-transp.png b/documentation/yocto-project-qs/figures/yocto-project-transp.png
new file mode 100755
index 0000000..31d2b14
--- /dev/null
+++ b/documentation/yocto-project-qs/figures/yocto-project-transp.png
Binary files differ
diff --git a/documentation/yocto-project-qs/qs-style.css b/documentation/yocto-project-qs/qs-style.css
new file mode 100644
index 0000000..234e432
--- /dev/null
+++ b/documentation/yocto-project-qs/qs-style.css
@@ -0,0 +1,979 @@
1/*
2 Generic XHTML / DocBook XHTML CSS Stylesheet.
3
4 Browser wrangling and typographic design by
5 Oyvind Kolas / pippin@gimp.org
6
7 Customised for Poky by
8 Matthew Allum / mallum@o-hand.com
9
10 Thanks to:
11 Liam R. E. Quin
12 William Skaggs
13 Jakub Steiner
14
15 Structure
16 ---------
17
18 The stylesheet is divided into the following sections:
19
20 Positioning
21 Margins, paddings, width, font-size, clearing.
22 Decorations
23 Borders, style
24 Colors
25 Colors
26 Graphics
27 Graphical backgrounds
28 Nasty IE tweaks
29 Workarounds needed to make it work in internet explorer,
30 currently makes the stylesheet non validating, but up until
31 this point it is validating.
32 Mozilla extensions
33 Transparency for footer
34 Rounded corners on boxes
35
36*/
37
38
39 /*************** /
40 / Positioning /
41/ ***************/
42
43body {
44 font-family: Verdana, Sans, sans-serif;
45
46 min-width: 640px;
47 width: 80%;
48 margin: 0em auto;
49 padding: 2em 5em 5em 5em;
50 color: #333;
51}
52
53h1,h2,h3,h4,h5,h6,h7 {
54 font-family: Arial, Sans;
55 color: #00557D;
56 clear: both;
57}
58
59h1 {
60 font-size: 2em;
61 text-align: left;
62 padding: 0em 0em 0em 0em;
63 margin: 2em 0em 0em 0em;
64}
65
66h2.subtitle {
67 margin: 0.10em 0em 3.0em 0em;
68 padding: 0em 0em 0em 0em;
69 font-size: 1.8em;
70 padding-left: 20%;
71 font-weight: normal;
72 font-style: italic;
73}
74
75h2 {
76 margin: 2em 0em 0.66em 0em;
77 padding: 0.5em 0em 0em 0em;
78 font-size: 1.5em;
79 font-weight: bold;
80}
81
82h3.subtitle {
83 margin: 0em 0em 1em 0em;
84 padding: 0em 0em 0em 0em;
85 font-size: 142.14%;
86 text-align: right;
87}
88
89h3 {
90 margin: 1em 0em 0.5em 0em;
91 padding: 1em 0em 0em 0em;
92 font-size: 140%;
93 font-weight: bold;
94}
95
96h4 {
97 margin: 1em 0em 0.5em 0em;
98 padding: 1em 0em 0em 0em;
99 font-size: 120%;
100 font-weight: bold;
101}
102
103h5 {
104 margin: 1em 0em 0.5em 0em;
105 padding: 1em 0em 0em 0em;
106 font-size: 110%;
107 font-weight: bold;
108}
109
110h6 {
111 margin: 1em 0em 0em 0em;
112 padding: 1em 0em 0em 0em;
113 font-size: 110%;
114 font-weight: bold;
115}
116
117.authorgroup {
118 background-color: transparent;
119 background-repeat: no-repeat;
120 padding-top: 256px;
121 background-image: url("../figures/yocto-project-bw.png");
122 background-position: top;
123 margin-top: -256px;
124 padding-right: 50px;
125 margin-left: 50px;
126 text-align: center;
127 width: 600px;
128}
129
130h3.author {
131 margin: 0em 0me 0em 0em;
132 padding: 0em 0em 0em 0em;
133 font-weight: normal;
134 font-size: 100%;
135 color: #333;
136 clear: both;
137}
138
139.author tt.email {
140 font-size: 66%;
141}
142
143.titlepage hr {
144 width: 0em;
145 clear: both;
146}
147
148.revhistory {
149 padding-top: 2em;
150 clear: both;
151}
152
153.toc,
154.list-of-tables,
155.list-of-examples,
156.list-of-figures {
157 padding: 1.33em 0em 2.5em 0em;
158 color: #00557D;
159}
160
161.toc p,
162.list-of-tables p,
163.list-of-figures p,
164.list-of-examples p {
165 padding: 0em 0em 0em 0em;
166 padding: 0em 0em 0.3em;
167 margin: 1.5em 0em 0em 0em;
168}
169
170.toc p b,
171.list-of-tables p b,
172.list-of-figures p b,
173.list-of-examples p b{
174 font-size: 100.0%;
175 font-weight: bold;
176}
177
178.toc dl,
179.list-of-tables dl,
180.list-of-figures dl,
181.list-of-examples dl {
182 margin: 0em 0em 0.5em 0em;
183 padding: 0em 0em 0em 0em;
184}
185
186.toc dt {
187 margin: 0em 0em 0em 0em;
188 padding: 0em 0em 0em 0em;
189}
190
191.toc dd {
192 margin: 0em 0em 0em 2.6em;
193 padding: 0em 0em 0em 0em;
194}
195
196div.glossary dl,
197div.variablelist dl {
198}
199
200.glossary dl dt,
201.variablelist dl dt,
202.variablelist dl dt span.term {
203 font-weight: normal;
204 width: 20em;
205 text-align: right;
206}
207
208.variablelist dl dt {
209 margin-top: 0.5em;
210}
211
212.glossary dl dd,
213.variablelist dl dd {
214 margin-top: -1em;
215 margin-left: 25.5em;
216}
217
218.glossary dd p,
219.variablelist dd p {
220 margin-top: 0em;
221 margin-bottom: 1em;
222}
223
224
225div.calloutlist table td {
226 padding: 0em 0em 0em 0em;
227 margin: 0em 0em 0em 0em;
228}
229
230div.calloutlist table td p {
231 margin-top: 0em;
232 margin-bottom: 1em;
233}
234
235div p.copyright {
236 text-align: left;
237}
238
239div.legalnotice p.legalnotice-title {
240 margin-bottom: 0em;
241}
242
243p {
244 line-height: 1.5em;
245 margin-top: 0em;
246
247}
248
249dl {
250 padding-top: 0em;
251}
252
253hr {
254 border: solid 1px;
255}
256
257
258.mediaobject,
259.mediaobjectco {
260 text-align: center;
261}
262
263img {
264 border: none;
265}
266
267ul {
268 padding: 0em 0em 0em 1.5em;
269}
270
271ul li {
272 padding: 0em 0em 0em 0em;
273}
274
275ul li p {
276 text-align: left;
277}
278
279table {
280 width :100%;
281}
282
283th {
284 padding: 0.25em;
285 text-align: left;
286 font-weight: normal;
287 vertical-align: top;
288}
289
290td {
291 padding: 0.25em;
292 vertical-align: top;
293}
294
295p a[id] {
296 margin: 0px;
297 padding: 0px;
298 display: inline;
299 background-image: none;
300}
301
302a {
303 text-decoration: underline;
304 color: #444;
305}
306
307pre {
308 overflow: auto;
309}
310
311a:hover {
312 text-decoration: underline;
313 /*font-weight: bold;*/
314}
315
316
317div.informalfigure,
318div.informalexample,
319div.informaltable,
320div.figure,
321div.table,
322div.example {
323 margin: 1em 0em;
324 padding: 1em;
325 page-break-inside: avoid;
326}
327
328
329div.informalfigure p.title b,
330div.informalexample p.title b,
331div.informaltable p.title b,
332div.figure p.title b,
333div.example p.title b,
334div.table p.title b{
335 padding-top: 0em;
336 margin-top: 0em;
337 font-size: 100%;
338 font-weight: normal;
339}
340
341.mediaobject .caption,
342.mediaobject .caption p {
343 text-align: center;
344 font-size: 80%;
345 padding-top: 0.5em;
346 padding-bottom: 0.5em;
347}
348
349.epigraph {
350 padding-left: 55%;
351 margin-bottom: 1em;
352}
353
354.epigraph p {
355 text-align: left;
356}
357
358.epigraph .quote {
359 font-style: italic;
360}
361.epigraph .attribution {
362 font-style: normal;
363 text-align: right;
364}
365
366span.application {
367 font-style: italic;
368}
369
370.programlisting {
371 font-family: monospace;
372 font-size: 80%;
373 white-space: pre;
374 margin: 1.33em 0em;
375 padding: 1.33em;
376}
377
378.tip,
379.warning,
380.caution,
381.note {
382 margin-top: 1em;
383 margin-bottom: 1em;
384
385}
386
387/* force full width of table within div */
388.tip table,
389.warning table,
390.caution table,
391.note table {
392 border: none;
393 width: 100%;
394}
395
396
397.tip table th,
398.warning table th,
399.caution table th,
400.note table th {
401 padding: 0.8em 0.0em 0.0em 0.0em;
402 margin : 0em 0em 0em 0em;
403}
404
405.tip p,
406.warning p,
407.caution p,
408.note p {
409 margin-top: 0.5em;
410 margin-bottom: 0.5em;
411 padding-right: 1em;
412 text-align: left;
413}
414
415.acronym {
416 text-transform: uppercase;
417}
418
419b.keycap,
420.keycap {
421 padding: 0.09em 0.3em;
422 margin: 0em;
423}
424
425.itemizedlist li {
426 clear: none;
427}
428
429.filename {
430 font-size: medium;
431 font-family: Courier, monospace;
432}
433
434
435div.navheader, div.heading{
436 position: absolute;
437 left: 0em;
438 top: 0em;
439 width: 100%;
440 background-color: #cdf;
441 width: 100%;
442}
443
444div.navfooter, div.footing{
445 position: fixed;
446 left: 0em;
447 bottom: 0em;
448 background-color: #eee;
449 width: 100%;
450}
451
452
453div.navheader td,
454div.navfooter td {
455 font-size: 66%;
456}
457
458div.navheader table th {
459 /*font-family: Georgia, Times, serif;*/
460 /*font-size: x-large;*/
461 font-size: 80%;
462}
463
464div.navheader table {
465 border-left: 0em;
466 border-right: 0em;
467 border-top: 0em;
468 width: 100%;
469}
470
471div.navfooter table {
472 border-left: 0em;
473 border-right: 0em;
474 border-bottom: 0em;
475 width: 100%;
476}
477
478div.navheader table td a,
479div.navfooter table td a {
480 color: #777;
481 text-decoration: none;
482}
483
484/* normal text in the footer */
485div.navfooter table td {
486 color: black;
487}
488
489div.navheader table td a:visited,
490div.navfooter table td a:visited {
491 color: #444;
492}
493
494
495/* links in header and footer */
496div.navheader table td a:hover,
497div.navfooter table td a:hover {
498 text-decoration: underline;
499 background-color: transparent;
500 color: #33a;
501}
502
503div.navheader hr,
504div.navfooter hr {
505 display: none;
506}
507
508
509.qandaset tr.question td p {
510 margin: 0em 0em 1em 0em;
511 padding: 0em 0em 0em 0em;
512}
513
514.qandaset tr.answer td p {
515 margin: 0em 0em 1em 0em;
516 padding: 0em 0em 0em 0em;
517}
518.answer td {
519 padding-bottom: 1.5em;
520}
521
522.emphasis {
523 font-weight: bold;
524}
525
526
527 /************* /
528 / decorations /
529/ *************/
530
531.titlepage {
532}
533
534.part .title {
535}
536
537.subtitle {
538 border: none;
539}
540
541/*
542h1 {
543 border: none;
544}
545
546h2 {
547 border-top: solid 0.2em;
548 border-bottom: solid 0.06em;
549}
550
551h3 {
552 border-top: 0em;
553 border-bottom: solid 0.06em;
554}
555
556h4 {
557 border: 0em;
558 border-bottom: solid 0.06em;
559}
560
561h5 {
562 border: 0em;
563}
564*/
565
566.programlisting {
567 border: solid 1px;
568}
569
570div.figure,
571div.table,
572div.informalfigure,
573div.informaltable,
574div.informalexample,
575div.example {
576 border: 1px solid;
577}
578
579
580
581.tip,
582.warning,
583.caution,
584.note {
585 border: 1px solid;
586}
587
588.tip table th,
589.warning table th,
590.caution table th,
591.note table th {
592 border-bottom: 1px solid;
593}
594
595.question td {
596 border-top: 1px solid black;
597}
598
599.answer {
600}
601
602
603b.keycap,
604.keycap {
605 border: 1px solid;
606}
607
608
609div.navheader, div.heading{
610 border-bottom: 1px solid;
611}
612
613
614div.navfooter, div.footing{
615 border-top: 1px solid;
616}
617
618 /********* /
619 / colors /
620/ *********/
621
622body {
623 color: #333;
624 background: white;
625}
626
627a {
628 background: transparent;
629}
630
631a:hover {
632 background-color: #dedede;
633}
634
635
636h1,
637h2,
638h3,
639h4,
640h5,
641h6,
642h7,
643h8 {
644 background-color: transparent;
645}
646
647hr {
648 border-color: #aaa;
649}
650
651
652.tip, .warning, .caution, .note {
653 border-color: #fff;
654}
655
656
657.tip table th,
658.warning table th,
659.caution table th,
660.note table th {
661 border-bottom-color: #fff;
662}
663
664
665.warning {
666 background-color: #f0f0f2;
667}
668
669.caution {
670 background-color: #f0f0f2;
671}
672
673.tip {
674 background-color: #f0f0f2;
675}
676
677.note {
678 background-color: #f0f0f2;
679}
680
681.glossary dl dt,
682.variablelist dl dt,
683.variablelist dl dt span.term {
684 color: #044;
685}
686
687div.figure,
688div.table,
689div.example,
690div.informalfigure,
691div.informaltable,
692div.informalexample {
693 border-color: #aaa;
694}
695
696pre.programlisting {
697 color: black;
698 background-color: #fff;
699 border-color: #aaa;
700 border-width: 2px;
701}
702
703.guimenu,
704.guilabel,
705.guimenuitem {
706 background-color: #eee;
707}
708
709
710b.keycap,
711.keycap {
712 background-color: #eee;
713 border-color: #999;
714}
715
716
717div.navheader {
718 border-color: black;
719}
720
721
722div.navfooter {
723 border-color: black;
724}
725
726
727 /*********** /
728 / graphics /
729/ ***********/
730
731/*
732body {
733 background-image: url("images/body_bg.jpg");
734 background-attachment: fixed;
735}
736
737.navheader,
738.note,
739.tip {
740 background-image: url("images/note_bg.jpg");
741 background-attachment: fixed;
742}
743
744.warning,
745.caution {
746 background-image: url("images/warning_bg.jpg");
747 background-attachment: fixed;
748}
749
750.figure,
751.informalfigure,
752.example,
753.informalexample,
754.table,
755.informaltable {
756 background-image: url("images/figure_bg.jpg");
757 background-attachment: fixed;
758}
759
760*/
761h1,
762h2,
763h3,
764h4,
765h5,
766h6,
767h7{
768}
769
770/*
771Example of how to stick an image as part of the title.
772
773div.article .titlepage .title
774{
775 background-image: url("figures/white-on-black.png");
776 background-position: center;
777 background-repeat: repeat-x;
778}
779*/
780
781div.preface .titlepage .title,
782div.colophon .title,
783div.chapter .titlepage .title,
784div.article .titlepage .title
785{
786}
787
788div.section div.section .titlepage .title,
789div.sect2 .titlepage .title {
790 background: none;
791}
792
793
794h1.title {
795 background-color: transparent;
796 background-image: url("figures/yocto-project-bw.png");
797 background-repeat: no-repeat;
798 height: 256px;
799 text-indent: -9000px;
800 overflow:hidden;
801}
802
803h2.subtitle {
804 background-color: transparent;
805 text-indent: -9000px;
806 overflow:hidden;
807 width: 0px;
808 display: none;
809}
810
811 /*************************************** /
812 / pippin.gimp.org specific alterations /
813/ ***************************************/
814
815/*
816div.heading, div.navheader {
817 color: #777;
818 font-size: 80%;
819 padding: 0;
820 margin: 0;
821 text-align: left;
822 position: absolute;
823 top: 0px;
824 left: 0px;
825 width: 100%;
826 height: 50px;
827 background: url('/gfx/heading_bg.png') transparent;
828 background-repeat: repeat-x;
829 background-attachment: fixed;
830 border: none;
831}
832
833div.heading a {
834 color: #444;
835}
836
837div.footing, div.navfooter {
838 border: none;
839 color: #ddd;
840 font-size: 80%;
841 text-align:right;
842
843 width: 100%;
844 padding-top: 10px;
845 position: absolute;
846 bottom: 0px;
847 left: 0px;
848
849 background: url('/gfx/footing_bg.png') transparent;
850}
851*/
852
853
854
855 /****************** /
856 / nasty ie tweaks /
857/ ******************/
858
859/*
860div.heading, div.navheader {
861 width:expression(document.body.clientWidth + "px");
862}
863
864div.footing, div.navfooter {
865 width:expression(document.body.clientWidth + "px");
866 margin-left:expression("-5em");
867}
868body {
869 padding:expression("4em 5em 0em 5em");
870}
871*/
872
873 /**************************************** /
874 / mozilla vendor specific css extensions /
875/ ****************************************/
876/*
877div.navfooter, div.footing{
878 -moz-opacity: 0.8em;
879}
880
881div.figure,
882div.table,
883div.informalfigure,
884div.informaltable,
885div.informalexample,
886div.example,
887.tip,
888.warning,
889.caution,
890.note {
891 -moz-border-radius: 0.5em;
892}
893
894b.keycap,
895.keycap {
896 -moz-border-radius: 0.3em;
897}
898*/
899
900table tr td table tr td {
901 display: none;
902}
903
904
905hr {
906 display: none;
907}
908
909table {
910 border: 0em;
911}
912
913 .photo {
914 float: right;
915 margin-left: 1.5em;
916 margin-bottom: 1.5em;
917 margin-top: 0em;
918 max-width: 17em;
919 border: 1px solid gray;
920 padding: 3px;
921 background: white;
922}
923 .seperator {
924 padding-top: 2em;
925 clear: both;
926 }
927
928 #validators {
929 margin-top: 5em;
930 text-align: right;
931 color: #777;
932 }
933 @media print {
934 body {
935 font-size: 8pt;
936 }
937 .noprint {
938 display: none;
939 }
940 }
941
942
943.tip,
944.note {
945 background: #f0f0f2;
946 color: #333;
947 padding: 20px;
948 margin: 20px;
949}
950
951.tip h3,
952.note h3 {
953 padding: 0em;
954 margin: 0em;
955 font-size: 2em;
956 font-weight: bold;
957 color: #333;
958}
959
960.tip a,
961.note a {
962 color: #333;
963 text-decoration: underline;
964}
965
966.footnote {
967 font-size: small;
968 color: #333;
969}
970
971/* Changes the announcement text */
972.tip h3,
973.warning h3,
974.caution h3,
975.note h3 {
976 font-size:large;
977 color: #00557D;
978}
979
diff --git a/documentation/yocto-project-qs/yocto-project-qs-customization.xsl b/documentation/yocto-project-qs/yocto-project-qs-customization.xsl
new file mode 100644
index 0000000..bd53ecb
--- /dev/null
+++ b/documentation/yocto-project-qs/yocto-project-qs-customization.xsl
@@ -0,0 +1,9 @@
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
3
4 <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl" />
5 <xsl:import href="yocto-project-qs-titlepage.xsl"/>
6
7 <xsl:param name="generate.toc" select="'article nop'"></xsl:param>
8 <xsl:param name="html.stylesheet" select="'qs-style.css'" />
9</xsl:stylesheet>
diff --git a/documentation/yocto-project-qs/yocto-project-qs-eclipse-customization.xsl b/documentation/yocto-project-qs/yocto-project-qs-eclipse-customization.xsl
new file mode 100644
index 0000000..f8f8930
--- /dev/null
+++ b/documentation/yocto-project-qs/yocto-project-qs-eclipse-customization.xsl
@@ -0,0 +1,25 @@
1<?xml version='1.0'?>
2<xsl:stylesheet
3 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4 xmlns="http://www.w3.org/1999/xhtml"
5 xmlns:fo="http://www.w3.org/1999/XSL/Format"
6 version="1.0">
7
8 <xsl:import
9 href="http://docbook.sourceforge.net/release/xsl/current/eclipse/eclipse3.xsl" />
10 <xsl:import href="yocto-project-qs-titlepage.xsl"/>
11
12 <xsl:param name="chunker.output.indent" select="'yes'"/>
13 <xsl:param name="chunk.quietly" select="1"/>
14 <xsl:param name="use.id.as.filename" select="1"/>
15 <xsl:param name="ulink.target" select="'_self'" />
16 <xsl:param name="base.dir" select="'html/yocto-project-qs/'"/>
17 <xsl:param name="chunk.section.depth" select="0"/>
18 <xsl:param name="html.stylesheet" select="'../book.css'"/>
19 <xsl:param name="eclipse.manifest" select="0"/>
20 <xsl:param name="create.plugin.xml" select="0"/>
21 <xsl:param name="suppress.navigation" select="1"/>
22 <xsl:param name="generate.index" select="0"/>
23 <xsl:param name="generate.toc" select="'article nop'"></xsl:param>
24 <xsl:param name="html.stylesheet" select="'style.css'" />
25</xsl:stylesheet>
diff --git a/documentation/yocto-project-qs/yocto-project-qs-titlepage.xsl b/documentation/yocto-project-qs/yocto-project-qs-titlepage.xsl
new file mode 100644
index 0000000..a435ac7
--- /dev/null
+++ b/documentation/yocto-project-qs/yocto-project-qs-titlepage.xsl
@@ -0,0 +1,3820 @@
1<?xml version="1.0"?>
2
3<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" version="1.0" exclude-result-prefixes="exsl">
4
5<!-- This stylesheet was created by template/titlepage.xsl-->
6
7<xsl:template name="article.titlepage.recto">
8 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/abstract"/>
9 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/abstract"/>
10 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/abstract"/>
11 <xsl:choose>
12 <xsl:when test="articleinfo/title">
13 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/title"/>
14 </xsl:when>
15 <xsl:when test="artheader/title">
16 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/title"/>
17 </xsl:when>
18 <xsl:when test="info/title">
19 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/title"/>
20 </xsl:when>
21 <xsl:when test="title">
22 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="title"/>
23 </xsl:when>
24 </xsl:choose>
25
26 <xsl:choose>
27 <xsl:when test="articleinfo/subtitle">
28 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/subtitle"/>
29 </xsl:when>
30 <xsl:when test="artheader/subtitle">
31 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/subtitle"/>
32 </xsl:when>
33 <xsl:when test="info/subtitle">
34 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/subtitle"/>
35 </xsl:when>
36 <xsl:when test="subtitle">
37 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="subtitle"/>
38 </xsl:when>
39 </xsl:choose>
40
41 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/corpauthor"/>
42 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/corpauthor"/>
43 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/corpauthor"/>
44 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/authorgroup"/>
45 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/authorgroup"/>
46 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/authorgroup"/>
47 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/author"/>
48 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/author"/>
49 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/author"/>
50 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/othercredit"/>
51 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/othercredit"/>
52 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/othercredit"/>
53 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/releaseinfo"/>
54 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/releaseinfo"/>
55 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/releaseinfo"/>
56 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/copyright"/>
57 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/copyright"/>
58 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/copyright"/>
59 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/legalnotice"/>
60 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/legalnotice"/>
61 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/legalnotice"/>
62 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/pubdate"/>
63 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/pubdate"/>
64 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/pubdate"/>
65 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revision"/>
66 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revision"/>
67 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revision"/>
68 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="articleinfo/revhistory"/>
69 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="artheader/revhistory"/>
70 <xsl:apply-templates mode="article.titlepage.recto.auto.mode" select="info/revhistory"/>
71</xsl:template>
72
73<xsl:template name="article.titlepage.verso">
74</xsl:template>
75
76<xsl:template name="article.titlepage.separator"><hr/>
77</xsl:template>
78
79<xsl:template name="article.titlepage.before.recto">
80</xsl:template>
81
82<xsl:template name="article.titlepage.before.verso">
83</xsl:template>
84
85<xsl:template name="article.titlepage">
86 <div class="titlepage">
87 <xsl:variable name="recto.content">
88 <xsl:call-template name="article.titlepage.before.recto"/>
89 <xsl:call-template name="article.titlepage.recto"/>
90 </xsl:variable>
91 <xsl:variable name="recto.elements.count">
92 <xsl:choose>
93 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
94 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
95 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
96 <xsl:otherwise>1</xsl:otherwise>
97 </xsl:choose>
98 </xsl:variable>
99 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
100 <div><xsl:copy-of select="$recto.content"/></div>
101 </xsl:if>
102 <xsl:variable name="verso.content">
103 <xsl:call-template name="article.titlepage.before.verso"/>
104 <xsl:call-template name="article.titlepage.verso"/>
105 </xsl:variable>
106 <xsl:variable name="verso.elements.count">
107 <xsl:choose>
108 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
109 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
110 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
111 <xsl:otherwise>1</xsl:otherwise>
112 </xsl:choose>
113 </xsl:variable>
114 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
115 <div><xsl:copy-of select="$verso.content"/></div>
116 </xsl:if>
117 <xsl:call-template name="article.titlepage.separator"/>
118 </div>
119</xsl:template>
120
121<xsl:template match="*" mode="article.titlepage.recto.mode">
122 <!-- if an element isn't found in this mode, -->
123 <!-- try the generic titlepage.mode -->
124 <xsl:apply-templates select="." mode="titlepage.mode"/>
125</xsl:template>
126
127<xsl:template match="*" mode="article.titlepage.verso.mode">
128 <!-- if an element isn't found in this mode, -->
129 <!-- try the generic titlepage.mode -->
130 <xsl:apply-templates select="." mode="titlepage.mode"/>
131</xsl:template>
132
133<xsl:template match="abstract" mode="article.titlepage.recto.auto.mode">
134<div xsl:use-attribute-sets="article.titlepage.recto.style">
135 <xsl:call-template name="anchor"/>
136 <xsl:apply-templates/>
137<!-- orignally generated content -->
138<!-- <xsl:apply-templates select="." mode="article.titlepage.recto.mode"/> -->
139</div>
140</xsl:template>
141
142<xsl:template match="title" mode="article.titlepage.recto.auto.mode">
143<div xsl:use-attribute-sets="article.titlepage.recto.style">
144<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
145</div>
146</xsl:template>
147
148<xsl:template match="subtitle" mode="article.titlepage.recto.auto.mode">
149<div xsl:use-attribute-sets="article.titlepage.recto.style">
150<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
151</div>
152</xsl:template>
153
154<xsl:template match="corpauthor" mode="article.titlepage.recto.auto.mode">
155<div xsl:use-attribute-sets="article.titlepage.recto.style">
156<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
157</div>
158</xsl:template>
159
160<xsl:template match="authorgroup" mode="article.titlepage.recto.auto.mode">
161<div xsl:use-attribute-sets="article.titlepage.recto.style">
162<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
163</div>
164</xsl:template>
165
166<xsl:template match="author" mode="article.titlepage.recto.auto.mode">
167<div xsl:use-attribute-sets="article.titlepage.recto.style">
168<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
169</div>
170</xsl:template>
171
172<xsl:template match="othercredit" mode="article.titlepage.recto.auto.mode">
173<div xsl:use-attribute-sets="article.titlepage.recto.style">
174<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
175</div>
176</xsl:template>
177
178<xsl:template match="releaseinfo" mode="article.titlepage.recto.auto.mode">
179<div xsl:use-attribute-sets="article.titlepage.recto.style">
180<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
181</div>
182</xsl:template>
183
184<xsl:template match="copyright" mode="article.titlepage.recto.auto.mode">
185<div xsl:use-attribute-sets="article.titlepage.recto.style">
186<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
187</div>
188</xsl:template>
189
190<xsl:template match="legalnotice" mode="article.titlepage.recto.auto.mode">
191<div xsl:use-attribute-sets="article.titlepage.recto.style">
192<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
193</div>
194</xsl:template>
195
196<xsl:template match="pubdate" mode="article.titlepage.recto.auto.mode">
197<div xsl:use-attribute-sets="article.titlepage.recto.style">
198<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
199</div>
200</xsl:template>
201
202<xsl:template match="revision" mode="article.titlepage.recto.auto.mode">
203<div xsl:use-attribute-sets="article.titlepage.recto.style">
204<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
205</div>
206</xsl:template>
207
208<xsl:template match="revhistory" mode="article.titlepage.recto.auto.mode">
209<div xsl:use-attribute-sets="article.titlepage.recto.style">
210<xsl:apply-templates select="." mode="article.titlepage.recto.mode"/>
211</div>
212</xsl:template>
213
214<xsl:template name="set.titlepage.recto">
215 <xsl:choose>
216 <xsl:when test="setinfo/title">
217 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/title"/>
218 </xsl:when>
219 <xsl:when test="info/title">
220 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/title"/>
221 </xsl:when>
222 <xsl:when test="title">
223 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="title"/>
224 </xsl:when>
225 </xsl:choose>
226
227 <xsl:choose>
228 <xsl:when test="setinfo/subtitle">
229 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/subtitle"/>
230 </xsl:when>
231 <xsl:when test="info/subtitle">
232 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/subtitle"/>
233 </xsl:when>
234 <xsl:when test="subtitle">
235 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="subtitle"/>
236 </xsl:when>
237 </xsl:choose>
238
239 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/corpauthor"/>
240 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/corpauthor"/>
241 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/authorgroup"/>
242 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/authorgroup"/>
243 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/author"/>
244 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/author"/>
245 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/othercredit"/>
246 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/othercredit"/>
247 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/releaseinfo"/>
248 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/releaseinfo"/>
249 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/copyright"/>
250 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/copyright"/>
251 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/legalnotice"/>
252 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/legalnotice"/>
253 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/pubdate"/>
254 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/pubdate"/>
255 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revision"/>
256 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revision"/>
257 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/revhistory"/>
258 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/revhistory"/>
259 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="setinfo/abstract"/>
260 <xsl:apply-templates mode="set.titlepage.recto.auto.mode" select="info/abstract"/>
261</xsl:template>
262
263<xsl:template name="set.titlepage.verso">
264</xsl:template>
265
266<xsl:template name="set.titlepage.separator"><hr/>
267</xsl:template>
268
269<xsl:template name="set.titlepage.before.recto">
270</xsl:template>
271
272<xsl:template name="set.titlepage.before.verso">
273</xsl:template>
274
275<xsl:template name="set.titlepage">
276 <div class="titlepage">
277 <xsl:variable name="recto.content">
278 <xsl:call-template name="set.titlepage.before.recto"/>
279 <xsl:call-template name="set.titlepage.recto"/>
280 </xsl:variable>
281 <xsl:variable name="recto.elements.count">
282 <xsl:choose>
283 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
284 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
285 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
286 <xsl:otherwise>1</xsl:otherwise>
287 </xsl:choose>
288 </xsl:variable>
289 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
290 <div><xsl:copy-of select="$recto.content"/></div>
291 </xsl:if>
292 <xsl:variable name="verso.content">
293 <xsl:call-template name="set.titlepage.before.verso"/>
294 <xsl:call-template name="set.titlepage.verso"/>
295 </xsl:variable>
296 <xsl:variable name="verso.elements.count">
297 <xsl:choose>
298 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
299 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
300 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
301 <xsl:otherwise>1</xsl:otherwise>
302 </xsl:choose>
303 </xsl:variable>
304 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
305 <div><xsl:copy-of select="$verso.content"/></div>
306 </xsl:if>
307 <xsl:call-template name="set.titlepage.separator"/>
308 </div>
309</xsl:template>
310
311<xsl:template match="*" mode="set.titlepage.recto.mode">
312 <!-- if an element isn't found in this mode, -->
313 <!-- try the generic titlepage.mode -->
314 <xsl:apply-templates select="." mode="titlepage.mode"/>
315</xsl:template>
316
317<xsl:template match="*" mode="set.titlepage.verso.mode">
318 <!-- if an element isn't found in this mode, -->
319 <!-- try the generic titlepage.mode -->
320 <xsl:apply-templates select="." mode="titlepage.mode"/>
321</xsl:template>
322
323<xsl:template match="title" mode="set.titlepage.recto.auto.mode">
324<div xsl:use-attribute-sets="set.titlepage.recto.style">
325<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
326</div>
327</xsl:template>
328
329<xsl:template match="subtitle" mode="set.titlepage.recto.auto.mode">
330<div xsl:use-attribute-sets="set.titlepage.recto.style">
331<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
332</div>
333</xsl:template>
334
335<xsl:template match="corpauthor" mode="set.titlepage.recto.auto.mode">
336<div xsl:use-attribute-sets="set.titlepage.recto.style">
337<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
338</div>
339</xsl:template>
340
341<xsl:template match="authorgroup" mode="set.titlepage.recto.auto.mode">
342<div xsl:use-attribute-sets="set.titlepage.recto.style">
343<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
344</div>
345</xsl:template>
346
347<xsl:template match="author" mode="set.titlepage.recto.auto.mode">
348<div xsl:use-attribute-sets="set.titlepage.recto.style">
349<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
350</div>
351</xsl:template>
352
353<xsl:template match="othercredit" mode="set.titlepage.recto.auto.mode">
354<div xsl:use-attribute-sets="set.titlepage.recto.style">
355<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
356</div>
357</xsl:template>
358
359<xsl:template match="releaseinfo" mode="set.titlepage.recto.auto.mode">
360<div xsl:use-attribute-sets="set.titlepage.recto.style">
361<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
362</div>
363</xsl:template>
364
365<xsl:template match="copyright" mode="set.titlepage.recto.auto.mode">
366<div xsl:use-attribute-sets="set.titlepage.recto.style">
367<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
368</div>
369</xsl:template>
370
371<xsl:template match="legalnotice" mode="set.titlepage.recto.auto.mode">
372<div xsl:use-attribute-sets="set.titlepage.recto.style">
373<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
374</div>
375</xsl:template>
376
377<xsl:template match="pubdate" mode="set.titlepage.recto.auto.mode">
378<div xsl:use-attribute-sets="set.titlepage.recto.style">
379<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
380</div>
381</xsl:template>
382
383<xsl:template match="revision" mode="set.titlepage.recto.auto.mode">
384<div xsl:use-attribute-sets="set.titlepage.recto.style">
385<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
386</div>
387</xsl:template>
388
389<xsl:template match="revhistory" mode="set.titlepage.recto.auto.mode">
390<div xsl:use-attribute-sets="set.titlepage.recto.style">
391<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
392</div>
393</xsl:template>
394
395<xsl:template match="abstract" mode="set.titlepage.recto.auto.mode">
396<div xsl:use-attribute-sets="set.titlepage.recto.style">
397<xsl:apply-templates select="." mode="set.titlepage.recto.mode"/>
398</div>
399</xsl:template>
400
401<xsl:template name="book.titlepage.recto">
402 <xsl:choose>
403 <xsl:when test="bookinfo/title">
404 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/title"/>
405 </xsl:when>
406 <xsl:when test="info/title">
407 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/title"/>
408 </xsl:when>
409 <xsl:when test="title">
410 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="title"/>
411 </xsl:when>
412 </xsl:choose>
413
414 <xsl:choose>
415 <xsl:when test="bookinfo/subtitle">
416 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/subtitle"/>
417 </xsl:when>
418 <xsl:when test="info/subtitle">
419 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/subtitle"/>
420 </xsl:when>
421 <xsl:when test="subtitle">
422 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="subtitle"/>
423 </xsl:when>
424 </xsl:choose>
425
426 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/corpauthor"/>
427 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/corpauthor"/>
428 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/authorgroup"/>
429 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/authorgroup"/>
430 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/author"/>
431 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/author"/>
432 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/othercredit"/>
433 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/othercredit"/>
434 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/releaseinfo"/>
435 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/releaseinfo"/>
436 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/copyright"/>
437 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/copyright"/>
438 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/legalnotice"/>
439 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/legalnotice"/>
440 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/pubdate"/>
441 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/pubdate"/>
442 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revision"/>
443 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revision"/>
444 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/revhistory"/>
445 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/revhistory"/>
446 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="bookinfo/abstract"/>
447 <xsl:apply-templates mode="book.titlepage.recto.auto.mode" select="info/abstract"/>
448</xsl:template>
449
450<xsl:template name="book.titlepage.verso">
451</xsl:template>
452
453<xsl:template name="book.titlepage.separator"><hr/>
454</xsl:template>
455
456<xsl:template name="book.titlepage.before.recto">
457</xsl:template>
458
459<xsl:template name="book.titlepage.before.verso">
460</xsl:template>
461
462<xsl:template name="book.titlepage">
463 <div class="titlepage">
464 <xsl:variable name="recto.content">
465 <xsl:call-template name="book.titlepage.before.recto"/>
466 <xsl:call-template name="book.titlepage.recto"/>
467 </xsl:variable>
468 <xsl:variable name="recto.elements.count">
469 <xsl:choose>
470 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
471 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
472 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
473 <xsl:otherwise>1</xsl:otherwise>
474 </xsl:choose>
475 </xsl:variable>
476 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
477 <div><xsl:copy-of select="$recto.content"/></div>
478 </xsl:if>
479 <xsl:variable name="verso.content">
480 <xsl:call-template name="book.titlepage.before.verso"/>
481 <xsl:call-template name="book.titlepage.verso"/>
482 </xsl:variable>
483 <xsl:variable name="verso.elements.count">
484 <xsl:choose>
485 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
486 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
487 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
488 <xsl:otherwise>1</xsl:otherwise>
489 </xsl:choose>
490 </xsl:variable>
491 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
492 <div><xsl:copy-of select="$verso.content"/></div>
493 </xsl:if>
494 <xsl:call-template name="book.titlepage.separator"/>
495 </div>
496</xsl:template>
497
498<xsl:template match="*" mode="book.titlepage.recto.mode">
499 <!-- if an element isn't found in this mode, -->
500 <!-- try the generic titlepage.mode -->
501 <xsl:apply-templates select="." mode="titlepage.mode"/>
502</xsl:template>
503
504<xsl:template match="*" mode="book.titlepage.verso.mode">
505 <!-- if an element isn't found in this mode, -->
506 <!-- try the generic titlepage.mode -->
507 <xsl:apply-templates select="." mode="titlepage.mode"/>
508</xsl:template>
509
510<xsl:template match="title" mode="book.titlepage.recto.auto.mode">
511<div xsl:use-attribute-sets="book.titlepage.recto.style">
512<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
513</div>
514</xsl:template>
515
516<xsl:template match="subtitle" mode="book.titlepage.recto.auto.mode">
517<div xsl:use-attribute-sets="book.titlepage.recto.style">
518<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
519</div>
520</xsl:template>
521
522<xsl:template match="corpauthor" mode="book.titlepage.recto.auto.mode">
523<div xsl:use-attribute-sets="book.titlepage.recto.style">
524<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
525</div>
526</xsl:template>
527
528<xsl:template match="authorgroup" mode="book.titlepage.recto.auto.mode">
529<div xsl:use-attribute-sets="book.titlepage.recto.style">
530<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
531</div>
532</xsl:template>
533
534<xsl:template match="author" mode="book.titlepage.recto.auto.mode">
535<div xsl:use-attribute-sets="book.titlepage.recto.style">
536<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
537</div>
538</xsl:template>
539
540<xsl:template match="othercredit" mode="book.titlepage.recto.auto.mode">
541<div xsl:use-attribute-sets="book.titlepage.recto.style">
542<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
543</div>
544</xsl:template>
545
546<xsl:template match="releaseinfo" mode="book.titlepage.recto.auto.mode">
547<div xsl:use-attribute-sets="book.titlepage.recto.style">
548<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
549</div>
550</xsl:template>
551
552<xsl:template match="copyright" mode="book.titlepage.recto.auto.mode">
553<div xsl:use-attribute-sets="book.titlepage.recto.style">
554<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
555</div>
556</xsl:template>
557
558<xsl:template match="legalnotice" mode="book.titlepage.recto.auto.mode">
559<div xsl:use-attribute-sets="book.titlepage.recto.style">
560<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
561</div>
562</xsl:template>
563
564<xsl:template match="pubdate" mode="book.titlepage.recto.auto.mode">
565<div xsl:use-attribute-sets="book.titlepage.recto.style">
566<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
567</div>
568</xsl:template>
569
570<xsl:template match="revision" mode="book.titlepage.recto.auto.mode">
571<div xsl:use-attribute-sets="book.titlepage.recto.style">
572<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
573</div>
574</xsl:template>
575
576<xsl:template match="revhistory" mode="book.titlepage.recto.auto.mode">
577<div xsl:use-attribute-sets="book.titlepage.recto.style">
578<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
579</div>
580</xsl:template>
581
582<xsl:template match="abstract" mode="book.titlepage.recto.auto.mode">
583<div xsl:use-attribute-sets="book.titlepage.recto.style">
584<xsl:apply-templates select="." mode="book.titlepage.recto.mode"/>
585</div>
586</xsl:template>
587
588<xsl:template name="part.titlepage.recto">
589 <div xsl:use-attribute-sets="part.titlepage.recto.style">
590<xsl:call-template name="division.title">
591<xsl:with-param name="node" select="ancestor-or-self::part[1]"/>
592</xsl:call-template></div>
593 <xsl:choose>
594 <xsl:when test="partinfo/subtitle">
595 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/subtitle"/>
596 </xsl:when>
597 <xsl:when test="docinfo/subtitle">
598 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
599 </xsl:when>
600 <xsl:when test="info/subtitle">
601 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/subtitle"/>
602 </xsl:when>
603 <xsl:when test="subtitle">
604 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="subtitle"/>
605 </xsl:when>
606 </xsl:choose>
607
608 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/corpauthor"/>
609 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
610 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/corpauthor"/>
611 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/authorgroup"/>
612 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
613 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/authorgroup"/>
614 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/author"/>
615 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/author"/>
616 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/author"/>
617 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/othercredit"/>
618 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
619 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/othercredit"/>
620 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/releaseinfo"/>
621 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
622 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/releaseinfo"/>
623 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/copyright"/>
624 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/copyright"/>
625 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/copyright"/>
626 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/legalnotice"/>
627 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
628 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/legalnotice"/>
629 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/pubdate"/>
630 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
631 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/pubdate"/>
632 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revision"/>
633 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revision"/>
634 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revision"/>
635 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/revhistory"/>
636 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
637 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/revhistory"/>
638 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="partinfo/abstract"/>
639 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="docinfo/abstract"/>
640 <xsl:apply-templates mode="part.titlepage.recto.auto.mode" select="info/abstract"/>
641</xsl:template>
642
643<xsl:template name="part.titlepage.verso">
644</xsl:template>
645
646<xsl:template name="part.titlepage.separator">
647</xsl:template>
648
649<xsl:template name="part.titlepage.before.recto">
650</xsl:template>
651
652<xsl:template name="part.titlepage.before.verso">
653</xsl:template>
654
655<xsl:template name="part.titlepage">
656 <div class="titlepage">
657 <xsl:variable name="recto.content">
658 <xsl:call-template name="part.titlepage.before.recto"/>
659 <xsl:call-template name="part.titlepage.recto"/>
660 </xsl:variable>
661 <xsl:variable name="recto.elements.count">
662 <xsl:choose>
663 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
664 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
665 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
666 <xsl:otherwise>1</xsl:otherwise>
667 </xsl:choose>
668 </xsl:variable>
669 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
670 <div><xsl:copy-of select="$recto.content"/></div>
671 </xsl:if>
672 <xsl:variable name="verso.content">
673 <xsl:call-template name="part.titlepage.before.verso"/>
674 <xsl:call-template name="part.titlepage.verso"/>
675 </xsl:variable>
676 <xsl:variable name="verso.elements.count">
677 <xsl:choose>
678 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
679 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
680 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
681 <xsl:otherwise>1</xsl:otherwise>
682 </xsl:choose>
683 </xsl:variable>
684 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
685 <div><xsl:copy-of select="$verso.content"/></div>
686 </xsl:if>
687 <xsl:call-template name="part.titlepage.separator"/>
688 </div>
689</xsl:template>
690
691<xsl:template match="*" mode="part.titlepage.recto.mode">
692 <!-- if an element isn't found in this mode, -->
693 <!-- try the generic titlepage.mode -->
694 <xsl:apply-templates select="." mode="titlepage.mode"/>
695</xsl:template>
696
697<xsl:template match="*" mode="part.titlepage.verso.mode">
698 <!-- if an element isn't found in this mode, -->
699 <!-- try the generic titlepage.mode -->
700 <xsl:apply-templates select="." mode="titlepage.mode"/>
701</xsl:template>
702
703<xsl:template match="subtitle" mode="part.titlepage.recto.auto.mode">
704<div xsl:use-attribute-sets="part.titlepage.recto.style">
705<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
706</div>
707</xsl:template>
708
709<xsl:template match="corpauthor" mode="part.titlepage.recto.auto.mode">
710<div xsl:use-attribute-sets="part.titlepage.recto.style">
711<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
712</div>
713</xsl:template>
714
715<xsl:template match="authorgroup" mode="part.titlepage.recto.auto.mode">
716<div xsl:use-attribute-sets="part.titlepage.recto.style">
717<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
718</div>
719</xsl:template>
720
721<xsl:template match="author" mode="part.titlepage.recto.auto.mode">
722<div xsl:use-attribute-sets="part.titlepage.recto.style">
723<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
724</div>
725</xsl:template>
726
727<xsl:template match="othercredit" mode="part.titlepage.recto.auto.mode">
728<div xsl:use-attribute-sets="part.titlepage.recto.style">
729<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
730</div>
731</xsl:template>
732
733<xsl:template match="releaseinfo" mode="part.titlepage.recto.auto.mode">
734<div xsl:use-attribute-sets="part.titlepage.recto.style">
735<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
736</div>
737</xsl:template>
738
739<xsl:template match="copyright" mode="part.titlepage.recto.auto.mode">
740<div xsl:use-attribute-sets="part.titlepage.recto.style">
741<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
742</div>
743</xsl:template>
744
745<xsl:template match="legalnotice" mode="part.titlepage.recto.auto.mode">
746<div xsl:use-attribute-sets="part.titlepage.recto.style">
747<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
748</div>
749</xsl:template>
750
751<xsl:template match="pubdate" mode="part.titlepage.recto.auto.mode">
752<div xsl:use-attribute-sets="part.titlepage.recto.style">
753<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
754</div>
755</xsl:template>
756
757<xsl:template match="revision" mode="part.titlepage.recto.auto.mode">
758<div xsl:use-attribute-sets="part.titlepage.recto.style">
759<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
760</div>
761</xsl:template>
762
763<xsl:template match="revhistory" mode="part.titlepage.recto.auto.mode">
764<div xsl:use-attribute-sets="part.titlepage.recto.style">
765<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
766</div>
767</xsl:template>
768
769<xsl:template match="abstract" mode="part.titlepage.recto.auto.mode">
770<div xsl:use-attribute-sets="part.titlepage.recto.style">
771<xsl:apply-templates select="." mode="part.titlepage.recto.mode"/>
772</div>
773</xsl:template>
774
775<xsl:template name="partintro.titlepage.recto">
776 <xsl:choose>
777 <xsl:when test="partintroinfo/title">
778 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/title"/>
779 </xsl:when>
780 <xsl:when test="docinfo/title">
781 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/title"/>
782 </xsl:when>
783 <xsl:when test="info/title">
784 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/title"/>
785 </xsl:when>
786 <xsl:when test="title">
787 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="title"/>
788 </xsl:when>
789 </xsl:choose>
790
791 <xsl:choose>
792 <xsl:when test="partintroinfo/subtitle">
793 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/subtitle"/>
794 </xsl:when>
795 <xsl:when test="docinfo/subtitle">
796 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
797 </xsl:when>
798 <xsl:when test="info/subtitle">
799 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/subtitle"/>
800 </xsl:when>
801 <xsl:when test="subtitle">
802 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="subtitle"/>
803 </xsl:when>
804 </xsl:choose>
805
806 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/corpauthor"/>
807 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
808 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/corpauthor"/>
809 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/authorgroup"/>
810 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
811 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/authorgroup"/>
812 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/author"/>
813 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/author"/>
814 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/author"/>
815 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/othercredit"/>
816 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
817 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/othercredit"/>
818 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/releaseinfo"/>
819 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
820 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/releaseinfo"/>
821 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/copyright"/>
822 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/copyright"/>
823 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/copyright"/>
824 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/legalnotice"/>
825 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
826 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/legalnotice"/>
827 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/pubdate"/>
828 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
829 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/pubdate"/>
830 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revision"/>
831 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revision"/>
832 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revision"/>
833 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/revhistory"/>
834 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
835 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/revhistory"/>
836 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="partintroinfo/abstract"/>
837 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="docinfo/abstract"/>
838 <xsl:apply-templates mode="partintro.titlepage.recto.auto.mode" select="info/abstract"/>
839</xsl:template>
840
841<xsl:template name="partintro.titlepage.verso">
842</xsl:template>
843
844<xsl:template name="partintro.titlepage.separator">
845</xsl:template>
846
847<xsl:template name="partintro.titlepage.before.recto">
848</xsl:template>
849
850<xsl:template name="partintro.titlepage.before.verso">
851</xsl:template>
852
853<xsl:template name="partintro.titlepage">
854 <div>
855 <xsl:variable name="recto.content">
856 <xsl:call-template name="partintro.titlepage.before.recto"/>
857 <xsl:call-template name="partintro.titlepage.recto"/>
858 </xsl:variable>
859 <xsl:variable name="recto.elements.count">
860 <xsl:choose>
861 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
862 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
863 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
864 <xsl:otherwise>1</xsl:otherwise>
865 </xsl:choose>
866 </xsl:variable>
867 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
868 <div><xsl:copy-of select="$recto.content"/></div>
869 </xsl:if>
870 <xsl:variable name="verso.content">
871 <xsl:call-template name="partintro.titlepage.before.verso"/>
872 <xsl:call-template name="partintro.titlepage.verso"/>
873 </xsl:variable>
874 <xsl:variable name="verso.elements.count">
875 <xsl:choose>
876 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
877 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
878 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
879 <xsl:otherwise>1</xsl:otherwise>
880 </xsl:choose>
881 </xsl:variable>
882 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
883 <div><xsl:copy-of select="$verso.content"/></div>
884 </xsl:if>
885 <xsl:call-template name="partintro.titlepage.separator"/>
886 </div>
887</xsl:template>
888
889<xsl:template match="*" mode="partintro.titlepage.recto.mode">
890 <!-- if an element isn't found in this mode, -->
891 <!-- try the generic titlepage.mode -->
892 <xsl:apply-templates select="." mode="titlepage.mode"/>
893</xsl:template>
894
895<xsl:template match="*" mode="partintro.titlepage.verso.mode">
896 <!-- if an element isn't found in this mode, -->
897 <!-- try the generic titlepage.mode -->
898 <xsl:apply-templates select="." mode="titlepage.mode"/>
899</xsl:template>
900
901<xsl:template match="title" mode="partintro.titlepage.recto.auto.mode">
902<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
903<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
904</div>
905</xsl:template>
906
907<xsl:template match="subtitle" mode="partintro.titlepage.recto.auto.mode">
908<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
909<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
910</div>
911</xsl:template>
912
913<xsl:template match="corpauthor" mode="partintro.titlepage.recto.auto.mode">
914<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
915<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
916</div>
917</xsl:template>
918
919<xsl:template match="authorgroup" mode="partintro.titlepage.recto.auto.mode">
920<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
921<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
922</div>
923</xsl:template>
924
925<xsl:template match="author" mode="partintro.titlepage.recto.auto.mode">
926<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
927<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
928</div>
929</xsl:template>
930
931<xsl:template match="othercredit" mode="partintro.titlepage.recto.auto.mode">
932<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
933<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
934</div>
935</xsl:template>
936
937<xsl:template match="releaseinfo" mode="partintro.titlepage.recto.auto.mode">
938<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
939<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
940</div>
941</xsl:template>
942
943<xsl:template match="copyright" mode="partintro.titlepage.recto.auto.mode">
944<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
945<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
946</div>
947</xsl:template>
948
949<xsl:template match="legalnotice" mode="partintro.titlepage.recto.auto.mode">
950<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
951<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
952</div>
953</xsl:template>
954
955<xsl:template match="pubdate" mode="partintro.titlepage.recto.auto.mode">
956<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
957<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
958</div>
959</xsl:template>
960
961<xsl:template match="revision" mode="partintro.titlepage.recto.auto.mode">
962<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
963<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
964</div>
965</xsl:template>
966
967<xsl:template match="revhistory" mode="partintro.titlepage.recto.auto.mode">
968<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
969<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
970</div>
971</xsl:template>
972
973<xsl:template match="abstract" mode="partintro.titlepage.recto.auto.mode">
974<div xsl:use-attribute-sets="partintro.titlepage.recto.style">
975<xsl:apply-templates select="." mode="partintro.titlepage.recto.mode"/>
976</div>
977</xsl:template>
978
979<xsl:template name="reference.titlepage.recto">
980 <xsl:choose>
981 <xsl:when test="referenceinfo/title">
982 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/title"/>
983 </xsl:when>
984 <xsl:when test="docinfo/title">
985 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/title"/>
986 </xsl:when>
987 <xsl:when test="info/title">
988 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/title"/>
989 </xsl:when>
990 <xsl:when test="title">
991 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="title"/>
992 </xsl:when>
993 </xsl:choose>
994
995 <xsl:choose>
996 <xsl:when test="referenceinfo/subtitle">
997 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/subtitle"/>
998 </xsl:when>
999 <xsl:when test="docinfo/subtitle">
1000 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1001 </xsl:when>
1002 <xsl:when test="info/subtitle">
1003 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/subtitle"/>
1004 </xsl:when>
1005 <xsl:when test="subtitle">
1006 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="subtitle"/>
1007 </xsl:when>
1008 </xsl:choose>
1009
1010 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/corpauthor"/>
1011 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1012 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/corpauthor"/>
1013 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/authorgroup"/>
1014 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1015 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/authorgroup"/>
1016 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/author"/>
1017 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/author"/>
1018 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/author"/>
1019 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/othercredit"/>
1020 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1021 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/othercredit"/>
1022 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/releaseinfo"/>
1023 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1024 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1025 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/copyright"/>
1026 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1027 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/copyright"/>
1028 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/legalnotice"/>
1029 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1030 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/legalnotice"/>
1031 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/pubdate"/>
1032 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1033 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/pubdate"/>
1034 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revision"/>
1035 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revision"/>
1036 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revision"/>
1037 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/revhistory"/>
1038 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1039 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/revhistory"/>
1040 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="referenceinfo/abstract"/>
1041 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1042 <xsl:apply-templates mode="reference.titlepage.recto.auto.mode" select="info/abstract"/>
1043</xsl:template>
1044
1045<xsl:template name="reference.titlepage.verso">
1046</xsl:template>
1047
1048<xsl:template name="reference.titlepage.separator"><hr/>
1049</xsl:template>
1050
1051<xsl:template name="reference.titlepage.before.recto">
1052</xsl:template>
1053
1054<xsl:template name="reference.titlepage.before.verso">
1055</xsl:template>
1056
1057<xsl:template name="reference.titlepage">
1058 <div class="titlepage">
1059 <xsl:variable name="recto.content">
1060 <xsl:call-template name="reference.titlepage.before.recto"/>
1061 <xsl:call-template name="reference.titlepage.recto"/>
1062 </xsl:variable>
1063 <xsl:variable name="recto.elements.count">
1064 <xsl:choose>
1065 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1066 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1067 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1068 <xsl:otherwise>1</xsl:otherwise>
1069 </xsl:choose>
1070 </xsl:variable>
1071 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1072 <div><xsl:copy-of select="$recto.content"/></div>
1073 </xsl:if>
1074 <xsl:variable name="verso.content">
1075 <xsl:call-template name="reference.titlepage.before.verso"/>
1076 <xsl:call-template name="reference.titlepage.verso"/>
1077 </xsl:variable>
1078 <xsl:variable name="verso.elements.count">
1079 <xsl:choose>
1080 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1081 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1082 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1083 <xsl:otherwise>1</xsl:otherwise>
1084 </xsl:choose>
1085 </xsl:variable>
1086 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1087 <div><xsl:copy-of select="$verso.content"/></div>
1088 </xsl:if>
1089 <xsl:call-template name="reference.titlepage.separator"/>
1090 </div>
1091</xsl:template>
1092
1093<xsl:template match="*" mode="reference.titlepage.recto.mode">
1094 <!-- if an element isn't found in this mode, -->
1095 <!-- try the generic titlepage.mode -->
1096 <xsl:apply-templates select="." mode="titlepage.mode"/>
1097</xsl:template>
1098
1099<xsl:template match="*" mode="reference.titlepage.verso.mode">
1100 <!-- if an element isn't found in this mode, -->
1101 <!-- try the generic titlepage.mode -->
1102 <xsl:apply-templates select="." mode="titlepage.mode"/>
1103</xsl:template>
1104
1105<xsl:template match="title" mode="reference.titlepage.recto.auto.mode">
1106<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1107<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1108</div>
1109</xsl:template>
1110
1111<xsl:template match="subtitle" mode="reference.titlepage.recto.auto.mode">
1112<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1113<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1114</div>
1115</xsl:template>
1116
1117<xsl:template match="corpauthor" mode="reference.titlepage.recto.auto.mode">
1118<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1119<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1120</div>
1121</xsl:template>
1122
1123<xsl:template match="authorgroup" mode="reference.titlepage.recto.auto.mode">
1124<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1125<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1126</div>
1127</xsl:template>
1128
1129<xsl:template match="author" mode="reference.titlepage.recto.auto.mode">
1130<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1131<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1132</div>
1133</xsl:template>
1134
1135<xsl:template match="othercredit" mode="reference.titlepage.recto.auto.mode">
1136<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1137<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1138</div>
1139</xsl:template>
1140
1141<xsl:template match="releaseinfo" mode="reference.titlepage.recto.auto.mode">
1142<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1143<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1144</div>
1145</xsl:template>
1146
1147<xsl:template match="copyright" mode="reference.titlepage.recto.auto.mode">
1148<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1149<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1150</div>
1151</xsl:template>
1152
1153<xsl:template match="legalnotice" mode="reference.titlepage.recto.auto.mode">
1154<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1155<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1156</div>
1157</xsl:template>
1158
1159<xsl:template match="pubdate" mode="reference.titlepage.recto.auto.mode">
1160<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1161<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1162</div>
1163</xsl:template>
1164
1165<xsl:template match="revision" mode="reference.titlepage.recto.auto.mode">
1166<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1167<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1168</div>
1169</xsl:template>
1170
1171<xsl:template match="revhistory" mode="reference.titlepage.recto.auto.mode">
1172<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1173<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1174</div>
1175</xsl:template>
1176
1177<xsl:template match="abstract" mode="reference.titlepage.recto.auto.mode">
1178<div xsl:use-attribute-sets="reference.titlepage.recto.style">
1179<xsl:apply-templates select="." mode="reference.titlepage.recto.mode"/>
1180</div>
1181</xsl:template>
1182
1183<xsl:template name="refentry.titlepage.recto">
1184</xsl:template>
1185
1186<xsl:template name="refentry.titlepage.verso">
1187</xsl:template>
1188
1189<xsl:template name="refentry.titlepage.separator">
1190</xsl:template>
1191
1192<xsl:template name="refentry.titlepage.before.recto">
1193</xsl:template>
1194
1195<xsl:template name="refentry.titlepage.before.verso">
1196</xsl:template>
1197
1198<xsl:template name="refentry.titlepage">
1199 <div class="titlepage">
1200 <xsl:variable name="recto.content">
1201 <xsl:call-template name="refentry.titlepage.before.recto"/>
1202 <xsl:call-template name="refentry.titlepage.recto"/>
1203 </xsl:variable>
1204 <xsl:variable name="recto.elements.count">
1205 <xsl:choose>
1206 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1207 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1208 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1209 <xsl:otherwise>1</xsl:otherwise>
1210 </xsl:choose>
1211 </xsl:variable>
1212 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1213 <div><xsl:copy-of select="$recto.content"/></div>
1214 </xsl:if>
1215 <xsl:variable name="verso.content">
1216 <xsl:call-template name="refentry.titlepage.before.verso"/>
1217 <xsl:call-template name="refentry.titlepage.verso"/>
1218 </xsl:variable>
1219 <xsl:variable name="verso.elements.count">
1220 <xsl:choose>
1221 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1222 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1223 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1224 <xsl:otherwise>1</xsl:otherwise>
1225 </xsl:choose>
1226 </xsl:variable>
1227 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1228 <div><xsl:copy-of select="$verso.content"/></div>
1229 </xsl:if>
1230 <xsl:call-template name="refentry.titlepage.separator"/>
1231 </div>
1232</xsl:template>
1233
1234<xsl:template match="*" mode="refentry.titlepage.recto.mode">
1235 <!-- if an element isn't found in this mode, -->
1236 <!-- try the generic titlepage.mode -->
1237 <xsl:apply-templates select="." mode="titlepage.mode"/>
1238</xsl:template>
1239
1240<xsl:template match="*" mode="refentry.titlepage.verso.mode">
1241 <!-- if an element isn't found in this mode, -->
1242 <!-- try the generic titlepage.mode -->
1243 <xsl:apply-templates select="." mode="titlepage.mode"/>
1244</xsl:template>
1245
1246<xsl:template name="dedication.titlepage.recto">
1247 <div xsl:use-attribute-sets="dedication.titlepage.recto.style">
1248<xsl:call-template name="component.title">
1249<xsl:with-param name="node" select="ancestor-or-self::dedication[1]"/>
1250</xsl:call-template></div>
1251 <xsl:choose>
1252 <xsl:when test="dedicationinfo/subtitle">
1253 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="dedicationinfo/subtitle"/>
1254 </xsl:when>
1255 <xsl:when test="docinfo/subtitle">
1256 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1257 </xsl:when>
1258 <xsl:when test="info/subtitle">
1259 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="info/subtitle"/>
1260 </xsl:when>
1261 <xsl:when test="subtitle">
1262 <xsl:apply-templates mode="dedication.titlepage.recto.auto.mode" select="subtitle"/>
1263 </xsl:when>
1264 </xsl:choose>
1265
1266</xsl:template>
1267
1268<xsl:template name="dedication.titlepage.verso">
1269</xsl:template>
1270
1271<xsl:template name="dedication.titlepage.separator">
1272</xsl:template>
1273
1274<xsl:template name="dedication.titlepage.before.recto">
1275</xsl:template>
1276
1277<xsl:template name="dedication.titlepage.before.verso">
1278</xsl:template>
1279
1280<xsl:template name="dedication.titlepage">
1281 <div class="titlepage">
1282 <xsl:variable name="recto.content">
1283 <xsl:call-template name="dedication.titlepage.before.recto"/>
1284 <xsl:call-template name="dedication.titlepage.recto"/>
1285 </xsl:variable>
1286 <xsl:variable name="recto.elements.count">
1287 <xsl:choose>
1288 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1289 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1290 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1291 <xsl:otherwise>1</xsl:otherwise>
1292 </xsl:choose>
1293 </xsl:variable>
1294 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1295 <div><xsl:copy-of select="$recto.content"/></div>
1296 </xsl:if>
1297 <xsl:variable name="verso.content">
1298 <xsl:call-template name="dedication.titlepage.before.verso"/>
1299 <xsl:call-template name="dedication.titlepage.verso"/>
1300 </xsl:variable>
1301 <xsl:variable name="verso.elements.count">
1302 <xsl:choose>
1303 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1304 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1305 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1306 <xsl:otherwise>1</xsl:otherwise>
1307 </xsl:choose>
1308 </xsl:variable>
1309 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1310 <div><xsl:copy-of select="$verso.content"/></div>
1311 </xsl:if>
1312 <xsl:call-template name="dedication.titlepage.separator"/>
1313 </div>
1314</xsl:template>
1315
1316<xsl:template match="*" mode="dedication.titlepage.recto.mode">
1317 <!-- if an element isn't found in this mode, -->
1318 <!-- try the generic titlepage.mode -->
1319 <xsl:apply-templates select="." mode="titlepage.mode"/>
1320</xsl:template>
1321
1322<xsl:template match="*" mode="dedication.titlepage.verso.mode">
1323 <!-- if an element isn't found in this mode, -->
1324 <!-- try the generic titlepage.mode -->
1325 <xsl:apply-templates select="." mode="titlepage.mode"/>
1326</xsl:template>
1327
1328<xsl:template match="subtitle" mode="dedication.titlepage.recto.auto.mode">
1329<div xsl:use-attribute-sets="dedication.titlepage.recto.style">
1330<xsl:apply-templates select="." mode="dedication.titlepage.recto.mode"/>
1331</div>
1332</xsl:template>
1333
1334<xsl:template name="acknowledgements.titlepage.recto">
1335 <div xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
1336<xsl:call-template name="component.title">
1337<xsl:with-param name="node" select="ancestor-or-self::acknowledgements[1]"/>
1338</xsl:call-template></div>
1339 <xsl:choose>
1340 <xsl:when test="acknowledgementsinfo/subtitle">
1341 <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="acknowledgementsinfo/subtitle"/>
1342 </xsl:when>
1343 <xsl:when test="docinfo/subtitle">
1344 <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1345 </xsl:when>
1346 <xsl:when test="info/subtitle">
1347 <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="info/subtitle"/>
1348 </xsl:when>
1349 <xsl:when test="subtitle">
1350 <xsl:apply-templates mode="acknowledgements.titlepage.recto.auto.mode" select="subtitle"/>
1351 </xsl:when>
1352 </xsl:choose>
1353
1354</xsl:template>
1355
1356<xsl:template name="acknowledgements.titlepage.verso">
1357</xsl:template>
1358
1359<xsl:template name="acknowledgements.titlepage.separator">
1360</xsl:template>
1361
1362<xsl:template name="acknowledgements.titlepage.before.recto">
1363</xsl:template>
1364
1365<xsl:template name="acknowledgements.titlepage.before.verso">
1366</xsl:template>
1367
1368<xsl:template name="acknowledgements.titlepage">
1369 <div class="titlepage">
1370 <xsl:variable name="recto.content">
1371 <xsl:call-template name="acknowledgements.titlepage.before.recto"/>
1372 <xsl:call-template name="acknowledgements.titlepage.recto"/>
1373 </xsl:variable>
1374 <xsl:variable name="recto.elements.count">
1375 <xsl:choose>
1376 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1377 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1378 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1379 <xsl:otherwise>1</xsl:otherwise>
1380 </xsl:choose>
1381 </xsl:variable>
1382 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1383 <div><xsl:copy-of select="$recto.content"/></div>
1384 </xsl:if>
1385 <xsl:variable name="verso.content">
1386 <xsl:call-template name="acknowledgements.titlepage.before.verso"/>
1387 <xsl:call-template name="acknowledgements.titlepage.verso"/>
1388 </xsl:variable>
1389 <xsl:variable name="verso.elements.count">
1390 <xsl:choose>
1391 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1392 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1393 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1394 <xsl:otherwise>1</xsl:otherwise>
1395 </xsl:choose>
1396 </xsl:variable>
1397 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1398 <div><xsl:copy-of select="$verso.content"/></div>
1399 </xsl:if>
1400 <xsl:call-template name="acknowledgements.titlepage.separator"/>
1401 </div>
1402</xsl:template>
1403
1404<xsl:template match="*" mode="acknowledgements.titlepage.recto.mode">
1405 <!-- if an element isn't found in this mode, -->
1406 <!-- try the generic titlepage.mode -->
1407 <xsl:apply-templates select="." mode="titlepage.mode"/>
1408</xsl:template>
1409
1410<xsl:template match="*" mode="acknowledgements.titlepage.verso.mode">
1411 <!-- if an element isn't found in this mode, -->
1412 <!-- try the generic titlepage.mode -->
1413 <xsl:apply-templates select="." mode="titlepage.mode"/>
1414</xsl:template>
1415
1416<xsl:template match="subtitle" mode="acknowledgements.titlepage.recto.auto.mode">
1417<div xsl:use-attribute-sets="acknowledgements.titlepage.recto.style">
1418<xsl:apply-templates select="." mode="acknowledgements.titlepage.recto.mode"/>
1419</div>
1420</xsl:template>
1421
1422<xsl:template name="preface.titlepage.recto">
1423 <xsl:choose>
1424 <xsl:when test="prefaceinfo/title">
1425 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/title"/>
1426 </xsl:when>
1427 <xsl:when test="docinfo/title">
1428 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/title"/>
1429 </xsl:when>
1430 <xsl:when test="info/title">
1431 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/title"/>
1432 </xsl:when>
1433 <xsl:when test="title">
1434 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="title"/>
1435 </xsl:when>
1436 </xsl:choose>
1437
1438 <xsl:choose>
1439 <xsl:when test="prefaceinfo/subtitle">
1440 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/subtitle"/>
1441 </xsl:when>
1442 <xsl:when test="docinfo/subtitle">
1443 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1444 </xsl:when>
1445 <xsl:when test="info/subtitle">
1446 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/subtitle"/>
1447 </xsl:when>
1448 <xsl:when test="subtitle">
1449 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="subtitle"/>
1450 </xsl:when>
1451 </xsl:choose>
1452
1453 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/corpauthor"/>
1454 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1455 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/corpauthor"/>
1456 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/authorgroup"/>
1457 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1458 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/authorgroup"/>
1459 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/author"/>
1460 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/author"/>
1461 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/author"/>
1462 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/othercredit"/>
1463 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1464 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/othercredit"/>
1465 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/releaseinfo"/>
1466 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1467 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1468 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/copyright"/>
1469 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1470 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/copyright"/>
1471 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/legalnotice"/>
1472 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1473 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/legalnotice"/>
1474 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/pubdate"/>
1475 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1476 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/pubdate"/>
1477 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revision"/>
1478 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revision"/>
1479 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revision"/>
1480 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/revhistory"/>
1481 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1482 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/revhistory"/>
1483 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="prefaceinfo/abstract"/>
1484 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1485 <xsl:apply-templates mode="preface.titlepage.recto.auto.mode" select="info/abstract"/>
1486</xsl:template>
1487
1488<xsl:template name="preface.titlepage.verso">
1489</xsl:template>
1490
1491<xsl:template name="preface.titlepage.separator">
1492</xsl:template>
1493
1494<xsl:template name="preface.titlepage.before.recto">
1495</xsl:template>
1496
1497<xsl:template name="preface.titlepage.before.verso">
1498</xsl:template>
1499
1500<xsl:template name="preface.titlepage">
1501 <div class="titlepage">
1502 <xsl:variable name="recto.content">
1503 <xsl:call-template name="preface.titlepage.before.recto"/>
1504 <xsl:call-template name="preface.titlepage.recto"/>
1505 </xsl:variable>
1506 <xsl:variable name="recto.elements.count">
1507 <xsl:choose>
1508 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1509 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1510 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1511 <xsl:otherwise>1</xsl:otherwise>
1512 </xsl:choose>
1513 </xsl:variable>
1514 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1515 <div><xsl:copy-of select="$recto.content"/></div>
1516 </xsl:if>
1517 <xsl:variable name="verso.content">
1518 <xsl:call-template name="preface.titlepage.before.verso"/>
1519 <xsl:call-template name="preface.titlepage.verso"/>
1520 </xsl:variable>
1521 <xsl:variable name="verso.elements.count">
1522 <xsl:choose>
1523 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1524 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1525 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1526 <xsl:otherwise>1</xsl:otherwise>
1527 </xsl:choose>
1528 </xsl:variable>
1529 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1530 <div><xsl:copy-of select="$verso.content"/></div>
1531 </xsl:if>
1532 <xsl:call-template name="preface.titlepage.separator"/>
1533 </div>
1534</xsl:template>
1535
1536<xsl:template match="*" mode="preface.titlepage.recto.mode">
1537 <!-- if an element isn't found in this mode, -->
1538 <!-- try the generic titlepage.mode -->
1539 <xsl:apply-templates select="." mode="titlepage.mode"/>
1540</xsl:template>
1541
1542<xsl:template match="*" mode="preface.titlepage.verso.mode">
1543 <!-- if an element isn't found in this mode, -->
1544 <!-- try the generic titlepage.mode -->
1545 <xsl:apply-templates select="." mode="titlepage.mode"/>
1546</xsl:template>
1547
1548<xsl:template match="title" mode="preface.titlepage.recto.auto.mode">
1549<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1550<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1551</div>
1552</xsl:template>
1553
1554<xsl:template match="subtitle" mode="preface.titlepage.recto.auto.mode">
1555<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1556<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1557</div>
1558</xsl:template>
1559
1560<xsl:template match="corpauthor" mode="preface.titlepage.recto.auto.mode">
1561<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1562<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1563</div>
1564</xsl:template>
1565
1566<xsl:template match="authorgroup" mode="preface.titlepage.recto.auto.mode">
1567<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1568<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1569</div>
1570</xsl:template>
1571
1572<xsl:template match="author" mode="preface.titlepage.recto.auto.mode">
1573<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1574<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1575</div>
1576</xsl:template>
1577
1578<xsl:template match="othercredit" mode="preface.titlepage.recto.auto.mode">
1579<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1580<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1581</div>
1582</xsl:template>
1583
1584<xsl:template match="releaseinfo" mode="preface.titlepage.recto.auto.mode">
1585<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1586<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1587</div>
1588</xsl:template>
1589
1590<xsl:template match="copyright" mode="preface.titlepage.recto.auto.mode">
1591<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1592<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1593</div>
1594</xsl:template>
1595
1596<xsl:template match="legalnotice" mode="preface.titlepage.recto.auto.mode">
1597<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1598<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1599</div>
1600</xsl:template>
1601
1602<xsl:template match="pubdate" mode="preface.titlepage.recto.auto.mode">
1603<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1604<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1605</div>
1606</xsl:template>
1607
1608<xsl:template match="revision" mode="preface.titlepage.recto.auto.mode">
1609<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1610<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1611</div>
1612</xsl:template>
1613
1614<xsl:template match="revhistory" mode="preface.titlepage.recto.auto.mode">
1615<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1616<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1617</div>
1618</xsl:template>
1619
1620<xsl:template match="abstract" mode="preface.titlepage.recto.auto.mode">
1621<div xsl:use-attribute-sets="preface.titlepage.recto.style">
1622<xsl:apply-templates select="." mode="preface.titlepage.recto.mode"/>
1623</div>
1624</xsl:template>
1625
1626<xsl:template name="chapter.titlepage.recto">
1627 <xsl:choose>
1628 <xsl:when test="chapterinfo/title">
1629 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/title"/>
1630 </xsl:when>
1631 <xsl:when test="docinfo/title">
1632 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/title"/>
1633 </xsl:when>
1634 <xsl:when test="info/title">
1635 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/title"/>
1636 </xsl:when>
1637 <xsl:when test="title">
1638 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="title"/>
1639 </xsl:when>
1640 </xsl:choose>
1641
1642 <xsl:choose>
1643 <xsl:when test="chapterinfo/subtitle">
1644 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/subtitle"/>
1645 </xsl:when>
1646 <xsl:when test="docinfo/subtitle">
1647 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1648 </xsl:when>
1649 <xsl:when test="info/subtitle">
1650 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/subtitle"/>
1651 </xsl:when>
1652 <xsl:when test="subtitle">
1653 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="subtitle"/>
1654 </xsl:when>
1655 </xsl:choose>
1656
1657 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/corpauthor"/>
1658 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1659 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/corpauthor"/>
1660 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/authorgroup"/>
1661 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1662 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/authorgroup"/>
1663 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/author"/>
1664 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/author"/>
1665 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/author"/>
1666 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/othercredit"/>
1667 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1668 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/othercredit"/>
1669 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/releaseinfo"/>
1670 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1671 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1672 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/copyright"/>
1673 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1674 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/copyright"/>
1675 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/legalnotice"/>
1676 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1677 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/legalnotice"/>
1678 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/pubdate"/>
1679 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1680 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/pubdate"/>
1681 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revision"/>
1682 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revision"/>
1683 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revision"/>
1684 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/revhistory"/>
1685 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1686 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/revhistory"/>
1687 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="chapterinfo/abstract"/>
1688 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1689 <xsl:apply-templates mode="chapter.titlepage.recto.auto.mode" select="info/abstract"/>
1690</xsl:template>
1691
1692<xsl:template name="chapter.titlepage.verso">
1693</xsl:template>
1694
1695<xsl:template name="chapter.titlepage.separator">
1696</xsl:template>
1697
1698<xsl:template name="chapter.titlepage.before.recto">
1699</xsl:template>
1700
1701<xsl:template name="chapter.titlepage.before.verso">
1702</xsl:template>
1703
1704<xsl:template name="chapter.titlepage">
1705 <div class="titlepage">
1706 <xsl:variable name="recto.content">
1707 <xsl:call-template name="chapter.titlepage.before.recto"/>
1708 <xsl:call-template name="chapter.titlepage.recto"/>
1709 </xsl:variable>
1710 <xsl:variable name="recto.elements.count">
1711 <xsl:choose>
1712 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1713 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1714 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1715 <xsl:otherwise>1</xsl:otherwise>
1716 </xsl:choose>
1717 </xsl:variable>
1718 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1719 <div><xsl:copy-of select="$recto.content"/></div>
1720 </xsl:if>
1721 <xsl:variable name="verso.content">
1722 <xsl:call-template name="chapter.titlepage.before.verso"/>
1723 <xsl:call-template name="chapter.titlepage.verso"/>
1724 </xsl:variable>
1725 <xsl:variable name="verso.elements.count">
1726 <xsl:choose>
1727 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1728 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1729 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1730 <xsl:otherwise>1</xsl:otherwise>
1731 </xsl:choose>
1732 </xsl:variable>
1733 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1734 <div><xsl:copy-of select="$verso.content"/></div>
1735 </xsl:if>
1736 <xsl:call-template name="chapter.titlepage.separator"/>
1737 </div>
1738</xsl:template>
1739
1740<xsl:template match="*" mode="chapter.titlepage.recto.mode">
1741 <!-- if an element isn't found in this mode, -->
1742 <!-- try the generic titlepage.mode -->
1743 <xsl:apply-templates select="." mode="titlepage.mode"/>
1744</xsl:template>
1745
1746<xsl:template match="*" mode="chapter.titlepage.verso.mode">
1747 <!-- if an element isn't found in this mode, -->
1748 <!-- try the generic titlepage.mode -->
1749 <xsl:apply-templates select="." mode="titlepage.mode"/>
1750</xsl:template>
1751
1752<xsl:template match="title" mode="chapter.titlepage.recto.auto.mode">
1753<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1754<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1755</div>
1756</xsl:template>
1757
1758<xsl:template match="subtitle" mode="chapter.titlepage.recto.auto.mode">
1759<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1760<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1761</div>
1762</xsl:template>
1763
1764<xsl:template match="corpauthor" mode="chapter.titlepage.recto.auto.mode">
1765<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1766<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1767</div>
1768</xsl:template>
1769
1770<xsl:template match="authorgroup" mode="chapter.titlepage.recto.auto.mode">
1771<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1772<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1773</div>
1774</xsl:template>
1775
1776<xsl:template match="author" mode="chapter.titlepage.recto.auto.mode">
1777<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1778<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1779</div>
1780</xsl:template>
1781
1782<xsl:template match="othercredit" mode="chapter.titlepage.recto.auto.mode">
1783<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1784<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1785</div>
1786</xsl:template>
1787
1788<xsl:template match="releaseinfo" mode="chapter.titlepage.recto.auto.mode">
1789<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1790<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1791</div>
1792</xsl:template>
1793
1794<xsl:template match="copyright" mode="chapter.titlepage.recto.auto.mode">
1795<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1796<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1797</div>
1798</xsl:template>
1799
1800<xsl:template match="legalnotice" mode="chapter.titlepage.recto.auto.mode">
1801<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1802<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1803</div>
1804</xsl:template>
1805
1806<xsl:template match="pubdate" mode="chapter.titlepage.recto.auto.mode">
1807<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1808<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1809</div>
1810</xsl:template>
1811
1812<xsl:template match="revision" mode="chapter.titlepage.recto.auto.mode">
1813<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1814<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1815</div>
1816</xsl:template>
1817
1818<xsl:template match="revhistory" mode="chapter.titlepage.recto.auto.mode">
1819<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1820<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1821</div>
1822</xsl:template>
1823
1824<xsl:template match="abstract" mode="chapter.titlepage.recto.auto.mode">
1825<div xsl:use-attribute-sets="chapter.titlepage.recto.style">
1826<xsl:apply-templates select="." mode="chapter.titlepage.recto.mode"/>
1827</div>
1828</xsl:template>
1829
1830<xsl:template name="appendix.titlepage.recto">
1831 <xsl:choose>
1832 <xsl:when test="appendixinfo/title">
1833 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/title"/>
1834 </xsl:when>
1835 <xsl:when test="docinfo/title">
1836 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/title"/>
1837 </xsl:when>
1838 <xsl:when test="info/title">
1839 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/title"/>
1840 </xsl:when>
1841 <xsl:when test="title">
1842 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="title"/>
1843 </xsl:when>
1844 </xsl:choose>
1845
1846 <xsl:choose>
1847 <xsl:when test="appendixinfo/subtitle">
1848 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/subtitle"/>
1849 </xsl:when>
1850 <xsl:when test="docinfo/subtitle">
1851 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
1852 </xsl:when>
1853 <xsl:when test="info/subtitle">
1854 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/subtitle"/>
1855 </xsl:when>
1856 <xsl:when test="subtitle">
1857 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="subtitle"/>
1858 </xsl:when>
1859 </xsl:choose>
1860
1861 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/corpauthor"/>
1862 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
1863 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/corpauthor"/>
1864 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/authorgroup"/>
1865 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
1866 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/authorgroup"/>
1867 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/author"/>
1868 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/author"/>
1869 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/author"/>
1870 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/othercredit"/>
1871 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
1872 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/othercredit"/>
1873 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/releaseinfo"/>
1874 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
1875 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/releaseinfo"/>
1876 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/copyright"/>
1877 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/copyright"/>
1878 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/copyright"/>
1879 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/legalnotice"/>
1880 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
1881 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/legalnotice"/>
1882 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/pubdate"/>
1883 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
1884 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/pubdate"/>
1885 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revision"/>
1886 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revision"/>
1887 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revision"/>
1888 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/revhistory"/>
1889 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
1890 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/revhistory"/>
1891 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="appendixinfo/abstract"/>
1892 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="docinfo/abstract"/>
1893 <xsl:apply-templates mode="appendix.titlepage.recto.auto.mode" select="info/abstract"/>
1894</xsl:template>
1895
1896<xsl:template name="appendix.titlepage.verso">
1897</xsl:template>
1898
1899<xsl:template name="appendix.titlepage.separator">
1900</xsl:template>
1901
1902<xsl:template name="appendix.titlepage.before.recto">
1903</xsl:template>
1904
1905<xsl:template name="appendix.titlepage.before.verso">
1906</xsl:template>
1907
1908<xsl:template name="appendix.titlepage">
1909 <div class="titlepage">
1910 <xsl:variable name="recto.content">
1911 <xsl:call-template name="appendix.titlepage.before.recto"/>
1912 <xsl:call-template name="appendix.titlepage.recto"/>
1913 </xsl:variable>
1914 <xsl:variable name="recto.elements.count">
1915 <xsl:choose>
1916 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1917 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1918 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
1919 <xsl:otherwise>1</xsl:otherwise>
1920 </xsl:choose>
1921 </xsl:variable>
1922 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
1923 <div><xsl:copy-of select="$recto.content"/></div>
1924 </xsl:if>
1925 <xsl:variable name="verso.content">
1926 <xsl:call-template name="appendix.titlepage.before.verso"/>
1927 <xsl:call-template name="appendix.titlepage.verso"/>
1928 </xsl:variable>
1929 <xsl:variable name="verso.elements.count">
1930 <xsl:choose>
1931 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1932 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
1933 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
1934 <xsl:otherwise>1</xsl:otherwise>
1935 </xsl:choose>
1936 </xsl:variable>
1937 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
1938 <div><xsl:copy-of select="$verso.content"/></div>
1939 </xsl:if>
1940 <xsl:call-template name="appendix.titlepage.separator"/>
1941 </div>
1942</xsl:template>
1943
1944<xsl:template match="*" mode="appendix.titlepage.recto.mode">
1945 <!-- if an element isn't found in this mode, -->
1946 <!-- try the generic titlepage.mode -->
1947 <xsl:apply-templates select="." mode="titlepage.mode"/>
1948</xsl:template>
1949
1950<xsl:template match="*" mode="appendix.titlepage.verso.mode">
1951 <!-- if an element isn't found in this mode, -->
1952 <!-- try the generic titlepage.mode -->
1953 <xsl:apply-templates select="." mode="titlepage.mode"/>
1954</xsl:template>
1955
1956<xsl:template match="title" mode="appendix.titlepage.recto.auto.mode">
1957<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1958<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1959</div>
1960</xsl:template>
1961
1962<xsl:template match="subtitle" mode="appendix.titlepage.recto.auto.mode">
1963<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1964<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1965</div>
1966</xsl:template>
1967
1968<xsl:template match="corpauthor" mode="appendix.titlepage.recto.auto.mode">
1969<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1970<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1971</div>
1972</xsl:template>
1973
1974<xsl:template match="authorgroup" mode="appendix.titlepage.recto.auto.mode">
1975<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1976<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1977</div>
1978</xsl:template>
1979
1980<xsl:template match="author" mode="appendix.titlepage.recto.auto.mode">
1981<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1982<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1983</div>
1984</xsl:template>
1985
1986<xsl:template match="othercredit" mode="appendix.titlepage.recto.auto.mode">
1987<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1988<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1989</div>
1990</xsl:template>
1991
1992<xsl:template match="releaseinfo" mode="appendix.titlepage.recto.auto.mode">
1993<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
1994<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
1995</div>
1996</xsl:template>
1997
1998<xsl:template match="copyright" mode="appendix.titlepage.recto.auto.mode">
1999<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2000<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2001</div>
2002</xsl:template>
2003
2004<xsl:template match="legalnotice" mode="appendix.titlepage.recto.auto.mode">
2005<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2006<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2007</div>
2008</xsl:template>
2009
2010<xsl:template match="pubdate" mode="appendix.titlepage.recto.auto.mode">
2011<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2012<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2013</div>
2014</xsl:template>
2015
2016<xsl:template match="revision" mode="appendix.titlepage.recto.auto.mode">
2017<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2018<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2019</div>
2020</xsl:template>
2021
2022<xsl:template match="revhistory" mode="appendix.titlepage.recto.auto.mode">
2023<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2024<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2025</div>
2026</xsl:template>
2027
2028<xsl:template match="abstract" mode="appendix.titlepage.recto.auto.mode">
2029<div xsl:use-attribute-sets="appendix.titlepage.recto.style">
2030<xsl:apply-templates select="." mode="appendix.titlepage.recto.mode"/>
2031</div>
2032</xsl:template>
2033
2034<xsl:template name="section.titlepage.recto">
2035 <xsl:choose>
2036 <xsl:when test="sectioninfo/title">
2037 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/title"/>
2038 </xsl:when>
2039 <xsl:when test="info/title">
2040 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/title"/>
2041 </xsl:when>
2042 <xsl:when test="title">
2043 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="title"/>
2044 </xsl:when>
2045 </xsl:choose>
2046
2047 <xsl:choose>
2048 <xsl:when test="sectioninfo/subtitle">
2049 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/subtitle"/>
2050 </xsl:when>
2051 <xsl:when test="info/subtitle">
2052 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/subtitle"/>
2053 </xsl:when>
2054 <xsl:when test="subtitle">
2055 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="subtitle"/>
2056 </xsl:when>
2057 </xsl:choose>
2058
2059 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/corpauthor"/>
2060 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/corpauthor"/>
2061 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/authorgroup"/>
2062 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/authorgroup"/>
2063 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/author"/>
2064 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/author"/>
2065 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/othercredit"/>
2066 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/othercredit"/>
2067 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/releaseinfo"/>
2068 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2069 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/copyright"/>
2070 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/copyright"/>
2071 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/legalnotice"/>
2072 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/legalnotice"/>
2073 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/pubdate"/>
2074 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/pubdate"/>
2075 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revision"/>
2076 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revision"/>
2077 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/revhistory"/>
2078 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/revhistory"/>
2079 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="sectioninfo/abstract"/>
2080 <xsl:apply-templates mode="section.titlepage.recto.auto.mode" select="info/abstract"/>
2081</xsl:template>
2082
2083<xsl:template name="section.titlepage.verso">
2084</xsl:template>
2085
2086<xsl:template name="section.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2087</xsl:template>
2088
2089<xsl:template name="section.titlepage.before.recto">
2090</xsl:template>
2091
2092<xsl:template name="section.titlepage.before.verso">
2093</xsl:template>
2094
2095<xsl:template name="section.titlepage">
2096 <div class="titlepage">
2097 <xsl:variable name="recto.content">
2098 <xsl:call-template name="section.titlepage.before.recto"/>
2099 <xsl:call-template name="section.titlepage.recto"/>
2100 </xsl:variable>
2101 <xsl:variable name="recto.elements.count">
2102 <xsl:choose>
2103 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2104 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2105 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2106 <xsl:otherwise>1</xsl:otherwise>
2107 </xsl:choose>
2108 </xsl:variable>
2109 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2110 <div><xsl:copy-of select="$recto.content"/></div>
2111 </xsl:if>
2112 <xsl:variable name="verso.content">
2113 <xsl:call-template name="section.titlepage.before.verso"/>
2114 <xsl:call-template name="section.titlepage.verso"/>
2115 </xsl:variable>
2116 <xsl:variable name="verso.elements.count">
2117 <xsl:choose>
2118 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2119 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2120 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2121 <xsl:otherwise>1</xsl:otherwise>
2122 </xsl:choose>
2123 </xsl:variable>
2124 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2125 <div><xsl:copy-of select="$verso.content"/></div>
2126 </xsl:if>
2127 <xsl:call-template name="section.titlepage.separator"/>
2128 </div>
2129</xsl:template>
2130
2131<xsl:template match="*" mode="section.titlepage.recto.mode">
2132 <!-- if an element isn't found in this mode, -->
2133 <!-- try the generic titlepage.mode -->
2134 <xsl:apply-templates select="." mode="titlepage.mode"/>
2135</xsl:template>
2136
2137<xsl:template match="*" mode="section.titlepage.verso.mode">
2138 <!-- if an element isn't found in this mode, -->
2139 <!-- try the generic titlepage.mode -->
2140 <xsl:apply-templates select="." mode="titlepage.mode"/>
2141</xsl:template>
2142
2143<xsl:template match="title" mode="section.titlepage.recto.auto.mode">
2144<div xsl:use-attribute-sets="section.titlepage.recto.style">
2145<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2146</div>
2147</xsl:template>
2148
2149<xsl:template match="subtitle" mode="section.titlepage.recto.auto.mode">
2150<div xsl:use-attribute-sets="section.titlepage.recto.style">
2151<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2152</div>
2153</xsl:template>
2154
2155<xsl:template match="corpauthor" mode="section.titlepage.recto.auto.mode">
2156<div xsl:use-attribute-sets="section.titlepage.recto.style">
2157<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2158</div>
2159</xsl:template>
2160
2161<xsl:template match="authorgroup" mode="section.titlepage.recto.auto.mode">
2162<div xsl:use-attribute-sets="section.titlepage.recto.style">
2163<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2164</div>
2165</xsl:template>
2166
2167<xsl:template match="author" mode="section.titlepage.recto.auto.mode">
2168<div xsl:use-attribute-sets="section.titlepage.recto.style">
2169<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2170</div>
2171</xsl:template>
2172
2173<xsl:template match="othercredit" mode="section.titlepage.recto.auto.mode">
2174<div xsl:use-attribute-sets="section.titlepage.recto.style">
2175<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2176</div>
2177</xsl:template>
2178
2179<xsl:template match="releaseinfo" mode="section.titlepage.recto.auto.mode">
2180<div xsl:use-attribute-sets="section.titlepage.recto.style">
2181<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2182</div>
2183</xsl:template>
2184
2185<xsl:template match="copyright" mode="section.titlepage.recto.auto.mode">
2186<div xsl:use-attribute-sets="section.titlepage.recto.style">
2187<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2188</div>
2189</xsl:template>
2190
2191<xsl:template match="legalnotice" mode="section.titlepage.recto.auto.mode">
2192<div xsl:use-attribute-sets="section.titlepage.recto.style">
2193<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2194</div>
2195</xsl:template>
2196
2197<xsl:template match="pubdate" mode="section.titlepage.recto.auto.mode">
2198<div xsl:use-attribute-sets="section.titlepage.recto.style">
2199<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2200</div>
2201</xsl:template>
2202
2203<xsl:template match="revision" mode="section.titlepage.recto.auto.mode">
2204<div xsl:use-attribute-sets="section.titlepage.recto.style">
2205<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2206</div>
2207</xsl:template>
2208
2209<xsl:template match="revhistory" mode="section.titlepage.recto.auto.mode">
2210<div xsl:use-attribute-sets="section.titlepage.recto.style">
2211<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2212</div>
2213</xsl:template>
2214
2215<xsl:template match="abstract" mode="section.titlepage.recto.auto.mode">
2216<div xsl:use-attribute-sets="section.titlepage.recto.style">
2217<xsl:apply-templates select="." mode="section.titlepage.recto.mode"/>
2218</div>
2219</xsl:template>
2220
2221<xsl:template name="sect1.titlepage.recto">
2222 <xsl:choose>
2223 <xsl:when test="sect1info/title">
2224 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/title"/>
2225 </xsl:when>
2226 <xsl:when test="info/title">
2227 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/title"/>
2228 </xsl:when>
2229 <xsl:when test="title">
2230 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="title"/>
2231 </xsl:when>
2232 </xsl:choose>
2233
2234 <xsl:choose>
2235 <xsl:when test="sect1info/subtitle">
2236 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/subtitle"/>
2237 </xsl:when>
2238 <xsl:when test="info/subtitle">
2239 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/subtitle"/>
2240 </xsl:when>
2241 <xsl:when test="subtitle">
2242 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="subtitle"/>
2243 </xsl:when>
2244 </xsl:choose>
2245
2246 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/corpauthor"/>
2247 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/corpauthor"/>
2248 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/authorgroup"/>
2249 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/authorgroup"/>
2250 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/author"/>
2251 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/author"/>
2252 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/othercredit"/>
2253 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/othercredit"/>
2254 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/releaseinfo"/>
2255 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2256 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/copyright"/>
2257 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/copyright"/>
2258 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/legalnotice"/>
2259 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/legalnotice"/>
2260 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/pubdate"/>
2261 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/pubdate"/>
2262 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revision"/>
2263 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revision"/>
2264 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/revhistory"/>
2265 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/revhistory"/>
2266 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="sect1info/abstract"/>
2267 <xsl:apply-templates mode="sect1.titlepage.recto.auto.mode" select="info/abstract"/>
2268</xsl:template>
2269
2270<xsl:template name="sect1.titlepage.verso">
2271</xsl:template>
2272
2273<xsl:template name="sect1.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2274</xsl:template>
2275
2276<xsl:template name="sect1.titlepage.before.recto">
2277</xsl:template>
2278
2279<xsl:template name="sect1.titlepage.before.verso">
2280</xsl:template>
2281
2282<xsl:template name="sect1.titlepage">
2283 <div class="titlepage">
2284 <xsl:variable name="recto.content">
2285 <xsl:call-template name="sect1.titlepage.before.recto"/>
2286 <xsl:call-template name="sect1.titlepage.recto"/>
2287 </xsl:variable>
2288 <xsl:variable name="recto.elements.count">
2289 <xsl:choose>
2290 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2291 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2292 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2293 <xsl:otherwise>1</xsl:otherwise>
2294 </xsl:choose>
2295 </xsl:variable>
2296 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2297 <div><xsl:copy-of select="$recto.content"/></div>
2298 </xsl:if>
2299 <xsl:variable name="verso.content">
2300 <xsl:call-template name="sect1.titlepage.before.verso"/>
2301 <xsl:call-template name="sect1.titlepage.verso"/>
2302 </xsl:variable>
2303 <xsl:variable name="verso.elements.count">
2304 <xsl:choose>
2305 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2306 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2307 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2308 <xsl:otherwise>1</xsl:otherwise>
2309 </xsl:choose>
2310 </xsl:variable>
2311 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2312 <div><xsl:copy-of select="$verso.content"/></div>
2313 </xsl:if>
2314 <xsl:call-template name="sect1.titlepage.separator"/>
2315 </div>
2316</xsl:template>
2317
2318<xsl:template match="*" mode="sect1.titlepage.recto.mode">
2319 <!-- if an element isn't found in this mode, -->
2320 <!-- try the generic titlepage.mode -->
2321 <xsl:apply-templates select="." mode="titlepage.mode"/>
2322</xsl:template>
2323
2324<xsl:template match="*" mode="sect1.titlepage.verso.mode">
2325 <!-- if an element isn't found in this mode, -->
2326 <!-- try the generic titlepage.mode -->
2327 <xsl:apply-templates select="." mode="titlepage.mode"/>
2328</xsl:template>
2329
2330<xsl:template match="title" mode="sect1.titlepage.recto.auto.mode">
2331<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2332<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2333</div>
2334</xsl:template>
2335
2336<xsl:template match="subtitle" mode="sect1.titlepage.recto.auto.mode">
2337<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2338<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2339</div>
2340</xsl:template>
2341
2342<xsl:template match="corpauthor" mode="sect1.titlepage.recto.auto.mode">
2343<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2344<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2345</div>
2346</xsl:template>
2347
2348<xsl:template match="authorgroup" mode="sect1.titlepage.recto.auto.mode">
2349<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2350<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2351</div>
2352</xsl:template>
2353
2354<xsl:template match="author" mode="sect1.titlepage.recto.auto.mode">
2355<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2356<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2357</div>
2358</xsl:template>
2359
2360<xsl:template match="othercredit" mode="sect1.titlepage.recto.auto.mode">
2361<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2362<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2363</div>
2364</xsl:template>
2365
2366<xsl:template match="releaseinfo" mode="sect1.titlepage.recto.auto.mode">
2367<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2368<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2369</div>
2370</xsl:template>
2371
2372<xsl:template match="copyright" mode="sect1.titlepage.recto.auto.mode">
2373<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2374<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2375</div>
2376</xsl:template>
2377
2378<xsl:template match="legalnotice" mode="sect1.titlepage.recto.auto.mode">
2379<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2380<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2381</div>
2382</xsl:template>
2383
2384<xsl:template match="pubdate" mode="sect1.titlepage.recto.auto.mode">
2385<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2386<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2387</div>
2388</xsl:template>
2389
2390<xsl:template match="revision" mode="sect1.titlepage.recto.auto.mode">
2391<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2392<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2393</div>
2394</xsl:template>
2395
2396<xsl:template match="revhistory" mode="sect1.titlepage.recto.auto.mode">
2397<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2398<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2399</div>
2400</xsl:template>
2401
2402<xsl:template match="abstract" mode="sect1.titlepage.recto.auto.mode">
2403<div xsl:use-attribute-sets="sect1.titlepage.recto.style">
2404<xsl:apply-templates select="." mode="sect1.titlepage.recto.mode"/>
2405</div>
2406</xsl:template>
2407
2408<xsl:template name="sect2.titlepage.recto">
2409 <xsl:choose>
2410 <xsl:when test="sect2info/title">
2411 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/title"/>
2412 </xsl:when>
2413 <xsl:when test="info/title">
2414 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/title"/>
2415 </xsl:when>
2416 <xsl:when test="title">
2417 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="title"/>
2418 </xsl:when>
2419 </xsl:choose>
2420
2421 <xsl:choose>
2422 <xsl:when test="sect2info/subtitle">
2423 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/subtitle"/>
2424 </xsl:when>
2425 <xsl:when test="info/subtitle">
2426 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/subtitle"/>
2427 </xsl:when>
2428 <xsl:when test="subtitle">
2429 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="subtitle"/>
2430 </xsl:when>
2431 </xsl:choose>
2432
2433 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/corpauthor"/>
2434 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/corpauthor"/>
2435 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/authorgroup"/>
2436 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/authorgroup"/>
2437 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/author"/>
2438 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/author"/>
2439 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/othercredit"/>
2440 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/othercredit"/>
2441 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/releaseinfo"/>
2442 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2443 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/copyright"/>
2444 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/copyright"/>
2445 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/legalnotice"/>
2446 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/legalnotice"/>
2447 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/pubdate"/>
2448 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/pubdate"/>
2449 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revision"/>
2450 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revision"/>
2451 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/revhistory"/>
2452 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/revhistory"/>
2453 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="sect2info/abstract"/>
2454 <xsl:apply-templates mode="sect2.titlepage.recto.auto.mode" select="info/abstract"/>
2455</xsl:template>
2456
2457<xsl:template name="sect2.titlepage.verso">
2458</xsl:template>
2459
2460<xsl:template name="sect2.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2461</xsl:template>
2462
2463<xsl:template name="sect2.titlepage.before.recto">
2464</xsl:template>
2465
2466<xsl:template name="sect2.titlepage.before.verso">
2467</xsl:template>
2468
2469<xsl:template name="sect2.titlepage">
2470 <div class="titlepage">
2471 <xsl:variable name="recto.content">
2472 <xsl:call-template name="sect2.titlepage.before.recto"/>
2473 <xsl:call-template name="sect2.titlepage.recto"/>
2474 </xsl:variable>
2475 <xsl:variable name="recto.elements.count">
2476 <xsl:choose>
2477 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2478 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2479 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2480 <xsl:otherwise>1</xsl:otherwise>
2481 </xsl:choose>
2482 </xsl:variable>
2483 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2484 <div><xsl:copy-of select="$recto.content"/></div>
2485 </xsl:if>
2486 <xsl:variable name="verso.content">
2487 <xsl:call-template name="sect2.titlepage.before.verso"/>
2488 <xsl:call-template name="sect2.titlepage.verso"/>
2489 </xsl:variable>
2490 <xsl:variable name="verso.elements.count">
2491 <xsl:choose>
2492 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2493 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2494 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2495 <xsl:otherwise>1</xsl:otherwise>
2496 </xsl:choose>
2497 </xsl:variable>
2498 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2499 <div><xsl:copy-of select="$verso.content"/></div>
2500 </xsl:if>
2501 <xsl:call-template name="sect2.titlepage.separator"/>
2502 </div>
2503</xsl:template>
2504
2505<xsl:template match="*" mode="sect2.titlepage.recto.mode">
2506 <!-- if an element isn't found in this mode, -->
2507 <!-- try the generic titlepage.mode -->
2508 <xsl:apply-templates select="." mode="titlepage.mode"/>
2509</xsl:template>
2510
2511<xsl:template match="*" mode="sect2.titlepage.verso.mode">
2512 <!-- if an element isn't found in this mode, -->
2513 <!-- try the generic titlepage.mode -->
2514 <xsl:apply-templates select="." mode="titlepage.mode"/>
2515</xsl:template>
2516
2517<xsl:template match="title" mode="sect2.titlepage.recto.auto.mode">
2518<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2519<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2520</div>
2521</xsl:template>
2522
2523<xsl:template match="subtitle" mode="sect2.titlepage.recto.auto.mode">
2524<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2525<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2526</div>
2527</xsl:template>
2528
2529<xsl:template match="corpauthor" mode="sect2.titlepage.recto.auto.mode">
2530<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2531<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2532</div>
2533</xsl:template>
2534
2535<xsl:template match="authorgroup" mode="sect2.titlepage.recto.auto.mode">
2536<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2537<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2538</div>
2539</xsl:template>
2540
2541<xsl:template match="author" mode="sect2.titlepage.recto.auto.mode">
2542<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2543<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2544</div>
2545</xsl:template>
2546
2547<xsl:template match="othercredit" mode="sect2.titlepage.recto.auto.mode">
2548<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2549<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2550</div>
2551</xsl:template>
2552
2553<xsl:template match="releaseinfo" mode="sect2.titlepage.recto.auto.mode">
2554<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2555<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2556</div>
2557</xsl:template>
2558
2559<xsl:template match="copyright" mode="sect2.titlepage.recto.auto.mode">
2560<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2561<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2562</div>
2563</xsl:template>
2564
2565<xsl:template match="legalnotice" mode="sect2.titlepage.recto.auto.mode">
2566<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2567<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2568</div>
2569</xsl:template>
2570
2571<xsl:template match="pubdate" mode="sect2.titlepage.recto.auto.mode">
2572<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2573<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2574</div>
2575</xsl:template>
2576
2577<xsl:template match="revision" mode="sect2.titlepage.recto.auto.mode">
2578<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2579<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2580</div>
2581</xsl:template>
2582
2583<xsl:template match="revhistory" mode="sect2.titlepage.recto.auto.mode">
2584<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2585<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2586</div>
2587</xsl:template>
2588
2589<xsl:template match="abstract" mode="sect2.titlepage.recto.auto.mode">
2590<div xsl:use-attribute-sets="sect2.titlepage.recto.style">
2591<xsl:apply-templates select="." mode="sect2.titlepage.recto.mode"/>
2592</div>
2593</xsl:template>
2594
2595<xsl:template name="sect3.titlepage.recto">
2596 <xsl:choose>
2597 <xsl:when test="sect3info/title">
2598 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/title"/>
2599 </xsl:when>
2600 <xsl:when test="info/title">
2601 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/title"/>
2602 </xsl:when>
2603 <xsl:when test="title">
2604 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="title"/>
2605 </xsl:when>
2606 </xsl:choose>
2607
2608 <xsl:choose>
2609 <xsl:when test="sect3info/subtitle">
2610 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/subtitle"/>
2611 </xsl:when>
2612 <xsl:when test="info/subtitle">
2613 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/subtitle"/>
2614 </xsl:when>
2615 <xsl:when test="subtitle">
2616 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="subtitle"/>
2617 </xsl:when>
2618 </xsl:choose>
2619
2620 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/corpauthor"/>
2621 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/corpauthor"/>
2622 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/authorgroup"/>
2623 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/authorgroup"/>
2624 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/author"/>
2625 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/author"/>
2626 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/othercredit"/>
2627 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/othercredit"/>
2628 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/releaseinfo"/>
2629 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2630 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/copyright"/>
2631 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/copyright"/>
2632 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/legalnotice"/>
2633 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/legalnotice"/>
2634 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/pubdate"/>
2635 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/pubdate"/>
2636 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revision"/>
2637 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revision"/>
2638 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/revhistory"/>
2639 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/revhistory"/>
2640 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="sect3info/abstract"/>
2641 <xsl:apply-templates mode="sect3.titlepage.recto.auto.mode" select="info/abstract"/>
2642</xsl:template>
2643
2644<xsl:template name="sect3.titlepage.verso">
2645</xsl:template>
2646
2647<xsl:template name="sect3.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2648</xsl:template>
2649
2650<xsl:template name="sect3.titlepage.before.recto">
2651</xsl:template>
2652
2653<xsl:template name="sect3.titlepage.before.verso">
2654</xsl:template>
2655
2656<xsl:template name="sect3.titlepage">
2657 <div class="titlepage">
2658 <xsl:variable name="recto.content">
2659 <xsl:call-template name="sect3.titlepage.before.recto"/>
2660 <xsl:call-template name="sect3.titlepage.recto"/>
2661 </xsl:variable>
2662 <xsl:variable name="recto.elements.count">
2663 <xsl:choose>
2664 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2665 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2666 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2667 <xsl:otherwise>1</xsl:otherwise>
2668 </xsl:choose>
2669 </xsl:variable>
2670 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2671 <div><xsl:copy-of select="$recto.content"/></div>
2672 </xsl:if>
2673 <xsl:variable name="verso.content">
2674 <xsl:call-template name="sect3.titlepage.before.verso"/>
2675 <xsl:call-template name="sect3.titlepage.verso"/>
2676 </xsl:variable>
2677 <xsl:variable name="verso.elements.count">
2678 <xsl:choose>
2679 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2680 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2681 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2682 <xsl:otherwise>1</xsl:otherwise>
2683 </xsl:choose>
2684 </xsl:variable>
2685 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2686 <div><xsl:copy-of select="$verso.content"/></div>
2687 </xsl:if>
2688 <xsl:call-template name="sect3.titlepage.separator"/>
2689 </div>
2690</xsl:template>
2691
2692<xsl:template match="*" mode="sect3.titlepage.recto.mode">
2693 <!-- if an element isn't found in this mode, -->
2694 <!-- try the generic titlepage.mode -->
2695 <xsl:apply-templates select="." mode="titlepage.mode"/>
2696</xsl:template>
2697
2698<xsl:template match="*" mode="sect3.titlepage.verso.mode">
2699 <!-- if an element isn't found in this mode, -->
2700 <!-- try the generic titlepage.mode -->
2701 <xsl:apply-templates select="." mode="titlepage.mode"/>
2702</xsl:template>
2703
2704<xsl:template match="title" mode="sect3.titlepage.recto.auto.mode">
2705<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2706<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2707</div>
2708</xsl:template>
2709
2710<xsl:template match="subtitle" mode="sect3.titlepage.recto.auto.mode">
2711<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2712<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2713</div>
2714</xsl:template>
2715
2716<xsl:template match="corpauthor" mode="sect3.titlepage.recto.auto.mode">
2717<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2718<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2719</div>
2720</xsl:template>
2721
2722<xsl:template match="authorgroup" mode="sect3.titlepage.recto.auto.mode">
2723<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2724<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2725</div>
2726</xsl:template>
2727
2728<xsl:template match="author" mode="sect3.titlepage.recto.auto.mode">
2729<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2730<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2731</div>
2732</xsl:template>
2733
2734<xsl:template match="othercredit" mode="sect3.titlepage.recto.auto.mode">
2735<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2736<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2737</div>
2738</xsl:template>
2739
2740<xsl:template match="releaseinfo" mode="sect3.titlepage.recto.auto.mode">
2741<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2742<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2743</div>
2744</xsl:template>
2745
2746<xsl:template match="copyright" mode="sect3.titlepage.recto.auto.mode">
2747<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2748<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2749</div>
2750</xsl:template>
2751
2752<xsl:template match="legalnotice" mode="sect3.titlepage.recto.auto.mode">
2753<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2754<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2755</div>
2756</xsl:template>
2757
2758<xsl:template match="pubdate" mode="sect3.titlepage.recto.auto.mode">
2759<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2760<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2761</div>
2762</xsl:template>
2763
2764<xsl:template match="revision" mode="sect3.titlepage.recto.auto.mode">
2765<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2766<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2767</div>
2768</xsl:template>
2769
2770<xsl:template match="revhistory" mode="sect3.titlepage.recto.auto.mode">
2771<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2772<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2773</div>
2774</xsl:template>
2775
2776<xsl:template match="abstract" mode="sect3.titlepage.recto.auto.mode">
2777<div xsl:use-attribute-sets="sect3.titlepage.recto.style">
2778<xsl:apply-templates select="." mode="sect3.titlepage.recto.mode"/>
2779</div>
2780</xsl:template>
2781
2782<xsl:template name="sect4.titlepage.recto">
2783 <xsl:choose>
2784 <xsl:when test="sect4info/title">
2785 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/title"/>
2786 </xsl:when>
2787 <xsl:when test="info/title">
2788 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/title"/>
2789 </xsl:when>
2790 <xsl:when test="title">
2791 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="title"/>
2792 </xsl:when>
2793 </xsl:choose>
2794
2795 <xsl:choose>
2796 <xsl:when test="sect4info/subtitle">
2797 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/subtitle"/>
2798 </xsl:when>
2799 <xsl:when test="info/subtitle">
2800 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/subtitle"/>
2801 </xsl:when>
2802 <xsl:when test="subtitle">
2803 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="subtitle"/>
2804 </xsl:when>
2805 </xsl:choose>
2806
2807 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/corpauthor"/>
2808 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/corpauthor"/>
2809 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/authorgroup"/>
2810 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/authorgroup"/>
2811 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/author"/>
2812 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/author"/>
2813 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/othercredit"/>
2814 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/othercredit"/>
2815 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/releaseinfo"/>
2816 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/releaseinfo"/>
2817 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/copyright"/>
2818 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/copyright"/>
2819 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/legalnotice"/>
2820 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/legalnotice"/>
2821 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/pubdate"/>
2822 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/pubdate"/>
2823 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revision"/>
2824 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revision"/>
2825 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/revhistory"/>
2826 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/revhistory"/>
2827 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="sect4info/abstract"/>
2828 <xsl:apply-templates mode="sect4.titlepage.recto.auto.mode" select="info/abstract"/>
2829</xsl:template>
2830
2831<xsl:template name="sect4.titlepage.verso">
2832</xsl:template>
2833
2834<xsl:template name="sect4.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
2835</xsl:template>
2836
2837<xsl:template name="sect4.titlepage.before.recto">
2838</xsl:template>
2839
2840<xsl:template name="sect4.titlepage.before.verso">
2841</xsl:template>
2842
2843<xsl:template name="sect4.titlepage">
2844 <div class="titlepage">
2845 <xsl:variable name="recto.content">
2846 <xsl:call-template name="sect4.titlepage.before.recto"/>
2847 <xsl:call-template name="sect4.titlepage.recto"/>
2848 </xsl:variable>
2849 <xsl:variable name="recto.elements.count">
2850 <xsl:choose>
2851 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2852 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2853 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
2854 <xsl:otherwise>1</xsl:otherwise>
2855 </xsl:choose>
2856 </xsl:variable>
2857 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
2858 <div><xsl:copy-of select="$recto.content"/></div>
2859 </xsl:if>
2860 <xsl:variable name="verso.content">
2861 <xsl:call-template name="sect4.titlepage.before.verso"/>
2862 <xsl:call-template name="sect4.titlepage.verso"/>
2863 </xsl:variable>
2864 <xsl:variable name="verso.elements.count">
2865 <xsl:choose>
2866 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2867 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
2868 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
2869 <xsl:otherwise>1</xsl:otherwise>
2870 </xsl:choose>
2871 </xsl:variable>
2872 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
2873 <div><xsl:copy-of select="$verso.content"/></div>
2874 </xsl:if>
2875 <xsl:call-template name="sect4.titlepage.separator"/>
2876 </div>
2877</xsl:template>
2878
2879<xsl:template match="*" mode="sect4.titlepage.recto.mode">
2880 <!-- if an element isn't found in this mode, -->
2881 <!-- try the generic titlepage.mode -->
2882 <xsl:apply-templates select="." mode="titlepage.mode"/>
2883</xsl:template>
2884
2885<xsl:template match="*" mode="sect4.titlepage.verso.mode">
2886 <!-- if an element isn't found in this mode, -->
2887 <!-- try the generic titlepage.mode -->
2888 <xsl:apply-templates select="." mode="titlepage.mode"/>
2889</xsl:template>
2890
2891<xsl:template match="title" mode="sect4.titlepage.recto.auto.mode">
2892<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2893<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2894</div>
2895</xsl:template>
2896
2897<xsl:template match="subtitle" mode="sect4.titlepage.recto.auto.mode">
2898<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2899<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2900</div>
2901</xsl:template>
2902
2903<xsl:template match="corpauthor" mode="sect4.titlepage.recto.auto.mode">
2904<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2905<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2906</div>
2907</xsl:template>
2908
2909<xsl:template match="authorgroup" mode="sect4.titlepage.recto.auto.mode">
2910<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2911<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2912</div>
2913</xsl:template>
2914
2915<xsl:template match="author" mode="sect4.titlepage.recto.auto.mode">
2916<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2917<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2918</div>
2919</xsl:template>
2920
2921<xsl:template match="othercredit" mode="sect4.titlepage.recto.auto.mode">
2922<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2923<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2924</div>
2925</xsl:template>
2926
2927<xsl:template match="releaseinfo" mode="sect4.titlepage.recto.auto.mode">
2928<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2929<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2930</div>
2931</xsl:template>
2932
2933<xsl:template match="copyright" mode="sect4.titlepage.recto.auto.mode">
2934<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2935<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2936</div>
2937</xsl:template>
2938
2939<xsl:template match="legalnotice" mode="sect4.titlepage.recto.auto.mode">
2940<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2941<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2942</div>
2943</xsl:template>
2944
2945<xsl:template match="pubdate" mode="sect4.titlepage.recto.auto.mode">
2946<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2947<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2948</div>
2949</xsl:template>
2950
2951<xsl:template match="revision" mode="sect4.titlepage.recto.auto.mode">
2952<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2953<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2954</div>
2955</xsl:template>
2956
2957<xsl:template match="revhistory" mode="sect4.titlepage.recto.auto.mode">
2958<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2959<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2960</div>
2961</xsl:template>
2962
2963<xsl:template match="abstract" mode="sect4.titlepage.recto.auto.mode">
2964<div xsl:use-attribute-sets="sect4.titlepage.recto.style">
2965<xsl:apply-templates select="." mode="sect4.titlepage.recto.mode"/>
2966</div>
2967</xsl:template>
2968
2969<xsl:template name="sect5.titlepage.recto">
2970 <xsl:choose>
2971 <xsl:when test="sect5info/title">
2972 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/title"/>
2973 </xsl:when>
2974 <xsl:when test="info/title">
2975 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/title"/>
2976 </xsl:when>
2977 <xsl:when test="title">
2978 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="title"/>
2979 </xsl:when>
2980 </xsl:choose>
2981
2982 <xsl:choose>
2983 <xsl:when test="sect5info/subtitle">
2984 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/subtitle"/>
2985 </xsl:when>
2986 <xsl:when test="info/subtitle">
2987 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/subtitle"/>
2988 </xsl:when>
2989 <xsl:when test="subtitle">
2990 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="subtitle"/>
2991 </xsl:when>
2992 </xsl:choose>
2993
2994 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/corpauthor"/>
2995 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/corpauthor"/>
2996 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/authorgroup"/>
2997 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/authorgroup"/>
2998 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/author"/>
2999 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/author"/>
3000 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/othercredit"/>
3001 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/othercredit"/>
3002 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/releaseinfo"/>
3003 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3004 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/copyright"/>
3005 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/copyright"/>
3006 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/legalnotice"/>
3007 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/legalnotice"/>
3008 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/pubdate"/>
3009 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/pubdate"/>
3010 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revision"/>
3011 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revision"/>
3012 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/revhistory"/>
3013 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/revhistory"/>
3014 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="sect5info/abstract"/>
3015 <xsl:apply-templates mode="sect5.titlepage.recto.auto.mode" select="info/abstract"/>
3016</xsl:template>
3017
3018<xsl:template name="sect5.titlepage.verso">
3019</xsl:template>
3020
3021<xsl:template name="sect5.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
3022</xsl:template>
3023
3024<xsl:template name="sect5.titlepage.before.recto">
3025</xsl:template>
3026
3027<xsl:template name="sect5.titlepage.before.verso">
3028</xsl:template>
3029
3030<xsl:template name="sect5.titlepage">
3031 <div class="titlepage">
3032 <xsl:variable name="recto.content">
3033 <xsl:call-template name="sect5.titlepage.before.recto"/>
3034 <xsl:call-template name="sect5.titlepage.recto"/>
3035 </xsl:variable>
3036 <xsl:variable name="recto.elements.count">
3037 <xsl:choose>
3038 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3039 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3040 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3041 <xsl:otherwise>1</xsl:otherwise>
3042 </xsl:choose>
3043 </xsl:variable>
3044 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3045 <div><xsl:copy-of select="$recto.content"/></div>
3046 </xsl:if>
3047 <xsl:variable name="verso.content">
3048 <xsl:call-template name="sect5.titlepage.before.verso"/>
3049 <xsl:call-template name="sect5.titlepage.verso"/>
3050 </xsl:variable>
3051 <xsl:variable name="verso.elements.count">
3052 <xsl:choose>
3053 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3054 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3055 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3056 <xsl:otherwise>1</xsl:otherwise>
3057 </xsl:choose>
3058 </xsl:variable>
3059 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3060 <div><xsl:copy-of select="$verso.content"/></div>
3061 </xsl:if>
3062 <xsl:call-template name="sect5.titlepage.separator"/>
3063 </div>
3064</xsl:template>
3065
3066<xsl:template match="*" mode="sect5.titlepage.recto.mode">
3067 <!-- if an element isn't found in this mode, -->
3068 <!-- try the generic titlepage.mode -->
3069 <xsl:apply-templates select="." mode="titlepage.mode"/>
3070</xsl:template>
3071
3072<xsl:template match="*" mode="sect5.titlepage.verso.mode">
3073 <!-- if an element isn't found in this mode, -->
3074 <!-- try the generic titlepage.mode -->
3075 <xsl:apply-templates select="." mode="titlepage.mode"/>
3076</xsl:template>
3077
3078<xsl:template match="title" mode="sect5.titlepage.recto.auto.mode">
3079<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3080<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3081</div>
3082</xsl:template>
3083
3084<xsl:template match="subtitle" mode="sect5.titlepage.recto.auto.mode">
3085<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3086<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3087</div>
3088</xsl:template>
3089
3090<xsl:template match="corpauthor" mode="sect5.titlepage.recto.auto.mode">
3091<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3092<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3093</div>
3094</xsl:template>
3095
3096<xsl:template match="authorgroup" mode="sect5.titlepage.recto.auto.mode">
3097<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3098<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3099</div>
3100</xsl:template>
3101
3102<xsl:template match="author" mode="sect5.titlepage.recto.auto.mode">
3103<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3104<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3105</div>
3106</xsl:template>
3107
3108<xsl:template match="othercredit" mode="sect5.titlepage.recto.auto.mode">
3109<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3110<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3111</div>
3112</xsl:template>
3113
3114<xsl:template match="releaseinfo" mode="sect5.titlepage.recto.auto.mode">
3115<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3116<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3117</div>
3118</xsl:template>
3119
3120<xsl:template match="copyright" mode="sect5.titlepage.recto.auto.mode">
3121<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3122<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3123</div>
3124</xsl:template>
3125
3126<xsl:template match="legalnotice" mode="sect5.titlepage.recto.auto.mode">
3127<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3128<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3129</div>
3130</xsl:template>
3131
3132<xsl:template match="pubdate" mode="sect5.titlepage.recto.auto.mode">
3133<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3134<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3135</div>
3136</xsl:template>
3137
3138<xsl:template match="revision" mode="sect5.titlepage.recto.auto.mode">
3139<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3140<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3141</div>
3142</xsl:template>
3143
3144<xsl:template match="revhistory" mode="sect5.titlepage.recto.auto.mode">
3145<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3146<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3147</div>
3148</xsl:template>
3149
3150<xsl:template match="abstract" mode="sect5.titlepage.recto.auto.mode">
3151<div xsl:use-attribute-sets="sect5.titlepage.recto.style">
3152<xsl:apply-templates select="." mode="sect5.titlepage.recto.mode"/>
3153</div>
3154</xsl:template>
3155
3156<xsl:template name="simplesect.titlepage.recto">
3157 <xsl:choose>
3158 <xsl:when test="simplesectinfo/title">
3159 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/title"/>
3160 </xsl:when>
3161 <xsl:when test="docinfo/title">
3162 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/title"/>
3163 </xsl:when>
3164 <xsl:when test="info/title">
3165 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/title"/>
3166 </xsl:when>
3167 <xsl:when test="title">
3168 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="title"/>
3169 </xsl:when>
3170 </xsl:choose>
3171
3172 <xsl:choose>
3173 <xsl:when test="simplesectinfo/subtitle">
3174 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/subtitle"/>
3175 </xsl:when>
3176 <xsl:when test="docinfo/subtitle">
3177 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3178 </xsl:when>
3179 <xsl:when test="info/subtitle">
3180 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/subtitle"/>
3181 </xsl:when>
3182 <xsl:when test="subtitle">
3183 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="subtitle"/>
3184 </xsl:when>
3185 </xsl:choose>
3186
3187 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/corpauthor"/>
3188 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/corpauthor"/>
3189 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/corpauthor"/>
3190 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/authorgroup"/>
3191 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/authorgroup"/>
3192 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/authorgroup"/>
3193 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/author"/>
3194 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/author"/>
3195 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/author"/>
3196 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/othercredit"/>
3197 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/othercredit"/>
3198 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/othercredit"/>
3199 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/releaseinfo"/>
3200 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/releaseinfo"/>
3201 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/releaseinfo"/>
3202 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/copyright"/>
3203 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/copyright"/>
3204 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/copyright"/>
3205 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/legalnotice"/>
3206 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/legalnotice"/>
3207 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/legalnotice"/>
3208 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/pubdate"/>
3209 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/pubdate"/>
3210 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/pubdate"/>
3211 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revision"/>
3212 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revision"/>
3213 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revision"/>
3214 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/revhistory"/>
3215 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/revhistory"/>
3216 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/revhistory"/>
3217 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="simplesectinfo/abstract"/>
3218 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="docinfo/abstract"/>
3219 <xsl:apply-templates mode="simplesect.titlepage.recto.auto.mode" select="info/abstract"/>
3220</xsl:template>
3221
3222<xsl:template name="simplesect.titlepage.verso">
3223</xsl:template>
3224
3225<xsl:template name="simplesect.titlepage.separator"><xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
3226</xsl:template>
3227
3228<xsl:template name="simplesect.titlepage.before.recto">
3229</xsl:template>
3230
3231<xsl:template name="simplesect.titlepage.before.verso">
3232</xsl:template>
3233
3234<xsl:template name="simplesect.titlepage">
3235 <div class="titlepage">
3236 <xsl:variable name="recto.content">
3237 <xsl:call-template name="simplesect.titlepage.before.recto"/>
3238 <xsl:call-template name="simplesect.titlepage.recto"/>
3239 </xsl:variable>
3240 <xsl:variable name="recto.elements.count">
3241 <xsl:choose>
3242 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3243 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3244 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3245 <xsl:otherwise>1</xsl:otherwise>
3246 </xsl:choose>
3247 </xsl:variable>
3248 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3249 <div><xsl:copy-of select="$recto.content"/></div>
3250 </xsl:if>
3251 <xsl:variable name="verso.content">
3252 <xsl:call-template name="simplesect.titlepage.before.verso"/>
3253 <xsl:call-template name="simplesect.titlepage.verso"/>
3254 </xsl:variable>
3255 <xsl:variable name="verso.elements.count">
3256 <xsl:choose>
3257 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3258 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3259 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3260 <xsl:otherwise>1</xsl:otherwise>
3261 </xsl:choose>
3262 </xsl:variable>
3263 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3264 <div><xsl:copy-of select="$verso.content"/></div>
3265 </xsl:if>
3266 <xsl:call-template name="simplesect.titlepage.separator"/>
3267 </div>
3268</xsl:template>
3269
3270<xsl:template match="*" mode="simplesect.titlepage.recto.mode">
3271 <!-- if an element isn't found in this mode, -->
3272 <!-- try the generic titlepage.mode -->
3273 <xsl:apply-templates select="." mode="titlepage.mode"/>
3274</xsl:template>
3275
3276<xsl:template match="*" mode="simplesect.titlepage.verso.mode">
3277 <!-- if an element isn't found in this mode, -->
3278 <!-- try the generic titlepage.mode -->
3279 <xsl:apply-templates select="." mode="titlepage.mode"/>
3280</xsl:template>
3281
3282<xsl:template match="title" mode="simplesect.titlepage.recto.auto.mode">
3283<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3284<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3285</div>
3286</xsl:template>
3287
3288<xsl:template match="subtitle" mode="simplesect.titlepage.recto.auto.mode">
3289<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3290<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3291</div>
3292</xsl:template>
3293
3294<xsl:template match="corpauthor" mode="simplesect.titlepage.recto.auto.mode">
3295<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3296<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3297</div>
3298</xsl:template>
3299
3300<xsl:template match="authorgroup" mode="simplesect.titlepage.recto.auto.mode">
3301<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3302<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3303</div>
3304</xsl:template>
3305
3306<xsl:template match="author" mode="simplesect.titlepage.recto.auto.mode">
3307<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3308<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3309</div>
3310</xsl:template>
3311
3312<xsl:template match="othercredit" mode="simplesect.titlepage.recto.auto.mode">
3313<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3314<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3315</div>
3316</xsl:template>
3317
3318<xsl:template match="releaseinfo" mode="simplesect.titlepage.recto.auto.mode">
3319<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3320<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3321</div>
3322</xsl:template>
3323
3324<xsl:template match="copyright" mode="simplesect.titlepage.recto.auto.mode">
3325<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3326<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3327</div>
3328</xsl:template>
3329
3330<xsl:template match="legalnotice" mode="simplesect.titlepage.recto.auto.mode">
3331<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3332<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3333</div>
3334</xsl:template>
3335
3336<xsl:template match="pubdate" mode="simplesect.titlepage.recto.auto.mode">
3337<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3338<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3339</div>
3340</xsl:template>
3341
3342<xsl:template match="revision" mode="simplesect.titlepage.recto.auto.mode">
3343<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3344<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3345</div>
3346</xsl:template>
3347
3348<xsl:template match="revhistory" mode="simplesect.titlepage.recto.auto.mode">
3349<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3350<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3351</div>
3352</xsl:template>
3353
3354<xsl:template match="abstract" mode="simplesect.titlepage.recto.auto.mode">
3355<div xsl:use-attribute-sets="simplesect.titlepage.recto.style">
3356<xsl:apply-templates select="." mode="simplesect.titlepage.recto.mode"/>
3357</div>
3358</xsl:template>
3359
3360<xsl:template name="bibliography.titlepage.recto">
3361 <div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
3362<xsl:call-template name="component.title">
3363<xsl:with-param name="node" select="ancestor-or-self::bibliography[1]"/>
3364</xsl:call-template></div>
3365 <xsl:choose>
3366 <xsl:when test="bibliographyinfo/subtitle">
3367 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="bibliographyinfo/subtitle"/>
3368 </xsl:when>
3369 <xsl:when test="docinfo/subtitle">
3370 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3371 </xsl:when>
3372 <xsl:when test="info/subtitle">
3373 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="info/subtitle"/>
3374 </xsl:when>
3375 <xsl:when test="subtitle">
3376 <xsl:apply-templates mode="bibliography.titlepage.recto.auto.mode" select="subtitle"/>
3377 </xsl:when>
3378 </xsl:choose>
3379
3380</xsl:template>
3381
3382<xsl:template name="bibliography.titlepage.verso">
3383</xsl:template>
3384
3385<xsl:template name="bibliography.titlepage.separator">
3386</xsl:template>
3387
3388<xsl:template name="bibliography.titlepage.before.recto">
3389</xsl:template>
3390
3391<xsl:template name="bibliography.titlepage.before.verso">
3392</xsl:template>
3393
3394<xsl:template name="bibliography.titlepage">
3395 <div class="titlepage">
3396 <xsl:variable name="recto.content">
3397 <xsl:call-template name="bibliography.titlepage.before.recto"/>
3398 <xsl:call-template name="bibliography.titlepage.recto"/>
3399 </xsl:variable>
3400 <xsl:variable name="recto.elements.count">
3401 <xsl:choose>
3402 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3403 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3404 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3405 <xsl:otherwise>1</xsl:otherwise>
3406 </xsl:choose>
3407 </xsl:variable>
3408 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3409 <div><xsl:copy-of select="$recto.content"/></div>
3410 </xsl:if>
3411 <xsl:variable name="verso.content">
3412 <xsl:call-template name="bibliography.titlepage.before.verso"/>
3413 <xsl:call-template name="bibliography.titlepage.verso"/>
3414 </xsl:variable>
3415 <xsl:variable name="verso.elements.count">
3416 <xsl:choose>
3417 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3418 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3419 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3420 <xsl:otherwise>1</xsl:otherwise>
3421 </xsl:choose>
3422 </xsl:variable>
3423 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3424 <div><xsl:copy-of select="$verso.content"/></div>
3425 </xsl:if>
3426 <xsl:call-template name="bibliography.titlepage.separator"/>
3427 </div>
3428</xsl:template>
3429
3430<xsl:template match="*" mode="bibliography.titlepage.recto.mode">
3431 <!-- if an element isn't found in this mode, -->
3432 <!-- try the generic titlepage.mode -->
3433 <xsl:apply-templates select="." mode="titlepage.mode"/>
3434</xsl:template>
3435
3436<xsl:template match="*" mode="bibliography.titlepage.verso.mode">
3437 <!-- if an element isn't found in this mode, -->
3438 <!-- try the generic titlepage.mode -->
3439 <xsl:apply-templates select="." mode="titlepage.mode"/>
3440</xsl:template>
3441
3442<xsl:template match="subtitle" mode="bibliography.titlepage.recto.auto.mode">
3443<div xsl:use-attribute-sets="bibliography.titlepage.recto.style">
3444<xsl:apply-templates select="." mode="bibliography.titlepage.recto.mode"/>
3445</div>
3446</xsl:template>
3447
3448<xsl:template name="glossary.titlepage.recto">
3449 <div xsl:use-attribute-sets="glossary.titlepage.recto.style">
3450<xsl:call-template name="component.title">
3451<xsl:with-param name="node" select="ancestor-or-self::glossary[1]"/>
3452</xsl:call-template></div>
3453 <xsl:choose>
3454 <xsl:when test="glossaryinfo/subtitle">
3455 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="glossaryinfo/subtitle"/>
3456 </xsl:when>
3457 <xsl:when test="docinfo/subtitle">
3458 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3459 </xsl:when>
3460 <xsl:when test="info/subtitle">
3461 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="info/subtitle"/>
3462 </xsl:when>
3463 <xsl:when test="subtitle">
3464 <xsl:apply-templates mode="glossary.titlepage.recto.auto.mode" select="subtitle"/>
3465 </xsl:when>
3466 </xsl:choose>
3467
3468</xsl:template>
3469
3470<xsl:template name="glossary.titlepage.verso">
3471</xsl:template>
3472
3473<xsl:template name="glossary.titlepage.separator">
3474</xsl:template>
3475
3476<xsl:template name="glossary.titlepage.before.recto">
3477</xsl:template>
3478
3479<xsl:template name="glossary.titlepage.before.verso">
3480</xsl:template>
3481
3482<xsl:template name="glossary.titlepage">
3483 <div class="titlepage">
3484 <xsl:variable name="recto.content">
3485 <xsl:call-template name="glossary.titlepage.before.recto"/>
3486 <xsl:call-template name="glossary.titlepage.recto"/>
3487 </xsl:variable>
3488 <xsl:variable name="recto.elements.count">
3489 <xsl:choose>
3490 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3491 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3492 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3493 <xsl:otherwise>1</xsl:otherwise>
3494 </xsl:choose>
3495 </xsl:variable>
3496 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3497 <div><xsl:copy-of select="$recto.content"/></div>
3498 </xsl:if>
3499 <xsl:variable name="verso.content">
3500 <xsl:call-template name="glossary.titlepage.before.verso"/>
3501 <xsl:call-template name="glossary.titlepage.verso"/>
3502 </xsl:variable>
3503 <xsl:variable name="verso.elements.count">
3504 <xsl:choose>
3505 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3506 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3507 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3508 <xsl:otherwise>1</xsl:otherwise>
3509 </xsl:choose>
3510 </xsl:variable>
3511 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3512 <div><xsl:copy-of select="$verso.content"/></div>
3513 </xsl:if>
3514 <xsl:call-template name="glossary.titlepage.separator"/>
3515 </div>
3516</xsl:template>
3517
3518<xsl:template match="*" mode="glossary.titlepage.recto.mode">
3519 <!-- if an element isn't found in this mode, -->
3520 <!-- try the generic titlepage.mode -->
3521 <xsl:apply-templates select="." mode="titlepage.mode"/>
3522</xsl:template>
3523
3524<xsl:template match="*" mode="glossary.titlepage.verso.mode">
3525 <!-- if an element isn't found in this mode, -->
3526 <!-- try the generic titlepage.mode -->
3527 <xsl:apply-templates select="." mode="titlepage.mode"/>
3528</xsl:template>
3529
3530<xsl:template match="subtitle" mode="glossary.titlepage.recto.auto.mode">
3531<div xsl:use-attribute-sets="glossary.titlepage.recto.style">
3532<xsl:apply-templates select="." mode="glossary.titlepage.recto.mode"/>
3533</div>
3534</xsl:template>
3535
3536<xsl:template name="index.titlepage.recto">
3537 <div xsl:use-attribute-sets="index.titlepage.recto.style">
3538<xsl:call-template name="component.title">
3539<xsl:with-param name="node" select="ancestor-or-self::index[1]"/>
3540</xsl:call-template></div>
3541 <xsl:choose>
3542 <xsl:when test="indexinfo/subtitle">
3543 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="indexinfo/subtitle"/>
3544 </xsl:when>
3545 <xsl:when test="docinfo/subtitle">
3546 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3547 </xsl:when>
3548 <xsl:when test="info/subtitle">
3549 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="info/subtitle"/>
3550 </xsl:when>
3551 <xsl:when test="subtitle">
3552 <xsl:apply-templates mode="index.titlepage.recto.auto.mode" select="subtitle"/>
3553 </xsl:when>
3554 </xsl:choose>
3555
3556</xsl:template>
3557
3558<xsl:template name="index.titlepage.verso">
3559</xsl:template>
3560
3561<xsl:template name="index.titlepage.separator">
3562</xsl:template>
3563
3564<xsl:template name="index.titlepage.before.recto">
3565</xsl:template>
3566
3567<xsl:template name="index.titlepage.before.verso">
3568</xsl:template>
3569
3570<xsl:template name="index.titlepage">
3571 <div class="titlepage">
3572 <xsl:variable name="recto.content">
3573 <xsl:call-template name="index.titlepage.before.recto"/>
3574 <xsl:call-template name="index.titlepage.recto"/>
3575 </xsl:variable>
3576 <xsl:variable name="recto.elements.count">
3577 <xsl:choose>
3578 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3579 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3580 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3581 <xsl:otherwise>1</xsl:otherwise>
3582 </xsl:choose>
3583 </xsl:variable>
3584 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3585 <div><xsl:copy-of select="$recto.content"/></div>
3586 </xsl:if>
3587 <xsl:variable name="verso.content">
3588 <xsl:call-template name="index.titlepage.before.verso"/>
3589 <xsl:call-template name="index.titlepage.verso"/>
3590 </xsl:variable>
3591 <xsl:variable name="verso.elements.count">
3592 <xsl:choose>
3593 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3594 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3595 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3596 <xsl:otherwise>1</xsl:otherwise>
3597 </xsl:choose>
3598 </xsl:variable>
3599 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3600 <div><xsl:copy-of select="$verso.content"/></div>
3601 </xsl:if>
3602 <xsl:call-template name="index.titlepage.separator"/>
3603 </div>
3604</xsl:template>
3605
3606<xsl:template match="*" mode="index.titlepage.recto.mode">
3607 <!-- if an element isn't found in this mode, -->
3608 <!-- try the generic titlepage.mode -->
3609 <xsl:apply-templates select="." mode="titlepage.mode"/>
3610</xsl:template>
3611
3612<xsl:template match="*" mode="index.titlepage.verso.mode">
3613 <!-- if an element isn't found in this mode, -->
3614 <!-- try the generic titlepage.mode -->
3615 <xsl:apply-templates select="." mode="titlepage.mode"/>
3616</xsl:template>
3617
3618<xsl:template match="subtitle" mode="index.titlepage.recto.auto.mode">
3619<div xsl:use-attribute-sets="index.titlepage.recto.style">
3620<xsl:apply-templates select="." mode="index.titlepage.recto.mode"/>
3621</div>
3622</xsl:template>
3623
3624<xsl:template name="setindex.titlepage.recto">
3625 <div xsl:use-attribute-sets="setindex.titlepage.recto.style">
3626<xsl:call-template name="component.title">
3627<xsl:with-param name="node" select="ancestor-or-self::setindex[1]"/>
3628</xsl:call-template></div>
3629 <xsl:choose>
3630 <xsl:when test="setindexinfo/subtitle">
3631 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="setindexinfo/subtitle"/>
3632 </xsl:when>
3633 <xsl:when test="docinfo/subtitle">
3634 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3635 </xsl:when>
3636 <xsl:when test="info/subtitle">
3637 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="info/subtitle"/>
3638 </xsl:when>
3639 <xsl:when test="subtitle">
3640 <xsl:apply-templates mode="setindex.titlepage.recto.auto.mode" select="subtitle"/>
3641 </xsl:when>
3642 </xsl:choose>
3643
3644</xsl:template>
3645
3646<xsl:template name="setindex.titlepage.verso">
3647</xsl:template>
3648
3649<xsl:template name="setindex.titlepage.separator">
3650</xsl:template>
3651
3652<xsl:template name="setindex.titlepage.before.recto">
3653</xsl:template>
3654
3655<xsl:template name="setindex.titlepage.before.verso">
3656</xsl:template>
3657
3658<xsl:template name="setindex.titlepage">
3659 <div class="titlepage">
3660 <xsl:variable name="recto.content">
3661 <xsl:call-template name="setindex.titlepage.before.recto"/>
3662 <xsl:call-template name="setindex.titlepage.recto"/>
3663 </xsl:variable>
3664 <xsl:variable name="recto.elements.count">
3665 <xsl:choose>
3666 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3667 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3668 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3669 <xsl:otherwise>1</xsl:otherwise>
3670 </xsl:choose>
3671 </xsl:variable>
3672 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3673 <div><xsl:copy-of select="$recto.content"/></div>
3674 </xsl:if>
3675 <xsl:variable name="verso.content">
3676 <xsl:call-template name="setindex.titlepage.before.verso"/>
3677 <xsl:call-template name="setindex.titlepage.verso"/>
3678 </xsl:variable>
3679 <xsl:variable name="verso.elements.count">
3680 <xsl:choose>
3681 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3682 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3683 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3684 <xsl:otherwise>1</xsl:otherwise>
3685 </xsl:choose>
3686 </xsl:variable>
3687 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3688 <div><xsl:copy-of select="$verso.content"/></div>
3689 </xsl:if>
3690 <xsl:call-template name="setindex.titlepage.separator"/>
3691 </div>
3692</xsl:template>
3693
3694<xsl:template match="*" mode="setindex.titlepage.recto.mode">
3695 <!-- if an element isn't found in this mode, -->
3696 <!-- try the generic titlepage.mode -->
3697 <xsl:apply-templates select="." mode="titlepage.mode"/>
3698</xsl:template>
3699
3700<xsl:template match="*" mode="setindex.titlepage.verso.mode">
3701 <!-- if an element isn't found in this mode, -->
3702 <!-- try the generic titlepage.mode -->
3703 <xsl:apply-templates select="." mode="titlepage.mode"/>
3704</xsl:template>
3705
3706<xsl:template match="subtitle" mode="setindex.titlepage.recto.auto.mode">
3707<div xsl:use-attribute-sets="setindex.titlepage.recto.style">
3708<xsl:apply-templates select="." mode="setindex.titlepage.recto.mode"/>
3709</div>
3710</xsl:template>
3711
3712<xsl:template name="sidebar.titlepage.recto">
3713 <xsl:choose>
3714 <xsl:when test="sidebarinfo/title">
3715 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/title"/>
3716 </xsl:when>
3717 <xsl:when test="docinfo/title">
3718 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/title"/>
3719 </xsl:when>
3720 <xsl:when test="info/title">
3721 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/title"/>
3722 </xsl:when>
3723 <xsl:when test="title">
3724 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="title"/>
3725 </xsl:when>
3726 </xsl:choose>
3727
3728 <xsl:choose>
3729 <xsl:when test="sidebarinfo/subtitle">
3730 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="sidebarinfo/subtitle"/>
3731 </xsl:when>
3732 <xsl:when test="docinfo/subtitle">
3733 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="docinfo/subtitle"/>
3734 </xsl:when>
3735 <xsl:when test="info/subtitle">
3736 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="info/subtitle"/>
3737 </xsl:when>
3738 <xsl:when test="subtitle">
3739 <xsl:apply-templates mode="sidebar.titlepage.recto.auto.mode" select="subtitle"/>
3740 </xsl:when>
3741 </xsl:choose>
3742
3743</xsl:template>
3744
3745<xsl:template name="sidebar.titlepage.verso">
3746</xsl:template>
3747
3748<xsl:template name="sidebar.titlepage.separator">
3749</xsl:template>
3750
3751<xsl:template name="sidebar.titlepage.before.recto">
3752</xsl:template>
3753
3754<xsl:template name="sidebar.titlepage.before.verso">
3755</xsl:template>
3756
3757<xsl:template name="sidebar.titlepage">
3758 <div class="titlepage">
3759 <xsl:variable name="recto.content">
3760 <xsl:call-template name="sidebar.titlepage.before.recto"/>
3761 <xsl:call-template name="sidebar.titlepage.recto"/>
3762 </xsl:variable>
3763 <xsl:variable name="recto.elements.count">
3764 <xsl:choose>
3765 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3766 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3767 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($recto.content)/*)"/></xsl:when>
3768 <xsl:otherwise>1</xsl:otherwise>
3769 </xsl:choose>
3770 </xsl:variable>
3771 <xsl:if test="(normalize-space($recto.content) != '') or ($recto.elements.count &gt; 0)">
3772 <div><xsl:copy-of select="$recto.content"/></div>
3773 </xsl:if>
3774 <xsl:variable name="verso.content">
3775 <xsl:call-template name="sidebar.titlepage.before.verso"/>
3776 <xsl:call-template name="sidebar.titlepage.verso"/>
3777 </xsl:variable>
3778 <xsl:variable name="verso.elements.count">
3779 <xsl:choose>
3780 <xsl:when test="function-available('exsl:node-set')"><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3781 <xsl:when test="contains(system-property('xsl:vendor'), 'Apache Software Foundation')">
3782 <!--Xalan quirk--><xsl:value-of select="count(exsl:node-set($verso.content)/*)"/></xsl:when>
3783 <xsl:otherwise>1</xsl:otherwise>
3784 </xsl:choose>
3785 </xsl:variable>
3786 <xsl:if test="(normalize-space($verso.content) != '') or ($verso.elements.count &gt; 0)">
3787 <div><xsl:copy-of select="$verso.content"/></div>
3788 </xsl:if>
3789 <xsl:call-template name="sidebar.titlepage.separator"/>
3790 </div>
3791</xsl:template>
3792
3793<xsl:template match="*" mode="sidebar.titlepage.recto.mode">
3794 <!-- if an element isn't found in this mode, -->
3795 <!-- try the generic titlepage.mode -->
3796 <xsl:apply-templates select="." mode="titlepage.mode"/>
3797</xsl:template>
3798
3799<xsl:template match="*" mode="sidebar.titlepage.verso.mode">
3800 <!-- if an element isn't found in this mode, -->
3801 <!-- try the generic titlepage.mode -->
3802 <xsl:apply-templates select="." mode="titlepage.mode"/>
3803</xsl:template>
3804
3805<xsl:template match="title" mode="sidebar.titlepage.recto.auto.mode">
3806<div xsl:use-attribute-sets="sidebar.titlepage.recto.style">
3807<xsl:call-template name="formal.object.heading">
3808<xsl:with-param name="object" select="ancestor-or-self::sidebar[1]"/>
3809</xsl:call-template>
3810</div>
3811</xsl:template>
3812
3813<xsl:template match="subtitle" mode="sidebar.titlepage.recto.auto.mode">
3814<div xsl:use-attribute-sets="sidebar.titlepage.recto.style">
3815<xsl:apply-templates select="." mode="sidebar.titlepage.recto.mode"/>
3816</div>
3817</xsl:template>
3818
3819</xsl:stylesheet>
3820
diff --git a/documentation/yocto-project-qs/yocto-project-qs.xml b/documentation/yocto-project-qs/yocto-project-qs.xml
new file mode 100644
index 0000000..96abe83
--- /dev/null
+++ b/documentation/yocto-project-qs/yocto-project-qs.xml
@@ -0,0 +1,958 @@
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<article id='intro'>
6 <articleinfo>
7 <title>Yocto Project Quick Start</title>
8
9 <copyright>
10 <year>&COPYRIGHT_YEAR;</year>
11 <holder>Linux Foundation</holder>
12 </copyright>
13
14 <legalnotice>
15 <para>
16 Permission is granted to copy, distribute and/or modify this document under
17 the terms of the <ulink type="http" url="http://creativecommons.org/licenses/by-sa/2.0/uk/">Creative Commons Attribution-Share Alike 2.0 UK: England &amp; Wales</ulink> as published by Creative Commons.
18 </para>
19 <note>
20 For the latest version of this manual associated with this
21 Yocto Project release, see the
22 <ulink url='&YOCTO_DOCS_QS_URL;'>Yocto Project Quick Start</ulink>
23 from the Yocto Project website.
24 </note>
25 </legalnotice>
26
27
28 <abstract>
29 <imagedata fileref="figures/yocto-project-transp.png"
30 width="6in" depth="1in"
31 align="right" scale="25" />
32 </abstract>
33 </articleinfo>
34
35<section id='welcome'>
36 <title>Welcome!</title>
37 <para>
38 Welcome to the Yocto Project!
39 The Yocto Project is an open-source collaboration project focused on embedded Linux
40 developers.
41 Among other things, the Yocto Project uses a build system based on the Poky project
42 to construct complete Linux images.
43 The Poky project, in turn, draws from and contributes back to the OpenEmbedded project.
44 </para>
45
46 <para>
47 If you don't have a system that runs Linux and you want to give the Yocto Project a test run,
48 you might consider using the Yocto Project Build Appliance.
49 The Build Appliance allows you to build and boot a custom embedded Linux image with the Yocto
50 Project using a non-Linux development system.
51 See the <ulink url='http://www.yoctoproject.org/documentation/build-appliance'>Yocto
52 Project Build Appliance</ulink> for more information.
53 </para>
54
55 <para>
56 On the other hand, if you know all about open-source development, Linux development environments,
57 Git source repositories and the like and you just want some quick information that lets you try out
58 the Yocto Project on your Linux system, skip right to the
59 "<link linkend='super-user'>Super User</link>" section at the end of this quick start.
60 </para>
61
62 <para>
63 For the rest of you, this short document will give you some basic information about the environment and
64 let you experience it in its simplest form.
65 After reading this document, you will have a basic understanding of what the Yocto Project is
66 and how to use some of its core components.
67 This document steps you through a simple example showing you how to build a small image
68 and run it using the Quick EMUlator (QEMU emulator).
69 </para>
70
71 <para>
72 For more detailed information on the Yocto Project, you should check out these resources:
73 <itemizedlist>
74 <listitem><para><emphasis>Website:</emphasis> The <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink>
75 provides the latest builds, breaking news, full development documentation, and a rich Yocto
76 Project Development Community into which you can tap.
77 </para></listitem>
78 <listitem><para><emphasis>FAQs:</emphasis> Lists commonly asked Yocto Project questions and answers.
79 You can find two FAQs: <ulink url='&YOCTO_WIKI_URL;/wiki/FAQ'>Yocto Project FAQ</ulink> on
80 a wiki, and the
81 "<ulink url='&YOCTO_DOCS_REF_URL;#faq'>FAQ</ulink>" chapter in
82 the Yocto Project Reference Manual.
83 </para></listitem>
84 <listitem><para><emphasis>Developer Screencast:</emphasis> The
85 <ulink url='http://vimeo.com/36450321'>Getting Started with the Yocto Project - New
86 Developer Screencast Tutorial</ulink> provides a 30-minute video for the user
87 new to the Yocto Project but familiar with Linux build systems.</para></listitem>
88 </itemizedlist>
89 </para>
90</section>
91
92<section id='yp-intro'>
93 <title>Introducing the Yocto Project Development Environment</title>
94 <para>
95 The Yocto Project through the OpenEmbedded build system provides an open source development
96 environment targeting the ARM, MIPS, PowerPC and x86 architectures for a variety of
97 platforms including x86-64 and emulated ones.
98 You can use components from the Yocto Project to design, develop, build, debug, simulate,
99 and test the complete software stack using Linux, the X Window System, GNOME Mobile-based
100 application frameworks, and Qt frameworks.
101 </para>
102
103 <mediaobject>
104 <imageobject>
105 <imagedata fileref="figures/yocto-environment.png"
106 format="PNG" align='center' scalefit='1' width="100%"/>
107 </imageobject>
108 <caption>
109 <para>The Yocto Project Development Environment</para>
110 </caption>
111 </mediaobject>
112
113 <para>
114 Here are some highlights for the Yocto Project:
115 </para>
116
117 <itemizedlist>
118 <listitem>
119 <para>Provides a recent Linux kernel along with a set of system commands and libraries suitable for the embedded environment.</para>
120 </listitem>
121 <listitem>
122 <para>Makes available system components such as X11, GTK+, Qt, Clutter, and SDL
123 (among others) so you can create a rich user experience on devices
124 that have display hardware.
125 For devices that don't have a display or where you wish to use alternative UI
126 frameworks, these components need not be installed.</para>
127 </listitem>
128 <listitem>
129 <para>Creates a focused and stable core compatible with the OpenEmbedded
130 project with which you can easily and reliably build and develop.</para>
131 </listitem>
132 <listitem>
133 <para>Fully supports a wide range of hardware and device emulation through the QEMU
134 Emulator.</para>
135 </listitem>
136 </itemizedlist>
137
138 <para>
139 The Yocto Project can generate images for many kinds of devices.
140 However, the standard example machines target QEMU full-system emulation for x86, x86-64, ARM, MIPS,
141 and PPC-based architectures as well as specific hardware such as the
142 <trademark class='registered'>Intel</trademark> Desktop Board DH55TC.
143 Because an image developed with the Yocto Project can boot inside a QEMU emulator, the
144 development environment works nicely as a test platform for developing embedded software.
145 </para>
146
147 <para>
148 Another important Yocto Project feature is the Sato reference User Interface.
149 This optional GNOME mobile-based UI, which is intended for devices with
150 restricted screen sizes, sits neatly on top of a device using the
151 GNOME Mobile Stack and provides a well-defined user experience.
152 Implemented in its own layer, it makes it clear to developers how they can implement
153 their own user interface on top of a Linux image created with the Yocto Project.
154 </para>
155</section>
156
157<section id='yp-resources'>
158 <title>What You Need and How You Get It</title>
159
160 <para>
161 You need these things to develop in the Yocto Project environment:
162 </para>
163
164 <itemizedlist>
165 <listitem>
166 <para>A host system running a supported Linux distribution
167 (i.e. recent releases of Fedora, openSUSE, CentOS, Debian,
168 and Ubuntu).
169 If the host system supports multiple cores and threads, you can configure the
170 Yocto Project build system to decrease the time needed to build images
171 significantly.
172 </para>
173 </listitem>
174 <listitem>
175 <para>The right packages.</para>
176 </listitem>
177 <listitem>
178 <para>A release of the Yocto Project.</para>
179 </listitem>
180 </itemizedlist>
181
182 <section id='the-linux-distro'>
183 <title>The Linux Distribution</title>
184
185 <para>
186 The Yocto Project team is continually verifying more and more Linux
187 distributions with each release.
188 In general, if you have the current release minus one of the following
189 distributions you should have no problems.
190 <itemizedlist>
191 <listitem><para>Ubuntu</para></listitem>
192 <listitem><para>Fedora</para></listitem>
193 <listitem><para>openSUSE</para></listitem>
194 <listitem><para>CentOS</para></listitem>
195 <listitem><para>Debian</para></listitem>
196 </itemizedlist>
197 For a more detailed list of distributions that support the Yocto Project,
198 see the
199 "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>" section
200 in the Yocto Project Reference Manual.
201 </para>
202 <para>
203 The OpenEmbedded build system should be able to run on any modern
204 distribution that has the following versions for Git, tar, and
205 Python.
206 <itemizedlist>
207 <listitem><para>Git 1.7.5 or greater</para></listitem>
208 <listitem><para>tar 1.24 or greater</para></listitem>
209 <listitem><para>Python 2.7.3 or greater excluding Python
210 3.x, which is not supported.</para></listitem>
211 </itemizedlist>
212 Earlier releases of Python are known to not work and the system
213 does not support Python 3 at this time.
214 If your system does not meet any of these three listed
215 version requirements, you can
216 take steps to prepare the system so that you can still use the build
217 system.
218 See the
219 "<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</ulink>"
220 section in the Yocto Project Reference Manual for information.
221 </para>
222 <para>
223 This document assumes you are running one of the previously noted
224 distributions on your Linux-based host systems.
225 </para>
226 <note>
227 <para>
228 If you attempt to use a distribution not in the above list,
229 you may or may not have success.
230 Yocto Project releases are tested against the stable Linux
231 distributions listed in the
232 "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>"
233 section of the Yocto Project Reference Manual.
234 If you encounter problems, please go to
235 <ulink url='&YOCTO_BUGZILLA_URL;'>Yocto Project Bugzilla</ulink>
236 and submit a bug.
237 We are interested in hearing about your experience.
238 </para>
239 </note>
240 </section>
241
242 <section id='packages'>
243 <title>The Packages</title>
244
245 <para>
246 Packages and package installation vary depending on your development system
247 and on your intent.
248 For example, if you want to build an image that can run
249 on QEMU in graphical mode (a minimal, basic build
250 requirement), then the number of packages is different than if you want to
251 build an image on a headless system or build out the Yocto Project
252 documentation set.
253 Collectively, the number of required packages is large
254 if you want to be able to cover all cases.
255 <note>In general, you need to have root access and then install the
256 required packages.
257 Thus, the commands in the following section may or may not work
258 depending on whether or not your Linux distribution has
259 <filename>sudo</filename> installed.</note>
260 </para>
261
262 <para>
263 The next few sections list, by supported Linux Distributions, the required
264 packages needed to build an image that runs on QEMU in graphical mode
265 (e.g. essential plus graphics support).
266 </para>
267
268 <para>
269 For lists of required packages for other scenarios, see the
270 "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-host-development-system'>Required Packages for the Host Development System</ulink>"
271 section in the Yocto Project Reference Manual.
272 </para>
273
274 <section id='ubuntu'>
275 <title>Ubuntu and Debian</title>
276
277 <para>
278 The essential and graphical support packages you need for a
279 supported Ubuntu or Debian distribution are shown in the
280 following command:
281 <literallayout class='monospaced'>
282 $ sudo apt-get install &UBUNTU_HOST_PACKAGES_ESSENTIAL; libsdl1.2-dev xterm
283 </literallayout>
284 </para>
285 </section>
286
287 <section id='fedora'>
288 <title>Fedora</title>
289
290 <para>
291 The essential and graphical packages you need for a supported
292 Fedora distribution are shown in the following command:
293 <literallayout class='monospaced'>
294 $ sudo yum install &FEDORA_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
295 </literallayout>
296 </para>
297 </section>
298
299 <section id='opensuse'>
300 <title>OpenSUSE</title>
301
302 <para>
303 The essential and graphical packages you need for a supported
304 OpenSUSE distribution are shown in the following command:
305 <literallayout class='monospaced'>
306 $ sudo zypper install &OPENSUSE_HOST_PACKAGES_ESSENTIAL; libSDL-devel xterm
307 </literallayout>
308 </para>
309 </section>
310
311 <section id='centos'>
312 <title>CentOS</title>
313
314 <para>
315 The essential and graphical packages you need for a supported
316 CentOS distribution are shown in the following command:
317 <literallayout class='monospaced'>
318 $ sudo yum install &CENTOS_HOST_PACKAGES_ESSENTIAL; SDL-devel xterm
319 </literallayout>
320 <note>Depending on the CentOS version you are using, other requirements
321 and dependencies might exist.
322 For details, you should look at the CentOS sections on the
323 <ulink url='https://wiki.yoctoproject.org/wiki/Poky/GettingStarted/Dependencies'>Poky/GettingStarted/Dependencies</ulink>
324 wiki page.</note>
325 </para>
326 </section>
327 </section>
328
329 <section id='releases'>
330 <title>Yocto Project Release</title>
331
332 <para>
333 You can download the latest Yocto Project release by going to the
334 <ulink url="&YOCTO_HOME_URL;">Yocto Project website</ulink>
335 clicking "Downloads" in the navigation pane to the left to view all
336 available Yocto Project releases.
337 Current and archived releases are available for download to the
338 right.
339 Nightly and developmental builds are also maintained at
340 <ulink url="&YOCTO_AB_NIGHTLY_URL;"></ulink>.
341 However, for this document a released version of Yocto Project is used.
342 </para>
343
344 <para>
345 You can also get the Yocto Project files you need by setting up (cloning in Git terms)
346 a local copy of the <filename>poky</filename> Git repository on your host development
347 system.
348 Doing so allows you to contribute back to the Yocto Project project.
349 For information on how to get set up using this method, see the
350 "<ulink url='&YOCTO_DOCS_DEV_URL;#local-yp-release'>Yocto
351 Project Release</ulink>" item in the Yocto Project Development Manual.
352 </para>
353 </section>
354</section>
355
356<section id='test-run'>
357 <title>A Quick Test Run</title>
358
359 <para>
360 Now that you have your system requirements in order, you can give the Yocto Project a try.
361 This section presents some steps that let you do the following:
362 </para>
363
364 <itemizedlist>
365 <listitem>
366 <para>Build an image and run it in the QEMU emulator</para>
367 </listitem>
368 <listitem>
369 <para>Use a pre-built image and run it in the QEMU emulator</para>
370 </listitem>
371 </itemizedlist>
372
373 <section id='building-image'>
374 <title>Building an Image</title>
375
376 <para>
377 In the development environment you will need to build an image whenever you change hardware
378 support, add or change system libraries, or add or change services that have dependencies.
379 </para>
380
381 <mediaobject>
382 <imageobject>
383 <imagedata fileref="figures/building-an-image.png" format="PNG" align='center' scalefit='1'/>
384 </imageobject>
385 <caption>
386 <para>Building an Image</para>
387 </caption>
388 </mediaobject>
389
390 <para>
391 Use the following commands to build your image.
392 The OpenEmbedded build process creates an entire Linux distribution, including the toolchain,
393 from source.
394 </para>
395
396 <note><para>
397 The build process using Sato currently consumes about 50GB of disk space.
398 To allow for variations in the build process and for future package expansion, we
399 recommend having at least 100GB of free disk space.
400 </para></note>
401
402 <note><para>
403 By default, the build process searches for source code using a pre-determined order
404 through a set of locations.
405 If you encounter problems with the build process finding and downloading source code, see the
406 "<ulink url='&YOCTO_DOCS_REF_URL;#how-does-the-yocto-project-obtain-source-code-and-will-it-work-behind-my-firewall-or-proxy-server'>How does the OpenEmbedded build system obtain source code and will it work behind my
407 firewall or proxy server?</ulink>" in the Yocto Project Reference Manual.
408 </para></note>
409
410 <para>
411 <literallayout class='monospaced'>
412 $ wget &YOCTO_POKY_DL_URL;
413 $ tar xjf &YOCTO_POKY;.tar.bz2
414 $ cd &YOCTO_POKY;
415 $ source &OE_INIT_FILE;
416 </literallayout>
417 </para>
418
419 <tip><para>
420 To help conserve disk space during builds, you can add the following statement
421 to your project's configuration file, which for this example
422 is <filename>&YOCTO_POKY;/build/conf/local.conf</filename>.
423 Adding this statement deletes the work directory used for building a package
424 once the package is built.
425 <literallayout class='monospaced'>
426 INHERIT += "rm_work"
427 </literallayout>
428 </para></tip>
429
430 <itemizedlist>
431 <listitem><para>In the previous example, the first command retrieves the Yocto Project
432 release tarball from the source repositories using the
433 <filename>wget</filename> command.
434 Alternatively, you can go to the
435 <ulink url='&YOCTO_HOME_URL;'>Yocto Project website's</ulink>
436 "Downloads" page to retrieve the tarball.</para></listitem>
437 <listitem><para>The second command extracts the files from the tarball and places
438 them into a directory named <filename>&YOCTO_POKY;</filename> in the current
439 directory.</para></listitem>
440 <listitem><para>The third and fourth commands change the working directory to the
441 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
442 and run the Yocto Project
443 <ulink url='&YOCTO_DOCS_REF_URL;#structure-core-script'><filename>&OE_INIT_FILE;</filename></ulink>
444 environment setup script.
445 Running this script defines OpenEmbedded build environment settings needed to
446 complete the build.
447 The script also creates the
448 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>,
449 which is <filename>build</filename> in this case and is located in the
450 Source Directory.
451 After the script runs, your current working directory is set
452 to the Build Directory.
453 Later, when the build completes, the Build Directory contains all the files
454 created during the build.
455 <note>
456 For information on running a memory-resident BitBake, see
457 the
458 <ulink url='&YOCTO_DOCS_REF_URL;#structure-memres-core-script'><filename>oe-init-build-env-memres</filename></ulink>
459 setup script.
460 </note></para></listitem>
461 </itemizedlist>
462 <para>
463 Take some time to examine your <filename>local.conf</filename> file
464 in your project's configuration directory, which is found in the Build Directory.
465 The defaults in that file should work fine.
466 However, there are some variables of interest at which you might look.
467 </para>
468
469 <para>
470 By default, the target architecture for the build is <filename>qemux86</filename>,
471 which produces an image that can be used in the QEMU emulator and is targeted at an
472 <trademark class='registered'>Intel</trademark> 32-bit based architecture.
473 To change this default, edit the value of the
474 <ulink url='&YOCTO_DOCS_REF_URL;#var-MACHINE'><filename>MACHINE</filename></ulink>
475 variable in the configuration file before launching the build.
476 </para>
477
478 <para>
479 Another couple of variables of interest are the
480 <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></ulink> and the
481 <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink> variables.
482 By default, these variables are commented out.
483 However, if you have a multi-core CPU you might want to uncomment
484 the lines and set both variables equal to twice the number of your
485 host's processor cores.
486 Setting these variables can significantly shorten your build time.
487 </para>
488
489 <para>
490 Another consideration before you build is the package manager used when creating
491 the image.
492 By default, the OpenEmbedded build system uses the RPM package manager.
493 You can control this configuration by using the
494 <filename><ulink url='&YOCTO_DOCS_REF_URL;#var-PACKAGE_CLASSES'><filename>PACKAGE_CLASSES</filename></ulink></filename> variable.
495 For additional package manager selection information, see the
496 "<ulink url='&YOCTO_DOCS_REF_URL;#ref-classes-package'>Packaging - <filename>package*.bbclass</filename></ulink>"
497 section in the Yocto Project Reference Manual.
498 </para>
499
500 <para>
501 Continue with the following command to build an OS image for the target, which is
502 <filename>core-image-sato</filename> in this example.
503 For information on the <filename>-k</filename> option use the
504 <filename>bitbake --help</filename> command or see the
505 "<ulink url='&YOCTO_DOCS_REF_URL;#usingpoky-components-bitbake'>BitBake</ulink>" section in
506 the Yocto Project Reference Manual.
507 <literallayout class='monospaced'>
508 $ bitbake -k core-image-sato
509 </literallayout>
510 <note><para>
511 BitBake requires Python 2.6 or 2.7. For more information on this requirement,
512 see the
513 <ulink url='&YOCTO_DOCS_REF_URL;#faq'>FAQ</ulink> in the Yocto Project Reference
514 Manual.
515 </para></note>
516 The final command runs the image:
517 <literallayout class='monospaced'>
518 $ runqemu qemux86
519 </literallayout>
520 <note><para>
521 Depending on the number of processors and cores, the amount or RAM, the speed of your
522 Internet connection and other factors, the build process could take several hours the first
523 time you run it.
524 Subsequent builds run much faster since parts of the build are cached.
525 </para></note>
526 </para>
527 </section>
528
529 <section id='using-pre-built'>
530 <title>Using Pre-Built Binaries and QEMU</title>
531
532 <para>
533 If hardware, libraries and services are stable, you can get started by using a pre-built binary
534 of the filesystem image, kernel, and toolchain and run it using the QEMU emulator.
535 This scenario is useful for developing application software.
536 </para>
537
538 <mediaobject>
539 <imageobject>
540 <imagedata fileref="figures/using-a-pre-built-image.png" format="PNG" align='center' scalefit='1'/>
541 </imageobject>
542 <caption>
543 <para>Using a Pre-Built Image</para>
544 </caption>
545 </mediaobject>
546
547 <para>
548 For this scenario, you need to do several things:
549 </para>
550
551 <itemizedlist>
552 <listitem><para>Install the appropriate stand-alone toolchain tarball.</para></listitem>
553 <listitem><para>Download the pre-built image that will boot with QEMU.
554 You need to be sure to get the QEMU image that matches your target machine’s
555 architecture (e.g. x86, ARM, etc.).</para></listitem>
556 <listitem><para>Download the filesystem image for your target machine's architecture.
557 </para></listitem>
558 <listitem><para>Set up the environment to emulate the hardware and then start the QEMU emulator.
559 </para></listitem>
560 </itemizedlist>
561
562 <section id='installing-the-toolchain'>
563 <title>Installing the Toolchain</title>
564
565 <para>
566 You can download a tarball installer, which includes the
567 pre-built toolchain, the <filename>runqemu</filename>
568 script, and support files from the appropriate directory under
569 <ulink url='&YOCTO_TOOLCHAIN_DL_URL;'></ulink>.
570 Toolchains are available for 32-bit and 64-bit x86 development
571 systems from the <filename>i686</filename> and
572 <filename>x86_64</filename> directories, respectively.
573 The toolchains the Yocto Project provides are based off the
574 <filename>core-image-sato</filename> image and contain
575 libraries appropriate for developing against that image.
576 Each type of development system supports five or more target
577 architectures.
578 </para>
579
580 <para>
581 The names of the tarball installer scripts are such that a
582 string representing the host system appears first in the
583 filename and then is immediately followed by a string
584 that represents the target architecture.
585 </para>
586
587 <literallayout class='monospaced'>
588 poky-eglibc-&lt;<emphasis>host_system</emphasis>&gt;-&lt;<emphasis>image_type</emphasis>&gt;-&lt;<emphasis>arch</emphasis>&gt;-toolchain-&lt;<emphasis>release_version</emphasis>&gt;.sh
589
590 Where:
591 &lt;<emphasis>host_system</emphasis>&gt; is a string representing your development system:
592
593 i686 or x86_64.
594
595 &lt;<emphasis>image_type</emphasis>&gt; is a string representing the image you wish to
596 develop a Software Development Toolkit (SDK) for use against.
597 The Yocto Project builds toolchain installers using the
598 following BitBake command:
599
600 bitbake core-image-sato -c do_populatesdk core-image-sato
601
602 &lt;<emphasis>arch</emphasis>&gt; is a string representing the tuned target architecture:
603
604 i586, x86_64, powerpc, mips, armv7a or armv5te
605
606 &lt;<emphasis>release_version</emphasis>&gt; is a string representing the release number of the
607 Yocto Project:
608
609 &DISTRO;, &DISTRO;+snapshot
610 </literallayout>
611
612 <para>
613 For example, the following toolchain installer is for a 64-bit
614 development host system and a i586-tuned target architecture
615 based off the SDK for <filename>core-image-sato</filename>:
616 <literallayout class='monospaced'>
617 poky-eglibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
618 </literallayout>
619 </para>
620
621 <para>
622 Toolchains are self-contained and by default are installed into
623 <filename>/opt/poky</filename>.
624 However, when you run the toolchain installer, you can choose an
625 installation directory.
626 </para>
627
628 <para>
629 The following command shows how to run the installer given a toolchain tarball
630 for a 64-bit x86 development host system and a 32-bit x86 target architecture.
631 You must change the permissions on the toolchain
632 installer script so that it is executable.
633 </para>
634
635 <para>
636 The example assumes the toolchain installer is located in <filename>~/Downloads/</filename>.
637 <note>
638 If you do not have write permissions for the directory into which you are installing
639 the toolchain, the toolchain installer notifies you and exits.
640 Be sure you have write permissions in the directory and run the installer again.
641 </note>
642 </para>
643
644 <para>
645 <literallayout class='monospaced'>
646 $ ~/Downloads/poky-eglibc-x86_64-core-image-sato-i586-toolchain-&DISTRO;.sh
647 </literallayout>
648 </para>
649
650 <para>
651 For more information on how to install tarballs, see the
652 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-an-existing-toolchain-tarball'>Using a Cross-Toolchain Tarball</ulink>" and
653 "<ulink url='&YOCTO_DOCS_ADT_URL;#using-the-toolchain-from-within-the-build-tree'>Using BitBake and the Build Directory</ulink>" sections in the Yocto Project Application Developer's Guide.
654 </para>
655 </section>
656
657 <section id='downloading-the-pre-built-linux-kernel'>
658 <title>Downloading the Pre-Built Linux Kernel</title>
659
660 <para>
661 You can download the pre-built Linux kernel suitable for running in the QEMU emulator from
662 <ulink url='&YOCTO_QEMU_DL_URL;'></ulink>.
663 Be sure to use the kernel that matches the architecture you want to simulate.
664 Download areas exist for the five supported machine architectures:
665 <filename>qemuarm</filename>, <filename>qemumips</filename>, <filename>qemuppc</filename>,
666 <filename>qemux86</filename>, and <filename>qemux86-64</filename>.
667 </para>
668
669 <para>
670 Most kernel files have one of the following forms:
671 <literallayout class='monospaced'>
672 *zImage-qemu&lt;<emphasis>arch</emphasis>&gt;.bin
673 vmlinux-qemu&lt;<emphasis>arch</emphasis>&gt;.bin
674
675 Where:
676 &lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture:
677 x86, x86-64, ppc, mips, or arm.
678 </literallayout>
679 </para>
680
681 <para>
682 You can learn more about downloading a Yocto Project kernel in the
683 "<ulink url='&YOCTO_DOCS_DEV_URL;#local-kernel-files'>Yocto Project Kernel</ulink>"
684 bulleted item in the Yocto Project Development Manual.
685 </para>
686 </section>
687
688 <section id='downloading-the-filesystem'>
689 <title>Downloading the Filesystem</title>
690
691 <para>
692 You can also download the filesystem image suitable for your target architecture from
693 <ulink url='&YOCTO_QEMU_DL_URL;'></ulink>.
694 Again, be sure to use the filesystem that matches the architecture you want
695 to simulate.
696 </para>
697
698 <para>
699 The filesystem image has two tarball forms: <filename>ext3</filename> and
700 <filename>tar</filename>.
701 You must use the <filename>ext3</filename> form when booting an image using the
702 QEMU emulator.
703 The <filename>tar</filename> form can be flattened out in your host development system
704 and used for build purposes with the Yocto Project.
705 <literallayout class='monospaced'>
706 core-image-&lt;<emphasis>profile</emphasis>&gt;-qemu&lt;<emphasis>arch</emphasis>&gt;.ext3
707 core-image-&lt;<emphasis>profile</emphasis>&gt;-qemu&lt;<emphasis>arch</emphasis>&gt;.tar.bz2
708
709 Where:
710 &lt;<emphasis>profile</emphasis>&gt; is the filesystem image's profile:
711 lsb, lsb-dev, lsb-sdk, lsb-qt3, minimal, minimal-dev, sato,
712 sato-dev, or sato-sdk. For information on these types of image
713 profiles, see the "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" chapter in the Yocto Project
714 Reference Manual.
715
716 &lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture:
717 x86, x86-64, ppc, mips, or arm.
718 </literallayout>
719 </para>
720 </section>
721
722 <section id='setting-up-the-environment-and-starting-the-qemu-emulator'>
723 <title>Setting Up the Environment and Starting the QEMU Emulator</title>
724
725 <para>
726 Before you start the QEMU emulator, you need to set up the emulation environment.
727 The following command form sets up the emulation environment.
728 <literallayout class='monospaced'>
729 $ source &YOCTO_ADTPATH_DIR;/environment-setup-&lt;<emphasis>arch</emphasis>&gt;-poky-linux-&lt;<emphasis>if</emphasis>&gt;
730
731 Where:
732 &lt;<emphasis>arch</emphasis>&gt; is a string representing the target architecture:
733 i586, x86_64, ppc603e, mips, or armv5te.
734
735 &lt;<emphasis>if</emphasis>&gt; is a string representing an embedded application binary interface.
736 Not all setup scripts include this string.
737 </literallayout>
738 </para>
739
740 <para>
741 Finally, this command form invokes the QEMU emulator
742 <literallayout class='monospaced'>
743 $ runqemu &lt;<emphasis>qemuarch</emphasis>&gt; &lt;<emphasis>kernel-image</emphasis>&gt; &lt;<emphasis>filesystem-image</emphasis>&gt;
744
745 Where:
746 &lt;<emphasis>qemuarch</emphasis>&gt; is a string representing the target architecture: qemux86, qemux86-64,
747 qemuppc, qemumips, or qemuarm.
748
749 &lt;<emphasis>kernel-image</emphasis>&gt; is the architecture-specific kernel image.
750
751 &lt;<emphasis>filesystem-image</emphasis>&gt; is the .ext3 filesystem image.
752
753 </literallayout>
754 </para>
755
756 <para>
757 Continuing with the example, the following two commands setup the emulation
758 environment and launch QEMU.
759 This example assumes the root filesystem (<filename>.ext3</filename> file) and
760 the pre-built kernel image file both reside in your home directory.
761 The kernel and filesystem are for a 32-bit target architecture.
762 <literallayout class='monospaced'>
763 $ cd $HOME
764 $ source &YOCTO_ADTPATH_DIR;/environment-setup-i586-poky-linux
765 $ runqemu qemux86 bzImage-qemux86.bin \
766 core-image-sato-qemux86.ext3
767 </literallayout>
768 </para>
769
770 <para>
771 The environment in which QEMU launches varies depending on the filesystem image and on the
772 target architecture.
773 For example, if you source the environment for the ARM target
774 architecture and then boot the minimal QEMU image, the emulator comes up in a new
775 shell in command-line mode.
776 However, if you boot the SDK image, QEMU comes up with a GUI.
777 <note>Booting the PPC image results in QEMU launching in the same shell in
778 command-line mode.</note>
779 </para>
780 </section>
781 </section>
782</section>
783
784<section id='super-user'>
785 <title>Super User
786</title>
787
788 <para>
789 This section
790 <footnote>
791 <para>
792 Kudos and thanks to Robert P. J. Day of
793 <ulink url='http://www.crashcourse.ca'>CrashCourse</ulink> for providing the basis
794 for this "expert" section with information from one of his
795 <ulink url='http://www.crashcourse.ca/wiki/index.php/Yocto_Project_Quick_Start'>wiki</ulink>
796 pages.
797 </para>
798 </footnote>
799 gives you a minimal description of how to use the Yocto Project to build images
800 for a BeagleBoard xM starting from scratch.
801 The steps were performed on a 64-bit Ubuntu 10.04 system.
802 </para>
803
804 <section id='getting-yocto'>
805 <title>Getting the Yocto Project</title>
806
807 <para>
808 Set up your <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>
809 one of two ways:
810 <itemizedlist>
811 <listitem><para><emphasis>Tarball:</emphasis>
812 Use if you want the latest stable release:
813 <literallayout class='monospaced'>
814 $ wget &YOCTO_RELEASE_DL_URL;/&YOCTO_POKY_TARBALL;
815 $ tar xvjf &YOCTO_POKY_TARBALL;
816 </literallayout></para></listitem>
817 <listitem><para><emphasis>Git Repository:</emphasis>
818 Use if you want to work with cutting edge development content:
819 <literallayout class='monospaced'>
820 $ git clone git://git.yoctoproject.org/poky
821 </literallayout></para></listitem>
822 </itemizedlist>
823 The remainder of the section assumes the Git repository method.
824 </para>
825 </section>
826
827 <section id='setting-up-your-host'>
828 <title>Setting Up Your Host</title>
829
830 <para>
831 You need some packages for everything to work.
832 Rather than duplicate them here, look at the "<link linkend='packages'>The Packages</link>"
833 section earlier in this quick start.
834 </para>
835 </section>
836
837 <section id='initializing-the-build-environment'>
838 <title>Initializing the Build Environment</title>
839
840 <para>
841 From the parent directory your
842 <ulink url='&YOCTO_DOCS_DEV_URL;#source-directory'>Source Directory</ulink>,
843 initialize your environment and provide a meaningful
844 <ulink url='&YOCTO_DOCS_DEV_URL;#build-directory'>Build Directory</ulink>
845 name:
846 <literallayout class='monospaced'>
847 $ source poky/&OE_INIT_FILE; mybuilds
848 </literallayout>
849 At this point, the <filename>mybuilds</filename> directory has been created for you
850 and it is now your current working directory.
851 If you don't provide your own directory name it defaults to <filename>build</filename>,
852 which is inside the Source Directory.
853 </para>
854 </section>
855
856 <section id='configuring-the-local.conf-file'>
857 <title>Configuring the local.conf File</title>
858
859 <para>
860 Initializing the build environment creates a <filename>conf/local.conf</filename> configuration file
861 in the Build Directory.
862 You need to manually edit this file to specify the machine you are building and to optimize
863 your build time.
864 Here are the minimal changes to make:
865 <literallayout class='monospaced'>
866 BB_NUMBER_THREADS = "8"
867 PARALLEL_MAKE = "-j 8"
868 MACHINE ?= "beagleboard"
869 </literallayout>
870 Briefly, set <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_NUMBER_THREADS'><filename>BB_NUMBER_THREADS</filename></ulink>
871 and <ulink url='&YOCTO_DOCS_REF_URL;#var-PARALLEL_MAKE'><filename>PARALLEL_MAKE</filename></ulink> to
872 twice your host processor's number of cores.
873 </para>
874
875 <para>
876 A good deal that goes into a Yocto Project build is simply
877 downloading all of the source tarballs.
878 Maybe you have been working with another build system
879 (OpenEmbedded or Angstrom) for which you have built up a sizable
880 directory of source tarballs.
881 Or, perhaps someone else has such a directory for which you have
882 read access.
883 If so, you can save time by adding statements to your
884 configuration file so that the build process checks local
885 directories first for existing tarballs before checking the
886 Internet.
887 Here is an efficient way to set it up in your
888 <filename>local.conf</filename> file:
889 <literallayout class='monospaced'>
890 SOURCE_MIRROR_URL ?= "file:///home/you/your-download-dir/"
891 INHERIT += "own-mirrors"
892 BB_GENERATE_MIRROR_TARBALLS = "1"
893 # BB_NO_NETWORK = "1"
894 </literallayout>
895 </para>
896
897 <para>
898 In the previous example, the
899 <ulink url='&YOCTO_DOCS_REF_URL;#var-BB_GENERATE_MIRROR_TARBALLS'><filename>BB_GENERATE_MIRROR_TARBALLS</filename></ulink>
900 variable causes the OpenEmbedded build system to generate tarballs
901 of the Git repositories and store them in the
902 <ulink url='&YOCTO_DOCS_REF_URL;#var-DL_DIR'><filename>DL_DIR</filename></ulink>
903 directory.
904 Due to performance reasons, generating and storing these tarballs
905 is not the build system's default behavior.
906 </para>
907
908 <para>
909 You can also use the
910 <ulink url='&YOCTO_DOCS_REF_URL;#var-PREMIRRORS'><filename>PREMIRRORS</filename></ulink>
911 variable.
912 For an example, see the variable's glossary entry in the
913 Yocto Project Reference Manual.
914 </para>
915 </section>
916
917 <section id='building-the-image'>
918 <title>Building the Image</title>
919
920 <para>
921 At this point, you need to select an image to build for the BeagleBoard xM.
922 If this is your first build using the Yocto Project, you should try the smallest and simplest
923 image:
924 <literallayout class='monospaced'>
925 $ bitbake core-image-minimal
926 </literallayout>
927 Now you just wait for the build to finish.
928 </para>
929
930 <para>
931 Here are some variations on the build process that could be helpful:
932 <itemizedlist>
933 <listitem><para>Fetch all the necessary sources without starting the build:
934 <literallayout class='monospaced'>
935 $ bitbake -c fetchall core-image-minimal
936 </literallayout>
937 This variation guarantees that you have all the sources for that BitBake target
938 should you disconnect from the net and want to do the build later offline.
939 </para></listitem>
940 <listitem><para>Specify to continue the build even if BitBake encounters an error.
941 By default, BitBake aborts the build when it encounters an error.
942 This command keeps a faulty build going:
943 <literallayout class='monospaced'>
944 $ bitbake -k core-image-minimal
945 </literallayout></para></listitem>
946 </itemizedlist>
947 </para>
948
949 <para>
950 Once you have your image, you can take steps to load and boot it on the target hardware.
951 </para>
952 </section>
953</section>
954
955</article>
956<!--
957vim: expandtab tw=80 ts=4
958-->
diff --git a/presentations/automotive-linux-summit-2012/automotive.pin b/presentations/automotive-linux-summit-2012/automotive.pin
new file mode 100644
index 0000000..c5292fb
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/automotive.pin
@@ -0,0 +1,369 @@
1#!/usr/bin/env pinpoint
2
3[fill]
4[bottom]
5[font=ITC Kabel Semi-Bold 60px]
6[transition=fade]
7-- [yocto.jpg] [duration=15.152699]
8
9# Ross Burton, Userspace Architect for Yocto
10# Open Source Technology Centre at Intel
11# This session is a high level introduction to the Yocto Project
12
13-- [cars2.jpg] [duration=18.412748]
14What is the Yocto Project?
15# Appears to be confusion in the automotive community about the Yocto Project.
16# What is is, what it can offer and so on.
17# We were invited by the LF to come here and clarify what Yocto is.
18# So, the Yocto Project is...
19
20-- [umbrella.jpg] [duration=13.583521]
21Umbrella project
22# An umbrella project.
23# You don't download or install the Yocto Project itself
24# Just like you don't install the Apache Foundation
25
26-- [tools.jpg] [duration=27.991919]
27Build environment
28and development tools
29# An embedded build environment and development tools
30# Specifically, a build system (bitbake), package metadata (oe-core),
31# Eclipse plugin, Application Development Toolkit (deployable toolchain)
32
33-- [cpus.jpg] [text-align=center] [center] [duration=49.765675]
34x86 • ARM
35MIPS • PowerPC
36# We support all of the big architectures.
37# oe-core builds for qemu machines for all of these architectures
38# Ensures that the core builds for everything
39# Optional BSPs for specific platform support
40# Everything is cross compiled, so no "but it worked for x86" problems
41
42-- [people.jpg] [duration=22.377592]
43Collaboration space
44# Finally YP is a collaboration space, providing a forum
45# for users to share their problems and solutions
46# Public mailing lists and weekly phone conference
47# PAUSE
48
49-- [minifigs.jpg] [center] [duration=18.553514]
50So many choices…
51# When picking a platform what's the difference between yocto and
52# android, linaro, tizen, buildroot, baserock, or hacking your
53# favourite desktop distribution...
54
55-- [engineer.jpg] [duration=56.184429]
56…why pick the Yocto Project?
57# YP is Linux for embedded, from a small ARM board to mission critical
58# xeon clusters
59# Builds a custom distro suited to your needs
60# Easy to add, remove, or change components
61# Open development process, no code drops or license complications
62
63-- [cables.jpg] [duration=40.872715]
64Some are easy to hack on,
65but you’ll regret it later
66# Especially if your target is x86, it's easy to start with a
67# desktop distribution and chop pieces out
68# Building new pieces and rebuilding the pieces that need changes
69# But when you need to change hardware, or rebuild with different compiler flags
70# It's not that easy any more
71
72-- [road.jpg] [top] [duration=47.108444]
73Designed for the long term
74# Yocto is designed for long term use
75# Six monthly release cycle but maintained release branches
76# Commercial support from OSVs
77# Tools to help do the mundane distribution building
78# - Generate package repos and disk images
79# - Static release archives for license compliance
80
81-- [tumble.jpg] [top] [duration=45.338825]
82Won’t fall apart in time
83# Yocto won't surprise you late in product development
84# Reproducable builds for the entire system
85# Clear process for updates - easy to make the changes
86# and publish a new image or repo
87# GPL compliant - trivial to public source *and* build instructions
88
89-- [group.jpg] [duration=9.779828]
90Who is in the Yocto Project?
91# Not a complete list
92
93-- [chip.jpg] [duration=15.615728]
94Hardware manufacturers
95# i.e. Intel, Texas Instruments, Freescale
96
97-- [tins.jpg] [duration=26.482639]
98Embedded OSVs
99# i.e. Wind River, MontaVista, Enea Software, Mentor Graphics
100# Commercial supported linux from these vendors
101
102-- [cat.jpg] [duration=31.311359]
103Consultants and individuals
104# Consultants, small and large
105# individuals "scratching an itch" for their own projects
106
107-- [owl.jpg] [top] [duration=60.471573]
108Advisory Board
109# finally should mention the advisory board.
110# Yocto is a project at the Linux Foundation, not owned by any
111# particular company
112# The advisory board is comprised of reps from member companies
113# working on Yocto
114# The boards first action was to name itself "advisory board" rather
115# than "steering group" to reflect that it offers advice and input and
116# doesn't control the project technical direction entirely in the
117# hands of the architects and maintainers
118
119-- [xwing.jpg] [duration=10.061844]
120How does it work?
121# Enough about what the Yocto Project can do
122# How does it work?
123
124-- [cake.jpg] [duration=36.383984]
125It’s all about the layers
126# A YP distribution is assembled from a number of layers
127# Layers are modular and you can combine layers from different sources
128# An example
129
130-- [blueprint.jpg] [text-align=center] [duration=19.801914]
131Bitbake
132# Build system
133
134-- [blueprint.jpg] [text-align=center] [transition=none] [duration=42.480724]
135oe-core
136Bitbake
137# core metadata
138# toolchain, kernel, eglibc, cairo, gstreamer, Xorg, Wayland (soon), gtk/qt
139
140-- [blueprint.jpg] [text-align=center] [transition=none] [duration=27.569431]
141meta-intel
142oe-core
143Bitbake
144# unless you happy with a qemu emulated machine you'll need a bsp
145# Intel hardware BSP, such as cedar trail (atom, netbook/industrial), fish river
146# island 2 (atom, digital signage, smart services), jasper forest (xeon, server)
147
148-- [blueprint.jpg] [text-align=center] [transition=none] [duration=42.118870]
149meta-yocto
150meta-intel
151oe-core
152Bitbake
153# Distribution policy
154# (Poky in meta-yocto for historial reasons)
155
156-- [corridor.jpg] [duration=15.193717]
157Let’s build something!
158# Enough talk, let's pretend to build something.
159
160-- [corridor.jpg] [center] [duration=58.901318]
161<tt>$ <b>wget http://downloads.yoctoproject.org/…
162 /poky-denzil-7.0.tar.bz2</b>
163$ <b>tar xjf poky-denzil-7.0.tar.bz2</b>
164$ <b>cd poky-denzil-7.0</b></tt>
165# One of the downloads from the Yocto Project is Poky, a reference
166# distribution. This is basically Bitbake, oe-core, and meta-yocto
167# glued together for convenience Grabbing and extracting the tarball
168# of the 7.0 "denzil" release is as you'd expect
169
170-- [corridor.jpg] [center] [duration=44.895329]
171<tt> $ <b>./oe-init-build-env</b>
172 ### Shell environment set up for builds.
173 ### You can now run 'bitbake &lt;target&gt;‘
174 Common targets are:
175 core-image-minimal
176 core-image-sato
177
178 $ <b>emacs conf/local.conf</b></tt>
179# First you need to source a shell script to setup the environment.
180# Now lets have a quick look at the configuration file
181
182-- [corridor.jpg] [center] [duration=64.857567]
183<tt> # BB_NUMBER_THREADS = "4"
184 # PARALLEL_MAKE = "-j 4"
185
186 MACHINE ??= "qemux86"
187
188 #MACHINE ?= "qemuarm"
189 #MACHINE ?= "qemumips"
190 #MACHINE ?= "atom-pc"
191 #MACHINE ?= "beagleboard"</tt>
192# Just a small fragment of the options available. Defaults are all
193# reasonable and it will successfully build out of the box.
194# For a faster build, change the parallel options. My build machine is
195# a quad core with hyperthreading, so I set both of those to 8 to keep
196# it busy
197# Default target is x86 on qemu. This is trivially changed by simply
198# changing the MACHINE variable.
199# Other options include where to keep downloaded tarballs; location of
200# any mirrors; features to enable such as multiarch, installing the
201# toolchain in the image for development, what package format to use,
202# and more.
203
204-- [corridor.jpg] [center] [duration=38.235931]
205 <tt>$ <b>bitbake core-image-minimal</b></tt>
206# Then, you can run bitbake with the name of the target you want
207# Targets can be anything - images, packages, or operations.
208# Let's build core-image-minimal, a small system that boots to a
209# console good start to build up from if you're making a
210# single-purpose system
211
212-- [corridor.jpg] [center] [duration=61.638290]
213<tt>Currently 7 running tasks (5452 of 9438):
2140: webkit-gtk-1.8.2-r1 do_compile (pid 27137)
2151: qt4-embedded-4.8.1-r48.1 do_compile (pid 27129)
2162: qt4-x11-free-4.8.1-r46.1 do_compile (pid 27096)
2173: systemtap-1.8+git1…-r0 do_compile (pid 27130)
2184: gmp-5.0.5-r0 do_package_write_rpm (pid 27131)
2195: libglade-2.6.4-r4 do_package_write_rpm (pid 27134)
2206: nfs-utils-1.2.3-r5 do_unpack (pid 27187)</tt>
221# While bitbake is running you'll see a report of what it's doing,
222# something like this. This isn't actually the output from
223# core-image-minimal but a colleague's world build that happened to be
224# running when I was writing the slides. Poor guy is in for a long
225# wait, webkit and two qt builds.
226
227-- [corridor.jpg] [center] [duration=33.001926]
228<tt>$ <b>ls tmp/deploy/images/</b>
229
230core-image-minimal-atom-pc-20120918205848.hddimg
231core-image-minimal-atom-pc-20120918205848.iso
232core-image-minimal-atom-pc-20120918205848.rootfs.cpio.gz
233core-image-minimal-atom-pc-20120918205848.rootfs.ext3
234</tt>
235# When it finishes building the results are in the deploy directory
236# Here we can see the constructed root file system as a cpio archive,
237# a bare filesystem, a bootable ISO image, and a disk image.
238# Generally I'd be writing the disk image to a fast USB stick with dd
239# and booting from that for testing.
240# The build output is configurable per build and per machine. This
241# build was for a fairly standard Intel system so the final output is
242# typically bootable on those. Build for a say beagleboard and you'll
243# get kernel, bootloader and rootfs tarballs to write a SD card.
244# alongside the images directory there is the package repository that
245# was used to construct the root fs. This can be shared on the network
246# and used as a normal repository, ie install some development or
247# debug symbol packages to fix a bug.
248
249-- [hob.jpg] [duration=47.693535]
250Hob
251# Hob is a graphical interface to bitbake
252# demo gremlins have decided to break hob on this laptop - works on my build machine
253# 1st iteration, gtk+ application to configure an image and monitor the build
254# 2nd iteration, web-based. currently under development.
255
256-- [question.jpg] [duration=17.024797]
257Now what?
258# So that's how to build an image, but what could we do with it?
259# Two quick ideas
260
261-- [dolls.jpg] [top] [duration=42.701355]
262Virtualisation
263# I expect virtualisation to be common in next-generation automotive
264# systems as individual processors become more powerful and logically
265# separate systems are ran in virtual machines on fewer physical
266# processors.
267# Because systems built by Yocto can be trivially tuned to be exactly
268# what is required and nothing else they are a good match for
269# virtualised systems, both as a minimal host that does simply manages
270# the virtual machines, or as a specialized virtual machine itself.
271
272-- [dash.jpg] [top] [duration=24.712542]
273Specialised subsystem
274# Cars are complicated beasts these days with many processors performing specialised roles
275# Dashboard, engine management, and so on.
276
277-- [qa.jpg] [duration=10.726003]
278Q&amp;A
279
280-- [yocto.jpg]
281Thanks!
282
283# Credits
284#
285# cars2.jpg
286# http://www.flickr.com/photos/15443451@N00/516336421/
287# Creative Commons 2.0 BY-NC-SA (C) Piyapat Ch.
288#
289# cables.jpg
290# group.jpg
291# tumble.jpg
292# umbrella.jpg
293# (C) David Stewart, All Rights Reserved, Used with Permission.
294#
295# tools.jpg
296# http://www.flickr.com/photos/22749993@N08/5386712834/
297# Creative Commons 2.0 BY (C) Jim Pennucci
298#
299# cpus.jpg
300# http://www.flickr.com/photos/17642817@N00/4553998825/
301# Creative Commons 2.0 BY (C) Jason Rogers
302#
303# people.jpg
304# http://www.flickr.com/photos/29370225@N03/6292167005/
305# Creative Commons 2.0 BY (C) Roberto Trm
306#
307# minifigs.jpg
308# http://www.flickr.com/photos/40646519@N00/305410323/
309# Creative Commons 2.0 BY (C) peter dutton
310#
311# engineer.jpg
312# http://www.flickr.com/photos/39066002@N05/3595313340/
313# Creative Commons 2.0 BY-NC-SA (C) RoberthK
314#
315# road.jpg
316# http://www.flickr.com/photos/81851211@N00/5861614/
317# Creative Commons 2.0 BY-NC-SA (C) Rick Harrison
318#
319# chip.jpg
320# http://www.flickr.com/photos/19616961@N00/41549347/
321# Creative Commons 2.0 BY (C) Rodrigo Senna
322#
323# tins.jpg
324# http://www.flickr.com/photos/75771631@N00/5185871835/
325# Creative Commons 2.0 BY (C) Matthew Hine
326#
327# cat.jpg
328# http://www.flickr.com/photos/9516941@N08/2286083797/
329# Creative Commons 2.0 BY (C) Tristan Bowersox
330#
331# owl.jpg
332# http://www.flickr.com/photos/95962912@N00/161060725/
333# Creative Commons 2.0 BY-NC-SA (C) Nuno Barreto
334#
335# xwing.jpg
336# http://www.flickr.com/photos/55723329@N00/6657150957/
337# Creative Commons 2.0 BY (C) psiaki
338#
339# cake.jpg
340# http://www.flickr.com/photos/megpi/2690878513/
341# Creative Commons 2.0 BY-NC-SA (C) megpi
342#
343# blueprint.jpg
344# http://www.flickr.com/photos/71745913@N00/2576799956/
345# Creative Commons 2.0 BY-NC-SA (C) HD41117
346#
347# corridor.jpg
348# http://www.flickr.com/photos/71865026@N00/1264424156/
349# Creative Commons 2.0 BY-SA (C) Mark Sebastian
350#
351# hob.jpg
352# http://www.flickr.com/photos/11247388@N00/5436586179/
353# Creative Commons 2.0 BY (C) sunshinecity
354#
355# question.jpg
356# http://www.flickr.com/photos/65555826@N00/1447024668/
357# Creative Commons 2.0 BY (C) wonderferret
358#
359# dolls.jpg
360# http://www.flickr.com/photos/30692297@N07/5454308102/
361# Creative Commons 2.0 BY-NC-SA (C) Adrian S Jones
362#
363# dash.jpg
364# http://www.flickr.com/photos/97856361@N00/167428099/
365# Creative Commons 2.0 BY-NC-SA (C) Albert Lynn
366#
367# qa.jpg
368# http://www.flickr.com/photos/39039882@N00/22778226/
369# Creative Commons 2.0 BY-NC (C) Tantek Çelik
diff --git a/presentations/automotive-linux-summit-2012/blueprint.jpg b/presentations/automotive-linux-summit-2012/blueprint.jpg
new file mode 100644
index 0000000..be7e9ce
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/blueprint.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/cables.jpg b/presentations/automotive-linux-summit-2012/cables.jpg
new file mode 100644
index 0000000..3fdc7c6
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/cables.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/cake.jpg b/presentations/automotive-linux-summit-2012/cake.jpg
new file mode 100644
index 0000000..b0304cb
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/cake.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/cars2.jpg b/presentations/automotive-linux-summit-2012/cars2.jpg
new file mode 100644
index 0000000..00e3f64
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/cars2.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/cat.jpg b/presentations/automotive-linux-summit-2012/cat.jpg
new file mode 100644
index 0000000..2d255c0
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/cat.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/chip.jpg b/presentations/automotive-linux-summit-2012/chip.jpg
new file mode 100644
index 0000000..6fb58c8
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/chip.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/corridor.jpg b/presentations/automotive-linux-summit-2012/corridor.jpg
new file mode 100644
index 0000000..b9ec29d
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/corridor.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/cpus.jpg b/presentations/automotive-linux-summit-2012/cpus.jpg
new file mode 100644
index 0000000..65f81ff
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/cpus.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/dash.jpg b/presentations/automotive-linux-summit-2012/dash.jpg
new file mode 100644
index 0000000..47e91d0
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/dash.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/dolls.jpg b/presentations/automotive-linux-summit-2012/dolls.jpg
new file mode 100644
index 0000000..2e8193d
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/dolls.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/engineer.jpg b/presentations/automotive-linux-summit-2012/engineer.jpg
new file mode 100644
index 0000000..71b7350
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/engineer.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/group.jpg b/presentations/automotive-linux-summit-2012/group.jpg
new file mode 100644
index 0000000..d71666a
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/group.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/hob.jpg b/presentations/automotive-linux-summit-2012/hob.jpg
new file mode 100644
index 0000000..646f793
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/hob.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/minifigs.jpg b/presentations/automotive-linux-summit-2012/minifigs.jpg
new file mode 100644
index 0000000..3c63cbd
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/minifigs.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/none.json b/presentations/automotive-linux-summit-2012/none.json
new file mode 100644
index 0000000..ab050bf
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/none.json
@@ -0,0 +1,50 @@
1[{
2 "type":"ClutterGroup",
3 "id":"actor",
4 "rotation-center-z-gravity":"center",
5 "scale-gravity":"center",
6 "children":[
7 {
8 "id":"background",
9 "type":"ClutterGroup",
10 "rotation-center-z-gravity":"center",
11 "scale-gravity":"center"
12 },
13 {
14 "type":"ClutterGroup",
15 "children":[
16 {
17 "id":"midground",
18 "type":"ClutterGroup",
19 "rotation-center-z-gravity":"center",
20 "scale-gravity":"center"
21 }]},
22 {
23 "id":"foreground",
24 "type":"ClutterGroup",
25 "rotation-center-z-gravity":"center",
26 "scale-gravity":"center"
27 }
28 ]}
29 ,{
30 "type":"ClutterState",
31 "id":"state",
32 "duration":1,
33 "transitions":[
34 {
35 "source":null,
36 "target":"pre",
37 "keys": [["actor", "opacity", "linear", 0]]
38 },
39 {
40 "source":null,
41 "target":"show",
42 "keys": [["actor", "opacity", "linear", 255]]
43 },
44 {
45 "source":null,
46 "target":"post",
47 "keys": [["actor", "opacity", "linear", 0]]
48 }
49 ]}
50]
diff --git a/presentations/automotive-linux-summit-2012/owl.jpg b/presentations/automotive-linux-summit-2012/owl.jpg
new file mode 100644
index 0000000..8eda131
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/owl.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/people.jpg b/presentations/automotive-linux-summit-2012/people.jpg
new file mode 100644
index 0000000..3c596a2
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/people.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/qa.jpg b/presentations/automotive-linux-summit-2012/qa.jpg
new file mode 100644
index 0000000..11164d9
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/qa.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/question.jpg b/presentations/automotive-linux-summit-2012/question.jpg
new file mode 100644
index 0000000..a0c1991
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/question.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/road.jpg b/presentations/automotive-linux-summit-2012/road.jpg
new file mode 100644
index 0000000..a0e373c
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/road.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/tins.jpg b/presentations/automotive-linux-summit-2012/tins.jpg
new file mode 100644
index 0000000..607a863
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/tins.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/tools.jpg b/presentations/automotive-linux-summit-2012/tools.jpg
new file mode 100644
index 0000000..31f2f96
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/tools.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/tumble.jpg b/presentations/automotive-linux-summit-2012/tumble.jpg
new file mode 100644
index 0000000..3c63f29
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/tumble.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/umbrella.jpg b/presentations/automotive-linux-summit-2012/umbrella.jpg
new file mode 100644
index 0000000..e68fd46
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/umbrella.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/xwing.jpg b/presentations/automotive-linux-summit-2012/xwing.jpg
new file mode 100644
index 0000000..e8ada6b
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/xwing.jpg
Binary files differ
diff --git a/presentations/automotive-linux-summit-2012/yocto.jpg b/presentations/automotive-linux-summit-2012/yocto.jpg
new file mode 100644
index 0000000..333aec6
--- /dev/null
+++ b/presentations/automotive-linux-summit-2012/yocto.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/advert.jpg b/presentations/osts-2013-why-use-yocto/advert.jpg
new file mode 100644
index 0000000..2288b25
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/advert.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/apple.jpg b/presentations/osts-2013-why-use-yocto/apple.jpg
new file mode 100644
index 0000000..d3b7c9c
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/apple.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/bike.jpg b/presentations/osts-2013-why-use-yocto/bike.jpg
new file mode 100644
index 0000000..dd56173
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/bike.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/bomb.jpg b/presentations/osts-2013-why-use-yocto/bomb.jpg
new file mode 100644
index 0000000..1fd5e07
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/bomb.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/cables.jpg b/presentations/osts-2013-why-use-yocto/cables.jpg
new file mode 100644
index 0000000..3fdc7c6
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/cables.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/clay.jpg b/presentations/osts-2013-why-use-yocto/clay.jpg
new file mode 100644
index 0000000..a22a3ac
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/clay.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/data.jpg b/presentations/osts-2013-why-use-yocto/data.jpg
new file mode 100644
index 0000000..4820594
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/data.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/engineer.jpg b/presentations/osts-2013-why-use-yocto/engineer.jpg
new file mode 100644
index 0000000..71b7350
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/engineer.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/labquest.jpg b/presentations/osts-2013-why-use-yocto/labquest.jpg
new file mode 100644
index 0000000..9406a9d
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/labquest.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/license.jpg b/presentations/osts-2013-why-use-yocto/license.jpg
new file mode 100644
index 0000000..4d1fd00
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/license.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/minifigs.jpg b/presentations/osts-2013-why-use-yocto/minifigs.jpg
new file mode 100644
index 0000000..3c63cbd
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/minifigs.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/qa.jpg b/presentations/osts-2013-why-use-yocto/qa.jpg
new file mode 100644
index 0000000..11164d9
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/qa.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/road.jpg b/presentations/osts-2013-why-use-yocto/road.jpg
new file mode 100644
index 0000000..a0e373c
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/road.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/train.jpg b/presentations/osts-2013-why-use-yocto/train.jpg
new file mode 100644
index 0000000..c748db1
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/train.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/tv.jpg b/presentations/osts-2013-why-use-yocto/tv.jpg
new file mode 100644
index 0000000..4742383
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/tv.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/xeon-phi.jpg b/presentations/osts-2013-why-use-yocto/xeon-phi.jpg
new file mode 100644
index 0000000..3e914aa
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/xeon-phi.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/yocto.jpg b/presentations/osts-2013-why-use-yocto/yocto.jpg
new file mode 100644
index 0000000..333aec6
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/yocto.jpg
Binary files differ
diff --git a/presentations/osts-2013-why-use-yocto/yocto.pin b/presentations/osts-2013-why-use-yocto/yocto.pin
new file mode 100644
index 0000000..4ea52b8
--- /dev/null
+++ b/presentations/osts-2013-why-use-yocto/yocto.pin
@@ -0,0 +1,254 @@
1#!/usr/bin/env pinpoint
2
3[fill]
4[bottom]
5[font=ITC Kabel Semi-Bold 80px]
6[transition=fade]
7-- [yocto.jpg]
8
9# Ross Burton, a senior engineer on the Yocto Project
10#
11# Been working on Yocto for nearly a year, but also worked on the precursor to Yocto, Poky, before working on moblin, meego and tizen.
12
13-- [black] [text-align=center] [center]
14Why you should use
15the Yocto Project
16(instead of a desktop Linux)
17for your product
18#I'm talking about why you should use the Yocto Project (instead of a desktop Linux) for your pproduct
19#
20#They say when you can't summarise your talk in three words, why not use thirty, so I added a subtitle
21
22-- [bomb.jpg] [text-align=center]
23or,
24How I Learned To Stop Worrying
25And Love Building Distros
26#How I learned to stop worrying and love building distros.
27#
28#Because every conference should have a Dr Strangelove reference.
29#
30#Although this is less funny now that BAE systems have just appeared on the support mailing list.
31
32-- [yocto.jpg]
33“It's not an embedded Linux distribution
34— it creates a custom one for you”
35#What is the Yocto Project?
36#
37#YP is not a Linux distribution in the traditional sense, it helps you build a tailored Linux distribution for your embedded Linux product
38#
39#But what do we mean by embedded? Embedded means different things to different people.
40
41-- [apple.jpg]
42Not a “PC”
43#Basically, "not general purpose desktop computing".
44#
45#There are many examples where the YP is a good fit
46
47-- [tv.jpg]
48Home Media
49#Home media: Televisions, digital video recorders, set-top boxes, wireless speakers, internet radios.
50#
51#Our set-top box division is rebasing their SDK to YP right now, after maintaining their own linux distro.
52
53-- [advert.jpg]
54Digital Signage
55#Digital signage, such as the schedule displays you can see in the hallway, airport departure panels, so on.
56#
57#I certainy hope that next year instead of mac minis we're using minnow boards.
58
59-- [data.jpg] [text-align=center]
60Telecoms
61Data Centre
62#Telecoms and data centres, where you'll have clusters of xeons running core networking, or other specialised applications
63#
64#These are basically incredible powerful appliances, not general purpose machines. they need every bit of power squeezed out of their hardware, and generalising, even with an enterprise distro, may not be enough.
65
66-- [xeon-phi.jpg]
67Intel® Xeon Phi™
68(ding dong ding dong!)
69#Xeon Phi, aka MIC or Knights Corner.
70#
71#Can't get much more embedded than a PCI Express board with 64 x86 cores on. These are for massive number crunching, and each runs a Linux platform built by the Yocto Project.
72#
73#The processor was once upon a time a Pentium but is substantially extended, and the system is totally unlike anything else, so they needed a Linux system that could be massively customised to fit their needs.
74
75-- [labquest.jpg]
76Misc and Other
77#The fun thing about YP is you can't predict where people use it.
78#
79#This is the Vernier LabQuest, a flexible science probe for education.
80#
81#webOS, the platform on the palm phone and tablets, is built using YP.
82#
83#If you update the firmware in your Intel SSD, that tool is built with Yocto
84#
85#Concordia, our software defined radio platform, runs on YP.
86#
87#PAUSE.
88#
89#Now we know what sort of products the YP is aimed at, why should you use it?
90
91-- [minifigs.jpg] [center]
92So many choices!
93#When picking a platform what's the difference between Yocto and Android, Linaro, Tizen, Buildroot, Baserock, or hacking your favourite desktop distribution such as Fedora or Debian, especially as some have embedded versions such as emdebian.
94
95-- [cables.jpg]
96Easy to hack on at first,
97but you’ll regret it later
98#When your processor is x86, it's easy to prototype with a desktop distribution and chop pieces off
99#
100#Building new packages and rebuilding the pieces that need changes
101#
102#By the time the prototype is working well, you've invested enough effort that starting again to remove the hacks is off-putting.
103#
104#But you may end up with a fragile system, or the need to do something invasive such as rebuild the entire product with new compiler flags, it's not that easy any more
105
106-- [road.jpg] [top]
107Designed to go
108the distance
109#Yocto is proven technology and designed for long term use
110#
111#The build tool and package metadata (BitBake and OpenEmbedded) have been around for ten years with major deployments
112#
113#Builds on standard hardware (use your laptop to try it out) without any special requirements (eg no VM or root permission), just disk space and a compiler to bootstrap.
114#
115#Commercial support from major OSVs and specialized consultancies
116#
117#Finally no restrictions in it's use, the build system is GPL/MIT, no terms to agree to.
118#
119#Speaking of licensing
120
121-- [license.jpg] [center]
122
123Licensing Hell
124#It's easy to accidently break OSS licensing terms, so YP tries to help.
125#
126#Around $100k per violation
127#
128#All recipes need a license statement, and checksums to validate. if a new upstream release changes their license statements and you didn't notice, the build errors and the maintainer must verify the license situation.
129#
130#"No GPLv3" button when building that can will disable v3 features or whole packages if the v3 bothers you.
131#
132# Generate release archives for license compliance, full source and patches. Easy to split open/closed components and publish the "build instructions" (your build metadata) for true GPL compliance.
133
134-- [train.jpg] [top]
135
136Won’t fall apart over time
137#Yocto won't surprise you late in product development
138#
139#Reproducable builds for the entire system. minimal host dependencies and ability to blow away build tree results in same image.
140#
141#Six monthly release cycle with maintained release branches (about to release the first point release of 1.3, and 1.2 is still getting fixes in its branch)
142#
143#Open planning process for future releases, no development in private repos or not-quite open source model.
144
145-- [bike.jpg]
146Exactly how you want it
147
148#Numerous functional layers, with more packages (network daemons, multimedia support, selinux). these are all optional, you start from a minimal system and build up instead of from a large system and removing pieces.
149#
150#Entirely override existing packaging in your own layers, or just tweak behavior by appending packaging fragments.
151#
152#Generate a machine configuration for your exact target, so you can compile everything with optimal compiler flags, tuned libraries (jpeg, zlib, etc), specific kernel.
153#
154#meta-intel has BSPs for key Intel platforms with targetted hardware support, such as NUC, FRI2, Xeon and IVB/SNB platforms.
155
156-- [engineer.jpg]
157
158Developer friendly
159
160# YP is developer friendly
161#
162# Generate standalone toolchain with headers and libraries so app developers don't actually need to build the whole distro.
163#
164# Development images with compilers/headers, debug images with full symbols and source
165#
166# Eclipse based SDK for anyone who has an irrational fear of emacs and xterm.
167#
168# Bogdan just spoke about hob, the graphical interface to bitbake. also starting work on webhob
169#
170# Documentation is never finished but we've a paid documentation writer
171#
172# Our autobuild setup is open source and documented, so anyone else can do the same.
173#
174# Fast to build. Highly parallel builds. my consumer i7 does a build in under an hour, pre-built objects can be shared on the network.
175
176-- [clay.jpg]
177Malleable
178
179#YP is incredibly flexible.
180#
181#Easily swap or change components, such as systemd for sysvinit, uclibc for eglibc, use Wayland, X11 or DirectFB.
182#
183#choice of packaging system, and no need to keep it on the image.
184#
185#Easily shrinks down to a fastboot few meg filesystem for tiny single-application systems, but can also build a full desktop environment.
186
187-- [qa.jpg]
188Q&amp;A
189
190-- [yocto.jpg]
191Thanks!
192
193# Credits
194#
195# bomb.png
196# Public Domain, apparently. Fair use, if not, right?
197# http://commons.wikimedia.org/wiki/File:Dr._Strangelove_-_Riding_the_Bomb.png
198#
199# apple.jpg
200# Creative Commons 2.0 BY (C) Steve Jurvetson
201# http://www.flickr.com/photos/44124348109@N01/7515248418/
202#
203# tv.jpg
204# Creative Commons 2.0 BY (C) Sarah Reid
205# http://www.flickr.com/photos/sarahreido/3245498261/
206#
207# advert.jpg
208# Creative Commons 2.0 BY-NC-SA (C) Justin Brown
209# http://www.flickr.com/photos/40708728@N04/8496770124/
210#
211# data.jpg
212# Creative Commons 2.0 BY-SA (C) Leonardo Rizzi
213# http://www.flickr.com/photos/29479498@N05/4381851322/
214#
215# xeon-phi.jpg
216# (C) Intel, press material
217#
218# labquest.jpg
219# www.venier.com, press material
220#
221# minifigs.jpg
222# Creative Commons 2.0 BY (C) peter dutton
223# http://www.flickr.com/photos/40646519@N00/305410323/
224#
225# cables.jpg
226# (C) David Stewart, All Rights Reserved, Used with Permission.
227#
228# road.jpg
229# Creative Commons 2.0 BY-NC-SA (C) Rick Harrison
230# http://www.flickr.com/photos/81851211@N00/5861614/
231#
232# license.jpg
233# Creative Commons 2.0 BY-NC (C) Daniel Hoherd
234# http://www.flickr.com/photos/warzauwynn/2553621029/
235#
236# train.jpg
237# Creative Commons 2.0 BY-NC (C) Ian Britton
238# http://www.flickr.com/photos/freefoto/8488902378/
239#
240# bike.jpg
241# Creative Commons 2.0 BY (C) Gerry Lauzon
242# http://www.flickr.com/photos/26745132@N00/1677527193/
243#
244# engineer.jpg
245# Creative Commons 2.0 BY-NC-SA (C) RoberthK
246# http://www.flickr.com/photos/39066002@N05/3595313340/
247#
248# clay.jpg
249# Creative Commons 2.0 BY-NC (C) Toby Thain
250# http://www.flickr.com/photos/qu1j0t3/47174053/
251#
252# qa.jpg
253# Creative Commons 2.0 BY-NC (C) Tantek Çelik
254# http://www.flickr.com/photos/39039882@N00/22778226/