blob: 8f3a139e44a62b025c58fc704eb5c9ae77ff920f [file] [log] [blame]
Eric Park5e3a1012019-08-12 13:17:03 +08001
2
3
4
5<!doctype html>
6<html lang="en" class="no-js">
7 <head>
8
9 <meta charset="utf-8">
10 <meta name="viewport" content="width=device-width,initial-scale=1">
11 <meta http-equiv="x-ua-compatible" content="ie=edge">
12
13
14
15
16 <meta name="lang:clipboard.copy" content="Copy to clipboard">
17
18 <meta name="lang:clipboard.copied" content="Copied to clipboard">
19
20 <meta name="lang:search.language" content="en">
21
22 <meta name="lang:search.pipeline.stopwords" content="True">
23
24 <meta name="lang:search.pipeline.trimmer" content="True">
25
26 <meta name="lang:search.result.none" content="No matching documents">
27
28 <meta name="lang:search.result.one" content="1 matching document">
29
30 <meta name="lang:search.result.other" content="# matching documents">
31
32 <meta name="lang:search.tokenizer" content="[\s\-]+">
33
34 <link rel="shortcut icon" href="../../assets/images/favicon.png">
Eric Park45174ca2019-10-21 01:38:33 +080035 <meta name="generator" content="mkdocs-1.0.4, mkdocs-material-4.4.3">
Eric Park5e3a1012019-08-12 13:17:03 +080036
37
38
39 <title>Build Guide - Team Bliss</title>
40
41
42
Eric Park45174ca2019-10-21 01:38:33 +080043 <link rel="stylesheet" href="../../assets/stylesheets/application.30686662.css">
Eric Park5e3a1012019-08-12 13:17:03 +080044
45
46
47
48 <script src="../../assets/javascripts/modernizr.74668098.js"></script>
49
50
51
52 <link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
53 <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700|Roboto+Mono&display=fallback">
54 <style>body,input{font-family:"Roboto","Helvetica Neue",Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono","Courier New",Courier,monospace}</style>
55
56
57 <link rel="stylesheet" href="../../assets/fonts/material-icons.css">
58
59
60
61
62
63
64 </head>
65
66 <body dir="ltr">
67
68 <svg class="md-svg">
69 <defs>
70
71
72 </defs>
73 </svg>
74 <input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
75 <input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
76 <label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
77
78 <a href="#build-guide" tabindex="1" class="md-skip">
79 Skip to content
80 </a>
81
82
83 <header class="md-header" data-md-component="header">
84 <nav class="md-header-nav md-grid">
85 <div class="md-flex">
86 <div class="md-flex__cell md-flex__cell--shrink">
87 <a href="../.." title="Team Bliss" class="md-header-nav__button md-logo">
88
89 <i class="md-icon"></i>
90
91 </a>
92 </div>
93 <div class="md-flex__cell md-flex__cell--shrink">
94 <label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
95 </div>
96 <div class="md-flex__cell md-flex__cell--stretch">
97 <div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
98
99 <span class="md-header-nav__topic">
100 Team Bliss
101 </span>
102 <span class="md-header-nav__topic">
103
104 Build Guide
105
106 </span>
107
108 </div>
109 </div>
110 <div class="md-flex__cell md-flex__cell--shrink">
111
112 <label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
113
114<div class="md-search" data-md-component="search" role="dialog">
115 <label class="md-search__overlay" for="__search"></label>
116 <div class="md-search__inner" role="search">
117 <form class="md-search__form" name="search">
118 <input type="text" class="md-search__input" name="query" placeholder="Search" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="query" data-md-state="active">
119 <label class="md-icon md-search__icon" for="__search"></label>
120 <button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">
121 &#xE5CD;
122 </button>
123 </form>
124 <div class="md-search__output">
125 <div class="md-search__scrollwrap" data-md-scrollfix>
126 <div class="md-search-result" data-md-component="result">
127 <div class="md-search-result__meta">
128 Type to start searching
129 </div>
130 <ol class="md-search-result__list"></ol>
131 </div>
132 </div>
133 </div>
134 </div>
135</div>
136
137 </div>
138
139 </div>
140 </nav>
141</header>
142
143 <div class="md-container">
144
145
146
147
Eric Park45174ca2019-10-21 01:38:33 +0800148 <main class="md-main" role="main">
Eric Park5e3a1012019-08-12 13:17:03 +0800149 <div class="md-main__inner md-grid" data-md-component="container">
150
151
152 <div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
153 <div class="md-sidebar__scrollwrap">
154 <div class="md-sidebar__inner">
155 <nav class="md-nav md-nav--primary" data-md-level="0">
156 <label class="md-nav__title md-nav__title--site" for="__drawer">
157 <a href="../.." title="Team Bliss" class="md-nav__button md-logo">
158
159 <i class="md-icon"></i>
160
161 </a>
162 Team Bliss
163 </label>
164
165 <ul class="md-nav__list" data-md-scrollfix>
166
167
168
169
170
171
172 <li class="md-nav__item">
173 <a href="../.." title="Home" class="md-nav__link">
174 Home
175 </a>
176 </li>
177
178
179
180
181
182
183
184
185
186 <li class="md-nav__item md-nav__item--active md-nav__item--nested">
187
188 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-2" type="checkbox" id="nav-2" checked>
189
190 <label class="md-nav__link" for="nav-2">
191 Bliss OS
192 </label>
193 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
194 <label class="md-nav__title" for="nav-2">
195 Bliss OS
196 </label>
197 <ul class="md-nav__list" data-md-scrollfix>
198
199
200
201
202
203
204
205 <li class="md-nav__item">
206 <a href="../" title="Index" class="md-nav__link">
207 Index
208 </a>
209 </li>
210
211
212
213
214
215
216
217
218
219 <li class="md-nav__item md-nav__item--active">
220
221 <input class="md-toggle md-nav__toggle" data-md-toggle="toc" type="checkbox" id="__toc">
222
223
224
225
226 <label class="md-nav__link md-nav__link--active" for="__toc">
227 Build Guide
228 </label>
229
230 <a href="./" title="Build Guide" class="md-nav__link md-nav__link--active">
231 Build Guide
232 </a>
233
234
235<nav class="md-nav md-nav--secondary">
236
237
238
239
240
241 <label class="md-nav__title" for="__toc">Table of contents</label>
242 <ul class="md-nav__list" data-md-scrollfix>
243
244 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800245 <a href="#introduction" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800246 Introduction
247 </a>
248
249</li>
250
251 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800252 <a href="#preparation" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800253 Preparation
254 </a>
255
256</li>
257
258 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800259 <a href="#install-the-jdk" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800260 Install the JDK
261 </a>
262
263</li>
264
265 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800266 <a href="#install-build-tools" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800267 Install build tools
268 </a>
269
270</li>
271
272 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800273 <a href="#install-source-code-tools" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800274 Install source code tools
275 </a>
276
277 <nav class="md-nav">
278 <ul class="md-nav__list">
279
280 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800281 <a href="#what-is-source" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800282 What is source?
283 </a>
284
285</li>
286
287 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800288 <a href="#what-if-i-need-repo-globally" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800289 What if I need repo globally?
290 </a>
291
292</li>
293
294 </ul>
295 </nav>
296
297</li>
298
299 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800300 <a href="#download" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800301 Download
302 </a>
303
304 <nav class="md-nav">
305 <ul class="md-nav__list">
306
307 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800308 <a href="#i-still-dont-know-how-much-cpu-threads-i-have-how-do-i-check" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800309 I still don't know how much CPU threads I have. How do I check?
310 </a>
311
312</li>
313
314 </ul>
315 </nav>
316
317</li>
318
319 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800320 <a href="#easy-build-instructions" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800321 Easy Build Instructions
322 </a>
323
324</li>
325
326 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800327 <a href="#advanced-build-instructions" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800328 Advanced Build Instructions
329 </a>
330
331 <nav class="md-nav">
332 <ul class="md-nav__list">
333
334 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800335 <a href="#my-device-isnt-booting-and-userdebug-wont-print-any-adb-logcats-what-gives" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800336 My device isn't booting, and userdebug won't print any adb logcats. What gives?
337 </a>
338
339</li>
340
341 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800342 <a href="#why-mka-and-not-make" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800343 Why mka and not make?
344 </a>
345
346</li>
347
348 </ul>
349 </nav>
350
351</li>
352
353 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800354 <a href="#after-building" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800355 After building
356 </a>
357
358</li>
359
360 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800361 <a href="#changing-the-target-kernel-branch" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800362 Changing the target kernel branch
363 </a>
364
365 <nav class="md-nav">
366 <ul class="md-nav__list">
367
368 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800369 <a href="#switching-the-kernel-branch" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800370 Switching the kernel branch
371 </a>
372
373</li>
374
375 </ul>
376 </nav>
377
378</li>
379
380 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800381 <a href="#using-the-patch-system-for-testing" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800382 Using the patch system for testing
383 </a>
384
385</li>
386
387 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800388 <a href="#troubleshooting" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800389 Troubleshooting
390 </a>
391
392</li>
393
394 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800395 <a href="#conclusion" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800396 Conclusion
397 </a>
398
399</li>
400
401
402
403
404
405 </ul>
406
407</nav>
408
409 </li>
410
411
412
413
414
415
416
417 <li class="md-nav__item">
418 <a href="../extras/" title="Extras" class="md-nav__link">
419 Extras
420 </a>
421 </li>
422
423
424
425
426
427
428
429 <li class="md-nav__item">
Eric Parkd09b00e2020-02-15 11:07:48 +0900430 <a href="../installation-guide-misc/" title="Installation Guide (Misc)" class="md-nav__link">
431 Installation Guide (Misc)
432 </a>
433 </li>
434
435
436
437
438
439
440
441 <li class="md-nav__item">
442 <a href="../installation-guide-surface-devices/" title="Installation Guide (Surface devices)" class="md-nav__link">
443 Installation Guide (Surface devices)
444 </a>
445 </li>
446
447
448
449
450
451
452
453 <li class="md-nav__item">
Eric Park5e3a1012019-08-12 13:17:03 +0800454 <a href="../installation-guide/" title="Installation Guide" class="md-nav__link">
455 Installation Guide
456 </a>
457 </li>
458
459
460
461
462
463
464
465 <li class="md-nav__item">
Eric Park0509f652020-03-01 01:54:39 +0900466 <a href="../taking-bug-reports/" title="Taking bug reports" class="md-nav__link">
467 Taking bug reports
468 </a>
469 </li>
470
471
472
473
474
475
476
477 <li class="md-nav__item">
Eric Park5e3a1012019-08-12 13:17:03 +0800478 <a href="../troubleshooting/" title="Troubleshooting" class="md-nav__link">
479 Troubleshooting
480 </a>
481 </li>
482
483
484 </ul>
485 </nav>
486 </li>
487
488
489
490
491
492
493
494 <li class="md-nav__item md-nav__item--nested">
495
496 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3">
497
498 <label class="md-nav__link" for="nav-3">
499 BlissRoms
500 </label>
501 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
502 <label class="md-nav__title" for="nav-3">
503 BlissRoms
504 </label>
505 <ul class="md-nav__list" data-md-scrollfix>
506
507
508
509
510
511
512
513 <li class="md-nav__item">
514 <a href="../../BlissRoms/" title="Index" class="md-nav__link">
515 Index
516 </a>
517 </li>
518
519
520
521
522
523
524
525 <li class="md-nav__item">
526 <a href="../../BlissRoms/build-guide/" title="Build Guide" class="md-nav__link">
527 Build Guide
528 </a>
529 </li>
530
531
532
533
534
535
536
537 <li class="md-nav__item">
538 <a href="../../BlissRoms/build-tips/" title="Build Tips" class="md-nav__link">
539 Build Tips
540 </a>
541 </li>
542
543
544 </ul>
545 </nav>
546 </li>
547
548
549
550
551
552
553
554 <li class="md-nav__item md-nav__item--nested">
555
556 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-4" type="checkbox" id="nav-4">
557
558 <label class="md-nav__link" for="nav-4">
559 Common
560 </label>
561 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
562 <label class="md-nav__title" for="nav-4">
563 Common
564 </label>
565 <ul class="md-nav__list" data-md-scrollfix>
566
567
568
569
570
571
572
573 <li class="md-nav__item">
574 <a href="../../common/" title="Index" class="md-nav__link">
575 Index
576 </a>
577 </li>
578
579
580
581
582
583
584
585 <li class="md-nav__item">
586 <a href="../../common/git-started/" title="Git Started" class="md-nav__link">
587 Git Started
588 </a>
589 </li>
590
591
592
593
594
595
596
597 <li class="md-nav__item">
Eric Park8584eda2019-09-02 09:45:55 +0800598 <a href="../../common/maintaining-proper-authorship/" title="Maintaining proper authorship" class="md-nav__link">
599 Maintaining proper authorship
600 </a>
601 </li>
602
603
604
605
606
607
608
609 <li class="md-nav__item">
Eric Park5e3a1012019-08-12 13:17:03 +0800610 <a href="../../common/using-dippy-bird/" title="Using `dippy-bird`" class="md-nav__link">
611 Using `dippy-bird`
612 </a>
613 </li>
614
615
616 </ul>
617 </nav>
618 </li>
619
620
621
622
623
624
625
626 <li class="md-nav__item md-nav__item--nested">
627
628 <input class="md-toggle md-nav__toggle" data-md-toggle="nav-5" type="checkbox" id="nav-5">
629
630 <label class="md-nav__link" for="nav-5">
631 Infrastructure
632 </label>
633 <nav class="md-nav" data-md-component="collapsible" data-md-level="1">
634 <label class="md-nav__title" for="nav-5">
635 Infrastructure
636 </label>
637 <ul class="md-nav__list" data-md-scrollfix>
638
639
640
641
642
643
644
645 <li class="md-nav__item">
646 <a href="../../infrastructure/" title="Index" class="md-nav__link">
647 Index
648 </a>
649 </li>
650
651
652 </ul>
653 </nav>
654 </li>
655
656
657 </ul>
658</nav>
659 </div>
660 </div>
661 </div>
662
663
664 <div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
665 <div class="md-sidebar__scrollwrap">
666 <div class="md-sidebar__inner">
667
668<nav class="md-nav md-nav--secondary">
669
670
671
672
673
674 <label class="md-nav__title" for="__toc">Table of contents</label>
675 <ul class="md-nav__list" data-md-scrollfix>
676
677 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800678 <a href="#introduction" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800679 Introduction
680 </a>
681
682</li>
683
684 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800685 <a href="#preparation" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800686 Preparation
687 </a>
688
689</li>
690
691 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800692 <a href="#install-the-jdk" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800693 Install the JDK
694 </a>
695
696</li>
697
698 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800699 <a href="#install-build-tools" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800700 Install build tools
701 </a>
702
703</li>
704
705 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800706 <a href="#install-source-code-tools" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800707 Install source code tools
708 </a>
709
710 <nav class="md-nav">
711 <ul class="md-nav__list">
712
713 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800714 <a href="#what-is-source" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800715 What is source?
716 </a>
717
718</li>
719
720 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800721 <a href="#what-if-i-need-repo-globally" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800722 What if I need repo globally?
723 </a>
724
725</li>
726
727 </ul>
728 </nav>
729
730</li>
731
732 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800733 <a href="#download" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800734 Download
735 </a>
736
737 <nav class="md-nav">
738 <ul class="md-nav__list">
739
740 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800741 <a href="#i-still-dont-know-how-much-cpu-threads-i-have-how-do-i-check" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800742 I still don't know how much CPU threads I have. How do I check?
743 </a>
744
745</li>
746
747 </ul>
748 </nav>
749
750</li>
751
752 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800753 <a href="#easy-build-instructions" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800754 Easy Build Instructions
755 </a>
756
757</li>
758
759 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800760 <a href="#advanced-build-instructions" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800761 Advanced Build Instructions
762 </a>
763
764 <nav class="md-nav">
765 <ul class="md-nav__list">
766
767 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800768 <a href="#my-device-isnt-booting-and-userdebug-wont-print-any-adb-logcats-what-gives" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800769 My device isn't booting, and userdebug won't print any adb logcats. What gives?
770 </a>
771
772</li>
773
774 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800775 <a href="#why-mka-and-not-make" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800776 Why mka and not make?
777 </a>
778
779</li>
780
781 </ul>
782 </nav>
783
784</li>
785
786 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800787 <a href="#after-building" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800788 After building
789 </a>
790
791</li>
792
793 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800794 <a href="#changing-the-target-kernel-branch" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800795 Changing the target kernel branch
796 </a>
797
798 <nav class="md-nav">
799 <ul class="md-nav__list">
800
801 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800802 <a href="#switching-the-kernel-branch" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800803 Switching the kernel branch
804 </a>
805
806</li>
807
808 </ul>
809 </nav>
810
811</li>
812
813 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800814 <a href="#using-the-patch-system-for-testing" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800815 Using the patch system for testing
816 </a>
817
818</li>
819
820 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800821 <a href="#troubleshooting" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800822 Troubleshooting
823 </a>
824
825</li>
826
827 <li class="md-nav__item">
Eric Park45174ca2019-10-21 01:38:33 +0800828 <a href="#conclusion" class="md-nav__link">
Eric Park5e3a1012019-08-12 13:17:03 +0800829 Conclusion
830 </a>
831
832</li>
833
834
835
836
837
838 </ul>
839
840</nav>
841 </div>
842 </div>
843 </div>
844
845
846 <div class="md-content">
847 <article class="md-content__inner md-typeset">
848
849
850
851 <h1 id="build-guide">Build Guide</h1>
852<h2 id="introduction">Introduction</h2>
853<p>This is the official guide to build Bliss OS for PCs. In this guide, we will only cover building for x86 &amp; x86_64 devices. We will also go over the details of using the patch system for testing and recompiling a build with a different kernel branch.</p>
854<p>The golden rule to building is patience. If something breaks, pay attention to the console output or take logs of the issue and ask for guidance in our build support chat.</p>
855<p>Let’s get started.</p>
856<h2 id="preparation">Preparation</h2>
857<p>To get started, you need a computer with Ubuntu 18.04 (LTS), at least 200GB space of HDD, and at least 8GB RAM. A decent CPU (or CPUs if you have a server motherboard) is recommended. Other distros can work but is not officially supported in this guide.</p>
858<p>Underpowered machines may crash during compilation. If that happens, you may try and restart the build as most crashes are caused by lack of memory. If your storage space has run out, then you will need to build on a different hard drive.</p>
859<h2 id="install-the-jdk">Install the JDK</h2>
860<p>Install OpenJDK:</p>
861<pre><code>sudo apt install openjdk-8-jdk
862</code></pre>
utzcozdb29df72020-07-15 22:49:52 +0800863<p>From the AOSP 9.0, the AOSP uses the prebuilt JDK in code repository, so it is not required if building system based on AOSP 9.0 and above version.</p>
Eric Park5e3a1012019-08-12 13:17:03 +0800864<h2 id="install-build-tools">Install build tools</h2>
865<p>To install the required build tools, run the following command:</p>
866<pre><code>sudo apt-get install git-core gnupg flex bison maven gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev libxml2-utils xsltproc unzip squashfs-tools python-mako libssl-dev ninja-build lunzip syslinux syslinux-utils gettext genisoimage gettext bc xorriso libncurses5
867</code></pre>
868<h2 id="install-source-code-tools">Install source code tools</h2>
869<p>Now we need to get the source code via a program named <code>repo</code>, made by Google. The primary function of <code>repo</code> is to read a manifest file located in Bliss OS's GitHub organization, and find what repositories you need to actually build Android.</p>
870<p>Create a <code>~/bin</code> directory for <code>repo</code>:</p>
871<pre><code>mkdir -p ~/bin
872</code></pre>
873<p>The <code>-p</code> flag instructs <code>mkdir</code> to <em>only</em> create the directory if it does not exist in the first place. Now download the <code>repo</code> tool into <code>~/bin</code>:</p>
874<pre><code>curl https://storage.googleapis.com/git-repo-downloads/repo &gt; ~/bin/repo
875</code></pre>
876<p>Make <code>repo</code> executable:</p>
877<pre><code>chmod a+x ~/bin/repo
878</code></pre>
879<p>And add it to PATH:</p>
880<pre><code>nano .bashrc
881</code></pre>
882<p>Scroll to the end of the file and type these lines:</p>
883<pre><code># Export ~/bin
884export PATH=~/bin:$PATH
885</code></pre>
886<p>Ctrl-O and enter to save, then Ctrl-X to exit nano. Now either logout and login again (or reboot), or <code>source</code> the file:</p>
887<pre><code>source .bashrc
888</code></pre>
889<p>Which can be shortened to:</p>
890<pre><code>. .bashrc
891</code></pre>
892<h3 id="what-is-source">What is <code>source</code>?</h3>
893<p><code>source</code> is a <code>bash</code> command to read aliases, functions, and commands from the specified file. Typically, you'll supply <code>bash</code> with a configuration file such as <code>.bashrc</code> or <code>.bash_profile</code>, or an initialization file such as <code>envsetup.sh</code>. The difference is that while the configuration file lists configuration and user-defined aliases and functions, initialization files typically hold build commands such as <code>breakfast</code>, <code>brunch</code>, and <code>lunch</code>. Without those commands building would be significantly harder as you would have to memorize the long command to invoke a build manually!</p>
894<p>But why do you need to run it after modifying a file? Well, <code>bash</code> cannot automatically detect changes in our files. To solve this, we either <code>source</code> it or log out and log back in, forcing <code>bash</code> to reload configuration files. Keep this in mind, because unlike configuration files, if you forget to <code>source</code> initialization files, build commands will not function!</p>
895<h3 id="what-if-i-need-repo-globally">What if I need <code>repo</code> globally?</h3>
896<p>If you need the <code>repo</code> tool to be available anywhere, you will need to first download <code>repo</code> to your home directory, move it with <code>sudo</code> and give it executable permissions. The exact commands are as follows:</p>
897<pre><code>curl https://storage.googleapis.com/git-repo-downloads/repo &gt; ~/repo
898sudo mv ~/repo /usr/bin/
899chmod a+x /usr/bin/repo
900</code></pre>
901<p><code>repo</code> will now work anywhere, without any <code>.bashrc</code> modifications. However, these steps aren’t recommended as <code>repo</code> might become a security risk if a vulnerability is found.</p>
902<p>Now we’re ready to download the source code.</p>
903<h2 id="download">Download</h2>
904<p>Create a directory for the source:</p>
905<pre><code>mkdir -p ~/blissos/p9.0
906cd ~/blissos/p9.0
907</code></pre>
908<p>Before we download, we need to tell <code>repo</code> and <code>git</code> who we are. Run the following commands, substituting your information:</p>
909<pre><code>git config --global user.email “randy.mcrandyface@hotmail.net”
910git config --global user.name “Randy McRandyface”
911</code></pre>
912<p>Now, we’re ready to initialize. We need to tell <code>repo</code> which manifest to read:</p>
913<pre><code>repo init -u https://github.com/BlissRoms-x86/manifest.git -b p9.0-x86
914</code></pre>
915<p><code>-b</code> is for the branch, and we’re on <code>p9.0-x86</code>, Android Pie. It’ll take a couple of seconds. You may need to type <code>y</code> for the color prompt.</p>
916<p>Sync repo :</p>
917<pre><code>repo sync -j24 -c --no-tags --no-clone-bundle
918</code></pre>
919<p>Problems syncing? :</p>
920<pre><code>repo sync -j4 -c --no-tags --no-clone-bundle --force-sync
921</code></pre>
922<p><code>-j</code> is for threads. Typically, your CPU core count is your thread count, unless you’re using an older Intel CPU with hyperthreading. In that case, the thread count is double the count of your CPU cores. Newer CPUs have dropped hyperthreading unless you have the i9, so check how many threads you have. If you have four threads, you would run:</p>
923<pre><code>repo sync -j4 -c
924</code></pre>
925<p><code>-c</code> is for pulling in only the current branch, instead of the entire history. This is useful if you need the downloads fast and don’t want the entire history to be downloaded. This is used by default unless specified otherwise.</p>
926<h3 id="i-still-dont-know-how-much-cpu-threads-i-have-how-do-i-check">I still don't know how much CPU threads I have. How do I check?</h3>
927<p>Run <code>nproc</code>. The output should be something like this:</p>
928<pre><code>mybuildbox@test:~$ nproc
92924
930</code></pre>
931<p>This means that there are 24 threads in your machine.</p>
932<p><code>repo</code> will start downloading all the code. That’s going to be slow, even on a fiber network. Expect downloads to take more than a couple hours.</p>
933<h2 id="easy-build-instructions">Easy Build Instructions</h2>
934<p>This will build an x86 based .ISO for PCs.</p>
935<p>Usage: <code>$ bash build-x86.sh options buildVariants blissBranch extraOptions</code>
936Options:</p>
937<pre><code>-c | --clean : Does make clean &amp;&amp; make clobber and resets the efi device tree
938-s | --sync: Repo syncs the rom (clears out patches), then reapplies patches to needed repos
939-p | --patch: Just applies patches to needed repos
940-r | --proprietary: build needed items from proprietary vendor (non-public)
941</code></pre>
942<p>BuildVariants:</p>
943<pre><code>android_x86-user : Make user build
944android_x86-userdebug |: Make userdebug build
945android_x86-eng : Make eng build
946android_x86_64-user : Make user build
947android_x86_64-userdebug |: Make userdebug build
948android_x86_64-eng : Make eng build
949</code></pre>
950<p>BlissBranch:</p>
951<pre><code>select which bliss branch to sync, default is p9.0
952</code></pre>
953<p>ExtraOptions:</p>
954<pre><code>foss : packages microG &amp; FDroid with the build
955go : packages Gapps Go with the build
956gapps : packages OpenGapps with the build
957gms : packages GMS with the build (requires private repo access)
958none : force all extraOption flags to false.
959</code></pre>
960<p>To start, you must first use the -s (--sync) flag, then on following builds, it is not needed. Initial generation of the proprietary files from ChromeOS are also needed on the first build. We are able to use the -r (--proprietary) flag for that.
961<strong>This step needs to be on its own because the mounting process requires root permissions, so keep a look out for it asking for your root password</strong>.</p>
962<p>First you must sync with the new manifest changes:</p>
963<pre><code>bash build-x86.sh -p
964</code></pre>
965<p>This will do initial patching. Some of the patches will show as <code>already applied</code> or <code>conflict</code>. This is normal behavior and will not effect the build process if you continue to the next step without addressing any of the conflicts.</p>
966<p><strong>The only times you should worry about the conflicts is when you are adding or changing patches in <code>vendor/x86</code></strong>.</p>
967<p>Next step is to download the proprietary files from ChromeOS:</p>
968<pre><code>mkdir vendor/bliss_priv/proprietary
969mkdir vendor/bliss_priv/source
970bash build-x86.sh -r android_x86_64-userdebug
971</code></pre>
972<p>After that, you can build your release file:</p>
973<pre><code>bash build-x86.sh android_x86_64-userdebug (to build the userdebug version for x86_64 CPUs)
974</code></pre>
975<h2 id="advanced-build-instructions">Advanced Build Instructions</h2>
976<p>Set up the build environment:</p>
977<pre><code>. build/envsetup.sh
978</code></pre>
979<p>This is the initialization file we talked about earlier up top. This "initializes" the environment, and imports a bunch of useful build commands required to build your device. Again, you need to remember to <code>source</code> this file every time you log out and log back in, or launch a new <code>bash</code>/Terminal instance.</p>
980<p>Define what device you’re going to build. For example, the Nexus 5X, has a codename of <code>bullhead</code>. You can check your specific device's codename on GitHub or on Google. Execute:</p>
981<p>For 32 bit devices:</p>
982<pre><code>lunch android_x86-userdebug
983</code></pre>
984<p>For 64 bit devices:</p>
985<pre><code>lunch android_x86_64-userdebug
986</code></pre>
987<p>Let's break down the command. <code>lunch</code> initializes the proper environmental variables required for the build tools to build your specific device. Things like <code>BLISS_DEVICE</code> and other variables are set in this stage, and the changed variables will be shown as output. <code>x86</code> or <code>x86_64</code> is the specific device we are building. Finally, <code>userdebug</code> means that we will build a user-debuggable variant. This is usually what most ROMs use for publishing their builds. Manufacturers typically use <code>user</code> which disables most of the useful Android Logcats.</p>
988<h3 id="my-device-isnt-booting-and-userdebug-wont-print-any-adb-logcats-what-gives">My device isn't booting, and <code>userdebug</code> won't print any <code>adb logcat</code>s. What gives?</h3>
989<p>There is a third build variant called <code>eng</code>, short for engineering builds. These builds will activate <code>adb logcat</code> during boot, and will show you exactly what is going wrong, where, and why. However, these builds are <strong>NOT</strong> recommended for normal usage as they are not securely hardened, have log spam that will slow down your device, and other unexpected problems like userspace utilities crashing during runtime. If you want to submit your device for mainline, do <strong>NOT</strong> submit an <code>eng</code> build!</p>
990<p>If this is the first time you're running the build, you're going to want to run the proprietary build command first from the easy build instructions. Alternatively, you could also run those commands manually.</p>
991<pre><code>mkdir vendor/bliss_priv/proprietary &amp;&amp; mkdir vendor/bliss_priv/source
992</code></pre>
993<p>Then:</p>
994<pre><code>lunch android_x86_64-userdebug
995mka update_engine_applier
996mka proprietary
997</code></pre>
998<p>After that is complete, we can start the main building process. Run:</p>
999<p><code>mka iso_img</code></p>
1000<p>And the build should start. The build process will take a long time. Prepare to wait a few hours, even on a decent machine.</p>
1001<h3 id="why-mka-and-not-make">Why <code>mka</code> and not <code>make</code>?</h3>
1002<p><code>make</code> only runs with 1 thread. <code>mka</code> is properly aliased to use all of your threads by checking <code>nproc</code>.</p>
1003<p>If you want to customize your thread count (maybe you're building with a fan-screaming laptop in a quiet coffee shop), use <code>make -j#</code>, replacing the hash with the number of threads (example of <code>make -j4</code>).</p>
1004<h2 id="after-building">After building</h2>
1005<p>There are two outcomes to a build - either it fails and you get a red error message from <code>make</code>, or it succeeds and you see the Bliss logo in ASCII. If you encounter the former, you need to go back and fix whatever it's complaining about. Typically, 90% of the time the problem will be in your device tree. For the other 10%, submit a bug report to the ROM developers. Be sure to include the full log of your build to help diagnose the problem, and your device tree.</p>
1006<p>If you face the latter, congratulations! You've successfully built BlissRoms for your device. Grab the artifacts for your device:</p>
1007<pre><code>cd out/target/product/x86_64/
1008</code></pre>
1009<p>In here, you’ll find an <code>.iso</code> that goes along the lines of <code>Bliss-v11.9--OFFICIAL-20190801-1619_x86_64_k-k4.9.153_m-18.3.5-pie-x86-llvm80_f-dev-kernel.org.iso</code>.</p>
1010<h2 id="changing-the-target-kernel-branch">Changing the target kernel branch</h2>
1011<p>Sometimes, you might be working on a device that requires a different kernel branch. In order to switch kernels effectively on Bliss OS, they need to be compiled with the OS at build time.</p>
1012<h3 id="switching-the-kernel-branch">Switching the kernel branch</h3>
1013<p>Start off by entering the kernel folder</p>
1014<pre><code>cd kernel
1015</code></pre>
1016<p>Then pull all the available kernel branched from your target repo. In this case, we are using the default <code>BR-x86</code> repo</p>
1017<pre><code>git fetch BR-x86
1018</code></pre>
1019<p>Then after that is finished, we need to checkout our target branch, and in this example we are choosing our <code>k4.19.50-ax86-ga</code> branch, which has added commits from the GalliumOS project for Chromebooks</p>
1020<pre><code>git checkout BR-x86/k4.19.50-ax86-ga
1021</code></pre>
1022<p>Next step is to clean out any configs or generated files from the previously checked out kernel. To do this, run these commands</p>
1023<pre><code>make clean
1024make mrproper
1025</code></pre>
1026<p>Once that is done, we can <code>cd</code> back to our main project folder</p>
1027<pre><code>cd ..
1028</code></pre>
1029<p>And run our build command again to generate the <code>.iso</code> with the target kernel we selected</p>
1030<pre><code>rm -rf out/target/product/x86_64/kernel
1031mka iso_img
1032</code></pre>
1033<h2 id="using-the-patch-system-for-testing">Using the patch system for testing</h2>
1034<p>We use a patching method we adapted for Bliss from Intel's Project Celadon &amp; phh-treble. This patching system allows us to bring in a good number of commits to add to the OS, and test how they apply or if there are any conflicts.</p>
1035<p>Our intention was to make a system that can add all the needed x86/x86_64 commits to BlissROM, as well as other ROMs too.</p>
1036<p>The majority of this system is found in <code>vendor/x86/utils</code>.</p>
1037<p>From here, you simply generate the <code>.patch</code> files from your additions, and add them to the mix.
1038In the following example, we are going to generate patches from <code>packages/apps/Settings</code> and add them to the proper folder for live testing.</p>
1039<p>From your Project folder:</p>
1040<pre><code>cd packages/apps/Settings
1041</code></pre>
1042<p>And generate your <code>.patch</code> files. For this example, we've added four commits on top of what was there after sync</p>
1043<pre><code>git format-patch -4
1044</code></pre>
1045<p>Then copy those files to the proper folder in <code>vendor/x86</code>. In this case, you will find it here:</p>
1046<pre><code>vendor/x86/utils/android_p/google_diff/x86
1047</code></pre>
1048<p>After that is complete, you can <code>make clean</code> and run the patch system from your main project folder.</p>
1049<pre><code>make clean
1050bash build-x86.sh -p
1051</code></pre>
1052<p>This should start patching all the source files. Once that is complete, you can rebuild.</p>
1053<h2 id="troubleshooting">Troubleshooting</h2>
1054<p>If your build failed, there are a couple things you can try.</p>
1055<ul>
1056<li>Try a fresh <code>repo sync</code> to make your repository up to date. Sometimes, the Internet connection between you and GitHub can be flaky. In rare cases a commit merge might be ongoing, and you might've grabbed an incomplete merge. Mostly, this should fix the issue 70% of the time.</li>
1057<li>Make sure your dependencies are installed correctly. Error messages help out a lot here! Often it will say <code>shared/linked library not found</code> or something along those lines.</li>
1058<li>Make sure you sourced <code>build/envsetup.sh</code>. This is especially common and worth suspecting if none of the build commands like <code>breakfast</code> and <code>lunch</code> work. If you have <code>repo sync</code>ed do this again.</li>
1059<li>Make sure you’re at the root of the build tree. Again, to quickly jump there, use <code>croot</code>.</li>
1060<li>Make sure your computer itself isn’t faulty. HDDs usually die first, followed by RAM. SSDs rarely die but failure is not unheard of. In extremely rare cases, your CPU may have a defect. If you're unsure, run a stress test using a program like Prime95.</li>
1061</ul>
1062<p>If something goes wrong and you've tried everything above, first use Google to look up your error! Most of the errors you encounter is due to misconfiguration and wrong commands entered. More often than not, Google will have the answer you are looking for. If you're still stuck and nothing fixes the problem, then ask us via our Telegram Build Support chat.</p>
1063<h2 id="conclusion">Conclusion</h2>
1064<p>Building a ROM is very hard and tedious and the results are very rewarding! If you managed to follow along, congratulations!</p>
1065<p>After you finish building, you can try out the Git Started guide. Make changes, commit, and send them off to our GitHub for Bliss OS repos &amp; our Gerrit for review on BlissROMs repos! Or better yet, download experimental commits not ready for the mainline repositories and review them! Again, ROM building is a fun project you can work with. I hope this guide was a lot of fun to run through!</p>
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075 </article>
1076 </div>
1077 </div>
1078 </main>
1079
1080
1081<footer class="md-footer">
1082
1083 <div class="md-footer-nav">
1084 <nav class="md-footer-nav__inner md-grid">
1085
1086 <a href="../" title="Index" class="md-flex md-footer-nav__link md-footer-nav__link--prev" rel="prev">
1087 <div class="md-flex__cell md-flex__cell--shrink">
1088 <i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
1089 </div>
1090 <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
1091 <span class="md-flex__ellipsis">
1092 <span class="md-footer-nav__direction">
1093 Previous
1094 </span>
1095 Index
1096 </span>
1097 </div>
1098 </a>
1099
1100
1101 <a href="../extras/" title="Extras" class="md-flex md-footer-nav__link md-footer-nav__link--next" rel="next">
1102 <div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
1103 <span class="md-flex__ellipsis">
1104 <span class="md-footer-nav__direction">
1105 Next
1106 </span>
1107 Extras
1108 </span>
1109 </div>
1110 <div class="md-flex__cell md-flex__cell--shrink">
1111 <i class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
1112 </div>
1113 </a>
1114
1115 </nav>
1116 </div>
1117
1118 <div class="md-footer-meta md-typeset">
1119 <div class="md-footer-meta__inner md-grid">
1120 <div class="md-footer-copyright">
1121
1122 powered by
1123 <a href="https://www.mkdocs.org">MkDocs</a>
1124 and
1125 <a href="https://squidfunk.github.io/mkdocs-material/">
1126 Material for MkDocs</a>
1127 </div>
1128
1129 </div>
1130 </div>
1131</footer>
1132
1133 </div>
1134
Eric Park45174ca2019-10-21 01:38:33 +08001135 <script src="../../assets/javascripts/application.ac79c3b0.js"></script>
Eric Park5e3a1012019-08-12 13:17:03 +08001136
1137 <script>app.initialize({version:"1.0.4",url:{base:"../.."}})</script>
1138
1139
1140 </body>
1141</html>