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
|
|
@ -65,6 +65,18 @@ Description=Checkpoint Tundra clock once per minute
|
|||
OnBootSec=60
|
||||
OnUnitActiveSec=60
|
||||
""")
|
||||
write('etc/systemd/system/tundra-cpuidle.service', '''[Unit]
|
||||
Description=Enable Qualcomm CPU low-power states for Tundra
|
||||
After=systemd-modules-load.service tundra-hal.service
|
||||
Before=tundra-display.service
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStartPre=/usr/bin/python3 /etc/tundra/wait-hal.py
|
||||
ExecStart=/usr/bin/python3 /etc/tundra/enable-cpuidle.py
|
||||
RemainAfterExit=yes
|
||||
''')
|
||||
shutil.copy2(Path(__file__).with_name('enable-cpuidle.py'),
|
||||
root/'etc/tundra/enable-cpuidle.py')
|
||||
wants = root/'etc/systemd/system/tundra.target.wants'
|
||||
wants.mkdir(parents=True, exist_ok=True)
|
||||
for unit in ('tundra-clock-restore.service', 'tundra-clock-save.timer'):
|
||||
|
|
@ -75,7 +87,7 @@ OnUnitActiveSec=60
|
|||
write('etc/pam.d/other','auth required pam_deny.so\naccount required pam_deny.so\npassword required pam_deny.so\nsession required pam_deny.so\n')
|
||||
write('etc/pam.d/common-account','account required pam_unix.so\n')
|
||||
write('etc/pam.d/common-session-noninteractive','session required pam_unix.so\n')
|
||||
write('etc/systemd/logind.conf','[Login]\nHandlePowerKey=ignore\nIdleAction=ignore\n')
|
||||
write('etc/systemd/logind.conf','[Login]\nHandlePowerKey=ignore\nIdleAction=suspend\nIdleActionSec=30s\n')
|
||||
write('etc/systemd/journald.conf','[Journal]\nStorage=volatile\nRuntimeMaxUse=32M\n')
|
||||
write('etc/passwd','root:x:0:0:root:/root:/bin/bash\ndroidian:x:32011:32011:Vulpes trial:/home/droidian:/bin/bash\nsystem:x:1000:1000:Android HAL:/:/usr/sbin/nologin\n')
|
||||
write('etc/group','root:x:0:\ndroidian:x:32011:\nsystem:x:1000:droidian\ngraphics:x:1003:droidian\nandroid_input:x:1004:droidian\nvideo:x:44:droidian\nrender:x:105:droidian\ninput:x:104:droidian\nnetdev:x:988:\n')
|
||||
|
|
@ -111,8 +123,8 @@ TimeoutStopSec=15
|
|||
write('etc/systemd/system/tundra-display.service','''[Unit]
|
||||
Description=Gaia and Gecko on the Sargo display
|
||||
Requires=tundra-hal.service dbus.service systemd-logind.service
|
||||
After=tundra-hal.service dbus.service systemd-logind.service systemd-user-sessions.service
|
||||
Wants=systemd-user-sessions.service
|
||||
Wants=tundra-cpuidle.service
|
||||
After=tundra-hal.service dbus.service systemd-logind.service tundra-cpuidle.service
|
||||
[Service]
|
||||
User=droidian
|
||||
PAMName=tundra
|
||||
|
|
@ -122,6 +134,7 @@ Environment=XDG_SESSION_TYPE=wayland
|
|||
Environment=XDG_CURRENT_DESKTOP=Vulpes
|
||||
Environment=LANG=C.UTF-8
|
||||
Environment=VULPES_TUNDRA=1
|
||||
Environment=VULPES_DEVICE=sargo
|
||||
Environment=VULPES_TUNDRA_RADIO=1
|
||||
Environment=WLR_BACKENDS=hwcomposer,libinput
|
||||
Environment=EGL_PLATFORM=hwcomposer
|
||||
|
|
@ -144,11 +157,15 @@ TimeoutStopSec=15
|
|||
display.write_text(display.read_text().replace('--own-compositor --hybris-egl',
|
||||
'--own-compositor --hybris-egl --diagnostics'))
|
||||
write('etc/tundra/wait-hal.py','''import subprocess,time
|
||||
for _ in range(120):
|
||||
p=subprocess.run(['/usr/bin/lxc-attach','-n','tundra-hal','--','/system/bin/getprop','init.svc.vendor.hwcomposer-2-2'],capture_output=True,text=True)
|
||||
deadline=time.monotonic()+8
|
||||
while time.monotonic()<deadline:
|
||||
try:
|
||||
p=subprocess.run(['/usr/bin/lxc-attach','-n','tundra-hal','--','/system/bin/getprop','init.svc.vendor.hwcomposer-2-2'],capture_output=True,text=True,timeout=.5)
|
||||
except subprocess.TimeoutExpired:
|
||||
continue
|
||||
if p.stdout.strip()=='running':break
|
||||
time.sleep(.5)
|
||||
else:raise RuntimeError('Display HAL did not start')
|
||||
time.sleep(.25)
|
||||
else:raise RuntimeError('Display HAL did not start within 8 seconds')
|
||||
''')
|
||||
# Cellular HAL and oFono must see the same rmnet interfaces. Display-only
|
||||
# diagnostics retain a separate network namespace. No Android network manager runs.
|
||||
|
|
@ -161,7 +178,6 @@ lxc.apparmor.profile = unconfined
|
|||
lxc.autodev = 0
|
||||
lxc.cap.drop = mac_admin mac_override sys_boot
|
||||
lxc.cgroup.devices.deny = b *:* rwm
|
||||
lxc.cgroup2.devices.deny = b *:* rwm
|
||||
lxc.cgroup2.memory.max = 536870912
|
||||
lxc.mount.entry = tmpfs dev tmpfs nosuid 0 0
|
||||
lxc.mount.entry = /dev/__properties__ dev/__properties__ none bind,create=dir 0 0
|
||||
|
|
@ -173,6 +189,8 @@ lxc.mount.entry = /mnt mnt none rbind 0 0
|
|||
''')
|
||||
for name in ('hal_policy.py','setup-hal.py','lxc-guard.py','hardware-status.py','prepare-network.py','wifi-control.py','radio-control.py','mobile-settings.py','sms-inbox.py','call-audio.py','camera-preview.py','buttons.py'):
|
||||
shutil.copy2(Path(__file__).parent/name,root/'etc/tundra'/name)
|
||||
shutil.copy2(Path(__file__).resolve().parents[1]/'tools/inspect-hardware.py',
|
||||
root/'etc/tundra/inspect-hardware.py')
|
||||
write('etc/systemd/system/tundra-hardware.service', '''[Unit]
|
||||
Description=Tundra read-only battery and network state
|
||||
After=systemd-udev-trigger.service
|
||||
|
|
|
|||
Loading…
Reference in a new issue