Skip to content

Conversation

@bjordiscollaku
Copy link
Contributor

Summary
Deploy all device tree blobs (DTBs) by recursively collecting every *.dtb under arch/arm64/boot/dts into out/. This ensures the kernel packaging script can pick up the complete DTB set when building the .deb, eliminating misses from a hardcoded list.

Changes

  • Replace explicit DTB deployment lines with a safe recursive deployment:
    find "$kpath/dts" -type f -name '*.dtb' -print0 | xargs -0 -I{} cp "{}" "$BUILD_TOP/out/"

Rationale

  • Automatically includes DTBs for newly added boards without script updates.
  • Reduces maintenance overhead and risk of missing artifacts.

Behavior Notes

  • DTBs are deployed into a flat out/ directory.
  • Kernel image and module build/install steps remain unchanged.

Replace hardcoded DTB deployment with a recursive sweep that deploys every *.dtb found under arch/arm64/boot/dts into out/. This ensures the kernel packaging script can reliably pick up all DTBs when constructing the .deb.

No functional changes to kernel image or module build/install.

Signed-off-by: Bjordis Collaku <bcollaku@qti.qualcomm.com>
…elative paths

Add an optional positional argument to build_kernel.sh to override the main kernel tree directory. When not provided, the script continues to use the existing default of $BUILD_TOP/qcom-next/.

The argument is captured as 'treedir' and used to derive 'kpath' as
$treedir/arch/arm64/boot.

Update: resolve 'treedir' to an absolute path when computing 'kpath' to ensure relative arguments (e.g., "kernel-qcom") work correctly and avoid duplicated segments (e.g., kernel-qcom/kernel-qcom/...).
No other behavior is changed; build targets, outputs, and environment usage remain identical to the previous version.

This allows invoking the script against alternate kernel clones or
different workspace layouts without editing the script.

Usage:

# Default behavior (uses $BUILD_TOP/qcom-next/)
./build_kernel.sh

# Custom kernel tree root (absolute)
./build_kernel.sh /path/to/kernel/tree

# Custom kernel tree root (relative to current directory)
./build_kernel.sh kernel-qcom

Signed-off-by: Bjordis Collaku <bcollaku@qti.qualcomm.com>
@bjordiscollaku bjordiscollaku merged commit 71cae2b into main Jan 21, 2026
6 checks passed
@bjordiscollaku bjordiscollaku deleted the kernel/deploy-all-dtbs-for-packaging branch January 21, 2026 21:56
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.

3 participants