Skip to content

prepare-source.sh: resolve in-tree kernel config fragments - #72

Merged
Bjordis Collaku (bjordiscollaku) merged 1 commit into
qcom/debian/latestfrom
feat/intree-config-fragments
Aug 27, 2026
Merged

Bjordis Collaku (bjordiscollaku) merged 1 commit into
qcom/debian/latestfrom
feat/intree-config-fragments

Conversation

@bjordiscollaku

Copy link
Copy Markdown
Contributor

Summary

Adds an intree: prefix to --kernel-config so config fragments that ship with the kernel source can be activated without copying them into this repository.

This is the enabling change for #69. It is intentionally separate from the matrix change so it can land first: the matrix entry that uses intree:qcom_debug will fail on any revision that does not understand the prefix.

Problem

--kernel-config resolved names only against debian/config-available/. The debug fragment that #69 needs, qcom_debug.config, lives in the kernel source at arch/arm64/configs/qcom_debug.config:

CONFIG_QCOM_DCC=y
CONFIG_QCOM_DCC_DEV=y
CONFIG_QCOM_MEMORY_DUMP_V2=y
CONFIG_QCOM_MEMORY_DUMP_DEV=y

Those options track the kernel, so vendoring a copy into debian/config-available/ would reintroduce exactly the drift that #65 dealt with.

Change

A bare name resolves as before to debian/config-available/<name>.config. An intree: prefix resolves to arch/arm64/configs/<name>.config in the kernel source:

--kernel-config squashfs,systemd-boot,qcom-imsdk,docker,qemu-boot,usb-can,intree:qcom_debug

Both kinds are copied into debian/config/ before debian/rules prepare runs, so debian/rules needs no change: it already globs debian/config/*.config in sorted order.

Error handling matches the existing behaviour for packaging fragments:

  • A missing in-tree fragment fails the build and lists what the kernel tree provides.
  • Two entries resolving to the same filename are rejected rather than one silently overwriting the other.

Validation

Exercised against a fixture kernel tree:

Case Result
Bare names only (existing behaviour) Both fragments activated from debian/config-available
Mixed bare names plus intree:qcom_debug Packaging fragments and the in-tree fragment all activated, each logged with its origin
intree:does_not_exist Exits 1, reports the missing path and lists available in-tree fragments
docker and intree:docker together Exits 1 on the filename collision

bash -n and shellcheck -S error are clean on both modified scripts.

Compatibility

No existing --kernel-config value changes behaviour: every current matrix row uses bare names only. debian/rules is untouched.

Refs #69.

Config fragments were resolvable only from debian/config-available/. Some
fragments ship with the kernel source instead, under arch/arm64/configs/,
and are versioned with the kernel they target. qcom_debug.config is the
case that prompted this: its options track the kernel, so vendoring a copy
into this repository would reintroduce the drift that issue #65 addressed.

Accept an "intree:" prefix in --kernel-config. A bare name continues to
resolve to debian/config-available/<name>.config; "intree:<name>" resolves
to arch/arm64/configs/<name>.config in the kernel source. Both are copied
into debian/config/ before prepare runs, so debian/rules is unchanged.

A missing in-tree fragment fails the build and lists what the kernel tree
provides, matching the existing behaviour for packaging fragments. Two
entries resolving to the same filename are rejected rather than silently
overwriting one another.

Existing --kernel-config values are unaffected.

Signed-off-by: Bjordis Collaku <bcollaku@qti.qualcomm.com>
@bjordiscollaku
Bjordis Collaku (bjordiscollaku) merged commit 6069a08 into qcom/debian/latest Aug 27, 2026
3 checks passed
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