2022-06-24 03:58:43

by Frank Rowand

[permalink] [raw]
Subject: [PATCH 0/2] of: populate of_root_node if not set (alternate)

From: Frank Rowand <[email protected]>

This series is a different implementation to achieve the goals of
https://lore.kernel.org/r/[email protected]

In order to apply overlays or create new nodes under the root node, the
kernel expects of_root to be set. On some system where a device-tree was
not provided by firmware (x86 for instance) if CONFIG_OF is enabled,
then we will end up with a null of_root. This series add support to
create this root node using a builtin dtb and remove the manual
creation of the root node done in unittests.c.

This series modifies init/main.c. It was not clear to me whether
to add Linus to the distribution, or if the change should flow
through Rob. (I did not add Linus.)

Frank Rowand (2):
of: create of_root if no dtb provided
of: unittest: treat missing of_root as error instead of fixing up

drivers/of/Makefile | 2 +-
drivers/of/fdt.c | 19 ++++++++++++++++++-
drivers/of/unittest.c | 16 ++++++----------
include/linux/of_fdt.h | 2 ++
init/main.c | 2 ++
5 files changed, 29 insertions(+), 12 deletions(-)

--
Frank Rowand <[email protected]>