Skip to content

Configure kernel consistently with qcom-deb-images - #86

Merged
Christopher Obbard (obbardc) merged 5 commits into
qcom/debian/latestfrom
wip/obbardc/kernel-config
Aug 28, 2026
Merged

Configure kernel consistently with qcom-deb-images#86
Christopher Obbard (obbardc) merged 5 commits into
qcom/debian/latestfrom
wip/obbardc/kernel-config

Conversation

@obbardc

Copy link
Copy Markdown
Contributor

Generate the kernel configuration using the same method as qcom-deb-images.

I compared the generated .config files with scripts/diffconfig, there are no functional configuration differences.

Appending fragments to .config left duplicate and conflicting entries for
olddefconfig to resolve silently. Use scripts/kconfig/merge_config.sh -m -r
instead, so later fragments properly override earlier ones and any override
is reported.

Signed-off-by: Christopher Obbard <[email protected]>
prune.config strips options out of the base defconfig, so merging it after
qcom.config let it drop options that qcom.config had deliberately enabled.
Merge it first instead so that qcom.config wins on any overlap.

Signed-off-by: Christopher Obbard <[email protected]>
Update the README to match debian/rules: fragments are merged with
scripts/kconfig/merge_config.sh rather than appended to .config, and
prune.config is merged before qcom.config.

Signed-off-by: Christopher Obbard <[email protected]>
An "intree:" entry names a bare fragment, resolved under
arch/arm64/configs/, so nothing outside that one directory can be
referenced. The kernel ships useful fragments elsewhere, notably
kernel/configs/debug.config.

Take the whole path relative to the kernel source root instead, e.g.
intree:arch/arm64/configs/qcom_debug.config, and copy the file into
debian/config/ under its basename. Every directory in the tree becomes
reachable and the entry says exactly which file it activates rather than
leaving the directory implicit.

Reject an absolute path or one containing "..", so an entry cannot reach
outside the source tree, and require the .config suffix that
override_dh_auto_configure globs for, so a misnamed fragment fails here
instead of being copied in and silently ignored. The existing collision
check now also catches two in-tree paths sharing a basename, which the
wider namespace makes reachable: arch/arm64/configs/hardening.config and
kernel/configs/hardening.config both exist.

The old bare form is no longer accepted; it fails with a message showing
the path form. ci/build-matrix.json in the CI branch already emits full
paths.

Signed-off-by: Christopher Obbard <[email protected]>
Follow the resolution change through the places that document the option:
the --kernel-config help in prepare-source.sh and build-kernel.sh and the
config fragment section of the README.

State what the new form buys: any directory in the kernel tree, not just
arch/arm64/configs/  and record the constraints a caller can trip over:
the required .config suffix, the rejection of absolute and ".." paths
and the basename collision that two in-tree paths can now cause.

Signed-off-by: Christopher Obbard <[email protected]>
@bjordiscollaku

Copy link
Copy Markdown
Contributor

Reviewed this alongside #83. The diffconfig comparison covers the part I cared about, and I checked separately that prune.config and qcom.config have no symbols in common, so the reorder cannot change anything on its own.

One thing: did you generate those .config files through debian/rules, or by calling merge_config.sh directly? If it was through the recipe then the invocation is covered too and I can approve.

@obbardc

Copy link
Copy Markdown
Contributor Author

One thing: did you generate those .config files through debian/rules, or by calling merge_config.sh directly? If it was through the recipe then the invocation is covered too and I can approve.

I did a full end-to-end package build and compared the generated config to a similar end-to-end package build from qcom-deb-images :-).

@obbardc
Christopher Obbard (obbardc) merged commit dea363c into qcom/debian/latest Aug 28, 2026
3 checks passed
@obbardc
Christopher Obbard (obbardc) deleted the wip/obbardc/kernel-config branch August 28, 2026 17:09
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