mirror of
https://github.com/commaai/agnos-builder.git
synced 2026-10-28 00:53:48 +08:00
udev did a few more things
This commit is contained in:
@@ -10,7 +10,7 @@ Conflicts=shutdown.target
|
|||||||
Before=paths.target shutdown.target
|
Before=paths.target shutdown.target
|
||||||
|
|
||||||
[Path]
|
[Path]
|
||||||
PathModified=/dev/qseecom
|
PathExists=/dev/qseecom
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ Requires=leprop.service
|
|||||||
[Service]
|
[Service]
|
||||||
Restart=no
|
Restart=no
|
||||||
RemainAfterExit=yes
|
RemainAfterExit=yes
|
||||||
|
ExecStartPre=/bin/bash -c 'for i in {1..100}; do : < /dev/ion && exit 0; sleep 0.05; done; exit 1'
|
||||||
ExecStart=/etc/initscripts/qseecomd start
|
ExecStart=/etc/initscripts/qseecomd start
|
||||||
ExecStop=/etc/initscripts/qseecomd stop
|
ExecStop=/etc/initscripts/qseecomd stop
|
||||||
|
|
||||||
|
|||||||
@@ -127,8 +127,9 @@ function init_filesystems {
|
|||||||
wait "$pid" || failed=1
|
wait "$pid" || failed=1
|
||||||
done
|
done
|
||||||
|
|
||||||
# rmt_storage is the only thing that relies on /dev/block/bootdevice/by-name.
|
# rmt_storage and qseecomd are the only users of /dev/block/bootdevice/by-name.
|
||||||
mkdir -p /dev/block/bootdevice/by-name
|
mkdir -p /dev/block/bootdevice/by-name
|
||||||
|
ln -sf /dev/sda1 /dev/block/bootdevice/by-name/ssd
|
||||||
ln -sf /dev/sdf2 /dev/block/bootdevice/by-name/modemst1
|
ln -sf /dev/sdf2 /dev/block/bootdevice/by-name/modemst1
|
||||||
ln -sf /dev/sdf3 /dev/block/bootdevice/by-name/modemst2
|
ln -sf /dev/sdf3 /dev/block/bootdevice/by-name/modemst2
|
||||||
ln -sf /dev/sdf4 /dev/block/bootdevice/by-name/fsg
|
ln -sf /dev/sdf4 /dev/block/bootdevice/by-name/fsg
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ def check_touches():
|
|||||||
event_format = "llHHi"
|
event_format = "llHHi"
|
||||||
event_size = struct.calcsize(event_format)
|
event_size = struct.calcsize(event_format)
|
||||||
|
|
||||||
with open("/dev/input/by-path/platform-894000.i2c-event", "rb") as event_file:
|
with open("/dev/input/event2", "rb") as event_file:
|
||||||
fcntl.fcntl(event_file, fcntl.F_SETFL, os.O_NONBLOCK)
|
fcntl.fcntl(event_file, fcntl.F_SETFL, os.O_NONBLOCK)
|
||||||
while True:
|
while True:
|
||||||
while (event := event_file.read(event_size)):
|
while (event := event_file.read(event_size)):
|
||||||
|
|||||||
@@ -0,0 +1,28 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Serial Getty on ttyMSM0
|
||||||
|
Documentation=man:agetty(8)
|
||||||
|
After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
|
||||||
|
After=rc-local.service
|
||||||
|
Before=getty.target
|
||||||
|
IgnoreOnIsolate=yes
|
||||||
|
Conflicts=rescue.service
|
||||||
|
Before=rescue.service
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
ExecStartPre=/bin/stty -F /dev/ttyMSM0 hupcl
|
||||||
|
ExecStart=-/sbin/agetty -o '-p -- \\u' --keep-baud 115200,57600,38400,9600 - $TERM
|
||||||
|
Type=idle
|
||||||
|
Restart=always
|
||||||
|
UtmpIdentifier=ttyMSM0
|
||||||
|
StandardInput=tty
|
||||||
|
StandardOutput=tty
|
||||||
|
TTYPath=/dev/ttyMSM0
|
||||||
|
TTYReset=yes
|
||||||
|
TTYVHangup=yes
|
||||||
|
IgnoreSIGPIPE=no
|
||||||
|
SendSIGHUP=yes
|
||||||
|
ImportCredential=agetty.*
|
||||||
|
ImportCredential=login.*
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=getty.target
|
||||||
-4
@@ -1,4 +0,0 @@
|
|||||||
# With Ubuntu 24.04 (systemd 255) and 4.9 Kernel, the console is not properly
|
|
||||||
# hung up when the serial getty for ttyMSM0 is started. Force hangup with this.
|
|
||||||
[Service]
|
|
||||||
ExecStartPre=/bin/stty -F /dev/ttyMSM0 hupcl
|
|
||||||
Reference in New Issue
Block a user