[PATCH 53/67] upl: test: Show the handoff FDT when debugging
Simon Glass
sjg at chromium.org
Wed Jan 1 23:09:39 CET 2025
Add a few lines to print out the entire handoff FDT when LOG_DEBUG is
enabled, to aid debugging.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
test/boot/upl.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/test/boot/upl.c b/test/boot/upl.c
index 89201e445ff..e1454ba3469 100644
--- a/test/boot/upl.c
+++ b/test/boot/upl.c
@@ -6,6 +6,8 @@
* Written by Simon Glass <sjg at chromium.org>
*/
+#define LOG_CATEGORY UCLASS_BOOTSTD
+
#include <abuf.h>
#include <mapmem.h>
#include <upl.h>
@@ -341,6 +343,10 @@ static int upl_test_base(struct unit_test_state *uts)
ut_assertok(upl_create_handoff_tree(&upl, &tree));
ut_assertok(oftree_to_fdt(tree, &buf));
+ if (_LOG_DEBUG) {
+ set_working_fdt_addr(abuf_addr(&buf));
+ ut_assertok(run_command("fdt print", 0));
+ }
/*
* strings in check_tree and therefore check are only valid so long as
* buf stays around. As soon as we call abuf_uninit they go away
--
2.43.0
More information about the U-Boot
mailing list