Skip to content

Commit 5630162

Browse files
committed
move kernel build to prebuilt section
1 parent 466e7bd commit 5630162

File tree

1 file changed

+126
-126
lines changed

1 file changed

+126
-126
lines changed

static/build.html

Lines changed: 126 additions & 126 deletions
Original file line numberDiff line numberDiff line change
@@ -70,15 +70,6 @@ <h2><a href="#table-of-contents">Table of contents</a></h2>
7070
</ul>
7171
</li>
7272
<li><a href="#updating-and-switching-branches-or-tags">Updating and switching branches or tags</a></li>
73-
<li>
74-
<a href="#kernel">Kernel</a>
75-
<ul>
76-
<li><a href="#kernel-4th-generation-pixels">4th generation Pixels</a></li>
77-
<li><a href="#kernel-5th-generation-pixels">5th generation Pixels</a></li>
78-
<li><a href="#kernel-6th-generation-pixels">6th generation Pixels</a></li>
79-
<li><a href="#kernel-7th-generation-pixels">7th generation Pixels</a></li>
80-
</ul>
81-
</li>
8273
<li><a href="#extracting-vendor-files-for-pixel-devices">Extracting vendor files for Pixel devices</a></li>
8374
<li><a href="#setting-up-the-os-build-environment">Setting up the OS build environment</a></li>
8475
<li><a href="#reproducible-builds">Reproducible builds</a></li>
@@ -103,6 +94,15 @@ <h2><a href="#table-of-contents">Table of contents</a></h2>
10394
<li>
10495
<a href="#prebuilt-code">Prebuilt code</a>
10596
<ul>
97+
<li>
98+
<a href="#kernel">Kernel</a>
99+
<ul>
100+
<li><a href="#kernel-4th-generation-pixels">4th generation Pixels</a></li>
101+
<li><a href="#kernel-5th-generation-pixels">5th generation Pixels</a></li>
102+
<li><a href="#kernel-6th-generation-pixels">6th generation Pixels</a></li>
103+
<li><a href="#kernel-7th-generation-pixels">7th generation Pixels</a></li>
104+
</ul>
105+
</li>
106106
<li><a href="#browser-and-webview">Browser and WebView</a></li>
107107
<li><a href="#prebuilt-apps">Prebuilt apps</a></li>
108108
</ul>
@@ -257,21 +257,6 @@ <h3><a href="#build-dependencies">Build dependencies</a></h3>
257257
a fully self-contained build process with minimal external dependencies is gradual and
258258
there are still dependencies that need to be installed on the host system.</p>
259259

260-
<p>The Linux kernel build process is not integrated into the rest of the AOSP build
261-
process, but does reuse the same prebuilts to make the build reproducible.</p>
262-
263-
<p>Additional Linux kernel build dependencies not provided by the source tree:</p>
264-
265-
<ul>
266-
<li>libgcc (for the host, not the target)</li>
267-
<li>binutils (for the host, not the target)</li>
268-
</ul>
269-
270-
<p>The dependency on the host libgcc and binutils for building utilities during the
271-
build process will be phased out by moving to a pure LLVM-based toolchain alongside
272-
doing it for the target. This is lagging a bit behind for the kernel, particularly
273-
code built for the host.</p>
274-
275260
<p>Additional Android Open Source Project build dependencies not provided by the
276261
source tree:</p>
277262

@@ -391,108 +376,6 @@ <h3><a href="#updating-and-switching-branches-or-tags">Updating and switching br
391376
GrapheneOS only provides a stable history via tags.</p>
392377
</section>
393378

394-
<section id="kernel">
395-
<h3><a href="#kernel">Kernel</a></h3>
396-
397-
<p>The kernel needs to be built in advance, since it uses a separate build system.</p>
398-
399-
<p>Prebuilts are provided for all the officially supported devices, so this step
400-
is optional.</p>
401-
402-
<section id="kernel-4th-generation-pixels">
403-
<h4><a href="#kernel-4th-generation-pixels">4th generation Pixels</a></h4>
404-
405-
<pre>mkdir -p android/kernel/coral
406-
cd android/kernel/coral
407-
repo init -u https://github.com/GrapheneOS/kernel_manifest-coral.git -b 13
408-
repo sync -j16</pre>
409-
410-
<p>To build the coral kernel for the Pixel 4 and Pixel 4 XL:</p>
411-
412-
<pre>KBUILD_BUILD_VERSION=1 KBUILD_BUILD_USER=build-user KBUILD_BUILD_HOST=build-host KBUILD_BUILD_TIMESTAMP="Thu 01 Jan 1970 12:00:00 AM UTC" BUILD_CONFIG=private/msm-google/build.config.floral build/build.sh</pre>
413-
414-
<p>To build the sunfish kernel for the Pixel 4a:</p>
415-
416-
<pre>KBUILD_BUILD_VERSION=1 KBUILD_BUILD_USER=build-user KBUILD_BUILD_HOST=build-host KBUILD_BUILD_TIMESTAMP="Thu 01 Jan 1970 12:00:00 AM UTC" BUILD_CONFIG=private/msm-google/build.config.sunfish build/build.sh</pre>
417-
418-
<p>Replace the files in the OS source tree at
419-
<code>device/google/coral-kernel/</code> or
420-
<code>device/google/sunfish-kernel/</code> with your build in
421-
<code>out/android-msm-pixel-4.14/dist/</code>.</p>
422-
</section>
423-
424-
<section id="kernel-5th-generation-pixels">
425-
<h4><a href="#kernel-5th-generation-pixels">5th generation Pixels</a></h4>
426-
427-
<p>For 5th generation Pixels:</p>
428-
429-
<pre>mkdir -p android/kernel/redbull
430-
cd android/kernel/redbull
431-
repo init -u https://github.com/GrapheneOS/kernel_manifest-redbull.git -b 13
432-
repo sync -j16</pre>
433-
434-
<p>To build the redbull kernel for the Pixel 4a (5G), Pixel 5 and Pixel 5a
435-
kernel:</p>
436-
437-
<pre>BUILD_CONFIG=private/msm-google/build.config.redbull.vintf build/build.sh</pre>
438-
439-
<p>Replace the files in the OS source tree at
440-
<code>device/google/redbull-kernel/</code> (userdebug/eng) and
441-
<code>device/google/redbull-kernel/vintf/</code> (user) with your build in
442-
<code>out/android-msm-pixel-4.19/dist/</code>.</p>
443-
</section>
444-
445-
<section id="kernel-6th-generation-pixels">
446-
<h4><a href="#kernel-6th-generation-pixels">6th generation Pixels</a></h4>
447-
448-
<p>To sync the raviole kernel for the Pixel 6 and Pixel 6 Pro:</p>
449-
450-
<pre>mkdir -p android/kernel/raviole
451-
cd android/kernel/raviole
452-
repo init -u https://github.com/GrapheneOS/kernel_manifest-raviole.git -b 13
453-
repo sync -j16</pre>
454-
455-
<p>To sync the bluejay kernel for the Pixel 6a:</p>
456-
457-
<pre>mkdir -p android/kernel/bluejay
458-
cd android/kernel/bluejay
459-
repo init -u https://github.com/GrapheneOS/kernel_manifest-bluejay.git -b 13
460-
repo sync -j16</pre>
461-
462-
<p>To build the raviole kernel for the Pixel 6 and Pixel 6 Pro:</p>
463-
464-
<pre>LTO=full BUILD_KERNEL=1 ./build_slider.sh</pre>
465-
466-
<p>To build the bluejay kernel for the Pixel 6a:</p>
467-
468-
<pre>LTO=full BUILD_KERNEL=1 ./build_bluejay.sh</pre>
469-
470-
<p>Replace the files in the OS source tree at
471-
<code>device/google/raviole-kernel/</code> or
472-
<code>device/google/bluejay-kernel/</code> with your build in
473-
<code>out/mixed/dist/</code>.</p>
474-
</section>
475-
476-
<section id="kernel-7th-generation-pixels">
477-
<h4><a href="#kernel-7th-generation-pixels">7th generation Pixels</a></h4>
478-
479-
<p>To sync the pantah kernel for the Pixel 7 and Pixel 7 Pro:</p>
480-
481-
<pre>mkdir -p android/kernel/pantah
482-
cd android/kernel/pantah
483-
repo init -u https://github.com/GrapheneOS/kernel_manifest-pantah.git -b 13
484-
repo sync -j16</pre>
485-
486-
<p>To build the pantah kernel for the Pixel 7 and Pixel 7 Pro:</p>
487-
488-
<pre>LTO=full BUILD_AOSP_KERNEL=1 ./build_cloudripper.sh</pre>
489-
490-
<p>Replace the files in the OS source tree at
491-
<code>device/google/pantah-kernel/</code> with your build in
492-
<code>out/mixed/dist/</code>.</p>
493-
</section>
494-
</section>
495-
496379
<section id="extracting-vendor-files-for-pixel-devices">
497380
<h3><a href="#extracting-vendor-files-for-pixel-devices">Extracting vendor files for Pixel devices</a></h3>
498381

@@ -816,6 +699,123 @@ <h2><a href="#prebuilt-code">Prebuilt code</a></h2>
816699
separately and then bundled into the source tree as binaries. This section will be
817700
gradually expanded to cover building all of it.</p>
818701

702+
<section id="kernel">
703+
<h3><a href="#kernel">Kernel</a></h3>
704+
705+
<p>The Linux kernel is built separately using an AOSP kernel build system
706+
wrapping the upstream Linux kernel build system. Since it's a separate build
707+
system from the rest of the OS, the kernels are built separately. Many of the
708+
repositories are shared with the rest of the OS including the repositories
709+
providing the prebuilt toolchain for reproducible builds not depending on the
710+
tools from the host OS.</p>
711+
712+
<p>Additional Linux kernel build dependencies beyond the AOSP dependencies not
713+
provided by the source tree:</p>
714+
715+
<ul>
716+
<li>libgcc (for the host, not the target)</li>
717+
<li>binutils (for the host, not the target)</li>
718+
</ul>
719+
720+
<p>The dependency on the host libgcc and binutils for building utilities during the
721+
build process will be phased out by moving to a pure LLVM-based toolchain alongside
722+
doing it for the target. This is lagging a bit behind for the kernel, particularly
723+
code built for the host.</p>
724+
725+
<section id="kernel-4th-generation-pixels">
726+
<h4><a href="#kernel-4th-generation-pixels">4th generation Pixels</a></h4>
727+
728+
<pre>mkdir -p android/kernel/coral
729+
cd android/kernel/coral
730+
repo init -u https://github.com/GrapheneOS/kernel_manifest-coral.git -b 13
731+
repo sync -j16</pre>
732+
733+
<p>To build the coral kernel for the Pixel 4 and Pixel 4 XL:</p>
734+
735+
<pre>KBUILD_BUILD_VERSION=1 KBUILD_BUILD_USER=build-user KBUILD_BUILD_HOST=build-host KBUILD_BUILD_TIMESTAMP="Thu 01 Jan 1970 12:00:00 AM UTC" BUILD_CONFIG=private/msm-google/build.config.floral build/build.sh</pre>
736+
737+
<p>To build the sunfish kernel for the Pixel 4a:</p>
738+
739+
<pre>KBUILD_BUILD_VERSION=1 KBUILD_BUILD_USER=build-user KBUILD_BUILD_HOST=build-host KBUILD_BUILD_TIMESTAMP="Thu 01 Jan 1970 12:00:00 AM UTC" BUILD_CONFIG=private/msm-google/build.config.sunfish build/build.sh</pre>
740+
741+
<p>Replace the files in the OS source tree at
742+
<code>device/google/coral-kernel/</code> or
743+
<code>device/google/sunfish-kernel/</code> with your build in
744+
<code>out/android-msm-pixel-4.14/dist/</code>.</p>
745+
</section>
746+
747+
<section id="kernel-5th-generation-pixels">
748+
<h4><a href="#kernel-5th-generation-pixels">5th generation Pixels</a></h4>
749+
750+
<p>For 5th generation Pixels:</p>
751+
752+
<pre>mkdir -p android/kernel/redbull
753+
cd android/kernel/redbull
754+
repo init -u https://github.com/GrapheneOS/kernel_manifest-redbull.git -b 13
755+
repo sync -j16</pre>
756+
757+
<p>To build the redbull kernel for the Pixel 4a (5G), Pixel 5 and Pixel 5a
758+
kernel:</p>
759+
760+
<pre>BUILD_CONFIG=private/msm-google/build.config.redbull.vintf build/build.sh</pre>
761+
762+
<p>Replace the files in the OS source tree at
763+
<code>device/google/redbull-kernel/</code> (userdebug/eng) and
764+
<code>device/google/redbull-kernel/vintf/</code> (user) with your build in
765+
<code>out/android-msm-pixel-4.19/dist/</code>.</p>
766+
</section>
767+
768+
<section id="kernel-6th-generation-pixels">
769+
<h4><a href="#kernel-6th-generation-pixels">6th generation Pixels</a></h4>
770+
771+
<p>To sync the raviole kernel for the Pixel 6 and Pixel 6 Pro:</p>
772+
773+
<pre>mkdir -p android/kernel/raviole
774+
cd android/kernel/raviole
775+
repo init -u https://github.com/GrapheneOS/kernel_manifest-raviole.git -b 13
776+
repo sync -j16</pre>
777+
778+
<p>To sync the bluejay kernel for the Pixel 6a:</p>
779+
780+
<pre>mkdir -p android/kernel/bluejay
781+
cd android/kernel/bluejay
782+
repo init -u https://github.com/GrapheneOS/kernel_manifest-bluejay.git -b 13
783+
repo sync -j16</pre>
784+
785+
<p>To build the raviole kernel for the Pixel 6 and Pixel 6 Pro:</p>
786+
787+
<pre>LTO=full BUILD_KERNEL=1 ./build_slider.sh</pre>
788+
789+
<p>To build the bluejay kernel for the Pixel 6a:</p>
790+
791+
<pre>LTO=full BUILD_KERNEL=1 ./build_bluejay.sh</pre>
792+
793+
<p>Replace the files in the OS source tree at
794+
<code>device/google/raviole-kernel/</code> or
795+
<code>device/google/bluejay-kernel/</code> with your build in
796+
<code>out/mixed/dist/</code>.</p>
797+
</section>
798+
799+
<section id="kernel-7th-generation-pixels">
800+
<h4><a href="#kernel-7th-generation-pixels">7th generation Pixels</a></h4>
801+
802+
<p>To sync the pantah kernel for the Pixel 7 and Pixel 7 Pro:</p>
803+
804+
<pre>mkdir -p android/kernel/pantah
805+
cd android/kernel/pantah
806+
repo init -u https://github.com/GrapheneOS/kernel_manifest-pantah.git -b 13
807+
repo sync -j16</pre>
808+
809+
<p>To build the pantah kernel for the Pixel 7 and Pixel 7 Pro:</p>
810+
811+
<pre>LTO=full BUILD_AOSP_KERNEL=1 ./build_cloudripper.sh</pre>
812+
813+
<p>Replace the files in the OS source tree at
814+
<code>device/google/pantah-kernel/</code> with your build in
815+
<code>out/mixed/dist/</code>.</p>
816+
</section>
817+
</section>
818+
819819
<section id="browser-and-webview">
820820
<h3><a href="#browser-and-webview">Browser and WebView</a></h3>
821821

0 commit comments

Comments
 (0)