aboutsummaryrefslogtreecommitdiffci
path: root/config.sh
diff refs
from:
to:
diff options
context:
space:
mode:
authorGravatar Saya Andy <saya.andy@posteo.com> 2026-09-07 12:33:58 +0700
committerGravatar Saya Andy <saya.andy@posteo.com> 2026-09-07 12:33:58 +0700
commitcd45abe68eec0d00e6b51d765db273a424352529 (patch)
tree3b35a0941dd03c98539c9ecfe1e321126df365ac /config.sh
parent2411d569bb9c00b434691bf0a2add278e16c798e (diff)
downloadkiwi-descriptions-cd45abe68eec0d00e6b51d765db273a424352529.tar.gz
kiwi-descriptions-cd45abe68eec0d00e6b51d765db273a424352529.zip
fix: release-split dtb copies
Diffstat (limited to 'config.sh')
-rwxr-xr-xconfig.sh15
1 files changed, 9 insertions, 6 deletions
diff --git a/config.sh b/config.sh
index ef17771..0ab8a88 100755
--- a/config.sh
+++ b/config.sh
@@ -437,9 +437,9 @@ fi
#--------------------------------------
# Device tree. kernel-surface compiles the patched dts in-tree and installs the
-# result twice: into its own module tree (dtb/qcom, from dtbs_install) and
-# version-independently into /usr/lib/surface-dtb. The latter is the master copy
-# 60-surface-dtb.install re-stages into each new kernel's module tree on update,
+# result twice: into its own module tree (dtb/qcom, from dtbs_install) and into
+# /usr/lib/surface-dtb/<kver>/. The latter is the master copy
+# 60-surface-dtb.install re-stages into a kernel that shipped without one,
# which is the only reason the image no longer carries a prebuilt blob of its
# own -- the description installs kernel-surface by name and <ignore>s Fedora's
# kernel packages, so the package is always there.
@@ -453,9 +453,12 @@ fi
# module-tree copy, anything keyed off /usr/lib/modules/$kver/dtb (including the
# anaconda post-script) finds nothing and silently does nothing.
dtb_name=x1p42100-microsoft-sp12in.dtb
-dtb_src="/usr/lib/surface-dtb/$dtb_name"
-if [[ ! -f "$dtb_src" ]]; then
- printf 'Error: %s is missing, so kernel-surface (built from ../kernel-surface) is not installed.\n' "$dtb_src" >&2
+# One directory per kernel version under /usr/lib/surface-dtb: kernel-surface is
+# installonly, so nothing it owns can be version-unqualified. Only one release is
+# ever installed at this point in the build, but glob anyway rather than assume.
+dtb_src=$(ls -1 /usr/lib/surface-dtb/*/"$dtb_name" 2>/dev/null | sort -V | tail -n1)
+if [[ -z "$dtb_src" ]]; then
+ printf 'Error: no %s under /usr/lib/surface-dtb/, so kernel-surface (built from ../kernel-surface) is not installed.\n' "$dtb_name" >&2
exit 1
fi
install -Dm644 "$dtb_src" "/usr/lib/modules/$kver/dtb/qcom/$dtb_name"