Hello Christian, On 05.03.24 10:36, Taedcke, Christian wrote: > From: Christian Taedcke <christian.taed...@weidmueller.com> > > 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". > > The functionality to add the compatible line was added in commit > f4c82fb6da89 ("kernel-fitImage: add machine compatible to config > section"). > > Signed-off-by: Christian Taedcke <christian.taed...@weidmueller.com> > ---
> dtb_path="${EXTERNAL_KERNEL_DEVICETREE}/${dtb_image_sect}" > - compatible_line="compatible = \"$(fdtget "$dtb_path" / compatible | sed > 's/ /", "/g')\";" > + if [ -e "$dtb_path" ]; then > + compatible_line="compatible = \"$(fdtget "$dtb_path" / > compatible | sed 's/ /", "/g')\";" > + fi The change is ok, but I'd prefer we harden this against errors a bit more: if [ -e "$dtb_path" ]; then compat=$(fdtget -t -s "$dtb_path" / compatible | sed 's/ /", "/g') if [ -n "$compat" ]; then compatible_line="compatible = \"compat\";" fi fi This should ensure that compatible = "" only results when the DT indeed has compatible = "". What do you think? Thanks, Ahmad > > dtb_image=$(echo $dtb_image | tr '/' '_') > dtb_image_sect=$(echo "${dtb_image_sect}" | tr '/' '_') > > > > > -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#196678): https://lists.openembedded.org/g/openembedded-core/message/196678 Mute This Topic: https://lists.openembedded.org/mt/104741166/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-