Skip to content

Support for device tree autoloading for Compute targets #227

Description

@lool

Hi

Currently, qcom-deb-images debos-recipes use systemd-boot and supports mainly Qualcomm IoT boards (and QEMU).

With regular QLI Qualcomm IoT boards, the device tree is supposed to be loaded from the boot firmware. It can either be provided by a dtb.bin partition (supported by current debos-recipes) or a FIT image partition for some boards (not yet implemented in debos-recipes).

In debos-recipes, systemd-boot can also be configured to load a specific device tree instead of using the DT from the boot firmware, overriding the boot firmware DT entirely.

For Compute targets (laptops/desktops) such as Snapdragon laptops, there is often no DT coming from the boot firmware (typically designed for Windows), or an improper one. Ubuntu has initially implemented GRUB changes + configs to select the right DT automatically, and later implemented stubble, a mini-systemd-boot fork to do this within a simplified UKI.

qcom-deb-images should support automatic loading of the target device tree to demonstrate booting on Compute targets, and we should work with Debian to support this in regular boot media somehow.

Activity

  1. obbardc commented on Feb 3, 2026

    @obbardc
    Contributor

    stubble (ubuntu's loader) is in debian unstable now, I can backport it if there's interest.

  2. lool commented on Feb 3, 2026

    @lool
    ContributorAuthor

    I prototyped this on my Thinkpad T14s Gen6 (Hamoa/X1E), following guidance from Hans and ukify/stubble docs. Notes below:

    1. My T14s Gen6 boots with our mainline kernel qcom-deb-images builds which are Debian trixie + 6.19-rc7 if I set the device tree explicitly (qcom/x1e78100-lenovo-thinkpad-t14s.dtb) via /etc/kernel/devicetree and using regular systemd-boot (no UKI)

    2. I installed ukify, I set /etc/kernel/install.conf to layout=uki, reconfigured the working kernel and got an UKI with linux, initrd, dtb, cmdline etc. sections and it booted fine too (yay!). To query sections, install binutils-multiarch and run objdump -x on the EFI binary under /boot/efi/EFI/Linux/*.efi.

    3. Then I wanted to try with stubble HWIDs which seem to be supported directly in UKIs, so I cloned stubble in my home directory, created /etc/kernel/uki.conf with:

    [UKI]
    HWIDs=/home/debian/stubble/hwids/json
    DeviceTreeAuto=<list of qcom dtbs>
    

    For the dtbs, I had to use the full path, I listed all sc8* and all x1* dtbs, but perhaps this needs to be finetuned somehow. Including all dtbs or all qcom dtbs would be a bit much but doable (~33M), perhaps they could be compressed nicely together somehow?

    Then I removed /etc/kernel/devicetree, and reconfigured the kernel.

    In the new UKI, I had linux, initrd, hwids sections, no dtb section (as expected), and multiple dtbauto sections; that... just worked.

    I also checked with sudo fwupdtool hwids, and the Manufacturer + ProductSku HWID matches with an entry in x1e78100-lenovo-thinkpad-t14s.json which says lenovo,thinkpad-t14s-lcd (looks good).

  3. lool commented on Feb 3, 2026

    @lool
    ContributorAuthor

    stubble (ubuntu's loader) is in debian unstable now, I can backport it if there's interest.

    Oh wow, I checked like daily last week to see if it was still in NEW; thanks!! I'll try with that one

    Yeah, a trixie backport would be awesome, happy to help there too if you like :)

  4. tobhe commented on Feb 5, 2026

    @tobhe

    fwiw I uploaded the latest upstream release (7) to Debian just now, see https://tracker.debian.org/pkg/stubble

  5. obbardc commented on Feb 5, 2026

    @obbardc
    Contributor

    stubble (ubuntu's loader) is in debian unstable now, I can backport it if there's interest.

    Oh wow, I checked like daily last week to see if it was still in NEW; thanks!! I'll try with that one

    Yeah, a trixie backport would be awesome, happy to help there too if you like :)

    ...

    fwiw I uploaded the latest upstream release (7) to Debian just now, see https://tracker.debian.org/pkg/stubble

    I just uploaded stubble_7-1~bpo13+1_arm64.changes into backports-new :-)

  6. lool commented on Feb 5, 2026

    @lool
    ContributorAuthor

    Oh wow, you two are amazing!

  7. added
    debos-recipes
    on Feb 7, 2026
  8. lool commented on Feb 7, 2026

    @lool
    ContributorAuthor

    stubble (ubuntu's loader) is in debian unstable now, I can backport it if there's interest.

    Oh wow, I checked like daily last week to see if it was still in NEW; thanks!! I'll try with that one
    Yeah, a trixie backport would be awesome, happy to help there too if you like :)

    ...

    fwiw I uploaded the latest upstream release (7) to Debian just now, see https://tracker.debian.org/pkg/stubble

    I just uploaded stubble_7-1~bpo13+1_arm64.changes into backports-new :-)

    I don't know if I should be able to see it there:
    https://ftp-master.debian.org/backports-new.html
    but I'm also guessing it needs to migrate to testing/forky before being considered for trixie-backports.

  9. lool commented on Feb 7, 2026

    @lool
    ContributorAuthor

    stubble (ubuntu's loader) is in debian unstable now, I can backport it if there's interest.

    Oh wow, I checked like daily last week to see if it was still in NEW; thanks!! I'll try with that one
    Yeah, a trixie backport would be awesome, happy to help there too if you like :)

    ...

    fwiw I uploaded the latest upstream release (7) to Debian just now, see https://tracker.debian.org/pkg/stubble

    I just uploaded stubble_7-1~bpo13+1_arm64.changes into backports-new :-)

    I don't know if I should be able to see it there: https://ftp-master.debian.org/backports-new.html but I'm also guessing it needs to migrate to testing/forky before being considered for trixie-backports.

    Indeed:
    https://lists.debian.org/debian-backports/2026/02/msg00001.html

  10. obbardc commented on Feb 16, 2026

    @obbardc
    Contributor

    I uploaded stubble_7-2~bpo13+1_arm64.changes (which has been in testing for a few days) into backports-new. Let's hope that is enough!

  11. obbardc commented on Feb 17, 2026

    @obbardc
    Contributor

    stubble is now in trixie-backports: stubble_7-2~bpo13+1_arm64.changes ACCEPTED into stable-backports

  12. lool commented on Feb 18, 2026

    @lool
    ContributorAuthor
  13. gagath commented on Feb 20, 2026

    @gagath
    Contributor

    I was able to reproduce all the steps with the stubble version in trixie-backports and boot the generated UKI on my T14s! 🍰

    The only downside that I see for the moment is that I source the dtb files for DeviceTreeAuto= from /lib/linux-image-6.19.0-g904982138f20/qcom/x1e78100.... This path could move anytime the kernel version changes and AFAIK ukify does not support wildcards like * in this DeviceTreeAuto= property (FileNotFoundError: the wildcard is not expanded).

    I wonder if we could come with something smart to not have to update /etc/kernel/uki.conf everytime the kernel version (and dtb location on the filesystem) changes.

  14. tobhe commented on Feb 20, 2026

    @tobhe

    fwiw in Ubuntu this is done in a kernel postinst hook rather than with a uki.conf, see https://github.com/ubuntu/stubble/blob/ubuntu/main/debian/postinst.d/stubble

  15. 5 remaining items

  16. obbardc commented on Mar 27, 2026

    @obbardc
    Contributor

    i uploaded latest stubble into backports: stubble_9-1~bpo13+1_source.changes ACCEPTED into stable-backports

  17. gagath commented on Mar 30, 2026

    @gagath
    Contributor

    Thanks Christopher Obbard (@obbardc), I was greeted with an apt update corresponding to that this morning on my T14s arm64. This enables Glymur support for stubble in trixie.

  18. added 6 commits that reference this issue on Apr 8, 2026
    cd75233
    e3445ad
    4ab2e5e
    5bf39b7
    c4eb3c2
    9fbd638
  19. github-actions commented on Aug 14, 2026

    @github-actions

    This issue has been marked as stale after 30 days of inactivity. Consider commenting on it or providing a pull request if one is not already being worked on.

  20. lool commented on Sep 20, 2026

    @lool
    ContributorAuthor

    I proposed ubuntu/stubble#89 to add a kernel-install install.d hook.

  21. lool commented on Sep 20, 2026

    @lool
    ContributorAuthor

    I've proposed the following PR to make use of this in qcom-deb-images:
    #642

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

debos-recipes

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions