Skip to content

Basic UKI and stubble support#362

Draft
gagath wants to merge 2 commits intoqualcomm-linux:mainfrom
gagath:stubble
Draft

Basic UKI and stubble support#362
gagath wants to merge 2 commits intoqualcomm-linux:mainfrom
gagath:stubble

Conversation

@gagath
Copy link
Copy Markdown
Contributor

@gagath gagath commented Apr 8, 2026

This is a proposal for a first basic support of UKIs with stubble and DeviceTreeAuto support.

gagath added 2 commits April 8, 2026 15:40
Using systemd-ukify, create a UKI .efi file that can be booted directly,
bypassing systemd-boot. Both exists after this commit, and the UKI can
be booted successfully from QEMU's "boot from file" option in BIOS.

Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
Add dtauto support in the generated UKI for a subset of selected qcom
hardware. Stubble allows to select the correct DTB based on the hardware
and pass it to the kernel.

Closes: qualcomm-linux#227

Signed-off-by: Agathe Porte <agathe.porte@oss.qualcomm.com>
Copy link
Copy Markdown
Contributor

@lool lool left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool! Left a few comments

I don't think we're in a rush to land this until we have figured where to do things correctly (otherwise we'll be distracted and will keep the technical debt); we could develop changes to systemd of ukify or kernel-install if needed

recommends: true
packages:
# provides objdump
- binutils
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm I like the idea of testing it somehow, but I don't like doing it at image generation time

I expect UKI to be generated on kernel install / upgrade, so they likely belong in an autopkgtest related to that, perhaps systemd-boot; we can contribute that in Debian?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to verify the content of our generated image. Autopkgtests are used to test packages themselves and fit a different purpose. Do you want me to remove tests that verify the content of our image?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

autopkgtests are used for integration testing; I think this test primarily belongs to the integration tests of the specific UKI generation you're writing, rather than to image tests

dt_auto=""
for image in /lib/linux-image-*
do
for dtb in "${image}"/qcom/x1e78100*
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we include all DTBs from stubble-data somehow?

tee /etc/kernel/uki.conf <<EOF
[UKI]
HWIDs=/usr/share/stubble/hwids/
DeviceTreeAuto=$dt_auto
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will get out of date, how about we add a kernel install script that updates this line in the file with a comment that the line is automatically updated? these two could be provided by some stubble package in Debian?

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Test Results

 2 files  ±0   6 suites  ±0   3m 22s ⏱️ ±0s
20 tests ±0  20 ✅ ±0  0 💤 ±0  0 ❌ ±0 
64 runs  ±0  64 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit cd75233. ± Comparison against base commit 68d5c9c.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 8, 2026

Test jobs for commit cd75233

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants