More AGNOS 20 regression fixes (#674)

This commit is contained in:
Adeeb Shihadeh
2026-10-19 21:58:47 -07:00
committed by GitHub
parent f1498ffa17
commit 6d5af34da4
9 changed files with 26 additions and 9 deletions
+1 -1
View File
@@ -113,7 +113,7 @@ RUN --mount=type=bind,source=userspace/root,target=/tmp/agnos/root \
set -o pipefail && \
tar -C /tmp/agnos/root --owner=0 --group=0 --mode=go-w -cf - . | tar -C / --no-overwrite-dir -xf -
COPY ./userspace/root/home/$USERNAME/.config/ /root/.config
RUN chown -R $USERNAME: /home/$USERNAME/.config
RUN chown -R $USERNAME: /home/$USERNAME
RUN touch -r /lib/systemd/systemd /etc/fstab
COPY ./output/linux-headers/include/ /usr/include/
+1 -1
View File
@@ -2,5 +2,5 @@
# don't restart whole SoC on subsystem crash
for i in {0..7}; do
echo "related" | sudo tee /sys/bus/msm_subsys/devices/subsys${i}/restart_level
echo "related" > /sys/bus/msm_subsys/devices/subsys${i}/restart_level
done
+1 -1
View File
@@ -6,5 +6,5 @@ if [ -f "$SSH_PARAM" ] && [ "$(< $SSH_PARAM)" == "1" ]; then
systemctl start ssh
else
echo "Disabling SSH"
systemctl stop ssh
systemctl stop ssh.socket ssh
fi
+5 -1
View File
@@ -44,7 +44,11 @@ boot wlan /sys/kernel/boot_wlan/boot_wlan
# https://github.com/commaai/agnos-kernel-sdm845/blob/8b0e4d289b246a5cc1b0484b25a3f9f8d4772544/drivers/soc/qcom/subsystem_restart.c#L1215-L1251
(
echo "modem: booting"
exec 3< /dev/subsys_modem && echo "modem: booted" || echo "modem: boot failed"
until exec 3< /dev/subsys_modem; do
echo "modem: boot failed, retrying"
sleep 1
done
echo "modem: booted"
exec sleep infinity
) &
daemon /usr/bin/pdmappersvc
@@ -1,6 +1,8 @@
[Unit]
Description=QCOM init
After=sysinit.target
# set the restart levels before any subsystem boots
Before=wifi.service sound.service cdsp.service
[Service]
Type=oneshot
@@ -1,5 +1,6 @@
[Unit]
Description=Magic
StartLimitIntervalSec=0
[Service]
Type=simple
@@ -13,6 +14,9 @@ ExecStartPre=/bin/bash -c "echo 0 > /data/misc/display/sdm_dbg_cfg.txt || true"
ExecStartPre=/bin/bash -c "echo 0 > /data/misc/display/gbm_dbg_cfg.txt || true"
ExecStart=/bin/bash -c "source /etc/profile && /usr/local/venv/bin/python -u /usr/comma/magic.py"
# raylib exits if the touchscreen or backlight isn't accessible yet, e.g. before udev sets their permissions
Restart=on-failure
RestartSec=1
[Install]
WantedBy=multi-user.target
@@ -1,7 +1,8 @@
[Unit]
Description=Sets the hostname to the device's serial number
After=basic.target
Before=network.target
# NetworkManager sends the hostname in DHCP requests
Before=network.target NetworkManager.service
[Service]
User=root
+8 -2
View File
@@ -73,11 +73,17 @@ class GPT:
pass
if not arrays:
raise ValueError(f'{path}: neither GPT copy is valid')
source = 1 if 1 in arrays else self.last
template = self.headers[source]
# Flashing only writes the primary, so a stale backup can disagree with it; rebuild it.
other = self.last if source == 1 else 1
if other in self.headers and (self.headers[other][40:72] != template[40:72] or
self.headers[other][80:88] != template[80:88]):
del self.headers[other]
arrays.pop(other, None)
self.valid_copies = set(arrays)
self.arrays = arrays
source = 1 if 1 in arrays else self.last
self.entries = bytearray(arrays[source])
template = self.headers[source]
self.entry_size = struct.unpack_from('<I', template, 84)[0]
# Preserve the entry-array location in every valid header.
# When rebuilding a header, reserve at least 16 KiB for the entry-array, matching ABL.
+2 -2
View File
@@ -27,8 +27,8 @@ systemctl enable avahi-daemon
systemctl enable avahi-ssh-publish.service
systemctl enable screen_calibration.service
# Disable SSH by default
systemctl disable ssh
# Disable SSH by default, ssh-param-watcher starts it
systemctl disable ssh ssh.socket
# Disable all useless systemctl services
systemctl disable apt-daily-upgrade.service