]>
Commit | Line | Data |
---|---|---|
a79a54a0 | 1 | // -*- mode:doc; -*- |
3edb0271 | 2 | // vim: set syntax=asciidoc: |
a79a54a0 | 3 | |
6b9bdfbb | 4 | Contributing to Buildroot |
37b22be9 TDS |
5 | ========================= |
6 | ||
7 | There are many ways in which you can contribute to Buildroot: analyzing | |
8 | and fixing bugs, analyzing and fixing package build failures detected by | |
9 | the autobuilders, testing and reviewing patches sent by other | |
10 | developers, working on the items in our TODO list and sending your own | |
11 | improvements to Buildroot or its manual. The following sections give a | |
12 | little more detail on each of these items. | |
13 | ||
14 | If you are interested in contributing to Buildroot, the first thing you | |
15 | should do is to subscribe to the Buildroot mailing list. This list is | |
16 | the main way of interacting with other Buildroot developers and to send | |
17 | contributions to. If you aren't subscribed yet, then refer to | |
a79a54a0 SM |
18 | xref:mailing-list-subscribe[]. |
19 | ||
37b22be9 TDS |
20 | If you are going to touch the code, it is highly recommended to use a |
21 | git repository of Buildroot, rather than starting from an extracted | |
22 | source code tarball. Git is the easiest way to develop from and directly | |
23 | send your patches to the mailing list. Refer to xref:getting-buildroot[] | |
24 | for more information on obtaining a Buildroot git tree. | |
a79a54a0 | 25 | |
e640872e TDS |
26 | Reproducing, analyzing and fixing bugs |
27 | -------------------------------------- | |
28 | ||
29 | A first way of contributing is to have a look at the open bug reports in | |
30 | the https://bugs.busybox.net/buglist.cgi?product=buildroot[Buildroot bug | |
31 | tracker]. As we strive to keep the bug count as small as possible, all | |
32 | help in reproducing, analyzing and fixing reported bugs is more than | |
33 | welcome. Don't hesitate to add a comment to bug reports reporting your | |
34 | findings, even if you don't yet see the full picture. | |
35 | ||
f7d5d971 TDS |
36 | Analyzing and fixing autobuild failures |
37 | --------------------------------------- | |
38 | ||
39 | The Buildroot autobuilders are a set of build machines that continuously | |
40 | run Buildroot builds based on random configurations. This is done for | |
41 | all architectures supported by Buildroot, with various toolchains, and | |
42 | with a random selection of packages. With the large commit activity on | |
43 | Buildroot, these autobuilders are a great help in detecting problems | |
44 | very early after commit. | |
45 | ||
46 | All build results are available at http://autobuild.buildroot.org[], | |
47 | statistics are at http://autobuild.buildroot.org/stats.php[]. Every day, | |
48 | an overview of all failed packages is sent to the mailing list. | |
49 | ||
50 | Detecting problems is great, but obviously these problems have to be | |
51 | fixed as well. Your contribution is very welcome here! There are | |
52 | basically two things that can be done: | |
53 | ||
54 | - Analyzing the problems. The daily summary mails do not contain details | |
55 | about the actual failures: in order to see what's going on you have to | |
56 | open the build log and check the last output. Having someone doing | |
57 | this for all packages in the mail is very useful for other developers, | |
58 | as they can make a quick initial analysis based on this output alone. | |
59 | ||
60 | - Fixing a problem. When fixing autobuild failures, you should follow | |
61 | these steps: | |
62 | . Check if you can reproduce the problem by building with the same | |
63 | configuration. You can do this manually, or use the | |
64 | http://git.buildroot.org/buildroot-test/tree/utils/br-reproduce-build[br-reproduce-build] | |
65 | script that will automatically clone a Buildroot git repository, | |
66 | checkout the correct revision, download and set the right | |
67 | configuration, and start the build. | |
68 | . Analyze the problem and create a fix. | |
69 | . Verify that the problem is really fixed by starting from a clean | |
70 | Buildroot tree and only applying your fix. | |
71 | . Send the fix to the Buildroot mailing list (see | |
72 | xref:submitting-patches[]). In case you created a patch against the | |
73 | package sources, you should also send the patch upstream so that the | |
74 | problem will be fixed in a later release, and the patch in Buildroot | |
75 | can be removed. | |
76 | In the commit message of a patch fixing an autobuild failure, add a | |
77 | reference to the build result directory, as follows: | |
78 | --------------------- | |
79 | Fixes http://autobuild.buildroot.org/results/51000a9d4656afe9e0ea6f07b9f8ed374c2e4069 | |
80 | --------------------- | |
81 | ||
aeae2356 TDS |
82 | Reviewing and testing patches |
83 | ----------------------------- | |
84 | ||
85 | With the amount of patches sent to the mailing list each day, the | |
86 | maintainer has a very hard job to judge which patches are ready to apply | |
87 | and which ones aren't. Contributors can greatly help here by reviewing | |
88 | and testing these patches. | |
89 | ||
90 | In the review process, do not hesitate to respond to patch submissions | |
91 | for remarks, suggestions or anything that will help everyone to | |
92 | understand the patches and make them better. Please use internet | |
93 | style replies in plain text emails when responding to patch | |
94 | submissions. | |
95 | ||
96 | To indicate approval of a patch, there are three formal tags that keep | |
97 | track of this approval. To add your tag to a patch, reply to it with the | |
98 | approval tag below the original author's Signed-off-by line. These tags | |
99 | will be picked up automatically by patchwork (see | |
100 | ref:apply-patches-patchwork[]) and will be part of the commit log when | |
101 | the patch is accepted. | |
102 | ||
103 | Tested-by:: Indicates that the patch has been tested successfully. | |
104 | You are encouraged to specify what kind of testing you performed | |
105 | (compile-test on architecture X and Y, runtime test on target A, | |
106 | ...). This additional information helps other testers and the | |
107 | maintainer. | |
108 | ||
109 | Reviewed-by:: Indicates that you code-reviewed the patch and did your | |
110 | best in spotting problems, but you are not sufficiently familiar with | |
111 | the area touched to provide an Acked-by tag. This means that there | |
112 | may be remaining problems in the patch that would be spotted by | |
113 | someone with more experience in that area. Should such problems be | |
114 | detected, your Reviewed-by tag remains appropriate and you cannot | |
115 | be blamed. | |
116 | ||
117 | Acked-by:: Indicates that you code-reviewed the patch and you are | |
118 | familiar enough with the area touched to feel that the patch can be | |
119 | committed as-is (no additional changes required). In case it later | |
120 | turns out that something is wrong with the patch, your Acked-by could | |
121 | be considered inappropriate. The difference between Acked-by and | |
122 | Reviewed-by is thus mainly that you are prepared to take the blame on | |
123 | Acked patches, but not on Reviewed ones. | |
124 | ||
125 | If you reviewed a patch and have comments on it, you should simply reply | |
126 | to the patch stating these comments, without providing a Reviewed-by or | |
127 | Acked-by tag. These tags should only be provided if you judge the patch | |
128 | to be good as it is. | |
129 | ||
130 | It is important to note that neither Reviewed-by nor Acked-by imply | |
131 | that testing has been performed. To indicate that you both reviewed and | |
132 | tested the patch, provide two separate tags (Reviewed/Acked-by and | |
133 | Tested-by). | |
134 | ||
135 | Note also that _any developer_ can provide Tested/Reviewed/Acked-by | |
136 | tags, without exception, and we encourage everyone to do this. Buildroot | |
137 | does not have a defined group of _core_ developers, it just so happens | |
138 | that some developers are more active than others. The maintainer will | |
139 | value tags according to the track record of their submitter. Tags | |
140 | provided by a regular contributor will naturally be trusted more than | |
141 | tags provided by a newcomer. As you provide tags more regularly, your | |
142 | 'trustworthiness' (in the eyes of the maintainer) will go up, but _any_ | |
143 | tag provided is valuable. | |
144 | ||
145 | Buildroot's Patchwork website can be used to pull in patches for testing | |
146 | purposes. Please see xref:apply-patches-patchwork[] for more | |
147 | information on using Buildroot's Patchwork website to apply patches. | |
148 | ||
b77143a7 TDS |
149 | Work on items from the TODO list |
150 | -------------------------------- | |
151 | ||
152 | If you want to contribute to Buildroot but don't know where to start, | |
153 | and you don't like any of the above topics, you can always work on items | |
154 | from the http://elinux.org/Buildroot#Todo_list[Buildroot TODO list]. | |
155 | Don't hesitate to discuss an item first on the mailing list or on IRC. | |
156 | Do edit the wiki to indicate when you start working on an item, so we | |
157 | avoid duplicate efforts. | |
aeae2356 | 158 | |
a79a54a0 SM |
159 | [[submitting-patches]] |
160 | Submitting patches | |
161 | ------------------ | |
162 | ||
37b22be9 TDS |
163 | [NOTE] |
164 | _Please, do not attach patches to bugs, send them to the mailing list | |
165 | instead_. | |
166 | ||
1133097c TDS |
167 | If you made some changes to Buildroot and you would like to contribute |
168 | them to the Buildroot project, proceed as follows. Starting from the | |
169 | changes committed in your local git view, _rebase_ your development | |
170 | branch on top of the upstream tree before generating a patch set. To do | |
171 | so, run: | |
a79a54a0 SM |
172 | |
173 | --------------------- | |
5664c4af SM |
174 | $ git fetch --all --tags |
175 | $ git rebase origin/master | |
a79a54a0 SM |
176 | --------------------- |
177 | ||
1133097c | 178 | Now, you are ready to generate then submit your patch set. |
a79a54a0 SM |
179 | |
180 | To generate it, run: | |
181 | ||
182 | --------------------- | |
5664c4af | 183 | $ git format-patch -M -n -s -o outgoing origin/master |
a79a54a0 SM |
184 | --------------------- |
185 | ||
186 | This will generate patch files in the +outgoing+ subdirectory, | |
f7da9ee5 | 187 | automatically adding the +Signed-off-by+ line. |
a79a54a0 | 188 | |
a79a54a0 | 189 | Once patch files are generated, you can review/edit the commit message |
1133097c | 190 | before submitting them, using your favorite text editor. |
a79a54a0 SM |
191 | |
192 | Lastly, send/submit your patch set to the Buildroot mailing list: | |
193 | ||
194 | --------------------- | |
2f78767b | 195 | $ git send-email --to [email protected] outgoing/* |
a79a54a0 SM |
196 | --------------------- |
197 | ||
198 | Note that +git+ should be configured to use your mail account. | |
199 | To configure +git+, see +man git-send-email+ or google it. | |
200 | ||
1133097c TDS |
201 | If you do not use +git send-email+, make sure posted *patches are not |
202 | line-wrapped*, otherwise they cannot easily be applied. In such a case, | |
203 | fix your e-mail client, or better yet, learn to use +git send-email+. | |
a79a54a0 | 204 | |
9cbeb341 VT |
205 | Cover letter |
206 | ~~~~~~~~~~~~ | |
207 | ||
208 | If you want to present the whole patch set in a separate mail, add | |
209 | +--cover-letter+ to the +git format-patch+ command (see +man | |
210 | git-format-patch+ for further information). This will generate a | |
211 | template for an introduction e-mail to your patch series. | |
212 | ||
213 | A 'cover letter' may be useful to introduce the changes you propose | |
214 | in the following cases: | |
215 | ||
216 | * large number of commits in the series; | |
217 | ||
218 | * deep impact of the changes in the rest of the project; | |
219 | ||
220 | * RFC footnote:[RFC: (Request for comments) change proposal]; | |
221 | ||
222 | * whenever you feel it will help presenting your work, your choices, | |
223 | the review process, etc. | |
224 | ||
225 | Patch revision changelog | |
226 | ~~~~~~~~~~~~~~~~~~~~~~~~ | |
227 | ||
228 | When improvements are requested, the new revision of each commit | |
229 | should include a changelog of the modifications between each | |
230 | submission. Note that when your patch series is introduced by a cover | |
9b556772 TDS |
231 | letter, an overall changelog may be added to the cover letter in |
232 | addition to the changelog in the individual commits. | |
9cbeb341 VT |
233 | |
234 | When added to the individual commits, this changelog is added when | |
235 | editing the commit message. Below the +Signed-off-by+ section, add | |
236 | +---+ and your changelog. | |
237 | ||
238 | Although the changelog will be visible for the reviewers in the mail | |
239 | thread, as well as in http://patchwork.buildroot.org[patchwork], +git+ | |
240 | will automatically ignores lines below +---+ when the patch will be | |
241 | merged. This is the intended behavior: the changelog is not meant to | |
242 | be preserved forever in the +git+ history of the project. | |
243 | ||
244 | Hereafter the recommended layout: | |
245 | ||
246 | --------------- | |
247 | Patch title less than 80-character length | |
248 | ||
1133097c | 249 | A paragraph giving more details. |
9cbeb341 VT |
250 | |
251 | And yet another paragraph giving more details. | |
252 | ||
f7da9ee5 | 253 | Signed-off-by: John Doe <[email protected]> |
9cbeb341 VT |
254 | --- |
255 | Changes v2 -> v3: | |
256 | - foo bar (suggested by Jane) | |
257 | - bar buz | |
258 | ||
259 | Changes v1 -> v2: | |
260 | - alpha bravo (suggested by John) | |
261 | - charly delta | |
262 | --------------- | |
263 | ||
264 | Any patch revision should include the version number. The version number | |
265 | is simply composed of the letter +v+ followed by an +integer+ greater or | |
266 | equal to two (i.e. "PATCH v2", "PATCH v3" ...). | |
267 | ||
268 | This can be easily handled with +git format-patch+ by using the option | |
269 | +--subject-prefix+: | |
270 | ||
271 | --------------------- | |
272 | $ git format-patch --subject-prefix "PATCH v4" \ | |
273 | -M -o outgoing origin/master | |
274 | --------------------- | |
275 | ||
a79a54a0 SM |
276 | [[reporting-bugs]] |
277 | Reporting issues/bugs, get help | |
278 | ------------------------------- | |
279 | ||
ecd23535 SD |
280 | Before reporting any issue, please check |
281 | xref:mailing-list-subscribe[the mailing list archive] in case someone has | |
a79a54a0 SM |
282 | already reported and fixed a similar problem. |
283 | ||
ecd23535 | 284 | However you choose to report bugs or get help, |
a79a54a0 | 285 | xref:bugtracker[opening a bug] or |
ecd23535 SD |
286 | xref:mailing-list-subscribe[send a mail to the mailing list], there are |
287 | a number of details to provide in order to help people reproduce and | |
a79a54a0 SM |
288 | find a solution to the issue. |
289 | ||
ecd23535 | 290 | Try to think as if you were trying to help someone else; in |
a79a54a0 SM |
291 | that case, what would you need? |
292 | ||
293 | Here is a short list of details to provide in such case: | |
294 | ||
295 | * host machine (OS/release) | |
296 | * version of Buildroot | |
297 | * target for which the build fails | |
298 | * package(s) which the build fails | |
299 | * the command that fails and its output | |
300 | * any information you think that may be relevant | |
301 | ||
302 | Additionnally, your can add the +.config+ file. | |
303 | ||
ecd23535 SD |
304 | If some of these details are too large, do not hesitate to use a |
305 | pastebin service (see http://www.similarsitesearch.com/alternatives-to/pastebin.com[]). |