Hi Sandeep,
On 1/4/23 03:53, Sandeep Gundlupet Raju via lists.openembedded.org wrote:
The dtb files must be before the dtbo files, otherwise the overlays may
not be applied correctly.
From Bruce Ashfield:
We can split between dtbs and dtbos, they just need to be sorted
for reproducibility reasons. Two loops versus one, would be
fine, with not too much duplicated code.
Of course, this was only working by luck previously (before the
sort), since it has always been gathering dtbs and dtbo's with
find, depending on filesystem ordering for the order in the
fitimage).
Signed-off-by: Sandeep Gundlupet Raju <sandeep.gundlupet-r...@amd.com>
---
meta/classes-recipe/kernel-fitimage.bbclass | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass
b/meta/classes-recipe/kernel-fitimage.bbclass
index 7980910aa8..cb6635a673 100644
--- a/meta/classes-recipe/kernel-fitimage.bbclass
+++ b/meta/classes-recipe/kernel-fitimage.bbclass
@@ -590,7 +590,7 @@ fitimage_assemble() {
if [ -n "${EXTERNAL_KERNEL_DEVICETREE}" ]; then
dtbcount=1
- for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" \( -name
'*.dtb' -o -name '*.dtbo' \) -printf '%P\n' | sort); do
+ for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" -name '*.dtb'
-printf '%P\n' | sort); do
I believe you could have
for DTB in $(find "${EXTERNAL_KERNEL_DEVICETREE}" -name '*.dtb' -printf
'%P\n' | sort) $(find "${EXTERNAL_KERNEL_DEVICETREE}" -name '*.dtbo'
-printf '%P\n' | sort); do
would make sure dtbs appear before dtbos in the fitimage sections but
still use the same logic within the loop without going for code duplication.
I believe the issue is the content of the DTBS variable, which might
start with a dtbo file.
When this happens, the default configuration for the fitimage takes the
dtbo only and I guess this is your bug.
We could also decide to have the original loop but have two variables:
DTBS for dtbs only, matched on file extension
and DTBOS for dtbos only
Then you'd iterate over DTBS for fitimage_emit_section_config first and
then DTBOS.
I'm also not sure we need to create fit configuration nodes for dtbos
only? but maybe there's something specific to security here?
Cheers,
Quentin
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#175463):
https://lists.openembedded.org/g/openembedded-core/message/175463
Mute This Topic: https://lists.openembedded.org/mt/96043776/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-