[PATCH 2/2] bootm: fix printing kernel command line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since af084cae41ce ("of: never fixup internal live tree")
of_get_fixed_tree() no longer fixes the tree passed into the function, but a copy thereof
instead. in bootm this has the side effect that data->of_root_node
will no longer contain a fixed tree, but the original tree instead.
data->of_root_node is used later for printing the kernel command line
and it's also printed with bootm -vv, so this pointer should really
hold a fixed tree.
Fix this by not using of_get_fixed_tree() but open coding it.

Fixes: af084cae41ce ("of: never fixup internal live tree")
Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 common/bootm.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/common/bootm.c b/common/bootm.c
index 27ada61f4e..2469d43441 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -421,7 +421,9 @@ void *bootm_get_devicetree(struct image_data *data)
 		of_add_reserve_entry(data->initrd_res->start, data->initrd_res->end);
 	}
 
-	oftree = of_get_fixed_tree(data->of_root_node);
+	of_fix_tree(data->of_root_node);
+
+	oftree = of_flatten_dtb(data->of_root_node);
 	if (!oftree)
 		return ERR_PTR(-EINVAL);
 
-- 
2.39.2





[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux