Commit 13e1e2d
committed
build-dtb-image: recurse into vendor subdirs when copying DTBs
The FIT image build path used a flat glob to collect DTBs from the
resolved source directory:
cp -rap "${DTB_SRC}"/*.dtb* "${DTB_STAGE}/"
This assumes all DTB files reside directly in DTB_SRC. In practice,
DTBs are always installed one level deeper under a vendor subdirectory:
lib/firmware/<KVER>/device-tree/qcom/*.dtb
When --kernel-deb is used, DTB_SRC resolves to the device-tree
directory (a symlink to usr/lib/linux-image-<KVER>/). The glob
expands to nothing because the DTBs are in qcom/, not at the top
level, causing the build to fail:
cp: cannot stat '.../device-tree/*.dtb*': No such file or directory
Replace the flat glob with find -L, which follows symlinks and
recurses into all vendor subdirectories, copying every *.dtb and
*.dtbo file flat into the mkimage staging directory
(arch/arm64/boot/dts/qcom/) as the ITS file expects.
Also add a post-copy count check and a sorted DTB listing so that
an empty or misconfigured DTB source is caught early with a clear
diagnostic rather than a cryptic mkimage FATAL ERROR.
Signed-off-by: Bjordis Collaku <bcollaku@qti.qualcomm.com>1 parent bf271c7 commit 13e1e2d
1 file changed
Lines changed: 20 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
503 | 503 | | |
504 | 504 | | |
505 | 505 | | |
506 | | - | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
507 | 511 | | |
508 | | - | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
509 | 527 | | |
510 | 528 | | |
511 | 529 | | |
| |||
0 commit comments