mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 0/7] Device Tree Overlay Support
@ 2019-09-05 10:51 Michael Tretter
  2019-09-05 10:51 ` [PATCH 1/7] dtc: add -@ option to enable __symbols__ Michael Tretter
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Michael Tretter @ 2019-09-05 10:51 UTC (permalink / raw)
  To: barebox; +Cc: Michael Tretter

Hello,

This series adds device tree overlay support loosely based on the Linux
driver.

In contrast to Linux, the overlay is not applied to the live tree, but
registered as a device tree fixup. This allows to apply the overlay to the
build-in device tree and external device trees, which is necessary for booting
Linux with an overlaid device tree.

I further added the "devicetree-overlay" key to the blspec. This allows to
specify device tree overlays that should be applied before booting the OS from
that blspec entry. Note that if an overlay fails to apply, Linux still would
boot normally with the base device tree.

The RFC extended the oftree command, but I now defined a new "of_overlay"
command that accepts the file name of the overlay as an argument. Having a
separate command with separate options for overlays looks much cleaner to me.

Compared to the RFC, I dropped the notifiers, because they are too limited to
get information from the module that registers the overlay to the module that
is notified and reacts on an overlay. Now, any other module that should react
on an overlay must be called explicitly.

Michael

Changelog:

rfc -> v1:
 - new of_overlay command
 - no more notifiers for device tree overlays

Michael Tretter (7):
  dtc: add -@ option to enable __symbols__
  of: add support for devicetree overlays
  blspec: add support for devicetree overlays
  of: add iterator for overlays
  firmware: add support to load firmware from dt overlay
  blspec: load firmware if specified in dt overlay
  commands: add of_overlay command for device tree overlays

 Documentation/user/booting-linux.rst |   4 +
 commands/Kconfig                     |  12 ++
 commands/Makefile                    |   1 +
 commands/of_overlay.c                |  89 +++++++++
 common/blspec.c                      |  75 ++++++++
 common/firmware.c                    |  77 ++++++++
 drivers/of/Kconfig                   |   9 +
 drivers/of/Makefile                  |   1 +
 drivers/of/overlay.c                 | 245 +++++++++++++++++++++++
 drivers/of/resolver.c                | 278 +++++++++++++++++++++++++++
 include/firmware.h                   |   3 +
 include/of.h                         |  33 ++++
 scripts/Makefile.lib                 |   2 +-
 13 files changed, 828 insertions(+), 1 deletion(-)
 create mode 100644 commands/of_overlay.c
 create mode 100644 drivers/of/overlay.c
 create mode 100644 drivers/of/resolver.c

-- 
2.20.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2019-09-06  7:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-05 10:51 [PATCH 0/7] Device Tree Overlay Support Michael Tretter
2019-09-05 10:51 ` [PATCH 1/7] dtc: add -@ option to enable __symbols__ Michael Tretter
2019-09-05 10:51 ` [PATCH 2/7] of: add support for devicetree overlays Michael Tretter
2019-09-05 15:24   ` Ahmad Fatoum
2019-09-06  7:15     ` Michael Tretter
2019-09-06  7:29   ` Sascha Hauer
2019-09-05 10:51 ` [PATCH 3/7] blspec: " Michael Tretter
2019-09-06  7:33   ` Sascha Hauer
2019-09-05 10:51 ` [PATCH 4/7] of: add iterator for overlays Michael Tretter
2019-09-05 10:51 ` [PATCH 5/7] firmware: add support to load firmware from dt overlay Michael Tretter
2019-09-05 10:51 ` [PATCH 6/7] blspec: load firmware if specified in " Michael Tretter
2019-09-05 10:51 ` [PATCH 7/7] commands: add of_overlay command for device tree overlays Michael Tretter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox