blob: bc880d07d76695f62c93caef05cc49f719851a29 [file] [log] [blame]
Eric Parkc9931992019-07-29 13:10:53 +09001
Eric Parkc9931992019-07-29 13:10:53 +09002<!doctype html>
3<html lang="en" class="no-js">
4 <head>
5
6 <meta charset="utf-8">
7 <meta name="viewport" content="width=device-width,initial-scale=1">
Eric Parkc9931992019-07-29 13:10:53 +09008
9
10
Eric Parkc9931992019-07-29 13:10:53 +090011 <link rel="shortcut icon" href="../../assets/images/favicon.png">
Eric Park8fd7bfb2020-10-02 19:05:33 +090012 <meta name="generator" content="mkdocs-1.1.2, mkdocs-material-6.0.1">
Eric Parkc9931992019-07-29 13:10:53 +090013
14
15
16 <title>Build Tips - Team Bliss</title>
17
18
19
Eric Park8fd7bfb2020-10-02 19:05:33 +090020 <link rel="stylesheet" href="../../assets/stylesheets/main.38780c08.min.css">
Eric Parkc9931992019-07-29 13:10:53 +090021
Eric Park8fd7bfb2020-10-02 19:05:33 +090022
23 <link rel="stylesheet" href="../../assets/stylesheets/palette.3f72e892.min.css">
24
Eric Parkc9931992019-07-29 13:10:53 +090025
26
27
Eric Parkc9931992019-07-29 13:10:53 +090028
29
Eric Park8fd7bfb2020-10-02 19:05:33 +090030
Eric Parkc9931992019-07-29 13:10:53 +090031 <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
Eric Park8fd7bfb2020-10-02 19:05:33 +090032 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
33 <style>body,input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono",SFMono-Regular,Consolas,Menlo,monospace}</style>
Eric Parkc9931992019-07-29 13:10:53 +090034
35
Eric Parkc9931992019-07-29 13:10:53 +090036
37
38
39
40
41
42 </head>
43
Eric Parkc9931992019-07-29 13:10:53 +090044
Eric Park8fd7bfb2020-10-02 19:05:33 +090045
46
47
48
49
50 <body dir="ltr" data-md-color-scheme="" data-md-color-primary="none" data-md-color-accent="none">
51
52
Eric Parkc9931992019-07-29 13:10:53 +090053 <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
54 <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
Eric Park8fd7bfb2020-10-02 19:05:33 +090055 <label class="md-overlay" for="__drawer"></label>
56 <div data-md-component="skip">
57
58
59 <a href="#build-tips" class="md-skip">
60 Skip to content
61 </a>
62
63 </div>
64 <div data-md-component="announce">
65
66 </div>
Eric Parkc9931992019-07-29 13:10:53 +090067
68 <header class="md-header" data-md-component="header">
Eric Park8fd7bfb2020-10-02 19:05:33 +090069 <nav class="md-header-nav md-grid" aria-label="Header">
70 <a href="../.." title="Team Bliss" class="md-header-nav__button md-logo" aria-label="Team Bliss">
71
72
73 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
74
75 </a>
76 <label class="md-header-nav__button md-icon" for="__drawer">
77 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
78 </label>
79 <div class="md-header-nav__title" data-md-component="header-title">
80
81 <div class="md-header-nav__ellipsis">
82 <span class="md-header-nav__topic md-ellipsis">
83 Team Bliss
84 </span>
85 <span class="md-header-nav__topic md-ellipsis">
86
87 Build Tips
88
89 </span>
Eric Parkc9931992019-07-29 13:10:53 +090090 </div>
Eric Park8fd7bfb2020-10-02 19:05:33 +090091
92 </div>
93
94 <label class="md-header-nav__button md-icon" for="__search">
95 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
96 </label>
97
Eric Parkc9931992019-07-29 13:10:53 +090098<div class="md-search" data-md-component="search" role="dialog">
99 <label class="md-search__overlay" for="__search"></label>
100 <div class="md-search__inner" role="search">
101 <form class="md-search__form" name="search">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900102 <input type="text" class="md-search__input" name="query" aria-label="Search" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active">
103 <label class="md-search__icon md-icon" for="__search">
104 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
105 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
106 </label>
107 <button type="reset" class="md-search__icon md-icon" aria-label="Clear" data-md-component="search-reset" tabindex="-1">
108 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
Eric Parkc9931992019-07-29 13:10:53 +0900109 </button>
110 </form>
111 <div class="md-search__output">
112 <div class="md-search__scrollwrap" data-md-scrollfix>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900113 <div class="md-search-result" data-md-component="search-result">
Eric Parkc9931992019-07-29 13:10:53 +0900114 <div class="md-search-result__meta">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900115 Initializing search
Eric Parkc9931992019-07-29 13:10:53 +0900116 </div>
117 <ol class="md-search-result__list"></ol>
118 </div>
119 </div>
120 </div>
121 </div>
122</div>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900123
124
Eric Parkc9931992019-07-29 13:10:53 +0900125 </nav>
126</header>
127
Eric Park8fd7bfb2020-10-02 19:05:33 +0900128 <div class="md-container" data-md-component="container">
129
Eric Parkc9931992019-07-29 13:10:53 +0900130
131
132
Eric Park8fd7bfb2020-10-02 19:05:33 +0900133 <main class="md-main" data-md-component="main">
134 <div class="md-main__inner md-grid">
Eric Parkc9931992019-07-29 13:10:53 +0900135
136
137 <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
138 <div class="md-sidebar__scrollwrap">
139 <div class="md-sidebar__inner">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900140 <nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
141 <label class="md-nav__title" for="__drawer">
142 <a href="../.." title="Team Bliss" class="md-nav__button md-logo" aria-label="Team Bliss">
Eric Parkc9931992019-07-29 13:10:53 +0900143
Eric Park8fd7bfb2020-10-02 19:05:33 +0900144
145 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
146
Eric Parkc9931992019-07-29 13:10:53 +0900147 </a>
148 Team Bliss
149 </label>
150
151 <ul class="md-nav__list" data-md-scrollfix>
152
153
154
155
156
157
158 <li class="md-nav__item">
Eric Park5e3a1012019-08-12 13:17:03 +0800159 <a href="../.." title="Home" class="md-nav__link">
160 Home
Eric Parkc9931992019-07-29 13:10:53 +0900161 </a>
162 </li>
163
164
165
166
167
168
169
170 <li class="md-nav__item md-nav__item--nested">
171
Eric Park8fd7bfb2020-10-02 19:05:33 +0900172 <input class="md-nav__toggle md-toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2">
Eric Parkc9931992019-07-29 13:10:53 +0900173
174 <label class="md-nav__link" for="nav-2">
175 Bliss OS
Eric Park8fd7bfb2020-10-02 19:05:33 +0900176 <span class="md-nav__icon md-icon"></span>
Eric Parkc9931992019-07-29 13:10:53 +0900177 </label>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900178 <nav class="md-nav" aria-label="Bliss OS" data-md-level="1">
Eric Parkc9931992019-07-29 13:10:53 +0900179 <label class="md-nav__title" for="nav-2">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900180 <span class="md-nav__icon md-icon"></span>
Eric Parkc9931992019-07-29 13:10:53 +0900181 Bliss OS
182 </label>
183 <ul class="md-nav__list" data-md-scrollfix>
184
185
186
187
188
189
190
191 <li class="md-nav__item">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900192 <a href="../../Bliss%20OS/" title="Index" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900193 Index
194 </a>
195 </li>
196
197
Eric Park608ce5a2019-08-07 21:27:46 +0800198
199
200
201
202
203 <li class="md-nav__item">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900204 <a href="../../Bliss%20OS/build-guide/" title="Build Guide" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800205 Build Guide
206 </a>
207 </li>
208
209
210
211
212
213
214
215 <li class="md-nav__item">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900216 <a href="../../Bliss%20OS/extras/" title="Extras" class="md-nav__link">
Eric Park608ce5a2019-08-07 21:27:46 +0800217 Extras
218 </a>
219 </li>
220
221
222
223
224
225
226
227 <li class="md-nav__item">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900228 <a href="../../Bliss%20OS/installation-guide-misc/" title="Installation Guide (Misc)" class="md-nav__link">
Eric Parkd09b00e2020-02-15 11:07:48 +0900229 Installation Guide (Misc)
230 </a>
231 </li>
232
233
234
235
236
237
238
239 <li class="md-nav__item">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900240 <a href="../../Bliss%20OS/installation-guide-surface-devices/" title="Installation Guide (Surface devices)" class="md-nav__link">
Eric Parkd09b00e2020-02-15 11:07:48 +0900241 Installation Guide (Surface devices)
242 </a>
243 </li>
244
245
246
247
248
249
250
251 <li class="md-nav__item">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900252 <a href="../../Bliss%20OS/installation-guide/" title="Installation Guide" class="md-nav__link">
Eric Park608ce5a2019-08-07 21:27:46 +0800253 Installation Guide
254 </a>
255 </li>
256
257
258
259
260
261
262
263 <li class="md-nav__item">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900264 <a href="../../Bliss%20OS/taking-bug-reports/" title="Taking bug reports" class="md-nav__link">
Eric Park0509f652020-03-01 01:54:39 +0900265 Taking bug reports
266 </a>
267 </li>
268
269
270
271
272
273
274
275 <li class="md-nav__item">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900276 <a href="../../Bliss%20OS/troubleshooting/" title="Troubleshooting" class="md-nav__link">
Eric Park608ce5a2019-08-07 21:27:46 +0800277 Troubleshooting
278 </a>
279 </li>
280
281
Eric Parkc9931992019-07-29 13:10:53 +0900282 </ul>
283 </nav>
284 </li>
285
286
287
288
289
290
291
292
293
294 <li class="md-nav__item md-nav__item--active md-nav__item--nested">
295
Eric Park8fd7bfb2020-10-02 19:05:33 +0900296 <input class="md-nav__toggle md-toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3" checked>
Eric Parkc9931992019-07-29 13:10:53 +0900297
298 <label class="md-nav__link" for="nav-3">
299 BlissRoms
Eric Park8fd7bfb2020-10-02 19:05:33 +0900300 <span class="md-nav__icon md-icon"></span>
Eric Parkc9931992019-07-29 13:10:53 +0900301 </label>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900302 <nav class="md-nav" aria-label="BlissRoms" data-md-level="1">
Eric Parkc9931992019-07-29 13:10:53 +0900303 <label class="md-nav__title" for="nav-3">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900304 <span class="md-nav__icon md-icon"></span>
Eric Parkc9931992019-07-29 13:10:53 +0900305 BlissRoms
306 </label>
307 <ul class="md-nav__list" data-md-scrollfix>
308
309
310
311
312
313
314
315 <li class="md-nav__item">
316 <a href="../" title="Index" class="md-nav__link">
317 Index
318 </a>
319 </li>
320
321
322
323
324
325
326
327 <li class="md-nav__item">
Eric Park608ce5a2019-08-07 21:27:46 +0800328 <a href="../build-guide/" title="Build Guide" class="md-nav__link">
329 Build Guide
Eric Parkc9931992019-07-29 13:10:53 +0900330 </a>
331 </li>
332
333
334
335
336
337
338
339
340
341 <li class="md-nav__item md-nav__item--active">
342
Eric Park8fd7bfb2020-10-02 19:05:33 +0900343 <input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
Eric Parkc9931992019-07-29 13:10:53 +0900344
345
346
347
348 <label class="md-nav__link md-nav__link--active" for="__toc">
349 Build Tips
Eric Park8fd7bfb2020-10-02 19:05:33 +0900350 <span class="md-nav__icon md-icon"></span>
Eric Parkc9931992019-07-29 13:10:53 +0900351 </label>
352
353 <a href="./" title="Build Tips" class="md-nav__link md-nav__link--active">
354 Build Tips
355 </a>
356
357
Eric Park8fd7bfb2020-10-02 19:05:33 +0900358<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
Eric Parkc9931992019-07-29 13:10:53 +0900359
360
361
362
363
Eric Park8fd7bfb2020-10-02 19:05:33 +0900364 <label class="md-nav__title" for="__toc">
365 <span class="md-nav__icon md-icon"></span>
366 Table of contents
367 </label>
Eric Parkc9931992019-07-29 13:10:53 +0900368 <ul class="md-nav__list" data-md-scrollfix>
369
370 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800371 <a href="#repo-optimization-tips" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900372 repo optimization tips
373 </a>
374
Eric Park8fd7bfb2020-10-02 19:05:33 +0900375 <nav class="md-nav" aria-label="repo optimization tips">
Eric Parkc9931992019-07-29 13:10:53 +0900376 <ul class="md-nav__list">
377
378 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800379 <a href="#threads" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900380 Threads
381 </a>
382
383</li>
384
385 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900386 <a href="#current-branch-only" class="md-nav__link">
387 Current branch only
388 </a>
389
390</li>
391
392 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800393 <a href="#current-history-only" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900394 Current history only
395 </a>
396
397</li>
398
399 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800400 <a href="#minimal-fetch" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900401 Minimal fetch
402 </a>
403
404</li>
405
406 <li class="md-nav__item">
Eric Parkf7befcf2020-01-17 07:17:51 +0800407 <a href="#force-sync" class="md-nav__link">
408 Force sync
409 </a>
410
Eric Park8fd7bfb2020-10-02 19:05:33 +0900411 <nav class="md-nav" aria-label="Force sync">
Eric Parkf7befcf2020-01-17 07:17:51 +0800412 <ul class="md-nav__list">
413
414 <li class="md-nav__item">
415 <a href="#why-not-use-f-as-well" class="md-nav__link">
416 Why not use -f as well?
417 </a>
418
419</li>
420
421 </ul>
422 </nav>
423
424</li>
425
426 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900427 <a href="#reposync-alias" class="md-nav__link">
428 reposync alias
Eric Parkc9931992019-07-29 13:10:53 +0900429 </a>
430
431</li>
432
433 </ul>
434 </nav>
435
436</li>
437
438 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900439 <a href="#delete-all-device-trees-and-local-manifests" class="md-nav__link">
440 Delete all device trees and local manifests
Eric Parkc9931992019-07-29 13:10:53 +0900441 </a>
442
443</li>
444
445 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800446 <a href="#github-cherry-pick" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900447 GitHub cherry-pick
448 </a>
449
450</li>
451
Eric Parkc9931992019-07-29 13:10:53 +0900452 </ul>
453
454</nav>
455
456 </li>
457
458
459 </ul>
460 </nav>
461 </li>
462
463
464
465
466
467
468
469 <li class="md-nav__item md-nav__item--nested">
470
Eric Park8fd7bfb2020-10-02 19:05:33 +0900471 <input class="md-nav__toggle md-toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4">
Eric Parkc9931992019-07-29 13:10:53 +0900472
473 <label class="md-nav__link" for="nav-4">
474 Common
Eric Park8fd7bfb2020-10-02 19:05:33 +0900475 <span class="md-nav__icon md-icon"></span>
Eric Parkc9931992019-07-29 13:10:53 +0900476 </label>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900477 <nav class="md-nav" aria-label="Common" data-md-level="1">
Eric Parkc9931992019-07-29 13:10:53 +0900478 <label class="md-nav__title" for="nav-4">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900479 <span class="md-nav__icon md-icon"></span>
Eric Parkc9931992019-07-29 13:10:53 +0900480 Common
481 </label>
482 <ul class="md-nav__list" data-md-scrollfix>
483
484
485
486
487
488
489
490 <li class="md-nav__item">
491 <a href="../../common/" title="Index" class="md-nav__link">
492 Index
493 </a>
494 </li>
495
496
497
498
499
500
501
502 <li class="md-nav__item">
503 <a href="../../common/git-started/" title="Git Started" class="md-nav__link">
504 Git Started
505 </a>
506 </li>
507
508
Eric Park608ce5a2019-08-07 21:27:46 +0800509
510
511
512
513
514 <li class="md-nav__item">
Eric Park8584eda2019-09-02 09:45:55 +0800515 <a href="../../common/maintaining-proper-authorship/" title="Maintaining proper authorship" class="md-nav__link">
516 Maintaining proper authorship
517 </a>
518 </li>
519
520
521
522
523
524
525
526 <li class="md-nav__item">
Eric Park608ce5a2019-08-07 21:27:46 +0800527 <a href="../../common/using-dippy-bird/" title="Using `dippy-bird`" class="md-nav__link">
528 Using `dippy-bird`
529 </a>
530 </li>
531
532
Eric Parkc9931992019-07-29 13:10:53 +0900533 </ul>
534 </nav>
535 </li>
536
537
538
539
540
541
542
543 <li class="md-nav__item md-nav__item--nested">
544
Eric Park8fd7bfb2020-10-02 19:05:33 +0900545 <input class="md-nav__toggle md-toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
Eric Parkc9931992019-07-29 13:10:53 +0900546
547 <label class="md-nav__link" for="nav-5">
548 Infrastructure
Eric Park8fd7bfb2020-10-02 19:05:33 +0900549 <span class="md-nav__icon md-icon"></span>
Eric Parkc9931992019-07-29 13:10:53 +0900550 </label>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900551 <nav class="md-nav" aria-label="Infrastructure" data-md-level="1">
Eric Parkc9931992019-07-29 13:10:53 +0900552 <label class="md-nav__title" for="nav-5">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900553 <span class="md-nav__icon md-icon"></span>
Eric Parkc9931992019-07-29 13:10:53 +0900554 Infrastructure
555 </label>
556 <ul class="md-nav__list" data-md-scrollfix>
557
558
559
560
561
562
563
564 <li class="md-nav__item">
565 <a href="../../infrastructure/" title="Index" class="md-nav__link">
566 Index
567 </a>
568 </li>
569
570
571 </ul>
572 </nav>
573 </li>
574
575
576 </ul>
577</nav>
578 </div>
579 </div>
580 </div>
581
582
583 <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
584 <div class="md-sidebar__scrollwrap">
585 <div class="md-sidebar__inner">
586
Eric Park8fd7bfb2020-10-02 19:05:33 +0900587<nav class="md-nav md-nav--secondary" aria-label="Table of contents">
Eric Parkc9931992019-07-29 13:10:53 +0900588
589
590
591
592
Eric Park8fd7bfb2020-10-02 19:05:33 +0900593 <label class="md-nav__title" for="__toc">
594 <span class="md-nav__icon md-icon"></span>
595 Table of contents
596 </label>
Eric Parkc9931992019-07-29 13:10:53 +0900597 <ul class="md-nav__list" data-md-scrollfix>
598
599 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800600 <a href="#repo-optimization-tips" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900601 repo optimization tips
602 </a>
603
Eric Park8fd7bfb2020-10-02 19:05:33 +0900604 <nav class="md-nav" aria-label="repo optimization tips">
Eric Parkc9931992019-07-29 13:10:53 +0900605 <ul class="md-nav__list">
606
607 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800608 <a href="#threads" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900609 Threads
610 </a>
611
612</li>
613
614 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900615 <a href="#current-branch-only" class="md-nav__link">
616 Current branch only
617 </a>
618
619</li>
620
621 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800622 <a href="#current-history-only" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900623 Current history only
624 </a>
625
626</li>
627
628 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800629 <a href="#minimal-fetch" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900630 Minimal fetch
631 </a>
632
633</li>
634
635 <li class="md-nav__item">
Eric Parkf7befcf2020-01-17 07:17:51 +0800636 <a href="#force-sync" class="md-nav__link">
637 Force sync
638 </a>
639
Eric Park8fd7bfb2020-10-02 19:05:33 +0900640 <nav class="md-nav" aria-label="Force sync">
Eric Parkf7befcf2020-01-17 07:17:51 +0800641 <ul class="md-nav__list">
642
643 <li class="md-nav__item">
644 <a href="#why-not-use-f-as-well" class="md-nav__link">
645 Why not use -f as well?
646 </a>
647
648</li>
649
650 </ul>
651 </nav>
652
653</li>
654
655 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900656 <a href="#reposync-alias" class="md-nav__link">
657 reposync alias
Eric Parkc9931992019-07-29 13:10:53 +0900658 </a>
659
660</li>
661
662 </ul>
663 </nav>
664
665</li>
666
667 <li class="md-nav__item">
Eric Parkf1180122019-12-28 17:11:20 +0900668 <a href="#delete-all-device-trees-and-local-manifests" class="md-nav__link">
669 Delete all device trees and local manifests
Eric Parkc9931992019-07-29 13:10:53 +0900670 </a>
671
672</li>
673
674 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800675 <a href="#github-cherry-pick" class="md-nav__link">
Eric Parkc9931992019-07-29 13:10:53 +0900676 GitHub cherry-pick
677 </a>
678
679</li>
680
Eric Parkc9931992019-07-29 13:10:53 +0900681 </ul>
682
683</nav>
684 </div>
685 </div>
686 </div>
687
688
689 <div class="md-content">
690 <article class="md-content__inner md-typeset">
691
692
693
694 <h1 id="build-tips">Build Tips</h1>
695<p>Here's a collective list of things you can try to improve your builds. Have fun!</p>
696<h2 id="repo-optimization-tips"><code>repo</code> optimization tips</h2>
697<h3 id="threads">Threads</h3>
Eric Parkf1180122019-12-28 17:11:20 +0900698<p>By default, <code>repo</code> only utilizes four threads (or whatever the ROM manifest declares.) If you have a stronger machine with more threads, you can increase this number. For example, to use 8 threads:</p>
699<pre><code>repo sync -j8
Eric Parkc9931992019-07-29 13:10:53 +0900700</code></pre>
Eric Parkf1180122019-12-28 17:11:20 +0900701<p>To use all of the threads on your machine, use:</p>
702<pre><code>repo sync -j$(nproc --all)
703</code></pre>
704<h3 id="current-branch-only">Current branch only</h3>
705<p>This is usually set by default in your ROM manifest, but just in case, you can tell <code>repo</code> to only fetch the branch you want to work on:</p>
Eric Parkc9931992019-07-29 13:10:53 +0900706<pre><code>repo sync -c
707</code></pre>
Eric Parkf1180122019-12-28 17:11:20 +0900708<h3 id="current-history-only">Current history only</h3>
709<p>To only download the most recent changes, use this flag:</p>
710<pre><code>repo sync --depth=1
711</code></pre>
712<p>This will make <code>repo</code> fetch the most recent changes.</p>
Eric Parkc9931992019-07-29 13:10:53 +0900713<h3 id="minimal-fetch">Minimal fetch</h3>
714<p>To disable syncing clone bundles and tags, use:</p>
715<pre><code>repo sync --no-clone-bundle --no-tags
716</code></pre>
Eric Parkf1180122019-12-28 17:11:20 +0900717<p><code>repo</code> uses <code>git</code> bundles over HTTP to download repositories. To disable this behavior, we use the <code>--no-clone-bundle</code> flag. We also don't need all of the <code>git</code> tags in each repository, so we disable that too with <code>--no-tags</code>.</p>
Eric Parkf7befcf2020-01-17 07:17:51 +0800718<h3 id="force-sync">Force sync</h3>
719<p>Sometimes, bad Internet conditions may cause your <code>.repo</code> directory to become corrupt and not sync. <code>repo</code> keeps two copies of a repository - one under <code>.repo</code>, and one in the root of your source directory. If the repository in <code>.repo</code> is corrupted, it will not sync over to the source directory.</p>
720<p>To resolve this problem, you need to sometimes tell <code>repo</code> to forcefully sync the repository in <code>.repo</code> again with the remote repository so that changes can be synced over to the main source tree. Use the <code>--force-sync</code> flag to achieve this:</p>
721<pre><code>repo sync --force-sync
722</code></pre>
723<h4 id="why-not-use-f-as-well">Why not use <code>-f</code> as well?</h4>
724<p>Starting from <code>repo</code> 1.26, the use of the flags <code>-f</code> and <code>--force-sync</code> together has been deprecated. <code>repo</code> will warn you of this change if you try and use those two flags together. To make sure your scripts do not break in future <code>repo</code> versions, it is recommended to not use the <code>-f</code> flag at all.</p>
Eric Parkf1180122019-12-28 17:11:20 +0900725<h3 id="reposync-alias"><code>reposync</code> alias</h3>
726<pre><code>repo sync -c -j$(nproc --all) --no-clone-bundle --no-tags
Eric Parkc9931992019-07-29 13:10:53 +0900727</code></pre>
728<p>That's quite long! How about we add this to our <code>.bashrc</code> as a alias? That way, we only have to type one phrase for <code>bash</code> to automatically type that out for us.</p>
729<p>Open up <code>~/.bashrc</code> and add these lines:</p>
730<pre><code># Alias to sync
Eric Parkf1180122019-12-28 17:11:20 +0900731alias reposync='repo sync -c -j$(nproc --all) --no-clone-bundle --no-tags'
Eric Parkc9931992019-07-29 13:10:53 +0900732</code></pre>
733<p>This way, next time you want to sync, just type <code>reposync</code> and <code>bash</code> will substitute the command for you. Easy! Just don't forget to <code>source ~/.bashrc</code> otherwise <code>bash</code> will not know of this new alias.</p>
Eric Parkf1180122019-12-28 17:11:20 +0900734<h2 id="delete-all-device-trees-and-local-manifests">Delete all device trees and local manifests</h2>
735<p><strong>WARNING</strong>: If you have any changes in your device trees, commit them and push them to a remote repository. This tip will permanently delete your local changes, so back them up!</p>
736<p>While messing around with device specific folders, you may break something and the build process might not work. Or, you may have multiple devices synced and you want to delete it all and start over. This tip/command will let you delete only the device trees.</p>
Eric Parkc9931992019-07-29 13:10:53 +0900737<p>Add this function to your <code>~/.bashrc</code>:</p>
Eric Parkf1180122019-12-28 17:11:20 +0900738<pre><code># Remove all device trees/local manifests
Eric Parkc9931992019-07-29 13:10:53 +0900739function resettree() {
740 rm -rf device kernel vendor out .repo/local_manifests
741 reposync
742}
743</code></pre>
744<p>Let's go over what this does, word by word:</p>
745<ul>
746<li><code>rm -rf</code>: Destructive command to erase all of the following:</li>
747<li><code>device</code> folder: Holds all device-related files</li>
748<li><code>kernel</code> folder: Holds all kernel-related files for devices</li>
749<li><code>vendor</code> folder: Holds all vendor-related files for devices AND ROM-specific vendor customizations</li>
750<li><code>out</code> folder: Stores artifacts of builds</li>
751<li><code>.repo/local_manifests</code> folder: Stores "manifest" information of devices to sync.</li>
752<li><code>reposync</code>: Executes the <code>repo sync</code> alias we made earlier.</li>
753</ul>
754<p>The last line is important, because by deleting the <code>vendor</code> folder, we also delete some crucial files for building Bliss. To fix that, we rerun a sync. Note that because we did not delete any other folders, syncing and updating files only take a fraction of a time compared to starting from scratch.</p>
Eric Parkf1180122019-12-28 17:11:20 +0900755<p>After running <code>resettree</code>, make sure to initialize a new tree by running <code>breakfast &lt;devicename&gt;</code>.</p>
Eric Parkc9931992019-07-29 13:10:53 +0900756<h2 id="github-cherry-pick">GitHub cherry-pick</h2>
757<p>Thanks to @blueyes for providing the script!</p>
758<p>Copy the following into your <code>~/.bashrc</code>:</p>
759<pre><code>function gcp() {
760 COMMIT=`echo "$1" | cut -d/ -f6`
761 GH=`echo "$1" | cut -d/ -f1-3`
762 if [ "$COMMIT" != "commit" ]; then
763 echo -e "Please use a commit URL."
764 elif [ "$GH" != "https://github.com" ]; then
765 echo -e "Please use an https://github.com/ URL."
766 else
767 PROJECT=`echo "$1" | cut -d/ -f1-5`
768 git fetch $PROJECT
769 CP=`echo "$1" | cut -d/ -f7`
770 git cherry-pick $CP
771 fi
772}
773</code></pre>
774<p>To use this, <code>source ~/.bashrc</code> and then run <code>gcp &lt;GitHub commit URL here&gt;</code>.</p>
Eric Parkc9931992019-07-29 13:10:53 +0900775
Eric Parkc9931992019-07-29 13:10:53 +0900776
777
778
779
780
781
782 </article>
783 </div>
784 </div>
785 </main>
786
787
788<footer class="md-footer">
789
790 <div class="md-footer-nav">
Eric Park8fd7bfb2020-10-02 19:05:33 +0900791 <nav class="md-footer-nav__inner md-grid" aria-label="Footer">
Eric Parkc9931992019-07-29 13:10:53 +0900792
Eric Park8fd7bfb2020-10-02 19:05:33 +0900793 <a href="../build-guide/" title="Build Guide" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
794 <div class="md-footer-nav__button md-icon">
795 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
Eric Parkc9931992019-07-29 13:10:53 +0900796 </div>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900797 <div class="md-footer-nav__title">
798 <div class="md-ellipsis">
Eric Parkc9931992019-07-29 13:10:53 +0900799 <span class="md-footer-nav__direction">
800 Previous
801 </span>
Eric Park608ce5a2019-08-07 21:27:46 +0800802 Build Guide
Eric Park8fd7bfb2020-10-02 19:05:33 +0900803 </div>
Eric Parkc9931992019-07-29 13:10:53 +0900804 </div>
805 </a>
806
807
Eric Park8fd7bfb2020-10-02 19:05:33 +0900808 <a href="../../common/" title="Index" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
809 <div class="md-footer-nav__title">
810 <div class="md-ellipsis">
Eric Parkc9931992019-07-29 13:10:53 +0900811 <span class="md-footer-nav__direction">
812 Next
813 </span>
814 Index
Eric Park8fd7bfb2020-10-02 19:05:33 +0900815 </div>
Eric Parkc9931992019-07-29 13:10:53 +0900816 </div>
Eric Park8fd7bfb2020-10-02 19:05:33 +0900817 <div class="md-footer-nav__button md-icon">
818 <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
Eric Parkc9931992019-07-29 13:10:53 +0900819 </div>
820 </a>
821
822 </nav>
823 </div>
824
825 <div class="md-footer-meta md-typeset">
826 <div class="md-footer-meta__inner md-grid">
827 <div class="md-footer-copyright">
828
Eric Park8fd7bfb2020-10-02 19:05:33 +0900829 Made with
830 <a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
831 Material for MkDocs
832 </a>
Eric Parkc9931992019-07-29 13:10:53 +0900833 </div>
834
835 </div>
836 </div>
837</footer>
838
839 </div>
840
Eric Park8fd7bfb2020-10-02 19:05:33 +0900841 <script src="../../assets/javascripts/vendor.77e55a48.min.js"></script>
842 <script src="../../assets/javascripts/bundle.aa3f9871.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing"}</script>
Eric Parkc9931992019-07-29 13:10:53 +0900843
Eric Park8fd7bfb2020-10-02 19:05:33 +0900844 <script>
845 app = initialize({
846 base: "../..",
847 features: [],
848 search: Object.assign({
849 worker: "../../assets/javascripts/worker/search.4ac00218.min.js"
850 }, typeof search !== "undefined" && search)
851 })
852 </script>
Eric Parkc9931992019-07-29 13:10:53 +0900853
854
855 </body>
856</html>