diff options
author | Scott Rifenbark <scott.m.rifenbark@intel.com> | 2012-12-07 17:23:56 -0600 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-12-11 16:15:24 +0000 |
commit | 72d01bf43da4d6761ee1b5997307c64152ec3517 (patch) | |
tree | a1b95e8fd3a4489343205eb5f67cb1937efb6f9c /documentation/dev-manual/dev-manual-newbie.xml | |
parent | eb8c9e1494692583f77d83267f78d5d88a79973d (diff) | |
download | poky-72d01bf43da4d6761ee1b5997307c64152ec3517.tar.gz |
documentation: dev-manual - Removed all trailing whitespace.
(From yocto-docs rev: d117584a589460412a7fc4df15512b0d9c9448c7)
Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'documentation/dev-manual/dev-manual-newbie.xml')
-rw-r--r-- | documentation/dev-manual/dev-manual-newbie.xml | 848 |
1 files changed, 424 insertions, 424 deletions
diff --git a/documentation/dev-manual/dev-manual-newbie.xml b/documentation/dev-manual/dev-manual-newbie.xml index 0e1041b4b8..e09c373da2 100644 --- a/documentation/dev-manual/dev-manual-newbie.xml +++ b/documentation/dev-manual/dev-manual-newbie.xml | |||
@@ -8,11 +8,11 @@ | |||
8 | 8 | ||
9 | <para> | 9 | <para> |
10 | This chapter helps you understand the Yocto Project as an open source development project. | 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 | 11 | In general, working in an open source environment is very different from working in a |
12 | closed, proprietary environment. | 12 | closed, proprietary environment. |
13 | Additionally, the Yocto Project uses specific tools and constructs as part of its development | 13 | Additionally, the Yocto Project uses specific tools and constructs as part of its development |
14 | environment. | 14 | environment. |
15 | This chapter specifically addresses open source philosophy, licensing issues, code repositories, | 15 | This chapter specifically addresses open source philosophy, licensing issues, code repositories, |
16 | the open source distributed version control system Git, and best practices using the Yocto Project. | 16 | the open source distributed version control system Git, and best practices using the Yocto Project. |
17 | </para> | 17 | </para> |
18 | 18 | ||
@@ -20,36 +20,36 @@ | |||
20 | <title>Open Source Philosophy</title> | 20 | <title>Open Source Philosophy</title> |
21 | 21 | ||
22 | <para> | 22 | <para> |
23 | Open source philosophy is characterized by software development directed by peer production | 23 | Open source philosophy is characterized by software development directed by peer production |
24 | and collaboration through an active community of developers. | 24 | and collaboration through an active community of developers. |
25 | Contrast this to the more standard centralized development models used by commercial software | 25 | Contrast this to the more standard centralized development models used by commercial software |
26 | companies where a finite set of developers produces a product for sale using a defined set | 26 | companies where a finite set of developers produces a product for sale using a defined set |
27 | of procedures that ultimately result in an end product whose architecture and source material | 27 | of procedures that ultimately result in an end product whose architecture and source material |
28 | are closed to the public. | 28 | are closed to the public. |
29 | </para> | 29 | </para> |
30 | 30 | ||
31 | <para> | 31 | <para> |
32 | Open source projects conceptually have differing concurrent agendas, approaches, and production. | 32 | Open source projects conceptually have differing concurrent agendas, approaches, and production. |
33 | These facets of the development process can come from anyone in the public (community) that has a | 33 | These facets of the development process can come from anyone in the public (community) that has a |
34 | stake in the software project. | 34 | stake in the software project. |
35 | The open source environment contains new copyright, licensing, domain, and consumer issues | 35 | The open source environment contains new copyright, licensing, domain, and consumer issues |
36 | that differ from the more traditional development environment. | 36 | that differ from the more traditional development environment. |
37 | In an open source environment, the end product, source material, and documentation are | 37 | In an open source environment, the end product, source material, and documentation are |
38 | all available to the public at no cost. | 38 | all available to the public at no cost. |
39 | </para> | 39 | </para> |
40 | 40 | ||
41 | <para> | 41 | <para> |
42 | A benchmark example of an open source project is the Linux Kernel, which was initially conceived | 42 | A benchmark example of an open source project is the Linux Kernel, which was initially conceived |
43 | and created by Finnish computer science student Linus Torvalds in 1991. | 43 | and created by Finnish computer science student Linus Torvalds in 1991. |
44 | Conversely, a good example of a non-open source project is the | 44 | Conversely, a good example of a non-open source project is the |
45 | <trademark class='registered'>Windows</trademark> family of operating | 45 | <trademark class='registered'>Windows</trademark> family of operating |
46 | systems developed by <trademark class='registered'>Microsoft</trademark> Corporation. | 46 | systems developed by <trademark class='registered'>Microsoft</trademark> Corporation. |
47 | </para> | 47 | </para> |
48 | 48 | ||
49 | <para> | 49 | <para> |
50 | Wikipedia has a good historical description of the Open Source Philosophy | 50 | Wikipedia has a good historical description of the Open Source Philosophy |
51 | <ulink url='http://en.wikipedia.org/wiki/Open_source'>here</ulink>. | 51 | <ulink url='http://en.wikipedia.org/wiki/Open_source'>here</ulink>. |
52 | You can also find helpful information on how to participate in the Linux Community | 52 | You can also find helpful information on how to participate in the Linux Community |
53 | <ulink url='http://ldn.linuxfoundation.org/book/how-participate-linux-community'>here</ulink>. | 53 | <ulink url='http://ldn.linuxfoundation.org/book/how-participate-linux-community'>here</ulink>. |
54 | </para> | 54 | </para> |
55 | </section> | 55 | </section> |
@@ -58,72 +58,72 @@ | |||
58 | <title>Using the Yocto Project in a Team Environment</title> | 58 | <title>Using the Yocto Project in a Team Environment</title> |
59 | 59 | ||
60 | <para> | 60 | <para> |
61 | It might not be immediately clear how you can use the Yocto Project in a team environment, | 61 | It might not be immediately clear how you can use the Yocto Project in a team environment, |
62 | or scale it for a large team of developers. | 62 | or scale it for a large team of developers. |
63 | The specifics of any situation determine the best solution. | 63 | The specifics of any situation determine the best solution. |
64 | Granted that the Yocto Project offers immense flexibility regarding this, practices do exist | 64 | Granted that the Yocto Project offers immense flexibility regarding this, practices do exist |
65 | that experience has shown work well. | 65 | that experience has shown work well. |
66 | </para> | 66 | </para> |
67 | 67 | ||
68 | <para> | 68 | <para> |
69 | The core component of any development effort with the Yocto Project is often an | 69 | The core component of any development effort with the Yocto Project is often an |
70 | automated build and testing framework along with an image generation process. | 70 | automated build and testing framework along with an image generation process. |
71 | You can use these core components to check that the metadata can be built, | 71 | You can use these core components to check that the metadata can be built, |
72 | highlight when commits break the build, and provide up-to-date images that | 72 | highlight when commits break the build, and provide up-to-date images that |
73 | allow developers to test the end result and use it as a base platform for further | 73 | allow developers to test the end result and use it as a base platform for further |
74 | development. | 74 | development. |
75 | Experience shows that buildbot is a good fit for this role. | 75 | Experience shows that buildbot is a good fit for this role. |
76 | What works well is to configure buildbot to make two types of builds: | 76 | What works well is to configure buildbot to make two types of builds: |
77 | incremental and full (from scratch). | 77 | incremental and full (from scratch). |
78 | See "<ulink url='http://autobuilder.yoctoproject.org:8010/'>Welcome to the buildbot for the Yocto Project</ulink>" | 78 | See "<ulink url='http://autobuilder.yoctoproject.org:8010/'>Welcome to the buildbot for the Yocto Project</ulink>" |
79 | for an example implementation that uses buildbot. | 79 | for an example implementation that uses buildbot. |
80 | </para> | 80 | </para> |
81 | 81 | ||
82 | <para> | 82 | <para> |
83 | You can tie an incremental build to a commit hook that triggers the build | 83 | You can tie an incremental build to a commit hook that triggers the build |
84 | each time a commit is made to the metadata. | 84 | each time a commit is made to the metadata. |
85 | This practice results in useful acid tests that determine whether a given commit | 85 | This practice results in useful acid tests that determine whether a given commit |
86 | breaks the build in some serious way. | 86 | breaks the build in some serious way. |
87 | Associating a build to a commit can catch a lot of simple errors. | 87 | Associating a build to a commit can catch a lot of simple errors. |
88 | Furthermore, the tests are fast so developers can get quick feedback on changes. | 88 | Furthermore, the tests are fast so developers can get quick feedback on changes. |
89 | </para> | 89 | </para> |
90 | 90 | ||
91 | <para> | 91 | <para> |
92 | Full builds build and test everything from the ground up. | 92 | Full builds build and test everything from the ground up. |
93 | These types of builds usually happen at predetermined times like during the | 93 | These types of builds usually happen at predetermined times like during the |
94 | night when the machine load is low. | 94 | night when the machine load is low. |
95 | </para> | 95 | </para> |
96 | 96 | ||
97 | <para> | 97 | <para> |
98 | Most teams have many pieces of software undergoing active development at any given time. | 98 | Most teams have many pieces of software undergoing active development at any given time. |
99 | You can derive large benefits by putting these pieces under the control of a source | 99 | You can derive large benefits by putting these pieces under the control of a source |
100 | control system that is compatible (i.e. Git or Subversion (SVN)) with the OpenEmbeded | 100 | control system that is compatible (i.e. Git or Subversion (SVN)) with the OpenEmbeded |
101 | build system that the Yocto Project uses. | 101 | build system that the Yocto Project uses. |
102 | You can then set the autobuilder to pull the latest revisions of the packages | 102 | You can then set the autobuilder to pull the latest revisions of the packages |
103 | and test the latest commits by the builds. | 103 | and test the latest commits by the builds. |
104 | This practice quickly highlights issues. | 104 | This practice quickly highlights issues. |
105 | The build system easily supports testing configurations that use both a | 105 | The build system easily supports testing configurations that use both a |
106 | stable known good revision and a floating revision. | 106 | stable known good revision and a floating revision. |
107 | The build system can also take just the changes from specific source control branches. | 107 | The build system can also take just the changes from specific source control branches. |
108 | This capability allows you to track and test specific changes. | 108 | This capability allows you to track and test specific changes. |
109 | </para> | 109 | </para> |
110 | 110 | ||
111 | <para> | 111 | <para> |
112 | Perhaps the hardest part of setting this up is defining the software project or | 112 | Perhaps the hardest part of setting this up is defining the software project or |
113 | the metadata policies that surround the different source control systems. | 113 | the metadata policies that surround the different source control systems. |
114 | Of course circumstances will be different in each case. | 114 | Of course circumstances will be different in each case. |
115 | However, this situation reveals one of the Yocto Project's advantages - | 115 | However, this situation reveals one of the Yocto Project's advantages - |
116 | the system itself does not | 116 | the system itself does not |
117 | force any particular policy on users, unlike a lot of build systems. | 117 | force any particular policy on users, unlike a lot of build systems. |
118 | The system allows the best policies to be chosen for the given circumstances. | 118 | The system allows the best policies to be chosen for the given circumstances. |
119 | </para> | 119 | </para> |
120 | 120 | ||
121 | <para> | 121 | <para> |
122 | In general, best practices exist that make your work with the Yocto | 122 | In general, best practices exist that make your work with the Yocto |
123 | Project easier in a team environment. | 123 | Project easier in a team environment. |
124 | This list presents some of these practices you might consider following. | 124 | This list presents some of these practices you might consider following. |
125 | Of course, you need to understand that you do not have to follow these | 125 | Of course, you need to understand that you do not have to follow these |
126 | practices and your setup can be totally controlled and customized by | 126 | practices and your setup can be totally controlled and customized by |
127 | your team: | 127 | your team: |
128 | <itemizedlist> | 128 | <itemizedlist> |
129 | <listitem><para>Use <link linkend='git'>Git</link> | 129 | <listitem><para>Use <link linkend='git'>Git</link> |
@@ -131,9 +131,9 @@ | |||
131 | <listitem><para>Maintain your metadata in layers that make sense | 131 | <listitem><para>Maintain your metadata in layers that make sense |
132 | for your situation. | 132 | for your situation. |
133 | See the "<link linkend='understanding-and-creating-layers'>Understanding | 133 | See the "<link linkend='understanding-and-creating-layers'>Understanding |
134 | and Creating Layeres</link>" section for more information on | 134 | and Creating Layeres</link>" section for more information on |
135 | layers.</para></listitem> | 135 | layers.</para></listitem> |
136 | <listitem><para>Separate the project's metadata and code by using | 136 | <listitem><para>Separate the project's metadata and code by using |
137 | separate Git repositories. | 137 | separate Git repositories. |
138 | See the "<link linkend='yocto-project-repositories'>Yocto Project | 138 | See the "<link linkend='yocto-project-repositories'>Yocto Project |
139 | Source Repositories</link>" section for information on these | 139 | Source Repositories</link>" section for information on these |
@@ -144,10 +144,10 @@ | |||
144 | <listitem><para>Set up the directory for the shared state cache | 144 | <listitem><para>Set up the directory for the shared state cache |
145 | (<ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>) | 145 | (<ulink url='&YOCTO_DOCS_REF_URL;#var-SSTATE_DIR'><filename>SSTATE_DIR</filename></ulink>) |
146 | where they make sense. | 146 | where they make sense. |
147 | For example, set up the sstate cache for developers using the | 147 | For example, set up the sstate cache for developers using the |
148 | same office and share source directories on the developer's | 148 | same office and share source directories on the developer's |
149 | machines.</para></listitem> | 149 | machines.</para></listitem> |
150 | <listitem><para>Set up an autobuilder and have it populate the | 150 | <listitem><para>Set up an autobuilder and have it populate the |
151 | sstate cache and source directories.</para></listitem> | 151 | sstate cache and source directories.</para></listitem> |
152 | </itemizedlist> | 152 | </itemizedlist> |
153 | </para> | 153 | </para> |
@@ -157,37 +157,37 @@ | |||
157 | <title>Yocto Project Source Repositories</title> | 157 | <title>Yocto Project Source Repositories</title> |
158 | 158 | ||
159 | <para> | 159 | <para> |
160 | The Yocto Project team maintains complete source repositories for all Yocto Project files | 160 | The Yocto Project team maintains complete source repositories for all Yocto Project files |
161 | at <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>. | 161 | at <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'></ulink>. |
162 | This web-based source code browser is organized into categories by function such as | 162 | This web-based source code browser is organized into categories by function such as |
163 | IDE Plugins, Matchbox, Poky, Yocto Linux Kernel, and so forth. | 163 | IDE Plugins, Matchbox, Poky, Yocto Linux Kernel, and so forth. |
164 | From the interface, you can click on any particular item in the "Name" column and | 164 | From the interface, you can click on any particular item in the "Name" column and |
165 | see the URL at the bottom of the page that you need to set up a Git repository for | 165 | see the URL at the bottom of the page that you need to set up a Git repository for |
166 | that particular item. | 166 | that particular item. |
167 | Having a local Git repository of the Source Directory (poky) allows you to | 167 | Having a local Git repository of the Source Directory (poky) allows you to |
168 | make changes, contribute to the history, and ultimately enhance the Yocto Project's | 168 | make changes, contribute to the history, and ultimately enhance the Yocto Project's |
169 | tools, Board Support Packages, and so forth. | 169 | tools, Board Support Packages, and so forth. |
170 | </para> | 170 | </para> |
171 | 171 | ||
172 | <para> | 172 | <para> |
173 | Conversely, if you are a developer that is not interested in contributing back to the | 173 | Conversely, if you are a developer that is not interested in contributing back to the |
174 | Yocto Project, you have the ability to simply download and extract release tarballs | 174 | Yocto Project, you have the ability to simply download and extract release tarballs |
175 | and use them within the Yocto Project environment. | 175 | and use them within the Yocto Project environment. |
176 | All that is required is a particular release of the Yocto Project and | 176 | All that is required is a particular release of the Yocto Project and |
177 | your application source code. | 177 | your application source code. |
178 | </para> | 178 | </para> |
179 | 179 | ||
180 | <para> | 180 | <para> |
181 | For any supported release of Yocto Project, you can go to the Yocto Project website’s | 181 | For any supported release of Yocto Project, you can go to the Yocto Project website’s |
182 | <ulink url='&YOCTO_HOME_URL;/download'>download page</ulink> and get a | 182 | <ulink url='&YOCTO_HOME_URL;/download'>download page</ulink> and get a |
183 | tarball of the release. | 183 | tarball of the release. |
184 | You can also go to this site to download any supported BSP tarballs. | 184 | You can also go to this site to download any supported BSP tarballs. |
185 | Unpacking the tarball gives you a hierarchical Source Directory that lets you develop | 185 | Unpacking the tarball gives you a hierarchical Source Directory that lets you develop |
186 | using the Yocto Project. | 186 | using the Yocto Project. |
187 | </para> | 187 | </para> |
188 | 188 | ||
189 | <para> | 189 | <para> |
190 | Once you are set up through either tarball extraction or creation of Git repositories, | 190 | Once you are set up through either tarball extraction or creation of Git repositories, |
191 | you are ready to develop. | 191 | you are ready to develop. |
192 | </para> | 192 | </para> |
193 | 193 | ||
@@ -195,18 +195,18 @@ | |||
195 | In summary, here is where you can get the project files needed for development: | 195 | In summary, here is where you can get the project files needed for development: |
196 | <itemizedlist> | 196 | <itemizedlist> |
197 | <listitem><para id='source-repositories'><emphasis><ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'>Source Repositories:</ulink></emphasis> | 197 | <listitem><para id='source-repositories'><emphasis><ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi'>Source Repositories:</ulink></emphasis> |
198 | This area contains IDE Plugins, Matchbox, Poky, Poky Support, Tools, Yocto Linux Kernel, and Yocto | 198 | This area contains IDE Plugins, Matchbox, Poky, Poky Support, Tools, Yocto Linux Kernel, and Yocto |
199 | Metadata Layers. | 199 | Metadata Layers. |
200 | You can create local copies of Git repositories for each of these areas.</para> | 200 | You can create local copies of Git repositories for each of these areas.</para> |
201 | <para> | 201 | <para> |
202 | <imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" /> | 202 | <imagedata fileref="figures/source-repos.png" align="center" width="6in" depth="4in" /> |
203 | </para></listitem> | 203 | </para></listitem> |
204 | <listitem><para><anchor id='index-downloads' /><emphasis><ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink></emphasis> | 204 | <listitem><para><anchor id='index-downloads' /><emphasis><ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink></emphasis> |
205 | This area contains index releases such as | 205 | This area contains index releases such as |
206 | the <trademark class='trade'>Eclipse</trademark> | 206 | the <trademark class='trade'>Eclipse</trademark> |
207 | Yocto Plug-in, miscellaneous support, poky, pseudo, installers for cross-development toolchains, | 207 | Yocto Plug-in, miscellaneous support, poky, pseudo, installers for cross-development toolchains, |
208 | and all released versions of Yocto Project in the form of images or tarballs. | 208 | and all released versions of Yocto Project in the form of images or tarballs. |
209 | Downloading and extracting these files does not produce a local copy of the | 209 | Downloading and extracting these files does not produce a local copy of the |
210 | Git repository but rather a snapshot of a particular release or image.</para> | 210 | Git repository but rather a snapshot of a particular release or image.</para> |
211 | <para> | 211 | <para> |
212 | <imagedata fileref="figures/index-downloads.png" align="center" width="6in" depth="4in" /> | 212 | <imagedata fileref="figures/index-downloads.png" align="center" width="6in" depth="4in" /> |
@@ -214,7 +214,7 @@ | |||
214 | <listitem><para><emphasis><ulink url='&YOCTO_HOME_URL;/download'>Yocto Project Download Page</ulink></emphasis> | 214 | <listitem><para><emphasis><ulink url='&YOCTO_HOME_URL;/download'>Yocto Project Download Page</ulink></emphasis> |
215 | This page on the Yocto Project website allows you to download any Yocto Project | 215 | This page on the Yocto Project website allows you to download any Yocto Project |
216 | release or Board Support Package (BSP) in tarball form. | 216 | release or Board Support Package (BSP) in tarball form. |
217 | The tarballs are similar to those found in the | 217 | The tarballs are similar to those found in the |
218 | <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink> area.</para> | 218 | <ulink url='&YOCTO_DL_URL;/releases/'>Index of /releases:</ulink> area.</para> |
219 | <para> | 219 | <para> |
220 | <imagedata fileref="figures/yp-download.png" align="center" width="6in" depth="4in" /> | 220 | <imagedata fileref="figures/yp-download.png" align="center" width="6in" depth="4in" /> |
@@ -227,17 +227,17 @@ | |||
227 | <title>Yocto Project Terms</title> | 227 | <title>Yocto Project Terms</title> |
228 | 228 | ||
229 | <para> | 229 | <para> |
230 | Following is a list of terms and definitions users new to the Yocto Project development | 230 | Following is a list of terms and definitions users new to the Yocto Project development |
231 | environment might find helpful. | 231 | environment might find helpful. |
232 | While some of these terms are universal, the list includes them just in case: | 232 | While some of these terms are universal, the list includes them just in case: |
233 | <itemizedlist> | 233 | <itemizedlist> |
234 | <listitem><para><emphasis>Append Files:</emphasis> Files that append build information to | 234 | <listitem><para><emphasis>Append Files:</emphasis> Files that append build information to |
235 | a recipe file. | 235 | a recipe file. |
236 | Append files are known as BitBake append files and <filename>.bbappend</filename> files. | 236 | Append files are known as BitBake append files and <filename>.bbappend</filename> files. |
237 | The OpenEmbedded build system expects every append file to have a corresponding and | 237 | The OpenEmbedded build system expects every append file to have a corresponding and |
238 | underlying recipe (<filename>.bb</filename>) file. | 238 | underlying recipe (<filename>.bb</filename>) file. |
239 | Furthermore, the append file and the underlying recipe must have the same root filename. | 239 | Furthermore, the append file and the underlying recipe must have the same root filename. |
240 | The filenames can differ only in the file type suffix used (e.g. | 240 | The filenames can differ only in the file type suffix used (e.g. |
241 | <filename>formfactor_0.0.bb</filename> and <filename>formfactor_0.0.bbappend</filename>). | 241 | <filename>formfactor_0.0.bb</filename> and <filename>formfactor_0.0.bbappend</filename>). |
242 | </para> | 242 | </para> |
243 | <para>Information in append files overrides the information in the similarly-named recipe file. | 243 | <para>Information in append files overrides the information in the similarly-named recipe file. |
@@ -245,20 +245,20 @@ | |||
245 | "<link linkend='using-bbappend-files'>Using .bbappend Files</link>" section. | 245 | "<link linkend='using-bbappend-files'>Using .bbappend Files</link>" section. |
246 | </para></listitem> | 246 | </para></listitem> |
247 | <listitem><para id='bitbake-term'><emphasis>BitBake:</emphasis> | 247 | <listitem><para id='bitbake-term'><emphasis>BitBake:</emphasis> |
248 | The task executor and scheduler used by | 248 | The task executor and scheduler used by |
249 | the OpenEmbedded build system to build images. | 249 | the OpenEmbedded build system to build images. |
250 | For more information on BitBake, see the BitBake documentation | 250 | For more information on BitBake, see the BitBake documentation |
251 | in the <filename>bitbake/doc/manual</filename> directory of the | 251 | in the <filename>bitbake/doc/manual</filename> directory of the |
252 | <link linkend='source-directory'>Source Directory</link>.</para></listitem> | 252 | <link linkend='source-directory'>Source Directory</link>.</para></listitem> |
253 | <listitem> | 253 | <listitem> |
254 | <para id='build-directory'><emphasis>Build Directory:</emphasis> | 254 | <para id='build-directory'><emphasis>Build Directory:</emphasis> |
255 | This term refers to the area used by the OpenEmbedded build system for builds. | 255 | This term refers to the area used by the OpenEmbedded build system for builds. |
256 | The area is created when you <filename>source</filename> the setup | 256 | The area is created when you <filename>source</filename> the setup |
257 | environment script that is found in the Source Directory | 257 | environment script that is found in the Source Directory |
258 | (i.e. <filename>&OE_INIT_FILE;</filename>). | 258 | (i.e. <filename>&OE_INIT_FILE;</filename>). |
259 | The <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink> | 259 | The <ulink url='&YOCTO_DOCS_REF_URL;#var-TOPDIR'><filename>TOPDIR</filename></ulink> |
260 | variable points to the Build Directory.</para> | 260 | variable points to the Build Directory.</para> |
261 | 261 | ||
262 | <para>You have a lot of flexibility when creating the Build Directory. | 262 | <para>You have a lot of flexibility when creating the Build Directory. |
263 | Following are some examples that show how to create the directory: | 263 | Following are some examples that show how to create the directory: |
264 | <itemizedlist> | 264 | <itemizedlist> |
@@ -268,119 +268,119 @@ | |||
268 | <literallayout class='monospaced'> | 268 | <literallayout class='monospaced'> |
269 | $ source &OE_INIT_PATH; | 269 | $ source &OE_INIT_PATH; |
270 | </literallayout></para></listitem> | 270 | </literallayout></para></listitem> |
271 | <listitem><para>Provide a directory path and specifically name the build | 271 | <listitem><para>Provide a directory path and specifically name the build |
272 | directory. | 272 | directory. |
273 | This next example creates a Build Directory named <filename>YP-&POKYVERSION;</filename> | 273 | This next example creates a Build Directory named <filename>YP-&POKYVERSION;</filename> |
274 | in your home directory within the directory <filename>mybuilds</filename>. | 274 | in your home directory within the directory <filename>mybuilds</filename>. |
275 | If <filename>mybuilds</filename> does not exist, the directory is created for you: | 275 | If <filename>mybuilds</filename> does not exist, the directory is created for you: |
276 | <literallayout class='monospaced'> | 276 | <literallayout class='monospaced'> |
277 | $ source &OE_INIT_PATH; $HOME/mybuilds/YP-&POKYVERSION; | 277 | $ source &OE_INIT_PATH; $HOME/mybuilds/YP-&POKYVERSION; |
278 | </literallayout></para></listitem> | 278 | </literallayout></para></listitem> |
279 | <listitem><para>Provide an existing directory to use as the Build Directory. | 279 | <listitem><para>Provide an existing directory to use as the Build Directory. |
280 | This example uses the existing <filename>mybuilds</filename> directory | 280 | This example uses the existing <filename>mybuilds</filename> directory |
281 | as the Build Directory. | 281 | as the Build Directory. |
282 | <literallayout class='monospaced'> | 282 | <literallayout class='monospaced'> |
283 | $ source &OE_INIT_PATH; $HOME/mybuilds/ | 283 | $ source &OE_INIT_PATH; $HOME/mybuilds/ |
284 | </literallayout></para></listitem> | 284 | </literallayout></para></listitem> |
285 | </itemizedlist> | 285 | </itemizedlist> |
286 | </para></listitem> | 286 | </para></listitem> |
287 | <listitem><para><emphasis>Build System:</emphasis> In the context of the Yocto Project | 287 | <listitem><para><emphasis>Build System:</emphasis> In the context of the Yocto Project |
288 | this term refers to the OpenEmbedded build system used by the project. | 288 | this term refers to the OpenEmbedded build system used by the project. |
289 | This build system is based on the project known as "Poky." | 289 | This build system is based on the project known as "Poky." |
290 | For some historical information about Poky, see the | 290 | For some historical information about Poky, see the |
291 | <link linkend='poky'>Poky</link> term further along in this section. | 291 | <link linkend='poky'>Poky</link> term further along in this section. |
292 | </para></listitem> | 292 | </para></listitem> |
293 | <listitem><para><emphasis>Classes:</emphasis> Files that provide for logic encapsulation | 293 | <listitem><para><emphasis>Classes:</emphasis> Files that provide for logic encapsulation |
294 | and inheritance allowing commonly used patterns to be defined once and easily used | 294 | and inheritance allowing commonly used patterns to be defined once and easily used |
295 | in multiple recipes. | 295 | in multiple recipes. |
296 | Class files end with the <filename>.bbclass</filename> filename extension. | 296 | Class files end with the <filename>.bbclass</filename> filename extension. |
297 | </para></listitem> | 297 | </para></listitem> |
298 | <listitem><para><emphasis>Configuration File:</emphasis> Configuration information in various | 298 | <listitem><para><emphasis>Configuration File:</emphasis> Configuration information in various |
299 | <filename>.conf</filename> files provides global definitions of variables. | 299 | <filename>.conf</filename> files provides global definitions of variables. |
300 | The <filename>conf/local.conf</filename> configuration file in the | 300 | The <filename>conf/local.conf</filename> configuration file in the |
301 | <link linkend='build-directory'>Build Directory</link> | 301 | <link linkend='build-directory'>Build Directory</link> |
302 | contains user-defined variables that affect each build. | 302 | contains user-defined variables that affect each build. |
303 | The <filename>meta-yocto/conf/distro/poky.conf</filename> configuration file | 303 | The <filename>meta-yocto/conf/distro/poky.conf</filename> configuration file |
304 | defines Yocto ‘distro’ configuration | 304 | defines Yocto ‘distro’ configuration |
305 | variables used only when building with this policy. | 305 | variables used only when building with this policy. |
306 | Machine configuration files, which | 306 | Machine configuration files, which |
307 | are located throughout the | 307 | are located throughout the |
308 | <link linkend='source-directory'>Source Directory</link>, define | 308 | <link linkend='source-directory'>Source Directory</link>, define |
309 | variables for specific hardware and are only used when building for that target | 309 | variables for specific hardware and are only used when building for that target |
310 | (e.g. the <filename>machine/beagleboard.conf</filename> configuration file defines | 310 | (e.g. the <filename>machine/beagleboard.conf</filename> configuration file defines |
311 | variables for the Texas Instruments ARM Cortex-A8 development board). | 311 | variables for the Texas Instruments ARM Cortex-A8 development board). |
312 | Configuration files end with a <filename>.conf</filename> filename extension. | 312 | Configuration files end with a <filename>.conf</filename> filename extension. |
313 | </para></listitem> | 313 | </para></listitem> |
314 | <listitem><para><emphasis>Cross-Development Toolchain:</emphasis> | 314 | <listitem><para><emphasis>Cross-Development Toolchain:</emphasis> |
315 | A collection of software development | 315 | A collection of software development |
316 | tools and utilities that allow you to develop software for targeted architectures. | 316 | tools and utilities that allow you to develop software for targeted architectures. |
317 | This toolchain contains cross-compilers, linkers, and debuggers that are specific to | 317 | This toolchain contains cross-compilers, linkers, and debuggers that are specific to |
318 | an architecture. | 318 | an architecture. |
319 | You can use the OpenEmbedded build system to build a cross-development toolchain | 319 | You can use the OpenEmbedded build system to build a cross-development toolchain |
320 | installer that when run installs the toolchain that contains the development tools you | 320 | installer that when run installs the toolchain that contains the development tools you |
321 | need to cross-compile and test your software. | 321 | need to cross-compile and test your software. |
322 | The Yocto Project ships with images that contain installers for | 322 | The Yocto Project ships with images that contain installers for |
323 | toolchains for supported architectures as well. | 323 | toolchains for supported architectures as well. |
324 | Sometimes this toolchain is referred to as the meta-toolchain.</para></listitem> | 324 | Sometimes this toolchain is referred to as the meta-toolchain.</para></listitem> |
325 | <listitem><para><emphasis>Image:</emphasis> An image is the result produced when | 325 | <listitem><para><emphasis>Image:</emphasis> An image is the result produced when |
326 | BitBake processes a given collection of recipes and related metadata. | 326 | BitBake processes a given collection of recipes and related metadata. |
327 | Images are the binary output that run on specific hardware or QEMU | 327 | Images are the binary output that run on specific hardware or QEMU |
328 | and for specific use cases. | 328 | and for specific use cases. |
329 | For a list of the supported image types that the Yocto Project provides, see the | 329 | For a list of the supported image types that the Yocto Project provides, see the |
330 | "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" | 330 | "<ulink url='&YOCTO_DOCS_REF_URL;#ref-images'>Images</ulink>" |
331 | chapter in the Yocto Project Reference Manual.</para></listitem> | 331 | chapter in the Yocto Project Reference Manual.</para></listitem> |
332 | <listitem><para id='layer'><emphasis>Layer:</emphasis> A collection of recipes representing the core, | 332 | <listitem><para id='layer'><emphasis>Layer:</emphasis> A collection of recipes representing the core, |
333 | a BSP, or an application stack. | 333 | a BSP, or an application stack. |
334 | For a discussion on BSP Layers, see the | 334 | For a discussion on BSP Layers, see the |
335 | "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>" | 335 | "<ulink url='&YOCTO_DOCS_BSP_URL;#bsp-layers'>BSP Layers</ulink>" |
336 | section in the Yocto Project Board Support Packages (BSP) Developer's Guide.</para></listitem> | 336 | section in the Yocto Project Board Support Packages (BSP) Developer's Guide.</para></listitem> |
337 | <listitem><para id='metadata'><emphasis>Metadata:</emphasis> The files that BitBake parses when | 337 | <listitem><para id='metadata'><emphasis>Metadata:</emphasis> The files that BitBake parses when |
338 | building an image. | 338 | building an image. |
339 | Metadata includes recipes, classes, and configuration files.</para></listitem> | 339 | Metadata includes recipes, classes, and configuration files.</para></listitem> |
340 | <listitem><para id='oe-core'><emphasis>OE-Core:</emphasis> A core set of metadata originating | 340 | <listitem><para id='oe-core'><emphasis>OE-Core:</emphasis> A core set of metadata originating |
341 | with OpenEmbedded (OE) that is shared between OE and the Yocto Project. | 341 | with OpenEmbedded (OE) that is shared between OE and the Yocto Project. |
342 | This metadata is found in the <filename>meta</filename> directory of the source | 342 | This metadata is found in the <filename>meta</filename> directory of the source |
343 | directory.</para></listitem> | 343 | directory.</para></listitem> |
344 | <listitem><para><emphasis>Package:</emphasis> In the context of the Yocto Project, | 344 | <listitem><para><emphasis>Package:</emphasis> In the context of the Yocto Project, |
345 | this term refers to the packaged output from a baked recipe. | 345 | this term refers to the packaged output from a baked recipe. |
346 | A package is generally the compiled binaries produced from the recipe's sources. | 346 | A package is generally the compiled binaries produced from the recipe's sources. |
347 | You ‘bake’ something by running it through BitBake.</para> | 347 | You ‘bake’ something by running it through BitBake.</para> |
348 | <para>It is worth noting that the term "package" can, in general, have subtle | 348 | <para>It is worth noting that the term "package" can, in general, have subtle |
349 | meanings. For example, the packages refered to in the | 349 | meanings. For example, the packages refered to in the |
350 | "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" section are | 350 | "<ulink url='&YOCTO_DOCS_QS_URL;#packages'>The Packages</ulink>" section are |
351 | compiled binaries that when installed add functionality to your Linux | 351 | compiled binaries that when installed add functionality to your Linux |
352 | distribution.</para> | 352 | distribution.</para> |
353 | <para>Another point worth noting is that historically within the Yocto Project, | 353 | <para>Another point worth noting is that historically within the Yocto Project, |
354 | recipes were referred to as packages - thus, the existence of several BitBake | 354 | recipes were referred to as packages - thus, the existence of several BitBake |
355 | variables that are seemingly mis-named, | 355 | variables that are seemingly mis-named, |
356 | (e.g. <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>, | 356 | (e.g. <ulink url='&YOCTO_DOCS_REF_URL;#var-PR'><filename>PR</filename></ulink>, |
357 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PRINC'><filename>PRINC</filename></ulink>, | 357 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PRINC'><filename>PRINC</filename></ulink>, |
358 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>, and | 358 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PV'><filename>PV</filename></ulink>, and |
359 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>). | 359 | <ulink url='&YOCTO_DOCS_REF_URL;#var-PE'><filename>PE</filename></ulink>). |
360 | </para></listitem> | 360 | </para></listitem> |
361 | <listitem><para id='poky'><emphasis>Poky:</emphasis> The term "poky" can mean several things. | 361 | <listitem><para id='poky'><emphasis>Poky:</emphasis> The term "poky" can mean several things. |
362 | In its most general sense, it is an open-source project that was initially developed | 362 | In its most general sense, it is an open-source project that was initially developed |
363 | by OpenedHand. With OpenedHand, poky was developed off of the existing OpenEmbedded | 363 | by OpenedHand. With OpenedHand, poky was developed off of the existing OpenEmbedded |
364 | build system becoming a build system for embedded images. | 364 | build system becoming a build system for embedded images. |
365 | After Intel Corporation aquired OpenedHand, the project poky became the basis for | 365 | After Intel Corporation aquired OpenedHand, the project poky became the basis for |
366 | the Yocto Project's build system. | 366 | the Yocto Project's build system. |
367 | Within the Yocto Project source repositories, poky exists as a separate Git repository | 367 | Within the Yocto Project source repositories, poky exists as a separate Git repository |
368 | that can be cloned to yield a local copy on the host system. | 368 | that can be cloned to yield a local copy on the host system. |
369 | Thus, "poky" can refer to the local copy of the Source Directory used to develop within | 369 | Thus, "poky" can refer to the local copy of the Source Directory used to develop within |
370 | the Yocto Project.</para></listitem> | 370 | the Yocto Project.</para></listitem> |
371 | <listitem><para><emphasis>Recipe:</emphasis> A set of instructions for building packages. | 371 | <listitem><para><emphasis>Recipe:</emphasis> A set of instructions for building packages. |
372 | A recipe describes where you get source code and which patches to apply. | 372 | A recipe describes where you get source code and which patches to apply. |
373 | Recipes describe dependencies for libraries or for other recipes, and they | 373 | Recipes describe dependencies for libraries or for other recipes, and they |
374 | also contain configuration and compilation options. | 374 | also contain configuration and compilation options. |
375 | Recipes contain the logical unit of execution, the software/images to build, and | 375 | Recipes contain the logical unit of execution, the software/images to build, and |
376 | use the <filename>.bb</filename> file extension.</para></listitem> | 376 | use the <filename>.bb</filename> file extension.</para></listitem> |
377 | <listitem> | 377 | <listitem> |
378 | <para id='source-directory'><emphasis>Source Directory:</emphasis> | 378 | <para id='source-directory'><emphasis>Source Directory:</emphasis> |
379 | This term refers to the directory structure created as a result of either downloading | 379 | This term refers to the directory structure created as a result of either downloading |
380 | and unpacking a Yocto Project release tarball or creating a local copy of | 380 | and unpacking a Yocto Project release tarball or creating a local copy of |
381 | the <filename>poky</filename> Git repository | 381 | the <filename>poky</filename> Git repository |
382 | <filename>git://git.yoctoproject.org/poky</filename>. | 382 | <filename>git://git.yoctoproject.org/poky</filename>. |
383 | Sometimes you might here the term "poky directory" used to refer to this | 383 | Sometimes you might here the term "poky directory" used to refer to this |
384 | directory structure. | 384 | directory structure. |
385 | <note> | 385 | <note> |
386 | The OpenEmbedded build system does not support file or directory names that | 386 | The OpenEmbedded build system does not support file or directory names that |
@@ -388,55 +388,55 @@ | |||
388 | Be sure that the Source Directory you use does not contain these types | 388 | Be sure that the Source Directory you use does not contain these types |
389 | of names. | 389 | of names. |
390 | </note></para> | 390 | </note></para> |
391 | <para>The Source Directory contains BitBake, Documentation, metadata and | 391 | <para>The Source Directory contains BitBake, Documentation, metadata and |
392 | other files that all support the Yocto Project. | 392 | other files that all support the Yocto Project. |
393 | Consequently, you must have the Source Directory in place on your development | 393 | Consequently, you must have the Source Directory in place on your development |
394 | system in order to do any development using the Yocto Project.</para> | 394 | system in order to do any development using the Yocto Project.</para> |
395 | 395 | ||
396 | <para>For tarball expansion, the name of the top-level directory of the Source Directory | 396 | <para>For tarball expansion, the name of the top-level directory of the Source Directory |
397 | is derived from the Yocto Project release tarball. | 397 | is derived from the Yocto Project release tarball. |
398 | For example, downloading and unpacking <filename>&YOCTO_POKY_TARBALL;</filename> | 398 | For example, downloading and unpacking <filename>&YOCTO_POKY_TARBALL;</filename> |
399 | results in a Source Directory whose top-level folder is named | 399 | results in a Source Directory whose top-level folder is named |
400 | <filename>&YOCTO_POKY;</filename>. | 400 | <filename>&YOCTO_POKY;</filename>. |
401 | If you create a local copy of the Git repository, then you can name the repository | 401 | If you create a local copy of the Git repository, then you can name the repository |
402 | anything you like. | 402 | anything you like. |
403 | Throughout much of the documentation, <filename>poky</filename> is used as the name of | 403 | Throughout much of the documentation, <filename>poky</filename> is used as the name of |
404 | the top-level folder of the local copy of the poky Git repository. | 404 | the top-level folder of the local copy of the poky Git repository. |
405 | So, for example, cloning the <filename>poky</filename> Git repository results in a | 405 | So, for example, cloning the <filename>poky</filename> Git repository results in a |
406 | local Git repository whose top-level folder is also named <filename>poky</filename>.</para> | 406 | local Git repository whose top-level folder is also named <filename>poky</filename>.</para> |
407 | 407 | ||
408 | <para>It is important to understand the differences between the Source Directory created | 408 | <para>It is important to understand the differences between the Source Directory created |
409 | by unpacking a released tarball as compared to cloning | 409 | by unpacking a released tarball as compared to cloning |
410 | <filename>git://git.yoctoproject.org/poky</filename>. | 410 | <filename>git://git.yoctoproject.org/poky</filename>. |
411 | When you unpack a tarball, you have an exact copy of the files based on the time of | 411 | When you unpack a tarball, you have an exact copy of the files based on the time of |
412 | release - a fixed release point. | 412 | release - a fixed release point. |
413 | Any changes you make to your local files in the Source Directory are on top of the release. | 413 | Any changes you make to your local files in the Source Directory are on top of the release. |
414 | On the other hand, when you clone the <filename>poky</filename> Git repository, you have an | 414 | On the other hand, when you clone the <filename>poky</filename> Git repository, you have an |
415 | active development repository. | 415 | active development repository. |
416 | In this case, any local changes you make to the Source Directory can be later applied | 416 | In this case, any local changes you make to the Source Directory can be later applied |
417 | to active development branches of the upstream <filename>poky</filename> Git | 417 | to active development branches of the upstream <filename>poky</filename> Git |
418 | repository.</para> | 418 | repository.</para> |
419 | 419 | ||
420 | <para>Finally, if you want to track a set of local changes while starting from the same point | 420 | <para>Finally, if you want to track a set of local changes while starting from the same point |
421 | as a release tarball, you can create a local Git branch that | 421 | as a release tarball, you can create a local Git branch that |
422 | reflects the exact copy of the files at the time of their release. | 422 | reflects the exact copy of the files at the time of their release. |
423 | You do this by using Git tags that are part of the repository.</para> | 423 | You do this by using Git tags that are part of the repository.</para> |
424 | 424 | ||
425 | <para>For more information on concepts around Git repositories, branches, and tags, | 425 | <para>For more information on concepts around Git repositories, branches, and tags, |
426 | see the | 426 | see the |
427 | "<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>" | 427 | "<link linkend='repositories-tags-and-branches'>Repositories, Tags, and Branches</link>" |
428 | section.</para></listitem> | 428 | section.</para></listitem> |
429 | <listitem><para><emphasis>Tasks:</emphasis> Arbitrary groups of software Recipes. | 429 | <listitem><para><emphasis>Tasks:</emphasis> Arbitrary groups of software Recipes. |
430 | You simply use Tasks to hold recipes that, when built, usually accomplish a single task. | 430 | You simply use Tasks to hold recipes that, when built, usually accomplish a single task. |
431 | For example, a task could contain the recipes for a company’s proprietary or value-add software. | 431 | For example, a task could contain the recipes for a company’s proprietary or value-add software. |
432 | Or, the task could contain the recipes that enable graphics. | 432 | Or, the task could contain the recipes that enable graphics. |
433 | A task is really just another recipe. | 433 | A task is really just another recipe. |
434 | Because task files are recipes, they end with the <filename>.bb</filename> filename | 434 | Because task files are recipes, they end with the <filename>.bb</filename> filename |
435 | extension.</para></listitem> | 435 | extension.</para></listitem> |
436 | <listitem><para><emphasis>Upstream:</emphasis> A reference to source code or repositories | 436 | <listitem><para><emphasis>Upstream:</emphasis> A reference to source code or repositories |
437 | that are not local to the development system but located in a master area that is controlled | 437 | that are not local to the development system but located in a master area that is controlled |
438 | by the maintainer of the source code. | 438 | by the maintainer of the source code. |
439 | For example, in order for a developer to work on a particular piece of code, they need to | 439 | For example, in order for a developer to work on a particular piece of code, they need to |
440 | first get a copy of it from an "upstream" source.</para></listitem> | 440 | first get a copy of it from an "upstream" source.</para></listitem> |
441 | </itemizedlist> | 441 | </itemizedlist> |
442 | </para> | 442 | </para> |
@@ -446,8 +446,8 @@ | |||
446 | <title>Licensing</title> | 446 | <title>Licensing</title> |
447 | 447 | ||
448 | <para> | 448 | <para> |
449 | Because open source projects are open to the public, they have different licensing structures in place. | 449 | Because open source projects are open to the public, they have different licensing structures in place. |
450 | License evolution for both Open Source and Free Software has an interesting history. | 450 | License evolution for both Open Source and Free Software has an interesting history. |
451 | If you are interested in this history, you can find basic information here: | 451 | If you are interested in this history, you can find basic information here: |
452 | <itemizedlist> | 452 | <itemizedlist> |
453 | <listitem><para><ulink url='http://en.wikipedia.org/wiki/Open-source_license'>Open source license history</ulink> | 453 | <listitem><para><ulink url='http://en.wikipedia.org/wiki/Open-source_license'>Open source license history</ulink> |
@@ -458,57 +458,57 @@ | |||
458 | </para> | 458 | </para> |
459 | 459 | ||
460 | <para> | 460 | <para> |
461 | In general, the Yocto Project is broadly licensed under the Massachusetts Institute of Technology | 461 | In general, the Yocto Project is broadly licensed under the Massachusetts Institute of Technology |
462 | (MIT) License. | 462 | (MIT) License. |
463 | MIT licensing permits the reuse of software within proprietary software as long as the | 463 | MIT licensing permits the reuse of software within proprietary software as long as the |
464 | license is distributed with that software. | 464 | license is distributed with that software. |
465 | MIT is also compatible with the GNU General Public License (GPL). | 465 | MIT is also compatible with the GNU General Public License (GPL). |
466 | Patches to the Yocto Project follow the upstream licensing scheme. | 466 | Patches to the Yocto Project follow the upstream licensing scheme. |
467 | You can find information on the MIT license at | 467 | You can find information on the MIT license at |
468 | <ulink url='http://www.opensource.org/licenses/mit-license.php'>here</ulink>. | 468 | <ulink url='http://www.opensource.org/licenses/mit-license.php'>here</ulink>. |
469 | You can find information on the GNU GPL <ulink url='http://www.opensource.org/licenses/LGPL-3.0'> | 469 | You can find information on the GNU GPL <ulink url='http://www.opensource.org/licenses/LGPL-3.0'> |
470 | here</ulink>. | 470 | here</ulink>. |
471 | </para> | 471 | </para> |
472 | 472 | ||
473 | <para> | 473 | <para> |
474 | When you build an image using the Yocto Project, the build process uses a | 474 | When you build an image using the Yocto Project, the build process uses a |
475 | known list of licenses to ensure compliance. | 475 | known list of licenses to ensure compliance. |
476 | You can find this list in the Yocto Project files directory at | 476 | You can find this list in the Yocto Project files directory at |
477 | <filename>meta/files/common-licenses</filename>. | 477 | <filename>meta/files/common-licenses</filename>. |
478 | Once the build completes, the list of all licenses found and used during that build are | 478 | Once the build completes, the list of all licenses found and used during that build are |
479 | kept in the | 479 | kept in the |
480 | <link linkend='build-directory'>Build Directory</link> at | 480 | <link linkend='build-directory'>Build Directory</link> at |
481 | <filename>tmp/deploy/images/licenses</filename>. | 481 | <filename>tmp/deploy/images/licenses</filename>. |
482 | </para> | 482 | </para> |
483 | 483 | ||
484 | <para> | 484 | <para> |
485 | If a module requires a license that is not in the base list, the build process | 485 | If a module requires a license that is not in the base list, the build process |
486 | generates a warning during the build. | 486 | generates a warning during the build. |
487 | These tools make it easier for a developer to be certain of the licenses with which | 487 | These tools make it easier for a developer to be certain of the licenses with which |
488 | their shipped products must comply. | 488 | their shipped products must comply. |
489 | However, even with these tools it is still up to the developer to resolve potential licensing issues. | 489 | However, even with these tools it is still up to the developer to resolve potential licensing issues. |
490 | </para> | 490 | </para> |
491 | 491 | ||
492 | <para> | 492 | <para> |
493 | The base list of licenses used by the build process is a combination of the Software Package | 493 | The base list of licenses used by the build process is a combination of the Software Package |
494 | Data Exchange (SPDX) list and the Open Source Initiative (OSI) projects. | 494 | Data Exchange (SPDX) list and the Open Source Initiative (OSI) projects. |
495 | <ulink url='http://spdx.org'>SPDX Group</ulink> is a working group of the Linux Foundation | 495 | <ulink url='http://spdx.org'>SPDX Group</ulink> is a working group of the Linux Foundation |
496 | that maintains a specification | 496 | that maintains a specification |
497 | for a standard format for communicating the components, licenses, and copyrights | 497 | for a standard format for communicating the components, licenses, and copyrights |
498 | associated with a software package. | 498 | associated with a software package. |
499 | <ulink url='http://opensource.org'>OSI</ulink> is a corporation dedicated to the Open Source | 499 | <ulink url='http://opensource.org'>OSI</ulink> is a corporation dedicated to the Open Source |
500 | Definition and the effort for reviewing and approving licenses that are OSD-conformant. | 500 | Definition and the effort for reviewing and approving licenses that are OSD-conformant. |
501 | </para> | 501 | </para> |
502 | 502 | ||
503 | <para> | 503 | <para> |
504 | You can find a list of the combined SPDX and OSI licenses that the Yocto Project uses | 504 | You can find a list of the combined SPDX and OSI licenses that the Yocto Project uses |
505 | <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/files/common-licenses'>here</ulink>. | 505 | <ulink url='&YOCTO_GIT_URL;/cgit/cgit.cgi/poky/tree/meta/files/common-licenses'>here</ulink>. |
506 | This wiki page discusses the license infrastructure used by the Yocto Project. | 506 | This wiki page discusses the license infrastructure used by the Yocto Project. |
507 | </para> | 507 | </para> |
508 | 508 | ||
509 | <para> | 509 | <para> |
510 | For information that can help you to maintain compliance with various open source licensing | 510 | For information that can help you to maintain compliance with various open source licensing |
511 | during the lifecycle of a product created using the Yocto Project, see the | 511 | during the lifecycle of a product created using the Yocto Project, see the |
512 | "<link linkend='maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</link>" section. | 512 | "<link linkend='maintaining-open-source-license-compliance-during-your-products-lifecycle'>Maintaining Open Source License Compliance During Your Product's Lifecycle</link>" section. |
513 | </para> | 513 | </para> |
514 | </section> | 514 | </section> |
@@ -517,45 +517,45 @@ | |||
517 | <title>Git</title> | 517 | <title>Git</title> |
518 | 518 | ||
519 | <para> | 519 | <para> |
520 | The Yocto Project uses Git, which is a free, open source distributed version control system. | 520 | The Yocto Project uses Git, which is a free, open source distributed version control system. |
521 | Git supports distributed development, non-linear development, and can handle large projects. | 521 | Git supports distributed development, non-linear development, and can handle large projects. |
522 | It is best that you have some fundamental understanding of how Git tracks projects and | 522 | It is best that you have some fundamental understanding of how Git tracks projects and |
523 | how to work with Git if you are going to use Yocto Project for development. | 523 | how to work with Git if you are going to use Yocto Project for development. |
524 | This section provides a quick overview of how Git works and provides you with a summary | 524 | This section provides a quick overview of how Git works and provides you with a summary |
525 | of some essential Git commands. | 525 | of some essential Git commands. |
526 | </para> | 526 | </para> |
527 | 527 | ||
528 | <para> | 528 | <para> |
529 | For more information on Git, see | 529 | For more information on Git, see |
530 | <ulink url='http://git-scm.com/documentation'></ulink>. | 530 | <ulink url='http://git-scm.com/documentation'></ulink>. |
531 | If you need to download Git, go to <ulink url='http://git-scm.com/download'></ulink>. | 531 | If you need to download Git, go to <ulink url='http://git-scm.com/download'></ulink>. |
532 | </para> | 532 | </para> |
533 | 533 | ||
534 | <section id='repositories-tags-and-branches'> | 534 | <section id='repositories-tags-and-branches'> |
535 | <title>Repositories, Tags, and Branches</title> | 535 | <title>Repositories, Tags, and Branches</title> |
536 | 536 | ||
537 | <para> | 537 | <para> |
538 | As mentioned earlier in section | 538 | As mentioned earlier in section |
539 | "<link linkend='yocto-project-repositories'>Yocto Project Source Repositories</link>", | 539 | "<link linkend='yocto-project-repositories'>Yocto Project Source Repositories</link>", |
540 | the Yocto Project maintains source repositories at | 540 | the Yocto Project maintains source repositories at |
541 | <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>. | 541 | <ulink url='&YOCTO_GIT_URL;/cgit.cgi'></ulink>. |
542 | If you look at this web-interface of the repositories, each item is a separate | 542 | If you look at this web-interface of the repositories, each item is a separate |
543 | Git repository. | 543 | Git repository. |
544 | </para> | 544 | </para> |
545 | 545 | ||
546 | <para> | 546 | <para> |
547 | Git repositories use branching techniques that track content change (not files) | 547 | Git repositories use branching techniques that track content change (not files) |
548 | within a project (e.g. a new feature or updated documentation). | 548 | within a project (e.g. a new feature or updated documentation). |
549 | Creating a tree-like structure based on project divergence allows for excellent historical | 549 | Creating a tree-like structure based on project divergence allows for excellent historical |
550 | information over the life of a project. | 550 | information over the life of a project. |
551 | This methodology also allows for an environment in which you can do lots of | 551 | This methodology also allows for an environment in which you can do lots of |
552 | local experimentation on a project as you develop changes or new features. | 552 | local experimentation on a project as you develop changes or new features. |
553 | </para> | 553 | </para> |
554 | 554 | ||
555 | <para> | 555 | <para> |
556 | A Git repository represents all development efforts for a given project. | 556 | A Git repository represents all development efforts for a given project. |
557 | For example, the Git repository <filename>poky</filename> contains all changes | 557 | For example, the Git repository <filename>poky</filename> contains all changes |
558 | and developments for Poky over the course of its entire life. | 558 | and developments for Poky over the course of its entire life. |
559 | That means that all changes that make up all releases are captured. | 559 | That means that all changes that make up all releases are captured. |
560 | The repository maintains a complete history of changes. | 560 | The repository maintains a complete history of changes. |
561 | </para> | 561 | </para> |
@@ -563,8 +563,8 @@ | |||
563 | <para> | 563 | <para> |
564 | You can create a local copy of any repository by "cloning" it with the Git | 564 | You can create a local copy of any repository by "cloning" it with the Git |
565 | <filename>clone</filename> command. | 565 | <filename>clone</filename> command. |
566 | When you clone a Git repository, you end up with an identical copy of the | 566 | When you clone a Git repository, you end up with an identical copy of the |
567 | repository on your development system. | 567 | repository on your development system. |
568 | Once you have a local copy of a repository, you can take steps to develop locally. | 568 | Once you have a local copy of a repository, you can take steps to develop locally. |
569 | For examples on how to clone Git repositories, see the section | 569 | For examples on how to clone Git repositories, see the section |
570 | "<link linkend='getting-setup'>Getting Set Up</link>" earlier in this manual. | 570 | "<link linkend='getting-setup'>Getting Set Up</link>" earlier in this manual. |
@@ -572,34 +572,34 @@ | |||
572 | 572 | ||
573 | <para> | 573 | <para> |
574 | It is important to understand that Git tracks content change and not files. | 574 | It is important to understand that Git tracks content change and not files. |
575 | Git uses "branches" to organize different development efforts. | 575 | Git uses "branches" to organize different development efforts. |
576 | For example, the <filename>poky</filename> repository has | 576 | For example, the <filename>poky</filename> repository has |
577 | <filename>bernard</filename>, | 577 | <filename>bernard</filename>, |
578 | <filename>edison</filename>, <filename>denzil</filename>, <filename>danny</filename> | 578 | <filename>edison</filename>, <filename>denzil</filename>, <filename>danny</filename> |
579 | and <filename>master</filename> branches among others. | 579 | and <filename>master</filename> branches among others. |
580 | You can see all the branches by going to | 580 | You can see all the branches by going to |
581 | <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and | 581 | <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and |
582 | clicking on the | 582 | clicking on the |
583 | <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/heads'>[...]</ulink></filename> | 583 | <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/heads'>[...]</ulink></filename> |
584 | link beneath the "Branch" heading. | 584 | link beneath the "Branch" heading. |
585 | </para> | 585 | </para> |
586 | 586 | ||
587 | <para> | 587 | <para> |
588 | Each of these branches represents a specific area of development. | 588 | Each of these branches represents a specific area of development. |
589 | The <filename>master</filename> branch represents the current or most recent | 589 | The <filename>master</filename> branch represents the current or most recent |
590 | development. | 590 | development. |
591 | All other branches represent off-shoots of the <filename>master</filename> | 591 | All other branches represent off-shoots of the <filename>master</filename> |
592 | branch. | 592 | branch. |
593 | </para> | 593 | </para> |
594 | 594 | ||
595 | <para> | 595 | <para> |
596 | When you create a local copy of a Git repository, the copy has the same set | 596 | When you create a local copy of a Git repository, the copy has the same set |
597 | of branches as the original. | 597 | of branches as the original. |
598 | This means you can use Git to create a local working area (also called a branch) | 598 | This means you can use Git to create a local working area (also called a branch) |
599 | that tracks a specific development branch from the source Git repository. | 599 | that tracks a specific development branch from the source Git repository. |
600 | in other words, you can define your local Git environment to work on any development | 600 | in other words, you can define your local Git environment to work on any development |
601 | branch in the repository. | 601 | branch in the repository. |
602 | To help illustrate, here is a set of commands that creates a local copy of the | 602 | To help illustrate, here is a set of commands that creates a local copy of the |
603 | <filename>poky</filename> Git repository and then creates and checks out a local | 603 | <filename>poky</filename> Git repository and then creates and checks out a local |
604 | Git branch that tracks the Yocto Project &DISTRO; Release (&DISTRO_NAME;) development: | 604 | Git branch that tracks the Yocto Project &DISTRO; Release (&DISTRO_NAME;) development: |
605 | <literallayout class='monospaced'> | 605 | <literallayout class='monospaced'> |
@@ -608,20 +608,20 @@ | |||
608 | $ cd poky | 608 | $ cd poky |
609 | $ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME; | 609 | $ git checkout -b &DISTRO_NAME; origin/&DISTRO_NAME; |
610 | </literallayout> | 610 | </literallayout> |
611 | In this example, the name of the top-level directory of your local Yocto Project | 611 | In this example, the name of the top-level directory of your local Yocto Project |
612 | Files Git repository is <filename>poky</filename>, | 612 | Files Git repository is <filename>poky</filename>, |
613 | and the name of the local working area (or local branch) you have created and checked | 613 | and the name of the local working area (or local branch) you have created and checked |
614 | out is <filename>&DISTRO_NAME;</filename>. | 614 | out is <filename>&DISTRO_NAME;</filename>. |
615 | The files in your repository now reflect the same files that are in the | 615 | The files in your repository now reflect the same files that are in the |
616 | <filename>&DISTRO_NAME;</filename> development branch of the Yocto Project's | 616 | <filename>&DISTRO_NAME;</filename> development branch of the Yocto Project's |
617 | <filename>poky</filename> repository. | 617 | <filename>poky</filename> repository. |
618 | It is important to understand that when you create and checkout a | 618 | It is important to understand that when you create and checkout a |
619 | local working branch based on a branch name, | 619 | local working branch based on a branch name, |
620 | your local environment matches the "tip" of that development branch | 620 | your local environment matches the "tip" of that development branch |
621 | at the time you created your local branch, which could be | 621 | at the time you created your local branch, which could be |
622 | different than the files at the time of a similarly named release. | 622 | different than the files at the time of a similarly named release. |
623 | In other words, creating and checking out a local branch based on the | 623 | In other words, creating and checking out a local branch based on the |
624 | <filename>&DISTRO_NAME;</filename> branch name is not the same as | 624 | <filename>&DISTRO_NAME;</filename> branch name is not the same as |
625 | cloning and checking out the <filename>master</filename> branch. | 625 | cloning and checking out the <filename>master</filename> branch. |
626 | Keep reading to see how you create a local snapshot of a Yocto Project Release. | 626 | Keep reading to see how you create a local snapshot of a Yocto Project Release. |
627 | </para> | 627 | </para> |
@@ -629,11 +629,11 @@ | |||
629 | <para> | 629 | <para> |
630 | Git uses "tags" to mark specific changes in a repository. | 630 | Git uses "tags" to mark specific changes in a repository. |
631 | Typically, a tag is used to mark a special point such as the final change | 631 | Typically, a tag is used to mark a special point such as the final change |
632 | before a project is released. | 632 | before a project is released. |
633 | You can see the tags used with the <filename>poky</filename> Git repository | 633 | You can see the tags used with the <filename>poky</filename> Git repository |
634 | by going to <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and | 634 | by going to <ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/'></ulink> and |
635 | clicking on the | 635 | clicking on the |
636 | <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/tags'>[...]</ulink></filename> | 636 | <filename><ulink url='&YOCTO_GIT_URL;/cgit.cgi/poky/refs/tags'>[...]</ulink></filename> |
637 | link beneath the "Tag" heading. | 637 | link beneath the "Tag" heading. |
638 | </para> | 638 | </para> |
639 | 639 | ||
@@ -644,14 +644,14 @@ | |||
644 | </para> | 644 | </para> |
645 | 645 | ||
646 | <para> | 646 | <para> |
647 | When you create a local copy of the Git repository, you also have access to all the | 647 | When you create a local copy of the Git repository, you also have access to all the |
648 | tags. | 648 | tags. |
649 | Similar to branches, you can create and checkout a local working Git branch based | 649 | Similar to branches, you can create and checkout a local working Git branch based |
650 | on a tag name. | 650 | on a tag name. |
651 | When you do this, you get a snapshot of the Git repository that reflects | 651 | When you do this, you get a snapshot of the Git repository that reflects |
652 | the state of the files when the change was made associated with that tag. | 652 | the state of the files when the change was made associated with that tag. |
653 | The most common use is to checkout a working branch that matches a specific | 653 | The most common use is to checkout a working branch that matches a specific |
654 | Yocto Project release. | 654 | Yocto Project release. |
655 | Here is an example: | 655 | Here is an example: |
656 | <literallayout class='monospaced'> | 656 | <literallayout class='monospaced'> |
657 | $ cd ~ | 657 | $ cd ~ |
@@ -659,101 +659,101 @@ | |||
659 | $ cd poky | 659 | $ cd poky |
660 | $ git checkout -b my-&DISTRO_NAME;-&POKYVERSION; &DISTRO_NAME;-&POKYVERSION; | 660 | $ git checkout -b my-&DISTRO_NAME;-&POKYVERSION; &DISTRO_NAME;-&POKYVERSION; |
661 | </literallayout> | 661 | </literallayout> |
662 | In this example, the name of the top-level directory of your local Yocto Project | 662 | In this example, the name of the top-level directory of your local Yocto Project |
663 | Files Git repository is <filename>poky</filename>. | 663 | Files Git repository is <filename>poky</filename>. |
664 | And, the name of the local branch you have created and checked out is | 664 | And, the name of the local branch you have created and checked out is |
665 | <filename>my-&DISTRO_NAME;-&POKYVERSION;</filename>. | 665 | <filename>my-&DISTRO_NAME;-&POKYVERSION;</filename>. |
666 | The files in your repository now exactly match the Yocto Project &DISTRO; | 666 | The files in your repository now exactly match the Yocto Project &DISTRO; |
667 | Release tag (<filename>&DISTRO_NAME;-&POKYVERSION;</filename>). | 667 | Release tag (<filename>&DISTRO_NAME;-&POKYVERSION;</filename>). |
668 | It is important to understand that when you create and checkout a local | 668 | It is important to understand that when you create and checkout a local |
669 | working branch based on a tag, your environment matches a specific point | 669 | working branch based on a tag, your environment matches a specific point |
670 | in time and not a development branch. | 670 | in time and not a development branch. |
671 | </para> | 671 | </para> |
672 | </section> | 672 | </section> |
673 | 673 | ||
674 | <section id='basic-commands'> | 674 | <section id='basic-commands'> |
675 | <title>Basic Commands</title> | 675 | <title>Basic Commands</title> |
676 | 676 | ||
677 | <para> | 677 | <para> |
678 | Git has an extensive set of commands that lets you manage changes and perform | 678 | Git has an extensive set of commands that lets you manage changes and perform |
679 | collaboration over the life of a project. | 679 | collaboration over the life of a project. |
680 | Conveniently though, you can manage with a small set of basic operations and workflows | 680 | Conveniently though, you can manage with a small set of basic operations and workflows |
681 | once you understand the basic philosophy behind Git. | 681 | once you understand the basic philosophy behind Git. |
682 | You do not have to be an expert in Git to be functional. | 682 | You do not have to be an expert in Git to be functional. |
683 | A good place to look for instruction on a minimal set of Git commands is | 683 | A good place to look for instruction on a minimal set of Git commands is |
684 | <ulink url='http://git-scm.com/documentation'>here</ulink>. | 684 | <ulink url='http://git-scm.com/documentation'>here</ulink>. |
685 | If you need to download Git, you can do so | 685 | If you need to download Git, you can do so |
686 | <ulink url='http://git-scm.com/download'>here</ulink>. | 686 | <ulink url='http://git-scm.com/download'>here</ulink>. |
687 | </para> | 687 | </para> |
688 | 688 | ||
689 | <para> | 689 | <para> |
690 | If you don’t know much about Git, we suggest you educate | 690 | If you don’t know much about Git, we suggest you educate |
691 | yourself by visiting the links previously mentioned. | 691 | yourself by visiting the links previously mentioned. |
692 | </para> | 692 | </para> |
693 | 693 | ||
694 | <para> | 694 | <para> |
695 | The following list briefly describes some basic Git operations as a way to get started. | 695 | The following list briefly describes some basic Git operations as a way to get started. |
696 | As with any set of commands, this list (in most cases) simply shows the base command and | 696 | As with any set of commands, this list (in most cases) simply shows the base command and |
697 | omits the many arguments they support. | 697 | omits the many arguments they support. |
698 | See the Git documentation for complete descriptions and strategies on how to use these commands: | 698 | See the Git documentation for complete descriptions and strategies on how to use these commands: |
699 | <itemizedlist> | 699 | <itemizedlist> |
700 | <listitem><para><emphasis><filename>git init</filename>:</emphasis> Initializes an empty Git repository. | 700 | <listitem><para><emphasis><filename>git init</filename>:</emphasis> Initializes an empty Git repository. |
701 | You cannot use Git commands unless you have a <filename>.git</filename> repository.</para></listitem> | 701 | You cannot use Git commands unless you have a <filename>.git</filename> repository.</para></listitem> |
702 | <listitem><para><emphasis><filename>git clone</filename>:</emphasis> Creates a clone of a repository. | 702 | <listitem><para><emphasis><filename>git clone</filename>:</emphasis> Creates a clone of a repository. |
703 | During collaboration, this command allows you to create a local repository that is on | 703 | During collaboration, this command allows you to create a local repository that is on |
704 | equal footing with a fellow developer’s repository.</para></listitem> | 704 | equal footing with a fellow developer’s repository.</para></listitem> |
705 | <listitem><para><emphasis><filename>git add</filename>:</emphasis> Adds updated file contents | 705 | <listitem><para><emphasis><filename>git add</filename>:</emphasis> Adds updated file contents |
706 | to the index that | 706 | to the index that |
707 | Git uses to track changes. | 707 | Git uses to track changes. |
708 | You must add all files that have changed before you can commit them.</para></listitem> | 708 | You must add all files that have changed before you can commit them.</para></listitem> |
709 | <listitem><para><emphasis><filename>git commit</filename>:</emphasis> Creates a “commit” that documents | 709 | <listitem><para><emphasis><filename>git commit</filename>:</emphasis> Creates a “commit” that documents |
710 | the changes you made. | 710 | the changes you made. |
711 | Commits are used for historical purposes, for determining if a maintainer of a project | 711 | Commits are used for historical purposes, for determining if a maintainer of a project |
712 | will allow the change, and for ultimately pushing the change from your local Git repository | 712 | will allow the change, and for ultimately pushing the change from your local Git repository |
713 | into the project’s upstream (or master) repository.</para></listitem> | 713 | into the project’s upstream (or master) repository.</para></listitem> |
714 | <listitem><para><emphasis><filename>git status</filename>:</emphasis> Reports any modified files that | 714 | <listitem><para><emphasis><filename>git status</filename>:</emphasis> Reports any modified files that |
715 | possibly need to be added and committed.</para></listitem> | 715 | possibly need to be added and committed.</para></listitem> |
716 | <listitem><para><emphasis><filename>git checkout <branch-name></filename>:</emphasis> Changes | 716 | <listitem><para><emphasis><filename>git checkout <branch-name></filename>:</emphasis> Changes |
717 | your working branch. | 717 | your working branch. |
718 | This command is analogous to “cd”.</para></listitem> | 718 | This command is analogous to “cd”.</para></listitem> |
719 | <listitem><para><emphasis><filename>git checkout –b <working-branch></filename>:</emphasis> Creates | 719 | <listitem><para><emphasis><filename>git checkout –b <working-branch></filename>:</emphasis> Creates |
720 | a working branch on your local machine where you can isolate work. | 720 | a working branch on your local machine where you can isolate work. |
721 | It is a good idea to use local branches when adding specific features or changes. | 721 | It is a good idea to use local branches when adding specific features or changes. |
722 | This way if you don’t like what you have done you can easily get rid of the work.</para></listitem> | 722 | This way if you don’t like what you have done you can easily get rid of the work.</para></listitem> |
723 | <listitem><para><emphasis><filename>git branch</filename>:</emphasis> Reports | 723 | <listitem><para><emphasis><filename>git branch</filename>:</emphasis> Reports |
724 | existing local branches and | 724 | existing local branches and |
725 | tells you the branch in which you are currently working.</para></listitem> | 725 | tells you the branch in which you are currently working.</para></listitem> |
726 | <listitem><para><emphasis><filename>git branch -D <branch-name></filename>:</emphasis> | 726 | <listitem><para><emphasis><filename>git branch -D <branch-name></filename>:</emphasis> |
727 | Deletes an existing local branch. | 727 | Deletes an existing local branch. |
728 | You need to be in a local branch other than the one you are deleting | 728 | You need to be in a local branch other than the one you are deleting |
729 | in order to delete <filename><branch-name></filename>.</para></listitem> | 729 | in order to delete <filename><branch-name></filename>.</para></listitem> |
730 | <listitem><para><emphasis><filename>git pull</filename>:</emphasis> Retrieves information | 730 | <listitem><para><emphasis><filename>git pull</filename>:</emphasis> Retrieves information |
731 | from an upstream Git | 731 | from an upstream Git |
732 | repository and places it in your local Git repository. | 732 | repository and places it in your local Git repository. |
733 | You use this command to make sure you are synchronized with the repository | 733 | You use this command to make sure you are synchronized with the repository |
734 | from which you are basing changes (.e.g. the master branch).</para></listitem> | 734 | from which you are basing changes (.e.g. the master branch).</para></listitem> |
735 | <listitem><para><emphasis><filename>git push</filename>:</emphasis> Sends all your local changes you | 735 | <listitem><para><emphasis><filename>git push</filename>:</emphasis> Sends all your local changes you |
736 | have committed to an upstream Git repository (e.g. a contribution repository). | 736 | have committed to an upstream Git repository (e.g. a contribution repository). |
737 | The maintainer of the project draws from these repositories when adding your changes to the | 737 | The maintainer of the project draws from these repositories when adding your changes to the |
738 | project’s master repository.</para></listitem> | 738 | project’s master repository.</para></listitem> |
739 | <listitem><para><emphasis><filename>git merge</filename>:</emphasis> Combines or adds changes from one | 739 | <listitem><para><emphasis><filename>git merge</filename>:</emphasis> Combines or adds changes from one |
740 | local branch of your repository with another branch. | 740 | local branch of your repository with another branch. |
741 | When you create a local Git repository, the default branch is named “master”. | 741 | When you create a local Git repository, the default branch is named “master”. |
742 | A typical workflow is to create a temporary branch for isolated work, make and commit your | 742 | A typical workflow is to create a temporary branch for isolated work, make and commit your |
743 | changes, switch to your local master branch, merge the changes from the temporary branch into the | 743 | changes, switch to your local master branch, merge the changes from the temporary branch into the |
744 | local master branch, and then delete the temporary branch.</para></listitem> | 744 | local master branch, and then delete the temporary branch.</para></listitem> |
745 | <listitem><para><emphasis><filename>git cherry-pick</filename>:</emphasis> Choose and apply specific | 745 | <listitem><para><emphasis><filename>git cherry-pick</filename>:</emphasis> Choose and apply specific |
746 | commits from one branch into another branch. | 746 | commits from one branch into another branch. |
747 | There are times when you might not be able to merge all the changes in one branch with | 747 | There are times when you might not be able to merge all the changes in one branch with |
748 | another but need to pick out certain ones.</para></listitem> | 748 | another but need to pick out certain ones.</para></listitem> |
749 | <listitem><para><emphasis><filename>gitk</filename>:</emphasis> Provides a GUI view of the branches | 749 | <listitem><para><emphasis><filename>gitk</filename>:</emphasis> Provides a GUI view of the branches |
750 | and changes in your local Git repository. | 750 | and changes in your local Git repository. |
751 | This command is a good way to graphically see where things have diverged in your | 751 | This command is a good way to graphically see where things have diverged in your |
752 | local repository.</para></listitem> | 752 | local repository.</para></listitem> |
753 | <listitem><para><emphasis><filename>git log</filename>:</emphasis> Reports a history of your changes to the | 753 | <listitem><para><emphasis><filename>git log</filename>:</emphasis> Reports a history of your changes to the |
754 | repository.</para></listitem> | 754 | repository.</para></listitem> |
755 | <listitem><para><emphasis><filename>git diff</filename>:</emphasis> Displays line-by-line differences | 755 | <listitem><para><emphasis><filename>git diff</filename>:</emphasis> Displays line-by-line differences |
756 | between your local working files and the same files in the upstream Git repository that your | 756 | between your local working files and the same files in the upstream Git repository that your |
757 | branch currently tracks.</para></listitem> | 757 | branch currently tracks.</para></listitem> |
758 | </itemizedlist> | 758 | </itemizedlist> |
759 | </para> | 759 | </para> |
@@ -764,130 +764,130 @@ | |||
764 | <title>Workflows</title> | 764 | <title>Workflows</title> |
765 | 765 | ||
766 | <para> | 766 | <para> |
767 | This section provides some overview on workflows using Git. | 767 | This section provides some overview on workflows using Git. |
768 | In particular, the information covers basic practices that describe roles and actions in a | 768 | In particular, the information covers basic practices that describe roles and actions in a |
769 | collaborative development environment. | 769 | collaborative development environment. |
770 | Again, if you are familiar with this type of development environment, you might want to just | 770 | Again, if you are familiar with this type of development environment, you might want to just |
771 | skip this section. | 771 | skip this section. |
772 | </para> | 772 | </para> |
773 | 773 | ||
774 | <para> | 774 | <para> |
775 | The Yocto Project files are maintained using Git in a "master" branch whose Git history | 775 | The Yocto Project files are maintained using Git in a "master" branch whose Git history |
776 | tracks every change and whose structure provides branches for all diverging functionality. | 776 | tracks every change and whose structure provides branches for all diverging functionality. |
777 | Although there is no need to use Git, many open source projects do so. | 777 | Although there is no need to use Git, many open source projects do so. |
778 | For the Yocto Project, a key individual called the "maintainer" is responsible for the "master" | 778 | For the Yocto Project, a key individual called the "maintainer" is responsible for the "master" |
779 | branch of the Git repository. | 779 | branch of the Git repository. |
780 | The "master" branch is the “upstream” repository where the final builds of the project occur. | 780 | The "master" branch is the “upstream” repository where the final builds of the project occur. |
781 | The maintainer is responsible for allowing changes in from other developers and for | 781 | The maintainer is responsible for allowing changes in from other developers and for |
782 | organizing the underlying branch structure to reflect release strategies and so forth. | 782 | organizing the underlying branch structure to reflect release strategies and so forth. |
783 | <note>You can see who is the maintainer for Yocto Project files by examining the | 783 | <note>You can see who is the maintainer for Yocto Project files by examining the |
784 | <filename>maintainers.inc</filename> file in the Yocto Project | 784 | <filename>maintainers.inc</filename> file in the Yocto Project |
785 | <filename>meta-yocto/conf/distro/include</filename> directory.</note> | 785 | <filename>meta-yocto/conf/distro/include</filename> directory.</note> |
786 | </para> | 786 | </para> |
787 | 787 | ||
788 | <para> | 788 | <para> |
789 | The project also has contribution repositories known as “contrib” areas. | 789 | The project also has contribution repositories known as “contrib” areas. |
790 | These areas temporarily hold changes to the project that have been submitted or committed | 790 | These areas temporarily hold changes to the project that have been submitted or committed |
791 | by the Yocto Project development team and by community members that contribute to the project. | 791 | by the Yocto Project development team and by community members that contribute to the project. |
792 | The maintainer determines if the changes are qualified to be moved from the "contrib" areas | 792 | The maintainer determines if the changes are qualified to be moved from the "contrib" areas |
793 | into the "master" branch of the Git repository. | 793 | into the "master" branch of the Git repository. |
794 | </para> | 794 | </para> |
795 | 795 | ||
796 | <para> | 796 | <para> |
797 | Developers (including contributing community members) create and maintain cloned repositories | 797 | Developers (including contributing community members) create and maintain cloned repositories |
798 | of the upstream "master" branch. | 798 | of the upstream "master" branch. |
799 | These repositories are local to their development platforms and are used to develop changes. | 799 | These repositories are local to their development platforms and are used to develop changes. |
800 | When a developer is satisfied with a particular feature or change, they “push” the changes | 800 | When a developer is satisfied with a particular feature or change, they “push” the changes |
801 | to the appropriate "contrib" repository. | 801 | to the appropriate "contrib" repository. |
802 | </para> | 802 | </para> |
803 | 803 | ||
804 | <para> | 804 | <para> |
805 | Developers are responsible for keeping their local repository up-to-date with "master". | 805 | Developers are responsible for keeping their local repository up-to-date with "master". |
806 | They are also responsible for straightening out any conflicts that might arise within files | 806 | They are also responsible for straightening out any conflicts that might arise within files |
807 | that are being worked on simultaneously by more than one person. | 807 | that are being worked on simultaneously by more than one person. |
808 | All this work is done locally on the developer’s machine before anything is pushed to a | 808 | All this work is done locally on the developer’s machine before anything is pushed to a |
809 | "contrib" area and examined at the maintainer’s level. | 809 | "contrib" area and examined at the maintainer’s level. |
810 | </para> | 810 | </para> |
811 | 811 | ||
812 | <para> | 812 | <para> |
813 | A somewhat formal method exists by which developers commit changes and push them into the | 813 | A somewhat formal method exists by which developers commit changes and push them into the |
814 | "contrib" area and subsequently request that the maintainer include them into "master" | 814 | "contrib" area and subsequently request that the maintainer include them into "master" |
815 | This process is called “submitting a patch” or “submitting a change.” | 815 | This process is called “submitting a patch” or “submitting a change.” |
816 | For information on submitting patches and changes, see the | 816 | For information on submitting patches and changes, see the |
817 | "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>" section. | 817 | "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>" section. |
818 | </para> | 818 | </para> |
819 | 819 | ||
820 | <para> | 820 | <para> |
821 | To summarize the environment: we have a single point of entry for changes into the project’s | 821 | To summarize the environment: we have a single point of entry for changes into the project’s |
822 | "master" branch of the Git repository, which is controlled by the project’s maintainer. | 822 | "master" branch of the Git repository, which is controlled by the project’s maintainer. |
823 | And, we have a set of developers who independently develop, test, and submit changes | 823 | And, we have a set of developers who independently develop, test, and submit changes |
824 | to "contrib" areas for the maintainer to examine. | 824 | to "contrib" areas for the maintainer to examine. |
825 | The maintainer then chooses which changes are going to become a permanent part of the project. | 825 | The maintainer then chooses which changes are going to become a permanent part of the project. |
826 | </para> | 826 | </para> |
827 | 827 | ||
828 | <para> | 828 | <para> |
829 | <imagedata fileref="figures/git-workflow.png" width="6in" depth="3in" align="left" scalefit="1" /> | 829 | <imagedata fileref="figures/git-workflow.png" width="6in" depth="3in" align="left" scalefit="1" /> |
830 | </para> | 830 | </para> |
831 | 831 | ||
832 | <para> | 832 | <para> |
833 | While each development environment is unique, there are some best practices or methods | 833 | While each development environment is unique, there are some best practices or methods |
834 | that help development run smoothly. | 834 | that help development run smoothly. |
835 | The following list describes some of these practices. | 835 | The following list describes some of these practices. |
836 | For more information about Git workflows, see the workflow topics in the | 836 | For more information about Git workflows, see the workflow topics in the |
837 | <ulink url='http://book.git-scm.com'>Git Community Book</ulink>. | 837 | <ulink url='http://book.git-scm.com'>Git Community Book</ulink>. |
838 | <itemizedlist> | 838 | <itemizedlist> |
839 | <listitem><para><emphasis>Make Small Changes:</emphasis> It is best to keep the changes you commit | 839 | <listitem><para><emphasis>Make Small Changes:</emphasis> It is best to keep the changes you commit |
840 | small as compared to bundling many disparate changes into a single commit. | 840 | small as compared to bundling many disparate changes into a single commit. |
841 | This practice not only keeps things manageable but also allows the maintainer | 841 | This practice not only keeps things manageable but also allows the maintainer |
842 | to more easily include or refuse changes.</para> | 842 | to more easily include or refuse changes.</para> |
843 | <para>It is also good practice to leave the repository in a state that allows you to | 843 | <para>It is also good practice to leave the repository in a state that allows you to |
844 | still successfully build your project. In other words, do not commit half of a feature, | 844 | still successfully build your project. In other words, do not commit half of a feature, |
845 | then add the other half in a separate, later commit. | 845 | then add the other half in a separate, later commit. |
846 | Each commit should take you from one buildable project state to another | 846 | Each commit should take you from one buildable project state to another |
847 | buildable state.</para></listitem> | 847 | buildable state.</para></listitem> |
848 | <listitem><para><emphasis>Use Branches Liberally:</emphasis> It is very easy to create, use, and | 848 | <listitem><para><emphasis>Use Branches Liberally:</emphasis> It is very easy to create, use, and |
849 | delete local branches in your working Git repository. | 849 | delete local branches in your working Git repository. |
850 | You can name these branches anything you like. | 850 | You can name these branches anything you like. |
851 | It is helpful to give them names associated with the particular feature or change | 851 | It is helpful to give them names associated with the particular feature or change |
852 | on which you are working. | 852 | on which you are working. |
853 | Once you are done with a feature or change, simply discard the branch.</para></listitem> | 853 | Once you are done with a feature or change, simply discard the branch.</para></listitem> |
854 | <listitem><para><emphasis>Merge Changes:</emphasis> The <filename>git merge</filename> | 854 | <listitem><para><emphasis>Merge Changes:</emphasis> The <filename>git merge</filename> |
855 | command allows you to take the | 855 | command allows you to take the |
856 | changes from one branch and fold them into another branch. | 856 | changes from one branch and fold them into another branch. |
857 | This process is especially helpful when more than a single developer might be working | 857 | This process is especially helpful when more than a single developer might be working |
858 | on different parts of the same feature. | 858 | on different parts of the same feature. |
859 | Merging changes also automatically identifies any collisions or “conflicts” | 859 | Merging changes also automatically identifies any collisions or “conflicts” |
860 | that might happen as a result of the same lines of code being altered by two different | 860 | that might happen as a result of the same lines of code being altered by two different |
861 | developers.</para></listitem> | 861 | developers.</para></listitem> |
862 | <listitem><para><emphasis>Manage Branches:</emphasis> Because branches are easy to use, you should | 862 | <listitem><para><emphasis>Manage Branches:</emphasis> Because branches are easy to use, you should |
863 | use a system where branches indicate varying levels of code readiness. | 863 | use a system where branches indicate varying levels of code readiness. |
864 | For example, you can have a “work” branch to develop in, a “test” branch where the code or | 864 | For example, you can have a “work” branch to develop in, a “test” branch where the code or |
865 | change is tested, a “stage” branch where changes are ready to be committed, and so forth. | 865 | change is tested, a “stage” branch where changes are ready to be committed, and so forth. |
866 | As your project develops, you can merge code across the branches to reflect ever-increasing | 866 | As your project develops, you can merge code across the branches to reflect ever-increasing |
867 | stable states of the development.</para></listitem> | 867 | stable states of the development.</para></listitem> |
868 | <listitem><para><emphasis>Use Push and Pull:</emphasis> The push-pull workflow is based on the | 868 | <listitem><para><emphasis>Use Push and Pull:</emphasis> The push-pull workflow is based on the |
869 | concept of developers “pushing” local commits to a remote repository, which is | 869 | concept of developers “pushing” local commits to a remote repository, which is |
870 | usually a contribution repository. | 870 | usually a contribution repository. |
871 | This workflow is also based on developers “pulling” known states of the project down into their | 871 | This workflow is also based on developers “pulling” known states of the project down into their |
872 | local development repositories. | 872 | local development repositories. |
873 | The workflow easily allows you to pull changes submitted by other developers from the | 873 | The workflow easily allows you to pull changes submitted by other developers from the |
874 | upstream repository into your work area ensuring that you have the most recent software | 874 | upstream repository into your work area ensuring that you have the most recent software |
875 | on which to develop. | 875 | on which to develop. |
876 | The Yocto Project has two scripts named <filename>create-pull-request</filename> and | 876 | The Yocto Project has two scripts named <filename>create-pull-request</filename> and |
877 | <filename>send-pull-request</filename> that ship with the release to facilitate this | 877 | <filename>send-pull-request</filename> that ship with the release to facilitate this |
878 | workflow. | 878 | workflow. |
879 | You can find these scripts in the local Yocto Project files Git repository in | 879 | You can find these scripts in the local Yocto Project files Git repository in |
880 | the <filename>scripts</filename> directory.</para> | 880 | the <filename>scripts</filename> directory.</para> |
881 | <para>You can find more information on these scripts in the | 881 | <para>You can find more information on these scripts in the |
882 | "<link linkend='pushing-a-change-upstream'>Using | 882 | "<link linkend='pushing-a-change-upstream'>Using |
883 | Scripts to Push a Change Upstream and Request a Pull</link>" section. | 883 | Scripts to Push a Change Upstream and Request a Pull</link>" section. |
884 | </para></listitem> | 884 | </para></listitem> |
885 | <listitem><para><emphasis>Patch Workflow:</emphasis> This workflow allows you to notify the | 885 | <listitem><para><emphasis>Patch Workflow:</emphasis> This workflow allows you to notify the |
886 | maintainer through an email that you have a change (or patch) you would like considered | 886 | maintainer through an email that you have a change (or patch) you would like considered |
887 | for the "master" branch of the Git repository. | 887 | for the "master" branch of the Git repository. |
888 | To send this type of change you format the patch and then send the email using the Git commands | 888 | To send this type of change you format the patch and then send the email using the Git commands |
889 | <filename>git format-patch</filename> and <filename>git send-email</filename>. | 889 | <filename>git format-patch</filename> and <filename>git send-email</filename>. |
890 | You can find information on how to submit changes | 890 | You can find information on how to submit changes |
891 | later in this chapter.</para></listitem> | 891 | later in this chapter.</para></listitem> |
892 | </itemizedlist> | 892 | </itemizedlist> |
893 | </para> | 893 | </para> |
@@ -897,24 +897,24 @@ | |||
897 | <title>Tracking Bugs</title> | 897 | <title>Tracking Bugs</title> |
898 | 898 | ||
899 | <para> | 899 | <para> |
900 | The Yocto Project uses its own implementation of | 900 | The Yocto Project uses its own implementation of |
901 | <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink> to track bugs. | 901 | <ulink url='http://www.bugzilla.org/about/'>Bugzilla</ulink> to track bugs. |
902 | Implementations of Bugzilla work well for group development because they track bugs and code | 902 | Implementations of Bugzilla work well for group development because they track bugs and code |
903 | changes, can be used to communicate changes and problems with developers, can be used to | 903 | changes, can be used to communicate changes and problems with developers, can be used to |
904 | submit and review patches, and can be used to manage quality assurance. | 904 | submit and review patches, and can be used to manage quality assurance. |
905 | The home page for the Yocto Project implementation of Bugzilla is | 905 | The home page for the Yocto Project implementation of Bugzilla is |
906 | <ulink url='&YOCTO_BUGZILLA_URL;'>&YOCTO_BUGZILLA_URL;</ulink>. | 906 | <ulink url='&YOCTO_BUGZILLA_URL;'>&YOCTO_BUGZILLA_URL;</ulink>. |
907 | </para> | 907 | </para> |
908 | 908 | ||
909 | <para> | 909 | <para> |
910 | Sometimes it is helpful to submit, investigate, or track a bug against the Yocto Project itself | 910 | Sometimes it is helpful to submit, investigate, or track a bug against the Yocto Project itself |
911 | such as when discovering an issue with some component of the build system that acts contrary | 911 | such as when discovering an issue with some component of the build system that acts contrary |
912 | to the documentation or your expectations. | 912 | to the documentation or your expectations. |
913 | Following is the general procedure for submitting a new bug using the Yocto Project | 913 | Following is the general procedure for submitting a new bug using the Yocto Project |
914 | Bugzilla. | 914 | Bugzilla. |
915 | You can find more information on defect management, bug tracking, and feature request | 915 | You can find more information on defect management, bug tracking, and feature request |
916 | processes all accomplished through the Yocto Project Bugzilla on the wiki page | 916 | processes all accomplished through the Yocto Project Bugzilla on the wiki page |
917 | <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>here</ulink>. | 917 | <ulink url='&YOCTO_WIKI_URL;/wiki/Bugzilla_Configuration_and_Bug_Tracking'>here</ulink>. |
918 | <orderedlist> | 918 | <orderedlist> |
919 | <listitem><para>Always use the Yocto Project implementation of Bugzilla to submit | 919 | <listitem><para>Always use the Yocto Project implementation of Bugzilla to submit |
920 | a bug.</para></listitem> | 920 | a bug.</para></listitem> |
@@ -922,21 +922,21 @@ | |||
922 | Classification, Product, and Component for which the issue was found. | 922 | Classification, Product, and Component for which the issue was found. |
923 | Defects for Yocto Project fall into one of six classifications: Yocto Project | 923 | Defects for Yocto Project fall into one of six classifications: Yocto Project |
924 | Components, Infrastructure, Build System & Metadata, Documentation, | 924 | Components, Infrastructure, Build System & Metadata, Documentation, |
925 | QA/Testing, and Runtime. | 925 | QA/Testing, and Runtime. |
926 | Each of these Classifications break down into multiple Products and, in some | 926 | Each of these Classifications break down into multiple Products and, in some |
927 | cases, multiple Components.</para></listitem> | 927 | cases, multiple Components.</para></listitem> |
928 | <listitem><para>Use the bug form to choose the correct Hardware and Architecture | 928 | <listitem><para>Use the bug form to choose the correct Hardware and Architecture |
929 | for which the bug applies.</para></listitem> | 929 | for which the bug applies.</para></listitem> |
930 | <listitem><para>Indicate the Yocto Project version you were using when the issue | 930 | <listitem><para>Indicate the Yocto Project version you were using when the issue |
931 | occurred.</para></listitem> | 931 | occurred.</para></listitem> |
932 | <listitem><para>Be sure to indicate the Severity of the bug. | 932 | <listitem><para>Be sure to indicate the Severity of the bug. |
933 | Severity communicates how the bug impacted your work.</para></listitem> | 933 | Severity communicates how the bug impacted your work.</para></listitem> |
934 | <listitem><para>Provide a brief summary of the issue. | 934 | <listitem><para>Provide a brief summary of the issue. |
935 | Try to limit your summary to just a line or two and be sure to capture the | 935 | Try to limit your summary to just a line or two and be sure to capture the |
936 | essence of the issue.</para></listitem> | 936 | essence of the issue.</para></listitem> |
937 | <listitem><para>Provide a detailed description of the issue. | 937 | <listitem><para>Provide a detailed description of the issue. |
938 | You should provide as much detail as you can about the context, behavior, output, | 938 | You should provide as much detail as you can about the context, behavior, output, |
939 | and so forth that surround the issue. | 939 | and so forth that surround the issue. |
940 | You can even attach supporting files for output or log by using the "Add an attachment" | 940 | You can even attach supporting files for output or log by using the "Add an attachment" |
941 | button.</para></listitem> | 941 | button.</para></listitem> |
942 | <listitem><para>Submit the bug by clicking the "Submit Bug" button.</para></listitem> | 942 | <listitem><para>Submit the bug by clicking the "Submit Bug" button.</para></listitem> |
@@ -954,7 +954,7 @@ | |||
954 | You should send patches to the appropriate mailing list so that they | 954 | You should send patches to the appropriate mailing list so that they |
955 | can be reviewed and merged by the appropriate maintainer. | 955 | can be reviewed and merged by the appropriate maintainer. |
956 | For a list of the Yocto Project and related mailing lists, see the | 956 | For a list of the Yocto Project and related mailing lists, see the |
957 | "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing lists</ulink>" section in | 957 | "<ulink url='&YOCTO_DOCS_REF_URL;#resources-mailinglist'>Mailing lists</ulink>" section in |
958 | the Yocto Project Reference Manual. | 958 | the Yocto Project Reference Manual. |
959 | </para> | 959 | </para> |
960 | 960 | ||
@@ -971,7 +971,7 @@ | |||
971 | <ulink url='&OE_LISTS_URL;/listinfo/bitbake-devel'>bitbake-devel</ulink> mailing list.</para></listitem> | 971 | <ulink url='&OE_LISTS_URL;/listinfo/bitbake-devel'>bitbake-devel</ulink> mailing list.</para></listitem> |
972 | <listitem><para>For changes to <filename>meta-yocto</filename>, send your patch to the | 972 | <listitem><para>For changes to <filename>meta-yocto</filename>, send your patch to the |
973 | <ulink url='&YOCTO_LISTS_URL;/listinfo/poky'>poky</ulink> mailing list.</para></listitem> | 973 | <ulink url='&YOCTO_LISTS_URL;/listinfo/poky'>poky</ulink> mailing list.</para></listitem> |
974 | <listitem><para>For changes to other layers hosted on | 974 | <listitem><para>For changes to other layers hosted on |
975 | <filename>yoctoproject.org</filename> (unless the | 975 | <filename>yoctoproject.org</filename> (unless the |
976 | layer's documentation specifies otherwise), tools, and Yocto Project | 976 | layer's documentation specifies otherwise), tools, and Yocto Project |
977 | documentation, use the | 977 | documentation, use the |
@@ -983,12 +983,12 @@ | |||
983 | <ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'>yocto</ulink> or | 983 | <ulink url='&YOCTO_LISTS_URL;/listinfo/yocto'>yocto</ulink> or |
984 | <ulink url='&OE_LISTS_URL;/listinfo/openembedded-devel'>openembedded-devel</ulink> | 984 | <ulink url='&OE_LISTS_URL;/listinfo/openembedded-devel'>openembedded-devel</ulink> |
985 | mailing lists.</para></listitem> | 985 | mailing lists.</para></listitem> |
986 | </itemizedlist> | 986 | </itemizedlist> |
987 | </para> | 987 | </para> |
988 | 988 | ||
989 | <para> | 989 | <para> |
990 | When you send a patch, be sure to include a "Signed-off-by:" | 990 | When you send a patch, be sure to include a "Signed-off-by:" |
991 | line in the same style as required by the Linux kernel. | 991 | line in the same style as required by the Linux kernel. |
992 | Adding this line signifies that you, the submitter, have agreed to the Developer's Certificate of Origin 1.1 | 992 | Adding this line signifies that you, the submitter, have agreed to the Developer's Certificate of Origin 1.1 |
993 | as follows: | 993 | as follows: |
994 | <literallayout class='monospaced'> | 994 | <literallayout class='monospaced'> |
@@ -1021,8 +1021,8 @@ | |||
1021 | </para> | 1021 | </para> |
1022 | 1022 | ||
1023 | <para> | 1023 | <para> |
1024 | In a collaborative environment, it is necessary to have some sort of standard | 1024 | In a collaborative environment, it is necessary to have some sort of standard |
1025 | or method through which you submit changes. | 1025 | or method through which you submit changes. |
1026 | Otherwise, things could get quite chaotic. | 1026 | Otherwise, things could get quite chaotic. |
1027 | One general practice to follow is to make small, controlled changes. | 1027 | One general practice to follow is to make small, controlled changes. |
1028 | Keeping changes small and isolated aids review, makes merging/rebasing easier | 1028 | Keeping changes small and isolated aids review, makes merging/rebasing easier |
@@ -1035,14 +1035,14 @@ | |||
1035 | For each commit, you must provide a single-line summary of the change and you | 1035 | For each commit, you must provide a single-line summary of the change and you |
1036 | should almost always provide a more detailed description of what you did (i.e. | 1036 | should almost always provide a more detailed description of what you did (i.e. |
1037 | the body of the commit message). | 1037 | the body of the commit message). |
1038 | The only exceptions for not providing a detailed description would be if your | 1038 | The only exceptions for not providing a detailed description would be if your |
1039 | change is a simple, self-explanatory change that needs no further description | 1039 | change is a simple, self-explanatory change that needs no further description |
1040 | beyond the summary. | 1040 | beyond the summary. |
1041 | Here are the guidelines for composing a commit message: | 1041 | Here are the guidelines for composing a commit message: |
1042 | <itemizedlist> | 1042 | <itemizedlist> |
1043 | <listitem><para>Provide a single-line, short summary of the change. | 1043 | <listitem><para>Provide a single-line, short summary of the change. |
1044 | This summary is typically viewable in the "shortlist" of changes. | 1044 | This summary is typically viewable in the "shortlist" of changes. |
1045 | Thus, providing something short and descriptive that gives the reader | 1045 | Thus, providing something short and descriptive that gives the reader |
1046 | a summary of the change is useful when viewing a list of many commits. | 1046 | a summary of the change is useful when viewing a list of many commits. |
1047 | This should be prefixed by the recipe name (if changing a recipe), or | 1047 | This should be prefixed by the recipe name (if changing a recipe), or |
1048 | else the short form path to the file being changed. | 1048 | else the short form path to the file being changed. |
@@ -1052,7 +1052,7 @@ | |||
1052 | you used. It may also be helpful if you mention how you tested the change. | 1052 | you used. It may also be helpful if you mention how you tested the change. |
1053 | Provide as much detail as you can in the body of the commit message. | 1053 | Provide as much detail as you can in the body of the commit message. |
1054 | </para></listitem> | 1054 | </para></listitem> |
1055 | <listitem><para>If the change addresses a specific bug or issue that is | 1055 | <listitem><para>If the change addresses a specific bug or issue that is |
1056 | associated with a bug-tracking ID, include a reference to that ID in | 1056 | associated with a bug-tracking ID, include a reference to that ID in |
1057 | your detailed description. | 1057 | your detailed description. |
1058 | For example, the Yocto Project uses a specific convention for bug | 1058 | For example, the Yocto Project uses a specific convention for bug |
@@ -1069,15 +1069,15 @@ | |||
1069 | </para> | 1069 | </para> |
1070 | 1070 | ||
1071 | <para> | 1071 | <para> |
1072 | You can find more guidance on creating well-formed commit messages at this OpenEmbedded | 1072 | You can find more guidance on creating well-formed commit messages at this OpenEmbedded |
1073 | wiki page: | 1073 | wiki page: |
1074 | <ulink url='&OE_HOME_URL;/wiki/Commit_Patch_Message_Guidelines'></ulink>. | 1074 | <ulink url='&OE_HOME_URL;/wiki/Commit_Patch_Message_Guidelines'></ulink>. |
1075 | </para> | 1075 | </para> |
1076 | 1076 | ||
1077 | <para> | 1077 | <para> |
1078 | Following are general instructions for both pushing changes upstream and for submitting | 1078 | Following are general instructions for both pushing changes upstream and for submitting |
1079 | changes as patches. | 1079 | changes as patches. |
1080 | </para> | 1080 | </para> |
1081 | 1081 | ||
1082 | <section id='pushing-a-change-upstream'> | 1082 | <section id='pushing-a-change-upstream'> |
1083 | <title>Using Scripts to Push a Change Upstream and Request a Pull</title> | 1083 | <title>Using Scripts to Push a Change Upstream and Request a Pull</title> |
@@ -1089,23 +1089,23 @@ | |||
1089 | <listitem><para>Stage your changes by using the <filename>git add</filename> | 1089 | <listitem><para>Stage your changes by using the <filename>git add</filename> |
1090 | command on each file you changed.</para></listitem> | 1090 | command on each file you changed.</para></listitem> |
1091 | <listitem><para>Commit the change by using the <filename>git commit</filename> | 1091 | <listitem><para>Commit the change by using the <filename>git commit</filename> |
1092 | command and push it to the "contrib" repository. | 1092 | command and push it to the "contrib" repository. |
1093 | Be sure to provide a commit message that follows the project’s commit message standards | 1093 | Be sure to provide a commit message that follows the project’s commit message standards |
1094 | as described earlier.</para></listitem> | 1094 | as described earlier.</para></listitem> |
1095 | <listitem><para>Notify the maintainer that you have pushed a change by making a pull | 1095 | <listitem><para>Notify the maintainer that you have pushed a change by making a pull |
1096 | request. | 1096 | request. |
1097 | The Yocto Project provides two scripts that conveniently let you generate and send | 1097 | The Yocto Project provides two scripts that conveniently let you generate and send |
1098 | pull requests to the Yocto Project. | 1098 | pull requests to the Yocto Project. |
1099 | These scripts are <filename>create-pull-request</filename> and | 1099 | These scripts are <filename>create-pull-request</filename> and |
1100 | <filename>send-pull-request</filename>. | 1100 | <filename>send-pull-request</filename>. |
1101 | You can find these scripts in the <filename>scripts</filename> directory | 1101 | You can find these scripts in the <filename>scripts</filename> directory |
1102 | within the <link linkend='source-directory'>Source Directory</link>.</para> | 1102 | within the <link linkend='source-directory'>Source Directory</link>.</para> |
1103 | <para>Using these scripts correctly formats the requests without introducing any | 1103 | <para>Using these scripts correctly formats the requests without introducing any |
1104 | whitespace or HTML formatting. | 1104 | whitespace or HTML formatting. |
1105 | The maintainer that receives your patches needs to be able to save and apply them | 1105 | The maintainer that receives your patches needs to be able to save and apply them |
1106 | directly from your emails. | 1106 | directly from your emails. |
1107 | Using these scripts is the preferred method for sending patches.</para> | 1107 | Using these scripts is the preferred method for sending patches.</para> |
1108 | <para>For help on using these scripts, simply provide the | 1108 | <para>For help on using these scripts, simply provide the |
1109 | <filename>-h</filename> argument as follows: | 1109 | <filename>-h</filename> argument as follows: |
1110 | <literallayout class='monospaced'> | 1110 | <literallayout class='monospaced'> |
1111 | $ ~/poky/scripts/create-pull-request -h | 1111 | $ ~/poky/scripts/create-pull-request -h |
@@ -1114,8 +1114,8 @@ | |||
1114 | </itemizedlist> | 1114 | </itemizedlist> |
1115 | </para> | 1115 | </para> |
1116 | 1116 | ||
1117 | <para> | 1117 | <para> |
1118 | You can find general Git information on how to push a change upstream in the | 1118 | You can find general Git information on how to push a change upstream in the |
1119 | <ulink url='http://book.git-scm.com/3_distributed_workflows.html'>Git Community Book</ulink>. | 1119 | <ulink url='http://book.git-scm.com/3_distributed_workflows.html'>Git Community Book</ulink>. |
1120 | </para> | 1120 | </para> |
1121 | </section> | 1121 | </section> |
@@ -1124,7 +1124,7 @@ | |||
1124 | <title>Using Email to Submit a Patch</title> | 1124 | <title>Using Email to Submit a Patch</title> |
1125 | 1125 | ||
1126 | <para> | 1126 | <para> |
1127 | You can submit patches without using the <filename>create-pull-request</filename> and | 1127 | You can submit patches without using the <filename>create-pull-request</filename> and |
1128 | <filename>send-pull-request</filename> scripts described in the previous section. | 1128 | <filename>send-pull-request</filename> scripts described in the previous section. |
1129 | Keep in mind, the preferred method is to use the scripts, however. | 1129 | Keep in mind, the preferred method is to use the scripts, however. |
1130 | </para> | 1130 | </para> |
@@ -1132,7 +1132,7 @@ | |||
1132 | <para> | 1132 | <para> |
1133 | Depending on the components changed, you need to submit the email to a specific | 1133 | Depending on the components changed, you need to submit the email to a specific |
1134 | mailing list. | 1134 | mailing list. |
1135 | For some guidance on which mailing list to use, see the list in the | 1135 | For some guidance on which mailing list to use, see the list in the |
1136 | "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>" section | 1136 | "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>" section |
1137 | earlier in this manual. | 1137 | earlier in this manual. |
1138 | For a description of the available mailing lists, see | 1138 | For a description of the available mailing lists, see |
@@ -1140,71 +1140,71 @@ | |||
1140 | section in the Yocto Project Reference Manual. | 1140 | section in the Yocto Project Reference Manual. |
1141 | </para> | 1141 | </para> |
1142 | 1142 | ||
1143 | <para> | 1143 | <para> |
1144 | Here is the general procedure on how to submit a patch through email without using the | 1144 | Here is the general procedure on how to submit a patch through email without using the |
1145 | scripts: | 1145 | scripts: |
1146 | <itemizedlist> | 1146 | <itemizedlist> |
1147 | <listitem><para>Make your changes in your local Git repository.</para></listitem> | 1147 | <listitem><para>Make your changes in your local Git repository.</para></listitem> |
1148 | <listitem><para>Stage your changes by using the <filename>git add</filename> | 1148 | <listitem><para>Stage your changes by using the <filename>git add</filename> |
1149 | command on each file you changed.</para></listitem> | 1149 | command on each file you changed.</para></listitem> |
1150 | <listitem><para>Commit the change by using the | 1150 | <listitem><para>Commit the change by using the |
1151 | <filename>git commit --signoff</filename> command. | 1151 | <filename>git commit --signoff</filename> command. |
1152 | Using the <filename>--signoff</filename> option identifies you as the person | 1152 | Using the <filename>--signoff</filename> option identifies you as the person |
1153 | making the change and also satisfies the Developer's Certificate of | 1153 | making the change and also satisfies the Developer's Certificate of |
1154 | Origin (DCO) shown earlier.</para> | 1154 | Origin (DCO) shown earlier.</para> |
1155 | <para>When you form a commit you must follow certain standards established by the | 1155 | <para>When you form a commit you must follow certain standards established by the |
1156 | Yocto Project development team. | 1156 | Yocto Project development team. |
1157 | See the earlier section | 1157 | See the earlier section |
1158 | "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>" | 1158 | "<link linkend='how-to-submit-a-change'>How to Submit a Change</link>" |
1159 | for Yocto Project commit message standards.</para></listitem> | 1159 | for Yocto Project commit message standards.</para></listitem> |
1160 | <listitem><para>Format the commit into an email message. | 1160 | <listitem><para>Format the commit into an email message. |
1161 | To format commits, use the <filename>git format-patch</filename> command. | 1161 | To format commits, use the <filename>git format-patch</filename> command. |
1162 | When you provide the command, you must include a revision list or a number of patches | 1162 | When you provide the command, you must include a revision list or a number of patches |
1163 | as part of the command. | 1163 | as part of the command. |
1164 | For example, these two commands each take the most recent single commit and | 1164 | For example, these two commands each take the most recent single commit and |
1165 | format it as an email message in the current directory: | 1165 | format it as an email message in the current directory: |
1166 | <literallayout class='monospaced'> | 1166 | <literallayout class='monospaced'> |
1167 | $ git format-patch -1 | 1167 | $ git format-patch -1 |
1168 | $ git format-patch HEAD~ | 1168 | $ git format-patch HEAD~ |
1169 | </literallayout></para> | 1169 | </literallayout></para> |
1170 | <para>After the command is run, the current directory contains a | 1170 | <para>After the command is run, the current directory contains a |
1171 | numbered <filename>.patch</filename> file for the commit.</para> | 1171 | numbered <filename>.patch</filename> file for the commit.</para> |
1172 | <para>If you provide several commits as part of the command, | 1172 | <para>If you provide several commits as part of the command, |
1173 | the <filename>git format-patch</filename> command produces a numbered | 1173 | the <filename>git format-patch</filename> command produces a numbered |
1174 | series of files in the current directory – one for each commit. | 1174 | series of files in the current directory – one for each commit. |
1175 | If you have more than one patch, you should also use the | 1175 | If you have more than one patch, you should also use the |
1176 | <filename>--cover</filename> option with the command, which generates a | 1176 | <filename>--cover</filename> option with the command, which generates a |
1177 | cover letter as the first "patch" in the series. | 1177 | cover letter as the first "patch" in the series. |
1178 | You can then edit the cover letter to provide a description for | 1178 | You can then edit the cover letter to provide a description for |
1179 | the series of patches. | 1179 | the series of patches. |
1180 | For information on the <filename>git format-patch</filename> command, | 1180 | For information on the <filename>git format-patch</filename> command, |
1181 | see <filename>GIT_FORMAT_PATCH(1)</filename> displayed using the | 1181 | see <filename>GIT_FORMAT_PATCH(1)</filename> displayed using the |
1182 | <filename>man git-format-patch</filename> command.</para> | 1182 | <filename>man git-format-patch</filename> command.</para> |
1183 | <note>If you are or will be a frequent contributor to the Yocto Project | 1183 | <note>If you are or will be a frequent contributor to the Yocto Project |
1184 | or to OpenEmbedded, you might consider requesting a contrib area and the | 1184 | or to OpenEmbedded, you might consider requesting a contrib area and the |
1185 | necessary associated rights.</note></listitem> | 1185 | necessary associated rights.</note></listitem> |
1186 | <listitem><para>Import the files into your mail client by using the | 1186 | <listitem><para>Import the files into your mail client by using the |
1187 | <filename>git send-email</filename> command. | 1187 | <filename>git send-email</filename> command. |
1188 | <note>In order to use <filename>git send-email</filename>, you must have the | 1188 | <note>In order to use <filename>git send-email</filename>, you must have the |
1189 | the proper Git packages installed. | 1189 | the proper Git packages installed. |
1190 | For Ubuntu and Fedora the package is <filename>git-email</filename>.</note></para> | 1190 | For Ubuntu and Fedora the package is <filename>git-email</filename>.</note></para> |
1191 | <para>The <filename>git send-email</filename> command sends email by using a local | 1191 | <para>The <filename>git send-email</filename> command sends email by using a local |
1192 | or remote Mail Transport Agent (MTA) such as | 1192 | or remote Mail Transport Agent (MTA) such as |
1193 | <filename>msmtp</filename>, <filename>sendmail</filename>, or through a direct | 1193 | <filename>msmtp</filename>, <filename>sendmail</filename>, or through a direct |
1194 | <filename>smtp</filename> configuration in your Git <filename>config</filename> | 1194 | <filename>smtp</filename> configuration in your Git <filename>config</filename> |
1195 | file. | 1195 | file. |
1196 | If you are submitting patches through email only, it is very important | 1196 | If you are submitting patches through email only, it is very important |
1197 | that you submit them without any whitespace or HTML formatting that | 1197 | that you submit them without any whitespace or HTML formatting that |
1198 | either you or your mailer introduces. | 1198 | either you or your mailer introduces. |
1199 | The maintainer that receives your patches needs to be able to save and | 1199 | The maintainer that receives your patches needs to be able to save and |
1200 | apply them directly from your emails. | 1200 | apply them directly from your emails. |
1201 | A good way to verify that what you are sending will be applicable by the | 1201 | A good way to verify that what you are sending will be applicable by the |
1202 | maintainer is to do a dry run and send them to yourself and then | 1202 | maintainer is to do a dry run and send them to yourself and then |
1203 | save and apply them as the maintainer would.</para> | 1203 | save and apply them as the maintainer would.</para> |
1204 | <para>The <filename>git send-email</filename> command is the preferred method | 1204 | <para>The <filename>git send-email</filename> command is the preferred method |
1205 | for sending your patches since there is no risk of compromising whitespace | 1205 | for sending your patches since there is no risk of compromising whitespace |
1206 | in the body of the message, which can occur when you use your own mail client. | 1206 | in the body of the message, which can occur when you use your own mail client. |
1207 | The command also has several options that let you | 1207 | The command also has several options that let you |
1208 | specify recipients and perform further editing of the email message. | 1208 | specify recipients and perform further editing of the email message. |
1209 | For information on how to use the <filename>git send-email</filename> command, | 1209 | For information on how to use the <filename>git send-email</filename> command, |
1210 | use the <filename>man git-send-email</filename> command.</para></listitem> | 1210 | use the <filename>man git-send-email</filename> command.</para></listitem> |