devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Appended DTB files for multi-machine kernels
@ 2013-07-04 16:56 Daniel Mack
  2013-07-04 17:28 ` Nicolas Pitre
                   ` (2 more replies)
  0 siblings, 3 replies; 19+ messages in thread
From: Daniel Mack @ 2013-07-04 16:56 UTC (permalink / raw)
  To: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
  Cc: stigge-uj/7R2tJ6VmzQB+pC5nmwQ, Stephen Warren, Sven Neumann,
	Mark Brown

Hi,

I'm facing a problem with a transition from legacy board-file driven ARM
machines to DTB, and I'm under the impression that a solution for it
could be of broader interest.

In short, devices that have been deployed in quantities come in three
hardware variants, which all boot with a unique machine-id. We ship
kernel images that have board support for all three machine types, and
do minor fixups to platform data of some drivers at runtime, depending
on the board revision number (passed in via ATAGs).

The built-in support for attaching a DTB to the zImage does not suffice
here, because we have one image for all models, and also, we couldn't do
a 'per-board-revision' selection that way either.

Unless I missed some recent discussion, this case is not easy to handle.
Yes, I know that these kind of things should be handled by a
next-generation bootloader, but in our case, we want to avoid a loader
update of already shipped hardware by all means.

As a solution, I'm thinking of a small framework that could for example
work as follows.

a) A small mechanism allows storing multiple DTB binary files inside the
kernel binary at compile time, and a simple function can extract them
again by name at runtime (something like what the firmware framework
does, but I don't know if that one can be used at such an early stage in
the boot process).

b) A DT_MACHINE_START-like macro takes both the machine ID and the name
of a DTB file that is compiled in. When matched, generic functions would
load the given file, populate the device tree and then conduct a generic
DT boot for the specified platform.

c) Allow users to open-code the DTB lookup depending on whatever kind of
runtime information (be it the board_revision or anything else).


Of course, everything has to be an opt-in that stubs itself out at zero
costs if not needed.


I'm open to opinion and sugesstions :)


Thanks,
Daniel

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

end of thread, other threads:[~2013-07-30 14:42 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-04 16:56 Appended DTB files for multi-machine kernels Daniel Mack
2013-07-04 17:28 ` Nicolas Pitre
     [not found]   ` <alpine.LFD.2.03.1307041322070.18597-hIgblCxmbi8OMTOF05IoTw@public.gmane.org>
2013-07-04 17:57     ` Daniel Mack
     [not found]       ` <51D5B7A1.60609-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-07-04 18:27         ` Nicolas Pitre
2013-07-26 16:13   ` Daniel Mack
2013-07-26 16:44     ` Nicolas Pitre
2013-07-29 21:23     ` [RFC PATCH 0/2] impedance-matcher generic improvements Jason Cooper
2013-07-30  7:48       ` Daniel Mack
2013-07-30 13:17         ` Jason Cooper
2013-07-30 13:37           ` Daniel Mack
2013-07-30 14:42             ` Jason Cooper
2013-07-29 21:24     ` [PATCH 1/2] add cscope Makefile target Jason Cooper
2013-07-29 21:24     ` [RFC PATCH 2/2] WIP: Get kernel and dtb addresses from command line Jason Cooper
2013-07-04 18:36 ` Appended DTB files for multi-machine kernels Dirk Behme
     [not found] ` <51D5A938.30607-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-07-04 17:11   ` Mark Brown
2013-07-04 21:34     ` Arnd Bergmann
     [not found]       ` <201307042334.37161.arnd-r2nGTMty4D4@public.gmane.org>
2013-07-04 23:02         ` Daniel Mack
2013-07-05  8:32         ` Magnus Damm
2013-07-05 18:36   ` Stephen Warren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).