Skip to content

Instantly share code, notes, and snippets.

@jwrdegoede
Created January 28, 2026 14:44
Show Gist options
  • Select an option

  • Save jwrdegoede/f9a1c3d16a5ccd900d2be1a16a8d0773 to your computer and use it in GitHub Desktop.

Select an option

Save jwrdegoede/f9a1c3d16a5ccd900d2be1a16a8d0773 to your computer and use it in GitHub Desktop.
ukify script for auto DTB loading
#!/bin/bash
set -e
pushd arch/arm64/boot/dts/qcom > /dev/null
DTBS=""
for i in asus dell hp lenovo microsoft; do
DTBS="$DTBS $(ls x1e*-$i-*.dtb | grep -v el2)"
done
for i in huawei lenovo microsoft; do
DTBS="$DTBS $(ls sc8?80x*-$i-*.dtb | grep -v el2)"
done
popd > /dev/null
DEVICETREE_AUTO=""
for i in $DTBS; do
DEVICETREE_AUTO="$DEVICETREE_AUTO --devicetree-auto=arch/arm64/boot/dts/qcom/$i"
done
set -x
ukify build --linux=arch/arm64/boot/vmlinuz.efi \
--os-release="" \
--stub=/usr/lib/systemd/boot/efi/linuxaa64.efi.stub \
--hwids=/usr/share/stubble/hwids \
$DEVICETREE_AUTO
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment