You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 2201308
Browse filesBrowse the repository at this point in the historyBrowse files
<p>Do not use separate fragment files here. Edit <code>arch/arm64/configs/gki_defconfig</code> directly and apply this <strong>GKI-only configuration</strong>.</p>
266
266
<p>These options are tested on all GKI kernels and do not break the ABI.</p>
267
267
<divclass="callout callout-warning"><strongclass="callout-title">Warning</strong><p><strong>Do not</strong> enable anything beyond the GKI configuration below. These specific options are kABI-safe only in combination with the Step 1 patch.</p>
268
-
<p>The <strong>Resource limits</strong> group at the end is the exception: it is not kABI-tested. Leave it out unless you need CPU or process limits, and test each option on its own.</p></div>
268
+
<p>The <strong>Resource limits</strong> group at the end is the exception: <code>CONFIG_CFS_BANDWIDTH</code> and <code>CONFIG_CGROUP_PIDS</code><strong>break the kABI</strong>, and no patch here covers them. See <ahref="#gki-resource-limits">CPU and process limits on GKI</a> before you touch them. Memory limits need nothing extra, <code>CONFIG_MEMCG</code> is already on in GKI.</p></div>
269
269
<divclass="code-block"><spanclass="code-lang">makefile</span><buttonclass="icon-button copy-btn" onclick="copyCode(this)" aria-label="Copy"><spanclass="icon" aria-hidden="true">content_copy</span></button><pre><code><spanclass="c"># Kernel configurations for full DroidSpaces support for GKI</span>
<h3id="step-4-flash-and-test">Step 4: Flash and test <aclass="header-anchor" href="#step-4-flash-and-test">#</a></h3>
328
332
<p>Flash the compiled <code>boot.img</code> or <code>Image</code> with Odin, fastboot, Heimdall, Anykernel3 or whatever your device uses. The patches are kABI-safe, so your stock vendor modules keep working.</p>
329
333
<p>After booting, open the Droidspaces app and go to <strong>Settings</strong> (gear icon) -> <strong>Requirements</strong> -> <strong>Check Requirements</strong> to verify the setup.</p>
334
+
<p><aid="gki-resource-limits"></a></p>
335
+
<h3id="cpu-and-process-limits-on-gki">CPU and process limits on GKI <aclass="header-anchor" href="#cpu-and-process-limits-on-gki">#</a></h3>
336
+
<p><code>CONFIG_CFS_BANDWIDTH</code> (for <code>--cpus</code>) and <code>CONFIG_CGROUP_PIDS</code> (for <code>--pids-limit</code>) are commented out in the configuration above on purpose.</p>
337
+
<p>Both change the size of scheduler and cgroup structures that almost every exported kernel function refers to. Measured on a 5.15 GKI tree, enabling the two changed the CRC of 4101 exported symbols. Stock vendor modules were built against the old CRCs, so they refuse to load ("disagrees about version of symbol"), and without its display, storage and Wi-Fi drivers the device bootloops. Unlike <code>CONFIG_SYSVIPC</code>, the new fields do not fit in the reserved kABI padding, so there is no patch for this.</p>
338
+
<divclass="callout callout-caution"><strongclass="callout-title">Caution</strong><p>Only enable these two options if you can do <strong>all</strong> of the following:</p>
339
+
<ol>
340
+
<li>Rebuild <strong>every</strong> kernel module from the same source tree and configuration as the kernel.</li>
341
+
<li>Flash the rebuilt modules in <code>vendor_boot</code>, <code>vendor_dlkm</code> and <code>system_dlkm</code><strong>together with</strong> the new kernel in <code>boot.img</code>, all at once. One stale partition is enough for a bootloop.</li>
342
+
</ol>
343
+
<p>If any module on your device is prebuilt and has no source, you cannot enable them.</p>
344
+
<p>Do not turn off <code>CONFIG_MODVERSIONS</code> or force-load modules to get past the check. The structures really did change, and a stock module would read the wrong offsets.</p></div>
345
+
<p>Without these options Droidspaces still works: <code>--cpus</code> and <code>--pids-limit</code> are skipped with a warning, and the app greys out the two toggles.</p>
330
346
<hr/>
331
347
<p><aid="testing"></a></p>
332
348
<h2id="testing-your-kernel">Testing your kernel <aclass="header-anchor" href="#testing-your-kernel">#</a></h2>
<navclass="toc" aria-label="On this page"><pclass="toc-title">On this page</p><ul><liclass="toc-h3"><ahref="#quick-navigation">Quick navigation</a></li><liclass="toc-h2"><ahref="#overview">Overview</a></li><liclass="toc-h2"><ahref="#configuring-non-gki-kernels-legacy-kernels">Configuring non-GKI kernels (legacy kernels)</a></li><liclass="toc-h3"><ahref="#step-1-mandatory-configuration">Step 1: Mandatory configuration</a></li><liclass="toc-h3"><ahref="#step-2-firewall-support-ufwfail2ban---optional">Step 2: Firewall support (UFW/Fail2ban) - optional</a></li><liclass="toc-h3"><ahref="#step-3-apply-patches">Step 3: Apply patches</a></li><liclass="toc-h3"><ahref="#step-4-build-flash-and-test">Step 4: Build, flash and test</a></li><liclass="toc-h2"><ahref="#configuring-gki-kernels">Configuring GKI kernels</a></li><liclass="toc-h3"><ahref="#step-1-apply-the-mandatory-kabi-patches">Step 1: Apply the mandatory kABI patches</a></li><liclass="toc-h3"><ahref="#step-2-edit-gki_defconfig">Step 2: Edit gki_defconfig</a></li><liclass="toc-h3"><ahref="#step-3-compile">Step 3: Compile</a></li><liclass="toc-h3"><ahref="#step-4-flash-and-test">Step 4: Flash and test</a></li><liclass="toc-h2"><ahref="#testing-your-kernel">Testing your kernel</a></li><liclass="toc-h3"><ahref="#1-run-the-requirements-check">1. Run the requirements check</a></li><liclass="toc-h3"><ahref="#2-understanding-the-results">2. Understanding the results</a></li><liclass="toc-h3"><ahref="#3-what-to-do-if-something-is-missing">3. What to do if something is missing</a></li><liclass="toc-h2"><ahref="#recommended-kernel-versions">Recommended kernel versions</a></li><liclass="toc-h2"><ahref="#nested-containers-docker-podman-lxc">Nested containers (Docker, Podman, LXC)</a></li><liclass="toc-h3"><ahref="#legacy-kernel-considerations-419-and-below">Legacy kernel considerations (4.19 and below)</a></li><liclass="toc-h2"><ahref="#additional-resources">Additional resources</a></li></ul></nav>
544
+
<navclass="toc" aria-label="On this page"><pclass="toc-title">On this page</p><ul><liclass="toc-h3"><ahref="#quick-navigation">Quick navigation</a></li><liclass="toc-h2"><ahref="#overview">Overview</a></li><liclass="toc-h2"><ahref="#configuring-non-gki-kernels-legacy-kernels">Configuring non-GKI kernels (legacy kernels)</a></li><liclass="toc-h3"><ahref="#step-1-mandatory-configuration">Step 1: Mandatory configuration</a></li><liclass="toc-h3"><ahref="#step-2-firewall-support-ufwfail2ban---optional">Step 2: Firewall support (UFW/Fail2ban) - optional</a></li><liclass="toc-h3"><ahref="#step-3-apply-patches">Step 3: Apply patches</a></li><liclass="toc-h3"><ahref="#step-4-build-flash-and-test">Step 4: Build, flash and test</a></li><liclass="toc-h2"><ahref="#configuring-gki-kernels">Configuring GKI kernels</a></li><liclass="toc-h3"><ahref="#step-1-apply-the-mandatory-kabi-patches">Step 1: Apply the mandatory kABI patches</a></li><liclass="toc-h3"><ahref="#step-2-edit-gki_defconfig">Step 2: Edit gki_defconfig</a></li><liclass="toc-h3"><ahref="#step-3-compile">Step 3: Compile</a></li><liclass="toc-h3"><ahref="#step-4-flash-and-test">Step 4: Flash and test</a></li><liclass="toc-h3"><ahref="#cpu-and-process-limits-on-gki">CPU and process limits on GKI</a></li><liclass="toc-h2"><ahref="#testing-your-kernel">Testing your kernel</a></li><liclass="toc-h3"><ahref="#1-run-the-requirements-check">1. Run the requirements check</a></li><liclass="toc-h3"><ahref="#2-understanding-the-results">2. Understanding the results</a></li><liclass="toc-h3"><ahref="#3-what-to-do-if-something-is-missing">3. What to do if something is missing</a></li><liclass="toc-h2"><ahref="#recommended-kernel-versions">Recommended kernel versions</a></li><liclass="toc-h2"><ahref="#nested-containers-docker-podman-lxc">Nested containers (Docker, Podman, LXC)</a></li><liclass="toc-h3"><ahref="#legacy-kernel-considerations-419-and-below">Legacy kernel considerations (4.19 and below)</a></li><liclass="toc-h2"><ahref="#additional-resources">Additional resources</a></li></ul></nav>
0 commit comments