[PATCH 2/2] fdtgrep: fix fdtgrep_find_regions() error with some device trees

Anatolij Gustschin agust at denx.de
Wed Jan 8 21:35:16 CET 2020


With some device trees (i.e. i.MX6 SoC) and longer REMOVE_PROPS list
the fdtgrep tool stops with "Internal error with fdtgrep_find_regions()".
Increase 'max_regions' count to avoid such errors.

Signed-off-by: Anatolij Gustschin <agust at denx.de>
---
 tools/fdtgrep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/fdtgrep.c b/tools/fdtgrep.c
index 052d419692..8f71b1cd7f 100644
--- a/tools/fdtgrep.c
+++ b/tools/fdtgrep.c
@@ -778,7 +778,7 @@ static int do_fdtgrep(struct display_info *disp, const char *filename)
 {
 	struct fdt_region *region = NULL;
 	int max_regions;
-	int count = 100;
+	int count = 110;
 	char path[1024];
 	char *blob;
 	int i, ret;
-- 
2.17.1



More information about the U-Boot mailing list