Pantelis Antoniou
f00c36a01e
fdt: Allow stacked overlays phandle references
This patch enables an overlay to refer to a previous overlay's
labels by performing a merge of symbol information at application
time.
In a nutshell it allows an overlay to refer to a symbol that a previous
overlay has defined. It requires both the base and all the overlays
to be compiled with the -@ command line switch so that symbol
information is included.
base.dts
--------
/dts-v1/;
/ {
foo: foonode {
foo-property;
};
};
$ dtc -@ -I dts -O dtb -o base.dtb base.dts
bar.dts
-------
/dts-v1/;
/plugin/;
/ {
fragment@1 {
target = <&foo>;
__overlay__ {
overlay-1-property;
bar: barnode {
bar-property;
};
};
};
};
$ dtc -@ -I dts -O dtb -o bar.dtb bar.dts
baz.dts
-------
/dts-v1/;
/plugin/;
/ {
fragment@1 {
target = <&bar>;
__overlay__ {
overlay-2-property;
baz: baznode {
baz-property;
};
};
};
};
$ dtc -@ -I dts -O dtb -o baz.dtb baz.dts
Applying the overlays:
$ fdtoverlay -i base.dtb -o target.dtb bar.dtb baz.dtb
Dumping:
$ fdtdump target.dtb
/ {
foonode {
overlay-1-property;
foo-property;
linux,phandle = <0x00000001>;
phandle = <0x00000001>;
barnode {
overlay-2-property;
phandle = <0x00000002>;
linux,phandle = <0x00000002>;
bar-property;
baznode {
phandle = <0x00000003>;
linux,phandle = <0x00000003>;
baz-property;
};
};
};
__symbols__ {
baz = "/foonode/barnode/baznode";
bar = "/foonode/barnode";
foo = "/foonode";
};
};
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Simon Glass <sjg@chromium.org>
2017-09-15 05:27:48 -06:00
..
2017-09-14 16:02:43 -04:00
2016-02-06 13:59:48 +01:00
2016-03-17 10:14:25 -04:00
2017-07-27 14:59:03 +02:00
2017-09-12 17:57:59 -04:00
2017-09-15 05:27:48 -06:00
2015-01-14 11:35:43 -05:00
2016-06-24 17:23:11 -04:00
2017-05-12 08:37:19 -04:00
2016-05-25 13:25:18 +09:00
2016-02-06 12:00:59 +01:00
2016-01-19 08:31:21 -05:00
2017-04-12 13:28:27 -04:00
2017-07-27 14:59:03 +02:00
2017-09-03 15:30:31 -04:00
2017-09-12 17:57:59 -04:00
2017-05-05 16:45:57 -04:00
2016-04-11 20:48:26 -04:00
2016-03-14 19:18:42 -04:00
2017-07-11 10:08:19 -06:00
2017-04-13 09:41:10 -04:00
2014-12-11 13:18:41 -07:00
2015-11-05 02:34:14 +01:00
2017-08-16 08:30:32 -04:00
2016-10-06 20:57:33 -04:00
2015-09-11 17:15:16 -04:00
2016-05-02 18:37:09 -04:00
2016-10-08 09:33:36 -04:00
2015-08-05 08:42:41 -06:00
2017-09-11 07:55:36 -07:00
2015-07-22 07:30:44 -06:00
2014-09-16 12:23:56 -04:00
2014-10-25 07:02:01 -04:00
2015-11-18 15:28:59 -05:00
2015-10-11 17:12:10 -04:00
2017-09-14 16:02:43 -04:00
2015-11-19 20:27:50 -07:00
2017-01-14 16:47:11 -05:00
2017-07-11 10:08:20 -06:00
2015-12-13 17:07:30 -07:00
2016-04-01 17:17:43 -04:00
2014-09-16 12:23:56 -04:00
2015-07-21 17:39:28 -06:00
2016-11-21 14:07:30 -05:00
2016-11-21 14:07:30 -05:00
2017-05-12 08:37:18 -04:00
2017-08-16 08:30:24 -04:00
2017-06-01 07:03:12 -06:00
2014-11-20 11:28:25 -05:00
2016-10-11 11:55:33 +08:00
2016-10-19 09:01:50 +02:00
2017-06-05 14:13:03 -04:00
2017-04-13 09:41:09 -04:00
2017-08-13 15:17:29 -04:00
2015-04-18 11:11:09 -06:00
2017-08-16 08:22:18 -04:00
2017-09-12 17:58:00 -04:00