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

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

 



From: Frank Rowand <frank.rowand@xxxxxxxx>

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

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@xxxxxxxx>




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux