diff options
author | Christian Taedcke <christian.taedcke@weidmueller.com> | 2024-03-06 08:43:00 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-03-08 08:06:16 +0000 |
commit | 125771c16f908a3ce186aab869dc967dfb26a801 (patch) | |
tree | 58b07da46f3910587cd12cbfa02de77f256d7393 | |
parent | ca829f14e0b0d44719229c1be1b3cbf2cee39b4e (diff) | |
download | poky-125771c16f908a3ce186aab869dc967dfb26a801.tar.gz |
kernel-fitImage: only include valid compatible line
Without this commit the configuration node includes the compatible
line 'compatible = [00];' if EXTERNAL_KERNEL_DEVICETREE is not
defined, i.e. if PREFERRED_PROVIDER_virtual/dtb is not used.
This prevents u-boot from using this configuration and it prints the
message "Could not find configuration node".
An additional check also ensures that the written compatible line
never contains an empty compatible.
The functionality to add the compatible line was added in commit
f4c82fb6da89 ("kernel-fitImage: add machine compatible to config
section").
(From OE-Core rev: f8f3a52b2f924789552e6a3f889162ff07e0887f)
Signed-off-by: Christian Taedcke <christian.taedcke@weidmueller.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes-recipe/kernel-fitimage.bbclass | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/classes-recipe/kernel-fitimage.bbclass b/meta/classes-recipe/kernel-fitimage.bbclass index 7e30a5d47e..4b74ddc201 100644 --- a/meta/classes-recipe/kernel-fitimage.bbclass +++ b/meta/classes-recipe/kernel-fitimage.bbclass | |||
@@ -421,6 +421,7 @@ fitimage_emit_section_config() { | |||
421 | bootscr_line="" | 421 | bootscr_line="" |
422 | setup_line="" | 422 | setup_line="" |
423 | default_line="" | 423 | default_line="" |
424 | compatible_line="" | ||
424 | 425 | ||
425 | dtb_image_sect=$(symlink_points_below $dtb_image "${EXTERNAL_KERNEL_DEVICETREE}") | 426 | dtb_image_sect=$(symlink_points_below $dtb_image "${EXTERNAL_KERNEL_DEVICETREE}") |
426 | if [ -z "$dtb_image_sect" ]; then | 427 | if [ -z "$dtb_image_sect" ]; then |
@@ -428,7 +429,12 @@ fitimage_emit_section_config() { | |||
428 | fi | 429 | fi |
429 | 430 | ||
430 | dtb_path="${EXTERNAL_KERNEL_DEVICETREE}/${dtb_image_sect}" | 431 | dtb_path="${EXTERNAL_KERNEL_DEVICETREE}/${dtb_image_sect}" |
431 | compatible_line="compatible = \"$(fdtget "$dtb_path" / compatible | sed 's/ /", "/g')\";" | 432 | if [ -e "$dtb_path" ]; then |
433 | compat=$(fdtget -t s "$dtb_path" / compatible | sed 's/ /", "/g') | ||
434 | if [ -n "$compat" ]; then | ||
435 | compatible_line="compatible = \"$compat\";" | ||
436 | fi | ||
437 | fi | ||
432 | 438 | ||
433 | dtb_image=$(echo $dtb_image | tr '/' '_') | 439 | dtb_image=$(echo $dtb_image | tr '/' '_') |
434 | dtb_image_sect=$(echo "${dtb_image_sect}" | tr '/' '_') | 440 | dtb_image_sect=$(echo "${dtb_image_sect}" | tr '/' '_') |