diff options
| author | 2026-09-07 04:50:59 +0700 | |
|---|---|---|
| committer | 2026-09-07 04:50:59 +0700 | |
| commit | 49428abac50976f943806aa2b116597328148ddc (patch) | |
| tree | e0d8a2d5fb1aa758738551345fd3c8c6d0d67fb3 /root | |
| parent | 1075e725492e482d826bfcf222e6f2f6644f5d4b (diff) | |
| download | kiwi-descriptions-49428abac50976f943806aa2b116597328148ddc.tar.gz kiwi-descriptions-49428abac50976f943806aa2b116597328148ddc.zip | |
DRAFT: feat: use kernel tailored for surface pro 12-inch
Diffstat (limited to 'root')
6 files changed, 38 insertions, 18 deletions
diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/kernel/devicetree b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/kernel/devicetree index 37226e7..2acf815 100644 --- a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/kernel/devicetree +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/kernel/devicetree @@ -1 +1 @@ -qcom/x1p42100-microsoft-surface-pro-12-inch.dtb +qcom/x1p42100-microsoft-sp12in.dtb diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/hexagonrpc.service b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/hexagonrpc.service index 5b252fd..2e3cf82 100644 --- a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/hexagonrpc.service +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/hexagonrpc.service @@ -1,6 +1,5 @@ [Unit] Description=HexagonRPC Service -After=network.target [Service] ExecStart=/usr/local/bin/hexagonrpcd -f /dev/fastrpc-adsp-secure -s diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/iio-sensor-proxy.service b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/iio-sensor-proxy.service deleted file mode 100644 index f0eb446..0000000 --- a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/iio-sensor-proxy.service +++ /dev/null @@ -1,11 +0,0 @@ -[Unit] -Description=IIO Sensor Proxy Service -After=network.target hexagonrpc.service -Requires=hexagonrpc.service - -[Service] -ExecStart=/usr/libexec/iio-sensor-proxy -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/iio-sensor-proxy.service.d/60-surface-pro-12-inch.conf b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/iio-sensor-proxy.service.d/60-surface-pro-12-inch.conf new file mode 100644 index 0000000..7b3cfcb --- /dev/null +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/etc/systemd/system/iio-sensor-proxy.service.d/60-surface-pro-12-inch.conf @@ -0,0 +1,14 @@ +# Surface Pro 12" (Snapdragon X1P-42-100) +# +# The sensors on this device are not IIO devices. They live behind the SLPI +# DSP, reached over fastrpc by hexagonrpcd, and iio-sensor-proxy only sees them +# through the SSC backend it is built with here (-Dssc-support=enabled). So it +# has to start after that daemon, and stop being useful if the daemon dies. +# +# A drop-in rather than a replacement unit: upstream's own unit is D-Bus +# activated (Type=dbus, BusName=net.hadess.SensorProxy), which is how anything +# asking for net.hadess.SensorProxy gets the service started, and overriding it +# wholesale traded that away for nothing but this ordering. +[Unit] +Requires=hexagonrpc.service +After=hexagonrpc.service diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/lib/kernel/install.d/60-surface-dtb.install b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/lib/kernel/install.d/60-surface-dtb.install index c12ff47..2dadac5 100644 --- a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/lib/kernel/install.d/60-surface-dtb.install +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/lib/kernel/install.d/60-surface-dtb.install @@ -5,11 +5,28 @@ umask 022 COMMAND="$1" KVER="$2" -SRC="/etc/surface-dtb/x1p42100-microsoft-surface-pro-12-inch.dtb" -DEST="/usr/lib/modules/${KVER}/dtb/qcom/x1p42100-microsoft-surface-pro-12-inch.dtb" +DTB_NAME=x1p42100-microsoft-sp12in.dtb +DEST="/usr/lib/modules/${KVER}/dtb/qcom/${DTB_NAME}" + +# The master copy comes from kernel-surface: it builds the dtb in-tree from the +# patched dts and installs it under /usr/lib/surface-dtb, deliberately outside +# any /usr/lib/modules/<kver>, so it can be re-staged into any kernel installed +# alongside it. +SRC="/usr/lib/surface-dtb/${DTB_NAME}" +[ -f "${SRC}" ] || SRC="" case "${COMMAND}" in add) + # No master and no dtb already in this kernel's tree means there is + # nothing this board can boot with, so say so rather than failing + # silently three steps later in the boot loader. + if [ -z "${SRC}" ]; then + if [ -f "${DEST}" ]; then + exit 0 + fi + echo "60-surface-dtb: no ${DTB_NAME} in /usr/lib/surface-dtb" >&2 + exit 1 + fi mkdir -p "$(dirname ${DEST})" cp -f "${SRC}" "${DEST}" chmod 644 "${DEST}" diff --git a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/lib/kernel/install.d/95-surface-dtb-patch.install b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/lib/kernel/install.d/95-surface-dtb-patch.install index 375b085..f0314b0 100644 --- a/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/lib/kernel/install.d/95-surface-dtb-patch.install +++ b/root/tmp/SayaAndy/surface-pro-12-inch-linux-fedora/usr/lib/kernel/install.d/95-surface-dtb-patch.install @@ -29,15 +29,16 @@ KVER="${2:-}" [ "$COMMAND" = "add" ] || exit 0 [ -n "$KVER" ] || exit 0 -DTB_NAME=x1p42100-microsoft-surface-pro-12-inch.dtb +DTB_NAME=x1p42100-microsoft-sp12in.dtb DTB_REL="qcom/$DTB_NAME" BOOT_ROOT="${KERNEL_INSTALL_BOOT_ROOT:-/boot}" # 60-surface-dtb.install stages the dtb into this kernel's module tree; fall -# back to the master copy if it has not run (or was removed). +# back to kernel-surface's version-independent master copy if it has not run +# (or was removed). DTB_SRC="/usr/lib/modules/${KVER}/dtb/${DTB_REL}" if [ ! -f "$DTB_SRC" ]; then - DTB_SRC="/etc/surface-dtb/$DTB_NAME" + DTB_SRC="/usr/lib/surface-dtb/$DTB_NAME" fi [ -f "$DTB_SRC" ] || exit 0 |