Hi Sebastian,

On 04.01.21 20:27, Sebastian Reichel wrote:
Hi,

On Mon, Dec 28, 2020 at 12:39:57PM +0100, Stefano Babic wrote:
On 15.12.20 00:41, Sebastian Reichel wrote:
Support reusing board_fit_config_name_match() to automatically
select a sensible default configuration for booting fitImages
using 'bootm'.


For reasons I have not understood, this patch breaks "sometimes" the build :

+common/image-fit.c: In function 'boot_get_fdt_fit':
+common/image-fit.c:2279:10: error: implicit declaration of function
'fdt_overlay_apply_verbose'; did you mean 'fdt_overlay_apply_node'?
[-Werror=implicit-function-declaration]
+ 2279 |    err = fdt_overlay_apply_verbose(base, ov);
+      |          ^~~~~~~~~~~~~~~~~~~~~~~~~
+      |          fdt_overlay_apply_node
+cc1: all warnings being treated as errors

https://gitlab.denx.de/u-boot/custodians/u-boot-imx/-/jobs/193967

And it looks to me that fdt_support.h is included.

This happens if I run buildman locally, too. But it is not
deterministic, sometimes it succeed.

snapper9g20 and snapper9260 seem to trigger more frequently the issues
(but they are not the ones).

I found the root cause. It's not this patch, but the previous one.
fdt_support.h is included, but in it all declartions only happen
if OF_LIBFDT is defined. My previous patch changes the code block
calling fdt_overlay_apply_verbose() from ifdef OF_LIBFDT_OVERLAY
to IS_ENABLED(OF_LIBFDT_OVERLAY). Note, that OF_LIBFDT_OVERLAY
requires OF_LIBFDT.

Good catch !


I'm about to send PATCHv3 dropping the OF_LIBFDT_OVERLAY related
cleanup.


Thanks !

So I applied the patches related to the board, but I left this
out.

Not applying this patch results in GE Bx50v3 boards no longer
booting properly with the default config :(


I will then apply it and ask Tom to include it in the release - thanks !

Best regards,
Stefano

-- Sebastian

Best regards,
Stefano Babic

Signed-off-by: Sebastian Reichel <sebastian.reic...@collabora.com>
---
  common/image-fit.c | 19 +++++++++++++------
  1 file changed, 13 insertions(+), 6 deletions(-)

diff --git a/common/image-fit.c b/common/image-fit.c
index 1f382d87e207..b3aeff8c5e4a 100644
--- a/common/image-fit.c
+++ b/common/image-fit.c
@@ -1738,12 +1738,19 @@ int fit_conf_get_node(const void *fit, const char 
*conf_uname)
        if (conf_uname == NULL) {
                /* get configuration unit name from the default property */
                debug("No configuration specified, trying default...\n");
-               conf_uname = (char *)fdt_getprop(fit, confs_noffset,
-                                                FIT_DEFAULT_PROP, &len);
-               if (conf_uname == NULL) {
-                       fit_get_debug(fit, confs_noffset, FIT_DEFAULT_PROP,
-                                     len);
-                       return len;
+               if (!host_build() && IS_ENABLED(CONFIG_MULTI_DTB_FIT)) {
+                       noffset = fit_find_config_node(fit);
+                       if (noffset < 0)
+                               return noffset;
+                       conf_uname = fdt_get_name(fit, noffset, NULL);
+               } else {
+                       conf_uname = (char *)fdt_getprop(fit, confs_noffset,
+                                                        FIT_DEFAULT_PROP, 
&len);
+                       if (conf_uname == NULL) {
+                               fit_get_debug(fit, confs_noffset, 
FIT_DEFAULT_PROP,
+                                             len);
+                               return len;
+                       }
                }
                debug("Found default configuration: '%s'\n", conf_uname);
        }



--
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================

--
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================

Reply via email to