Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | <!DOCTYPE chapter PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" |
| 2 | "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" |
| 3 | [<!ENTITY % poky SYSTEM "../poky.ent"> %poky; ] > |
| 4 | |
| 5 | <chapter id='dev-manual-start'> |
| 6 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 7 | <title>Setting Up to Use the Yocto Project</title> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 8 | |
| 9 | <para> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 10 | This chapter provides procedures related to getting set up to use the |
| 11 | Yocto Project. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 12 | You can learn about creating a team environment that develops using the |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 13 | Yocto Project, how to set up a |
| 14 | <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink>, |
| 15 | how to locate Yocto Project source repositories, and how to create local |
| 16 | Git repositories. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 17 | </para> |
| 18 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | <section id="usingpoky-changes-collaborate"> |
| 20 | <title>Creating a Team Development Environment</title> |
| 21 | |
| 22 | <para> |
| 23 | It might not be immediately clear how you can use the Yocto |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 24 | Project in a team development environment, or how to scale it for a |
| 25 | large team of developers. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 26 | One of the strengths of the Yocto Project is that it is extremely |
| 27 | flexible. |
| 28 | Thus, you can adapt it to many different use cases and scenarios. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 29 | However, this flexibility could cause difficulties if you are trying |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 30 | to create a working setup that scales across a large team. |
| 31 | </para> |
| 32 | |
| 33 | <para> |
| 34 | To help you understand how to set up this type of environment, |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 35 | this section presents a procedure that gives you information |
| 36 | that can help you get the results you want. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 37 | The procedure is high-level and presents some of the project's most |
| 38 | successful experiences, practices, solutions, and available |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 39 | technologies that have proved to work well in the past. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 40 | Keep in mind, the procedure here is a starting point. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 41 | You can build off these steps and customize the procedure to fit any |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 42 | particular working environment and set of practices. |
| 43 | <orderedlist> |
| 44 | <listitem><para> |
| 45 | <emphasis>Determine Who is Going to be Developing:</emphasis> |
| 46 | You need to understand who is going to be doing anything |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 47 | related to the Yocto Project and determine their roles. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 48 | Making this determination is essential to completing |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 49 | steps two and three, which are to get your equipment together |
| 50 | and set up your development environment's hardware topology. |
| 51 | </para> |
| 52 | |
| 53 | <para>The following roles exist: |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 54 | <itemizedlist> |
| 55 | <listitem><para> |
| 56 | <emphasis>Application Developer:</emphasis> |
| 57 | This type of developer does application level work |
| 58 | on top of an existing software stack. |
| 59 | </para></listitem> |
| 60 | <listitem><para> |
| 61 | <emphasis>Core System Developer:</emphasis> |
| 62 | This type of developer works on the contents of the |
| 63 | operating system image itself. |
| 64 | </para></listitem> |
| 65 | <listitem><para> |
| 66 | <emphasis>Build Engineer:</emphasis> |
| 67 | This type of developer manages Autobuilders and |
| 68 | releases. |
| 69 | Not all environments need a Build Engineer. |
| 70 | </para></listitem> |
| 71 | <listitem><para> |
| 72 | <emphasis>Test Engineer:</emphasis> |
| 73 | This type of developer creates and manages automated |
| 74 | tests that are used to ensure all application and |
| 75 | core system development meets desired quality |
| 76 | standards. |
| 77 | </para></listitem> |
| 78 | </itemizedlist> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 79 | </para></listitem> |
| 80 | <listitem><para> |
| 81 | <emphasis>Gather the Hardware:</emphasis> |
| 82 | Based on the size and make-up of the team, get the hardware |
| 83 | together. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 84 | Ideally, any development, build, or test engineer uses |
| 85 | a system that runs a supported Linux distribution. |
| 86 | These systems, in general, should be high performance |
| 87 | (e.g. dual, six-core Xeons with 24 Gbytes of RAM and plenty |
| 88 | of disk space). |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 89 | You can help ensure efficiency by having any machines used |
| 90 | for testing or that run Autobuilders be as high performance |
| 91 | as possible. |
| 92 | </para></listitem> |
| 93 | <listitem><para> |
| 94 | <emphasis>Understand the Hardware Topology of the Environment:</emphasis> |
| 95 | Once you understand the hardware involved and the make-up |
| 96 | of the team, you can understand the hardware topology of the |
| 97 | development environment. |
| 98 | You can get a visual idea of the machines and their roles |
| 99 | across the development environment. |
| 100 | |
| 101 | <!-- |
| 102 | The following figure shows a moderately sized Yocto Project |
| 103 | development environment. |
| 104 | |
| 105 | <para role="writernotes"> |
| 106 | Need figure.</para> |
| 107 | --> |
| 108 | |
| 109 | </para></listitem> |
| 110 | <listitem><para> |
| 111 | <emphasis>Use Git as Your Source Control Manager (SCM):</emphasis> |
| 112 | Keeping your |
| 113 | <ulink url='&YOCTO_DOCS_REF_URL;#metadata'>Metadata</ulink> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 114 | (i.e. recipes, configuration files, classes, and so forth) |
| 115 | and any software you are developing under the control of an SCM |
| 116 | system that is compatible with the OpenEmbedded build system |
| 117 | is advisable. |
| 118 | Of the SCMs BitBake supports, the Yocto Project team strongly |
| 119 | recommends using |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 120 | <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>. |
| 121 | Git is a distributed system that is easy to backup, |
| 122 | allows you to work remotely, and then connects back to the |
| 123 | infrastructure. |
| 124 | <note> |
| 125 | For information about BitBake, see the |
| 126 | <ulink url='&YOCTO_DOCS_BB_URL;'>BitBake User Manual</ulink>. |
| 127 | </note></para> |
| 128 | |
| 129 | <para>It is relatively easy to set up Git services and create |
| 130 | infrastructure like |
| 131 | <ulink url='&YOCTO_GIT_URL;'>http://git.yoctoproject.org</ulink>, |
| 132 | which is based on server software called |
| 133 | <filename>gitolite</filename> with <filename>cgit</filename> |
| 134 | being used to generate the web interface that lets you view the |
| 135 | repositories. |
| 136 | The <filename>gitolite</filename> software identifies users |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 137 | using SSH keys and allows branch-based access controls to |
| 138 | repositories that you can control as little or as much as |
| 139 | necessary. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 140 | <note> |
| 141 | The setup of these services is beyond the scope of this |
| 142 | manual. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 143 | However, sites such as the following exist that describe |
| 144 | how to perform setup: |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 145 | <itemizedlist> |
| 146 | <listitem><para> |
| 147 | <ulink url='http://git-scm.com/book/ch4-8.html'>Git documentation</ulink>: |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 148 | Describes how to install |
| 149 | <filename>gitolite</filename> on the server. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 150 | </para></listitem> |
| 151 | <listitem><para> |
| 152 | <ulink url='http://gitolite.com'>Gitolite</ulink>: |
| 153 | Information for <filename>gitolite</filename>. |
| 154 | </para></listitem> |
| 155 | <listitem><para> |
| 156 | <ulink url='https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools'>Interfaces, frontends, and tools</ulink>: |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 157 | Documentation on how to create interfaces and |
| 158 | frontends for Git. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 159 | </para></listitem> |
| 160 | </itemizedlist> |
| 161 | </note> |
| 162 | </para></listitem> |
| 163 | <listitem><para> |
| 164 | <emphasis>Set up the Application Development Machines:</emphasis> |
| 165 | As mentioned earlier, application developers are creating |
| 166 | applications on top of existing software stacks. |
| 167 | Following are some best practices for setting up machines |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 168 | used for application development: |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 169 | <itemizedlist> |
| 170 | <listitem><para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 171 | Use a pre-built toolchain that contains the software |
| 172 | stack itself. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 173 | Then, develop the application code on top of the |
| 174 | stack. |
| 175 | This method works well for small numbers of relatively |
| 176 | isolated applications. |
| 177 | </para></listitem> |
| 178 | <listitem><para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 179 | When possible, use the Yocto Project plug-in for the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 180 | <trademark class='trade'>Eclipse</trademark> IDE |
| 181 | and SDK development practices. |
| 182 | For more information, see the |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 183 | <ulink url='&YOCTO_DOCS_SDK_URL;'>Yocto Project Application Development and the Extensible Software Development Kit (eSDK)</ulink> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 184 | manual. |
| 185 | </para></listitem> |
| 186 | <listitem><para> |
| 187 | Keep your cross-development toolchains updated. |
| 188 | You can do this through provisioning either as new |
| 189 | toolchain downloads or as updates through a package |
| 190 | update mechanism using <filename>opkg</filename> |
| 191 | to provide updates to an existing toolchain. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 192 | The exact mechanics of how and when to do this depend |
| 193 | on local policy. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 194 | </para></listitem> |
| 195 | <listitem><para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 196 | Use multiple toolchains installed locally into |
| 197 | different locations to allow development across |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 198 | versions. |
| 199 | </para></listitem> |
| 200 | </itemizedlist> |
| 201 | </para></listitem> |
| 202 | <listitem><para> |
| 203 | <emphasis>Set up the Core Development Machines:</emphasis> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 204 | As mentioned earlier, core developers work on the contents of |
| 205 | the operating system itself. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 206 | Following are some best practices for setting up machines |
| 207 | used for developing images: |
| 208 | <itemizedlist> |
| 209 | <listitem><para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 210 | Have the |
| 211 | <ulink url='&YOCTO_DOCS_REF_URL;#build-system-term'>OpenEmbedded build system</ulink> |
| 212 | available on the developer workstations so developers |
| 213 | can run their own builds and directly rebuild the |
| 214 | software stack. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 215 | </para></listitem> |
| 216 | <listitem><para> |
| 217 | Keep the core system unchanged as much as |
| 218 | possible and do your work in layers on top of the |
| 219 | core system. |
| 220 | Doing so gives you a greater level of portability when |
| 221 | upgrading to new versions of the core system or Board |
| 222 | Support Packages (BSPs). |
| 223 | </para></listitem> |
| 224 | <listitem><para> |
| 225 | Share layers amongst the developers of a |
| 226 | particular project and contain the policy configuration |
| 227 | that defines the project. |
| 228 | </para></listitem> |
| 229 | </itemizedlist> |
| 230 | </para></listitem> |
| 231 | <listitem><para> |
| 232 | <emphasis>Set up an Autobuilder:</emphasis> |
| 233 | Autobuilders are often the core of the development |
| 234 | environment. |
| 235 | It is here that changes from individual developers are brought |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 236 | together and centrally tested. |
| 237 | Based on this automated build and test environment, subsequent |
| 238 | decisions about releases can be made. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 239 | Autobuilders also allow for "continuous integration" style |
| 240 | testing of software components and regression identification |
| 241 | and tracking.</para> |
| 242 | |
| 243 | <para>See "<ulink url='http://autobuilder.yoctoproject.org'>Yocto Project Autobuilder</ulink>" |
| 244 | for more information and links to buildbot. |
| 245 | The Yocto Project team has found this implementation |
| 246 | works well in this role. |
| 247 | A public example of this is the Yocto Project |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 248 | Autobuilders, which the Yocto Project team uses to test the |
| 249 | overall health of the project.</para> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 250 | |
| 251 | <para>The features of this system are: |
| 252 | <itemizedlist> |
| 253 | <listitem><para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 254 | Highlights when commits break the build. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 255 | </para></listitem> |
| 256 | <listitem><para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 257 | Populates an |
| 258 | <ulink url='&YOCTO_DOCS_OM_URL;#shared-state-cache'>sstate cache</ulink> |
| 259 | from which developers can pull rather than requiring |
| 260 | local builds. |
| 261 | </para></listitem> |
| 262 | <listitem><para> |
| 263 | Allows commit hook triggers, which trigger builds when |
| 264 | commits are made. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 265 | </para></listitem> |
| 266 | <listitem><para> |
| 267 | Allows triggering of automated image booting |
| 268 | and testing under the QuickEMUlator (QEMU). |
| 269 | </para></listitem> |
| 270 | <listitem><para> |
| 271 | Supports incremental build testing and |
| 272 | from-scratch builds. |
| 273 | </para></listitem> |
| 274 | <listitem><para> |
| 275 | Shares output that allows developer |
| 276 | testing and historical regression investigation. |
| 277 | </para></listitem> |
| 278 | <listitem><para> |
| 279 | Creates output that can be used for releases. |
| 280 | </para></listitem> |
| 281 | <listitem><para> |
| 282 | Allows scheduling of builds so that resources |
| 283 | can be used efficiently. |
| 284 | </para></listitem> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 285 | </itemizedlist> |
| 286 | </para></listitem> |
| 287 | <listitem><para> |
| 288 | <emphasis>Set up Test Machines:</emphasis> |
| 289 | Use a small number of shared, high performance systems |
| 290 | for testing purposes. |
| 291 | Developers can use these systems for wider, more |
| 292 | extensive testing while they continue to develop |
| 293 | locally using their primary development system. |
| 294 | </para></listitem> |
| 295 | <listitem><para> |
| 296 | <emphasis>Document Policies and Change Flow:</emphasis> |
| 297 | The Yocto Project uses a hierarchical structure and a |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 298 | pull model. |
| 299 | Scripts exist to create and send pull requests |
| 300 | (i.e. <filename>create-pull-request</filename> and |
| 301 | <filename>send-pull-request</filename>). |
| 302 | This model is in line with other open source projects where |
| 303 | maintainers are responsible for specific areas of the project |
| 304 | and a single maintainer handles the final "top-of-tree" merges. |
| 305 | <note> |
| 306 | You can also use a more collective push model. |
| 307 | The <filename>gitolite</filename> software supports both the |
| 308 | push and pull models quite easily. |
| 309 | </note></para> |
| 310 | |
| 311 | <para>As with any development environment, it is important |
| 312 | to document the policy used as well as any main project |
| 313 | guidelines so they are understood by everyone. |
| 314 | It is also a good idea to have well structured |
| 315 | commit messages, which are usually a part of a project's |
| 316 | guidelines. |
| 317 | Good commit messages are essential when looking back in time and |
| 318 | trying to understand why changes were made.</para> |
| 319 | |
| 320 | <para>If you discover that changes are needed to the core |
| 321 | layer of the project, it is worth sharing those with the |
| 322 | community as soon as possible. |
| 323 | Chances are if you have discovered the need for changes, |
| 324 | someone else in the community needs them also. |
| 325 | </para></listitem> |
| 326 | <listitem><para> |
| 327 | <emphasis>Development Environment Summary:</emphasis> |
| 328 | Aside from the previous steps, some best practices exist |
| 329 | within the Yocto Project development environment. |
| 330 | Consider the following: |
| 331 | <itemizedlist> |
| 332 | <listitem><para> |
| 333 | Use |
| 334 | <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink> |
| 335 | as the source control system. |
| 336 | </para></listitem> |
| 337 | <listitem><para> |
| 338 | Maintain your Metadata in layers that make sense |
| 339 | for your situation. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 340 | See the |
| 341 | "<ulink url='&YOCTO_DOCS_OM_URL;#the-yocto-project-layer-model'>The Yocto Project Layer Model</ulink>" |
| 342 | section in the Yocto Project Overview and Concepts |
| 343 | Manual and the |
| 344 | "<link linkend='understanding-and-creating-layers'>Understanding and Creating Layers</link>" |
| 345 | section for more information on layers. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 346 | </para></listitem> |
| 347 | <listitem><para> |
| 348 | Separate the project's Metadata and code by using |
| 349 | separate Git repositories. |
| 350 | See the |
| 351 | "<ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>" |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 352 | section in the Yocto Project Overview and Concepts |
| 353 | Manual for information on these repositories. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 354 | See the |
| 355 | "<link linkend='locating-yocto-project-source-files'>Locating Yocto Project Source Files</link>" |
| 356 | section for information on how to set up local Git |
| 357 | repositories for related upstream Yocto Project |
| 358 | Git repositories. |
| 359 | </para></listitem> |
| 360 | <listitem><para> |
| 361 | Set up the directory for the shared state cache |
| 362 | (<ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>) |
| 363 | where it makes sense. |
| 364 | For example, set up the sstate cache on a system used |
| 365 | by developers in the same organization and share the |
| 366 | same source directories on their machines. |
| 367 | </para></listitem> |
| 368 | <listitem><para> |
| 369 | Set up an Autobuilder and have it populate the |
| 370 | sstate cache and source directories. |
| 371 | </para></listitem> |
| 372 | <listitem><para> |
| 373 | The Yocto Project community encourages you |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 374 | to send patches to the project to fix bugs or add |
| 375 | features. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 376 | If you do submit patches, follow the project commit |
| 377 | guidelines for writing good commit messages. |
| 378 | See the "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>" |
| 379 | section. |
| 380 | </para></listitem> |
| 381 | <listitem><para> |
| 382 | Send changes to the core sooner than later |
| 383 | as others are likely to run into the same issues. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 384 | For some guidance on mailing lists to use, see the list |
| 385 | in the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 386 | "<link linkend='how-to-submit-a-change'>Submitting a Change to the Yocto Project</link>" |
| 387 | section. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 388 | For a description of the available mailing lists, see |
| 389 | the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 390 | "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing Lists</ulink>" |
| 391 | section in the Yocto Project Reference Manual. |
| 392 | </para></listitem> |
| 393 | </itemizedlist> |
| 394 | </para></listitem> |
| 395 | </orderedlist> |
| 396 | </para> |
| 397 | </section> |
| 398 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 399 | <section id='dev-preparing-the-build-host'> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 400 | <title>Preparing the Build Host</title> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 401 | |
| 402 | <para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 403 | This section provides procedures to set up a system to be used as your |
| 404 | <ulink url='&YOCTO_DOCS_REF_URL;#hardware-build-system-term'>build host</ulink> |
| 405 | for development using the Yocto Project. |
| 406 | Your build host can be a native Linux machine (recommended) or it can |
| 407 | be a machine (Linux, Mac, or Windows) that uses |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 408 | <ulink url='https://git.yoctoproject.org/cgit/cgit.cgi/crops/about/'>CROPS</ulink>, |
| 409 | which leverages |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 410 | <ulink url='https://www.docker.com/'>Docker Containers</ulink>. |
| 411 | <note> |
| 412 | You cannot use a build host that is using the |
| 413 | <ulink url='https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux'>Windows Subsystem for Linux</ulink> |
| 414 | (WSL). |
| 415 | The Yocto Project is not compatible with WSL. |
| 416 | </note> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 417 | </para> |
| 418 | |
| 419 | <para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 420 | Once your build host is set up to use the Yocto Project, |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 421 | further steps are necessary depending on what you want to |
| 422 | accomplish. |
| 423 | See the following references for information on how to prepare for |
| 424 | Board Support Package (BSP) development, kernel development, and |
| 425 | development using the <trademark class='trade'>Eclipse</trademark> IDE: |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 426 | <itemizedlist> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 427 | <listitem><para> |
| 428 | <emphasis>BSP Development:</emphasis> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 429 | See the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 430 | "<ulink url='&YOCTO_DOCS_BSP_URL;#preparing-your-build-host-to-work-with-bsp-layers'>Preparing Your Build Host to Work With BSP Layers</ulink>" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 431 | section in the Yocto Project Board Support Package (BSP) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 432 | Developer's Guide. |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 433 | </para></listitem> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 434 | <listitem><para> |
| 435 | <emphasis>Kernel Development:</emphasis> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 436 | See the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 437 | "<ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;#preparing-the-build-host-to-work-on-the-kernel'>Preparing the Build Host to Work on the Kernel</ulink>" |
| 438 | section in the Yocto Project Linux Kernel Development Manual. |
| 439 | </para></listitem> |
| 440 | <listitem><para> |
| 441 | <emphasis>Eclipse Development:</emphasis> |
| 442 | See the |
| 443 | "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-eclipse-project'>Developing Applications Using <trademark class='trade'>Eclipse</trademark></ulink>" |
| 444 | Chapter in the Yocto Project Application Development and the |
| 445 | Extensible Software Development Kit (eSDK) manual. |
| 446 | </para></listitem> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 447 | </itemizedlist> |
| 448 | </para> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 449 | |
| 450 | <section id='setting-up-a-native-linux-host'> |
| 451 | <title>Setting Up a Native Linux Host</title> |
| 452 | |
| 453 | <para> |
| 454 | Follow these steps to prepare a native Linux machine as your |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 455 | Yocto Project Build Host: |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 456 | <orderedlist> |
| 457 | <listitem><para> |
| 458 | <emphasis>Use a Supported Linux Distribution:</emphasis> |
| 459 | You should have a reasonably current Linux-based host |
| 460 | system. |
| 461 | You will have the best results with a recent release of |
| 462 | Fedora, openSUSE, Debian, Ubuntu, or CentOS as these |
| 463 | releases are frequently tested against the Yocto Project |
| 464 | and officially supported. |
| 465 | For a list of the distributions under validation and their |
| 466 | status, see the |
| 467 | "<ulink url='&YOCTO_DOCS_REF_URL;#detailed-supported-distros'>Supported Linux Distributions</ulink>" section |
| 468 | in the Yocto Project Reference Manual and the wiki page at |
| 469 | <ulink url='&YOCTO_WIKI_URL;/wiki/Distribution_Support'>Distribution Support</ulink>. |
| 470 | </para></listitem> |
| 471 | <listitem><para> |
| 472 | <emphasis>Have Enough Free Memory:</emphasis> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 473 | Your system should have at least 50 Gbytes of free disk |
| 474 | space for building images. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 475 | </para></listitem> |
| 476 | <listitem><para> |
| 477 | <emphasis>Meet Minimal Version Requirements:</emphasis> |
| 478 | The OpenEmbedded build system should be able to run on any |
| 479 | modern distribution that has the following versions for |
| 480 | Git, tar, and Python. |
| 481 | <itemizedlist> |
| 482 | <listitem><para> |
| 483 | Git 1.8.3.1 or greater |
| 484 | </para></listitem> |
| 485 | <listitem><para> |
| 486 | tar 1.27 or greater |
| 487 | </para></listitem> |
| 488 | <listitem><para> |
| 489 | Python 3.4.0 or greater. |
| 490 | </para></listitem> |
| 491 | </itemizedlist> |
| 492 | If your build host does not meet any of these three listed |
| 493 | version requirements, you can take steps to prepare the |
| 494 | system so that you can still use the Yocto Project. |
| 495 | See the |
| 496 | "<ulink url='&YOCTO_DOCS_REF_URL;#required-git-tar-and-python-versions'>Required Git, tar, and Python Versions</ulink>" |
| 497 | section in the Yocto Project Reference Manual for |
| 498 | information. |
| 499 | </para></listitem> |
| 500 | <listitem><para> |
| 501 | <emphasis>Install Development Host Packages:</emphasis> |
| 502 | Required development host packages vary depending on your |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 503 | build host and what you want to do with the Yocto |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 504 | Project. |
| 505 | Collectively, the number of required packages is large |
| 506 | if you want to be able to cover all cases.</para> |
| 507 | |
| 508 | <para>For lists of required packages for all scenarios, |
| 509 | see the |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 510 | "<ulink url='&YOCTO_DOCS_REF_URL;#required-packages-for-the-build-host'>Required Packages for the Build Host</ulink>" |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 511 | section in the Yocto Project Reference Manual. |
| 512 | </para></listitem> |
| 513 | </orderedlist> |
| 514 | Once you have completed the previous steps, you are ready to |
| 515 | continue using a given development path on your native Linux |
| 516 | machine. |
| 517 | If you are going to use BitBake, see the |
| 518 | "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>" |
| 519 | section. |
| 520 | If you are going to use the Extensible SDK, see the |
| 521 | "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>Using the Extensible SDK</ulink>" |
| 522 | Chapter in the Yocto Project Application Development and the |
| 523 | Extensible Software Development Kit (eSDK) manual. |
| 524 | If you want to work on the kernel, see the |
| 525 | <ulink url='&YOCTO_DOCS_KERNEL_DEV_URL;'>Yocto Project Linux Kernel Development Manual</ulink>. |
| 526 | If you are going to use Toaster, see the |
| 527 | "<ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-setup-and-use'>Setting Up and Using Toaster</ulink>" |
| 528 | section in the Toaster User Manual. |
| 529 | </para> |
| 530 | </section> |
| 531 | |
| 532 | <section id='setting-up-to-use-crops'> |
| 533 | <title>Setting Up to Use CROss PlatformS (CROPS)</title> |
| 534 | |
| 535 | <para> |
| 536 | With |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 537 | <ulink url='https://github.com/crops/crops/blob/master/README.md'>CROPS</ulink>, |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 538 | which leverages |
| 539 | <ulink url='https://www.docker.com/'>Docker Containers</ulink>, |
| 540 | you can create a Yocto Project development environment that |
| 541 | is operating system agnostic. |
| 542 | You can set up a container in which you can develop using the |
| 543 | Yocto Project on a Windows, Mac, or Linux machine. |
| 544 | </para> |
| 545 | |
| 546 | <para> |
| 547 | Follow these general steps to prepare a Windows, Mac, or Linux |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 548 | machine as your Yocto Project build host: |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 549 | <orderedlist> |
| 550 | <listitem><para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 551 | <emphasis>Determine What Your Build Host Needs:</emphasis> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 552 | <ulink url='https://www.docker.com/what-docker'>Docker</ulink> |
| 553 | is a software container platform that you need to install |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 554 | on the build host. |
| 555 | Depending on your build host, you might have to install |
| 556 | different software to support Docker containers. |
| 557 | Go to the Docker installation page and read about the |
| 558 | platform requirements in |
| 559 | "<ulink url='https://docs.docker.com/install/#supported-platforms'>Supported Platforms</ulink>" |
| 560 | your build host needs to run containers. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 561 | </para></listitem> |
| 562 | <listitem><para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 563 | <emphasis>Choose What To Install:</emphasis> |
| 564 | Depending on whether or not your build host meets system |
| 565 | requirements, you need to install "Docker CE Stable" or |
| 566 | the "Docker Toolbox". |
| 567 | Most situations call for Docker CE. |
| 568 | However, if you have a build host that does not meet |
| 569 | requirements (e.g. Pre-Windows 10 or Windows 10 "Home" |
| 570 | version), you must install Docker Toolbox instead. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 571 | </para></listitem> |
| 572 | <listitem><para> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 573 | <emphasis>Go to the Install Site for Your Platform:</emphasis> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 574 | Click the link for the Docker edition associated with |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 575 | your build host's native software. |
| 576 | For example, if your build host is running Microsoft |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 577 | Windows Version 10 and you want the Docker CE Stable |
| 578 | edition, click that link under "Supported Platforms". |
| 579 | </para></listitem> |
| 580 | <listitem><para> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 581 | <emphasis>Install the Software:</emphasis> |
| 582 | Once you have understood all the pre-requisites, you can |
| 583 | download and install the appropriate software. |
| 584 | Follow the instructions for your specific machine and |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 585 | the type of the software you need to install: |
| 586 | <itemizedlist> |
| 587 | <listitem><para> |
| 588 | Install |
| 589 | <ulink url='https://docs.docker.com/docker-for-windows/install/#install-docker-for-windows-desktop-app'>Docker CE for Windows</ulink> |
| 590 | for Windows build hosts that meet requirements. |
| 591 | </para></listitem> |
| 592 | <listitem><para> |
| 593 | Install |
| 594 | <ulink url='https://docs.docker.com/docker-for-mac/install/#install-and-run-docker-for-mac'>Docker CE for Macs</ulink> |
| 595 | for Mac build hosts that meet requirements. |
| 596 | </para></listitem> |
| 597 | <listitem><para> |
| 598 | Install |
| 599 | <ulink url='https://docs.docker.com/toolbox/toolbox_install_windows/'>Docker Toolbox for Windows</ulink> |
| 600 | for Windows build hosts that do not meet Docker |
| 601 | requirements. |
| 602 | </para></listitem> |
| 603 | <listitem><para> |
| 604 | Install |
| 605 | <ulink url='https://docs.docker.com/toolbox/toolbox_install_mac/'>Docker Toolbox for MacOS</ulink> |
| 606 | for Mac build hosts that do not meet Docker |
| 607 | requirements. |
| 608 | </para></listitem> |
| 609 | <listitem><para> |
| 610 | Install |
| 611 | <ulink url='https://docs.docker.com/install/linux/docker-ce/centos/'>Docker CE for CentOS</ulink> |
| 612 | for Linux build hosts running the CentOS |
| 613 | distribution. |
| 614 | </para></listitem> |
| 615 | <listitem><para> |
| 616 | Install |
| 617 | <ulink url='https://docs.docker.com/install/linux/docker-ce/debian/'>Docker CE for Debian</ulink> |
| 618 | for Linux build hosts running the Debian |
| 619 | distribution. |
| 620 | </para></listitem> |
| 621 | <listitem><para> |
| 622 | Install |
| 623 | <ulink url='https://docs.docker.com/install/linux/docker-ce/fedora/'>Docker CE for Fedora</ulink> |
| 624 | for Linux build hosts running the Fedora |
| 625 | distribution. |
| 626 | </para></listitem> |
| 627 | <listitem><para> |
| 628 | Install |
| 629 | <ulink url='https://docs.docker.com/install/linux/docker-ce/ubuntu/'>Docker CE for Ubuntu</ulink> |
| 630 | for Linux build hosts running the Ubuntu |
| 631 | distribution. |
| 632 | </para></listitem> |
| 633 | </itemizedlist> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 634 | </para></listitem> |
| 635 | <listitem><para> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 636 | <emphasis>Optionally Orient Yourself With Docker:</emphasis> |
| 637 | If you are unfamiliar with Docker and the container |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 638 | concept, you can learn more here - |
| 639 | <ulink url='https://docs.docker.com/get-started/'></ulink>. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 640 | </para></listitem> |
| 641 | <listitem><para> |
| 642 | <emphasis>Launch Docker or Docker Toolbox:</emphasis> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 643 | You should be able to launch Docker or the Docker Toolbox |
| 644 | and have a terminal shell on your development host. |
| 645 | </para></listitem> |
| 646 | <listitem><para> |
| 647 | <emphasis>Set Up the Containers to Use the Yocto Project:</emphasis> |
| 648 | Go to |
| 649 | <ulink url='https://github.com/crops/docker-win-mac-docs/wiki'></ulink> |
| 650 | and follow the directions for your particular |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 651 | build host (i.e. Linux, Mac, or Windows).</para> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 652 | |
| 653 | <para>Once you complete the setup instructions for your |
| 654 | machine, you have the Poky, Extensible SDK, and Toaster |
| 655 | containers available. |
| 656 | You can click those links from the page and learn more |
| 657 | about using each of those containers. |
| 658 | </para></listitem> |
| 659 | </orderedlist> |
| 660 | Once you have a container set up, everything is in place to |
| 661 | develop just as if you were running on a native Linux machine. |
| 662 | If you are going to use the Poky container, see the |
| 663 | "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>" |
| 664 | section. |
| 665 | If you are going to use the Extensible SDK container, see the |
| 666 | "<ulink url='&YOCTO_DOCS_SDK_URL;#sdk-extensible'>Using the Extensible SDK</ulink>" |
| 667 | Chapter in the Yocto Project Application Development and the |
| 668 | Extensible Software Development Kit (eSDK) manual. |
| 669 | If you are going to use the Toaster container, see the |
| 670 | "<ulink url='&YOCTO_DOCS_TOAST_URL;#toaster-manual-setup-and-use'>Setting Up and Using Toaster</ulink>" |
| 671 | section in the Toaster User Manual. |
| 672 | </para> |
| 673 | </section> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 674 | </section> |
| 675 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 676 | <section id='locating-yocto-project-source-files'> |
| 677 | <title>Locating Yocto Project Source Files</title> |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 678 | |
| 679 | <para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 680 | This section shows you how to locate and access the |
| 681 | source files that ship with the Yocto Project. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 682 | You establish and use these local files to work on projects. |
| 683 | <note><title>Notes</title> |
| 684 | <itemizedlist> |
| 685 | <listitem><para> |
| 686 | For concepts and introductory information about Git as it |
| 687 | is used in the Yocto Project, see the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 688 | "<ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink>" |
| 689 | section in the Yocto Project Overview and Concepts Manual. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 690 | </para></listitem> |
| 691 | <listitem><para> |
| 692 | For concepts on Yocto Project source repositories, see the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 693 | "<ulink url='&YOCTO_DOCS_OM_URL;#yocto-project-repositories'>Yocto Project Source Repositories</ulink>" |
| 694 | section in the Yocto Project Overview and Concepts Manual." |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 695 | </para></listitem> |
| 696 | </itemizedlist> |
| 697 | </note> |
| 698 | </para> |
| 699 | |
| 700 | <section id='accessing-source-repositories'> |
| 701 | <title>Accessing Source Repositories</title> |
| 702 | |
| 703 | <para> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 704 | Working from a copy of the upstream Yocto Project |
| 705 | <ulink url='&YOCTO_DOCS_OM_URL;#source-repositories'>Source Repositories</ulink> |
| 706 | is the preferred method for obtaining and using a Yocto Project |
| 707 | release. |
| 708 | You can view the Yocto Project Source Repositories at |
| 709 | <ulink url='&YOCTO_GIT_URL;'></ulink>. |
| 710 | In particular, you can find the |
| 711 | <filename>poky</filename> repository at |
| 712 | <ulink url='http://git.yoctoproject.org/cgit/cgit.cgi/poky/'></ulink>. |
| 713 | </para> |
| 714 | |
| 715 | <para> |
| 716 | Use the following procedure to locate the latest upstream copy of |
| 717 | the <filename>poky</filename> Git repository: |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 718 | <orderedlist> |
| 719 | <listitem><para> |
| 720 | <emphasis>Access Repositories:</emphasis> |
| 721 | Open a browser and go to |
| 722 | <ulink url='&YOCTO_GIT_URL;'></ulink> to access the |
| 723 | GUI-based interface into the Yocto Project source |
| 724 | repositories. |
| 725 | </para></listitem> |
| 726 | <listitem><para> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 727 | <emphasis>Select the Repository:</emphasis> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 728 | Click on the repository in which you are interested (e.g. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 729 | <filename>poky</filename>). |
| 730 | </para></listitem> |
| 731 | <listitem><para> |
| 732 | <emphasis>Find the URL Used to Clone the Repository:</emphasis> |
| 733 | At the bottom of the page, note the URL used to |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 734 | <ulink url='&YOCTO_DOCS_OM_URL;#git-commands-clone'>clone</ulink> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 735 | that repository (e.g. |
| 736 | <filename>&YOCTO_GIT_URL;/poky</filename>). |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 737 | <note> |
| 738 | For information on cloning a repository, see the |
| 739 | "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>" |
| 740 | section. |
| 741 | </note> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 742 | </para></listitem> |
| 743 | </orderedlist> |
| 744 | </para> |
| 745 | </section> |
| 746 | |
| 747 | <section id='accessing-index-of-releases'> |
| 748 | <title>Accessing Index of Releases</title> |
| 749 | |
| 750 | <para> |
| 751 | Yocto Project maintains an Index of Releases area that contains |
| 752 | related files that contribute to the Yocto Project. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 753 | Rather than Git repositories, these files are tarballs that |
| 754 | represent snapshots in time of a given component. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 755 | <note><title>Tip</title> |
| 756 | The recommended method for accessing Yocto Project |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 757 | components is to use Git to clone the upstream repository and |
| 758 | work from within that locally cloned repository. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 759 | The procedure in this section exists should you desire a |
| 760 | tarball snapshot of any given component. |
| 761 | </note> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 762 | Follow these steps to locate and download a particular tarball: |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 763 | <orderedlist> |
| 764 | <listitem><para> |
| 765 | <emphasis>Access the Index of Releases:</emphasis> |
| 766 | Open a browser and go to |
| 767 | <ulink url='&YOCTO_DL_URL;/releases'></ulink> to access the |
| 768 | Index of Releases. |
| 769 | The list represents released components (e.g. |
| 770 | <filename>eclipse-plugin</filename>, |
| 771 | <filename>sato</filename>, and so on). |
| 772 | <note> |
| 773 | The <filename>yocto</filename> directory contains the |
| 774 | full array of released Poky tarballs. |
| 775 | The <filename>poky</filename> directory in the |
| 776 | Index of Releases was historically used for very |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 777 | early releases and exists now only for retroactive |
| 778 | completeness. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 779 | </note> |
| 780 | </para></listitem> |
| 781 | <listitem><para> |
| 782 | <emphasis>Select a Component:</emphasis> |
| 783 | Click on any released component in which you are interested |
| 784 | (e.g. <filename>yocto</filename>). |
| 785 | </para></listitem> |
| 786 | <listitem><para> |
| 787 | <emphasis>Find the Tarball:</emphasis> |
| 788 | Drill down to find the associated tarball. |
| 789 | For example, click on <filename>yocto-&DISTRO;</filename> to |
| 790 | view files associated with the Yocto Project &DISTRO; |
| 791 | release (e.g. <filename>poky-&DISTRO_NAME_NO_CAP;-&POKYVERSION;.tar.bz2</filename>, |
| 792 | which is the released Poky tarball). |
| 793 | </para></listitem> |
| 794 | <listitem><para> |
| 795 | <emphasis>Download the Tarball:</emphasis> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 796 | Click the tarball to download and save a snapshot of the |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 797 | given component. |
| 798 | </para></listitem> |
| 799 | </orderedlist> |
| 800 | </para> |
| 801 | </section> |
| 802 | |
| 803 | <section id='using-the-downloads-page'> |
| 804 | <title>Using the Downloads Page</title> |
| 805 | |
| 806 | <para> |
| 807 | The |
| 808 | <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 809 | uses a "DOWNLOADS" page from which you can locate and download |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 810 | tarballs of any Yocto Project release. |
| 811 | Rather than Git repositories, these files represent snapshot |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 812 | tarballs similar to the tarballs located in the Index of Releases |
| 813 | described in the |
| 814 | "<link linkend='accessing-index-of-releases'>Accessing Index of Releases</link>" |
| 815 | section. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 816 | <note><title>Tip</title> |
| 817 | The recommended method for accessing Yocto Project |
| 818 | components is to use Git to clone a repository and work from |
| 819 | within that local repository. |
| 820 | The procedure in this section exists should you desire a |
| 821 | tarball snapshot of any given component. |
| 822 | </note> |
| 823 | <orderedlist> |
| 824 | <listitem><para> |
| 825 | <emphasis>Go to the Yocto Project Website:</emphasis> |
| 826 | Open The |
| 827 | <ulink url='&YOCTO_HOME_URL;'>Yocto Project Website</ulink> |
| 828 | in your browser. |
| 829 | </para></listitem> |
| 830 | <listitem><para> |
| 831 | <emphasis>Get to the Downloads Area:</emphasis> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 832 | Select the "DOWNLOADS" item from the pull-down |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 833 | "SOFTWARE" tab menu near the top of the page. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 834 | </para></listitem> |
| 835 | <listitem><para> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 836 | <emphasis>Select a Yocto Project Release:</emphasis> |
| 837 | Use the menu next to "RELEASE" to display and choose |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 838 | a recent or past supported Yocto Project release |
| 839 | (e.g. &DISTRO_NAME_NO_CAP;, |
| 840 | &DISTRO_NAME_NO_CAP_MINUS_ONE;, and so forth). |
| 841 | <note><title>Tip</title> |
| 842 | For a "map" of Yocto Project releases to version |
| 843 | numbers, see the |
| 844 | <ulink url='https://wiki.yoctoproject.org/wiki/Releases'>Releases</ulink> |
| 845 | wiki page. |
| 846 | </note> |
| 847 | You can use the "RELEASE ARCHIVE" link to reveal a menu of |
| 848 | all Yocto Project releases. |
| 849 | </para></listitem> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 850 | <listitem><para> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 851 | <emphasis>Download Tools or Board Support Packages (BSPs):</emphasis> |
| 852 | From the "DOWNLOADS" page, you can download tools or |
| 853 | BSPs as well. |
| 854 | Just scroll down the page and look for what you need. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 855 | </para></listitem> |
| 856 | </orderedlist> |
| 857 | </para> |
| 858 | </section> |
| 859 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 860 | <section id='accessing-nightly-builds'> |
| 861 | <title>Accessing Nightly Builds</title> |
| 862 | |
| 863 | <para> |
| 864 | Yocto Project maintains an area for nightly builds that contains |
| 865 | tarball releases at <ulink url='&YOCTO_AB_NIGHTLY_URL;'/>. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 866 | These builds include Yocto Project releases ("poky"), |
| 867 | toolchains, Yocto Project plugins for Eclipse, and builds for |
| 868 | supported machines. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 869 | </para> |
| 870 | |
| 871 | <para> |
| 872 | Should you ever want to access a nightly build of a particular |
| 873 | Yocto Project component, use the following procedure: |
| 874 | <orderedlist> |
| 875 | <listitem><para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 876 | <emphasis>Locate the Index of Nightly Builds:</emphasis> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 877 | Open a browser and go to |
| 878 | <ulink url='&YOCTO_AB_NIGHTLY_URL;'/> to access the |
| 879 | Nightly Builds. |
| 880 | </para></listitem> |
| 881 | <listitem><para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 882 | <emphasis>Select a Date:</emphasis> |
| 883 | Click on the date in which you are interested. |
| 884 | If you want the latest builds, use "CURRENT". |
| 885 | </para></listitem> |
| 886 | <listitem><para> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 887 | <emphasis>Select a Build:</emphasis> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 888 | Choose the area in which you are interested. |
| 889 | For example, if you are looking for the most recent |
| 890 | toolchains, select the "toolchain" link. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 891 | </para></listitem> |
| 892 | <listitem><para> |
| 893 | <emphasis>Find the Tarball:</emphasis> |
| 894 | Drill down to find the associated tarball. |
| 895 | </para></listitem> |
| 896 | <listitem><para> |
| 897 | <emphasis>Download the Tarball:</emphasis> |
| 898 | Click the tarball to download and save a snapshot of the |
| 899 | given component. |
| 900 | </para></listitem> |
| 901 | </orderedlist> |
| 902 | </para> |
| 903 | </section> |
| 904 | </section> |
| 905 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 906 | <section id='cloning-and-checking-out-branches'> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 907 | <title>Cloning and Checking Out Branches</title> |
| 908 | |
| 909 | <para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 910 | To use the Yocto Project for development, you need a release locally |
| 911 | installed on your development system. |
| 912 | This locally installed set of files is referred to as the |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 913 | <ulink url='&YOCTO_DOCS_REF_URL;#source-directory'>Source Directory</ulink> |
| 914 | in the Yocto Project documentation. |
| 915 | </para> |
| 916 | |
| 917 | <para> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 918 | The preferred method of creating your Source Directory is by using |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 919 | <ulink url='&YOCTO_DOCS_OM_URL;#git'>Git</ulink> to clone a local |
| 920 | copy of the upstream <filename>poky</filename> repository. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 921 | Working from a cloned copy of the upstream repository allows you |
| 922 | to contribute back into the Yocto Project or to simply work with |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 923 | the latest software on a development branch. |
| 924 | Because Git maintains and creates an upstream repository with |
| 925 | a complete history of changes and you are working with a local |
| 926 | clone of that repository, you have access to all the Yocto |
| 927 | Project development branches and tag names used in the upstream |
| 928 | repository. |
| 929 | </para> |
| 930 | |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 931 | <section id='cloning-the-poky-repository'> |
| 932 | <title>Cloning the <filename>poky</filename> Repository</title> |
| 933 | |
| 934 | <para> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 935 | Follow these steps to create a local version of the |
| 936 | upstream |
| 937 | <ulink url='&YOCTO_DOCS_REF_URL;#poky'><filename>poky</filename></ulink> |
| 938 | Git repository. |
| 939 | <orderedlist> |
| 940 | <listitem><para> |
| 941 | <emphasis>Set Your Directory:</emphasis> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 942 | Change your working directory to where you want to |
| 943 | create your local copy of |
| 944 | <filename>poky</filename>. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 945 | </para></listitem> |
| 946 | <listitem><para> |
| 947 | <emphasis>Clone the Repository:</emphasis> |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 948 | The following example command clones the |
| 949 | <filename>poky</filename> repository and uses |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 950 | the default name "poky" for your local repository: |
| 951 | <literallayout class='monospaced'> |
| 952 | $ git clone git://git.yoctoproject.org/poky |
| 953 | Cloning into 'poky'... |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 954 | remote: Counting objects: 432160, done. |
| 955 | remote: Compressing objects: 100% (102056/102056), done. |
| 956 | remote: Total 432160 (delta 323116), reused 432037 (delta 323000) |
| 957 | Receiving objects: 100% (432160/432160), 153.81 MiB | 8.54 MiB/s, done. |
| 958 | Resolving deltas: 100% (323116/323116), done. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 959 | Checking connectivity... done. |
| 960 | </literallayout> |
| 961 | Unless you specify a specific development branch or |
| 962 | tag name, Git clones the "master" branch, which results |
| 963 | in a snapshot of the latest development changes for |
| 964 | "master". |
| 965 | For information on how to check out a specific |
| 966 | development branch or on how to check out a local |
| 967 | branch based on a tag name, see the |
| 968 | "<link linkend='checking-out-by-branch-in-poky'>Checking Out By Branch in Poky</link>" |
| 969 | and |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 970 | <link linkend='checkout-out-by-tag-in-poky'>Checking Out By Tag in Poky</link>" |
| 971 | sections, respectively.</para> |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 972 | |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 973 | <para>Once the local repository is created, you can |
| 974 | change to that directory and check its status. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 975 | Here, the single "master" branch exists on your system |
| 976 | and by default, it is checked out: |
| 977 | <literallayout class='monospaced'> |
| 978 | $ cd ~/poky |
| 979 | $ git status |
| 980 | On branch master |
| 981 | Your branch is up-to-date with 'origin/master'. |
| 982 | nothing to commit, working directory clean |
| 983 | $ git branch |
| 984 | * master |
| 985 | </literallayout> |
| 986 | Your local repository of poky is identical to the |
| 987 | upstream poky repository at the time from which it was |
| 988 | cloned. |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 989 | As you work with the local branch, you can periodically |
| 990 | use the <filename>git pull ‐‐rebase</filename> |
| 991 | command to be sure you are up-to-date with the upstream |
| 992 | branch. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 993 | </para></listitem> |
| 994 | </orderedlist> |
| 995 | </para> |
| 996 | </section> |
| 997 | |
| 998 | <section id='checking-out-by-branch-in-poky'> |
| 999 | <title>Checking Out by Branch in Poky</title> |
| 1000 | |
| 1001 | <para> |
| 1002 | When you clone the upstream poky repository, you have access to |
| 1003 | all its development branches. |
| 1004 | Each development branch in a repository is unique as it forks |
| 1005 | off the "master" branch. |
| 1006 | To see and use the files of a particular development branch |
| 1007 | locally, you need to know the branch name and then specifically |
| 1008 | check out that development branch. |
| 1009 | <note> |
| 1010 | Checking out an active development branch by branch name |
| 1011 | gives you a snapshot of that particular branch at the time |
| 1012 | you check it out. |
| 1013 | Further development on top of the branch that occurs after |
| 1014 | check it out can occur. |
| 1015 | </note> |
| 1016 | <orderedlist> |
| 1017 | <listitem><para> |
| 1018 | <emphasis>Switch to the Poky Directory:</emphasis> |
| 1019 | If you have a local poky Git repository, switch to that |
| 1020 | directory. |
| 1021 | If you do not have the local copy of poky, see the |
| 1022 | "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>" |
| 1023 | section. |
| 1024 | </para></listitem> |
| 1025 | <listitem><para> |
| 1026 | <emphasis>Determine Existing Branch Names:</emphasis> |
| 1027 | <literallayout class='monospaced'> |
| 1028 | $ git branch -a |
| 1029 | * master |
| 1030 | remotes/origin/1.1_M1 |
| 1031 | remotes/origin/1.1_M2 |
| 1032 | remotes/origin/1.1_M3 |
| 1033 | remotes/origin/1.1_M4 |
| 1034 | remotes/origin/1.2_M1 |
| 1035 | remotes/origin/1.2_M2 |
| 1036 | remotes/origin/1.2_M3 |
| 1037 | . |
| 1038 | . |
| 1039 | . |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1040 | remotes/origin/pyro |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1041 | remotes/origin/pyro-next |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1042 | remotes/origin/rocko |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1043 | remotes/origin/rocko-next |
| 1044 | remotes/origin/sumo |
| 1045 | remotes/origin/sumo-next |
| 1046 | remotes/origin/thud |
| 1047 | remotes/origin/thud-next |
| 1048 | remotes/origin/warrior |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1049 | </literallayout> |
| 1050 | </para></listitem> |
| 1051 | <listitem><para> |
| 1052 | <emphasis>Checkout the Branch:</emphasis> |
| 1053 | Checkout the development branch in which you want to work. |
| 1054 | For example, to access the files for the Yocto Project |
| 1055 | &DISTRO; Release (&DISTRO_NAME;), use the following command: |
| 1056 | <literallayout class='monospaced'> |
| 1057 | $ git checkout -b &DISTRO_NAME_NO_CAP; origin/&DISTRO_NAME_NO_CAP; |
| 1058 | Branch &DISTRO_NAME_NO_CAP; set up to track remote branch &DISTRO_NAME_NO_CAP; from origin. |
| 1059 | Switched to a new branch '&DISTRO_NAME_NO_CAP;' |
| 1060 | </literallayout> |
| 1061 | The previous command checks out the "&DISTRO_NAME_NO_CAP;" |
| 1062 | development branch and reports that the branch is tracking |
| 1063 | the upstream "origin/&DISTRO_NAME_NO_CAP;" branch.</para> |
| 1064 | |
| 1065 | <para>The following command displays the branches |
| 1066 | that are now part of your local poky repository. |
| 1067 | The asterisk character indicates the branch that is |
| 1068 | currently checked out for work: |
| 1069 | <literallayout class='monospaced'> |
| 1070 | $ git branch |
| 1071 | master |
| 1072 | * &DISTRO_NAME_NO_CAP; |
| 1073 | </literallayout> |
| 1074 | </para></listitem> |
| 1075 | </orderedlist> |
| 1076 | </para> |
| 1077 | </section> |
| 1078 | |
| 1079 | <section id='checkout-out-by-tag-in-poky'> |
| 1080 | <title>Checking Out by Tag in Poky</title> |
| 1081 | |
| 1082 | <para> |
| 1083 | Similar to branches, the upstream repository uses tags |
| 1084 | to mark specific commits associated with significant points in |
| 1085 | a development branch (i.e. a release point or stage of a |
| 1086 | release). |
| 1087 | You might want to set up a local branch based on one of those |
| 1088 | points in the repository. |
| 1089 | The process is similar to checking out by branch name except you |
| 1090 | use tag names. |
| 1091 | <note> |
| 1092 | Checking out a branch based on a tag gives you a |
| 1093 | stable set of files not affected by development on the |
| 1094 | branch above the tag. |
| 1095 | </note> |
| 1096 | <orderedlist> |
| 1097 | <listitem><para> |
| 1098 | <emphasis>Switch to the Poky Directory:</emphasis> |
| 1099 | If you have a local poky Git repository, switch to that |
| 1100 | directory. |
| 1101 | If you do not have the local copy of poky, see the |
| 1102 | "<link linkend='cloning-the-poky-repository'>Cloning the <filename>poky</filename> Repository</link>" |
| 1103 | section. |
| 1104 | </para></listitem> |
| 1105 | <listitem><para> |
| 1106 | <emphasis>Fetch the Tag Names:</emphasis> |
| 1107 | To checkout the branch based on a tag name, you need to |
| 1108 | fetch the upstream tags into your local repository: |
| 1109 | <literallayout class='monospaced'> |
| 1110 | $ git fetch --tags |
| 1111 | $ |
| 1112 | </literallayout> |
| 1113 | </para></listitem> |
| 1114 | <listitem><para> |
| 1115 | <emphasis>List the Tag Names:</emphasis> |
| 1116 | You can list the tag names now: |
| 1117 | <literallayout class='monospaced'> |
| 1118 | $ git tag |
| 1119 | 1.1_M1.final |
| 1120 | 1.1_M1.rc1 |
| 1121 | 1.1_M1.rc2 |
| 1122 | 1.1_M2.final |
| 1123 | 1.1_M2.rc1 |
| 1124 | . |
| 1125 | . |
| 1126 | . |
Scott Rifenbark | fa4cfe3 | 2019-01-11 11:55:06 -0800 | [diff] [blame] | 1127 | yocto-2.5 |
| 1128 | yocto-2.5.1 |
| 1129 | yocto-2.5.2 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1130 | yocto-2.5.3 |
Scott Rifenbark | fa4cfe3 | 2019-01-11 11:55:06 -0800 | [diff] [blame] | 1131 | yocto-2.6 |
Scott Rifenbark | b0466fb | 2019-01-22 10:21:44 -0800 | [diff] [blame] | 1132 | yocto-2.6.1 |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1133 | yocto-2.7 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1134 | yocto_1.5_M5.rc8 |
| 1135 | </literallayout> |
| 1136 | </para></listitem> |
| 1137 | <listitem><para> |
| 1138 | <emphasis>Checkout the Branch:</emphasis> |
| 1139 | <literallayout class='monospaced'> |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 1140 | $ git checkout tags/&DISTRO_REL_TAG; -b my_yocto_&DISTRO; |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 1141 | Switched to a new branch 'my_yocto_&DISTRO;' |
| 1142 | $ git branch |
| 1143 | master |
| 1144 | * my_yocto_&DISTRO; |
| 1145 | </literallayout> |
| 1146 | The previous command creates and checks out a local |
| 1147 | branch named "my_yocto_&DISTRO;", which is based on |
| 1148 | the commit in the upstream poky repository that has |
| 1149 | the same tag. |
| 1150 | In this example, the files you have available locally |
| 1151 | as a result of the <filename>checkout</filename> |
| 1152 | command are a snapshot of the |
| 1153 | "&DISTRO_NAME_NO_CAP;" development branch at the point |
| 1154 | where Yocto Project &DISTRO; was released. |
| 1155 | </para></listitem> |
| 1156 | </orderedlist> |
| 1157 | </para> |
| 1158 | </section> |
| 1159 | </section> |
| 1160 | |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1161 | </chapter> |
| 1162 | <!-- |
| 1163 | vim: expandtab tw=80 ts=4 |
| 1164 | --> |