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

frowand.list@gmail.com posted 2 patches 3 years, 9 months ago
There is a newer version of this series
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(-)
[PATCH 0/2] of: populate of_root_node if not set (alternate)
Posted by frowand.list@gmail.com 3 years, 9 months ago
From: Frank Rowand <frank.rowand@sony.com>

This series is a different implementation to achieve the goals of
https://lore.kernel.org/r/20220623105044.152832-1-clement.leger@bootlin.com

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 <frank.rowand@sony.com>