Release Vulpes OS 2.7-preview.24
This commit is contained in:
parent
49572b6b45
commit
97ef99f827
135 changed files with 7717 additions and 2524 deletions
22
tundra/tools/kernel_cmdline.py
Normal file
22
tundra/tools/kernel_cmdline.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
"""Small helpers for keeping inherited Android boot flags out of Vulpes."""
|
||||
|
||||
|
||||
def remove_parameters(cmdline, names):
|
||||
"""Return (cleaned_cmdline, removed_tokens) for exact kernel parameter names."""
|
||||
names = set(names)
|
||||
kept = []
|
||||
removed = []
|
||||
for token in cmdline.split():
|
||||
if token.split('=', 1)[0] in names:
|
||||
removed.append(token)
|
||||
else:
|
||||
kept.append(token)
|
||||
return ' '.join(kept), removed
|
||||
|
||||
|
||||
def vulpes_cmdline(cmdline):
|
||||
# This Qualcomm cpuidle parameter disables every selectable low-power
|
||||
# level. It is inherited from Android and must not disable Vulpes CPU idle.
|
||||
return remove_parameters(cmdline, {'lpm_levels.sleep_disabled'})
|
||||
Loading…
Reference in a new issue