devicetree-compiler.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/2] stacked overlay support
@ 2017-07-25 17:24 Pantelis Antoniou
       [not found] ` <1501003476-2480-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Pantelis Antoniou @ 2017-07-25 17:24 UTC (permalink / raw)
  To: David Gibson
  Cc: Tom Rini, Nishanth Menon, Tero Kristo, Frank Rowand, Rob Herring,
	Simon Glass, Devicetree Compiler,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Pantelis Antoniou

Overlay application has a shortcoming that it is not possible
to refer to labels that were defined by a previously applied
overlay.

This patchset fixes the problem by keeping around the labels
that each overlay contains.

It is dependent on two previously submitted patches
"Introduce fdt_get_path_len() method"
"Introduce fdt_setprop_placeholder() method"

Changes since V2:
* Rework to make application faster when using target-path
* Various cosmetic fixes

Changes since V1:
* Rework to remove reliance on malloc and FDT_PATH_MAX


Pantelis Antoniou (2):
  fdt: Allow stacked overlays phandle references
  tests: Add stacked overlay tests on fdtoverlay

 libfdt/fdt_overlay.c           | 197 ++++++++++++++++++++++++++++++++++++-----
 tests/run_tests.sh             |  15 ++++
 tests/stacked_overlay_bar.dts  |  13 +++
 tests/stacked_overlay_base.dts |   6 ++
 tests/stacked_overlay_baz.dts  |  13 +++
 5 files changed, 222 insertions(+), 22 deletions(-)
 create mode 100644 tests/stacked_overlay_bar.dts
 create mode 100644 tests/stacked_overlay_base.dts
 create mode 100644 tests/stacked_overlay_baz.dts

-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: [PATCH v3 2/2] tests: Add stacked overlay tests on fdtoverlay
@ 2017-07-26  1:27 Franklin S Cooper Jr
  0 siblings, 0 replies; 7+ messages in thread
From: Franklin S Cooper Jr @ 2017-07-26  1:27 UTC (permalink / raw)
  To: Pantelis Antoniou, David Gibson
  Cc: Tom Rini, Nishanth Menon, Tero Kristo, Frank Rowand, Rob Herring,
	Simon Glass, Devicetree Compiler,
	devicetree-u79uwXL29TY76Z2rM5mHXA



On 07/25/2017 12:24 PM, Pantelis Antoniou wrote:
> Add a stacked overlay unit test, piggybacking on fdtoverlay.
> 
> Signed-off-by: Pantelis Antoniou <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
> ---
>  tests/run_tests.sh             | 15 +++++++++++++++
>  tests/stacked_overlay_bar.dts  | 13 +++++++++++++
>  tests/stacked_overlay_base.dts |  6 ++++++
>  tests/stacked_overlay_baz.dts  | 13 +++++++++++++
>  4 files changed, 47 insertions(+)
>  create mode 100644 tests/stacked_overlay_bar.dts
>  create mode 100644 tests/stacked_overlay_base.dts
>  create mode 100644 tests/stacked_overlay_baz.dts
> 
> diff --git a/tests/run_tests.sh b/tests/run_tests.sh
> index b8a2825..9e3d35d 100755
> --- a/tests/run_tests.sh
> +++ b/tests/run_tests.sh
> @@ -791,6 +791,21 @@ fdtoverlay_tests() {
>  
>      # test that the new property is installed
>      run_fdtoverlay_test foobar "/test-node" "test-str-property" "-ts" ${basedtb} ${targetdtb} ${overlaydtb}
> +
> +    stacked_base=stacked_overlay_base.dts
> +    stacked_basedtb=stacked_overlay_base.fdtoverlay.test.dtb
> +    stacked_bar=stacked_overlay_bar.dts
> +    stacked_bardtb=stacked_overlay_bar.fdtoverlay.test.dtb
> +    stacked_baz=stacked_overlay_baz.dts
> +    stacked_bazdtb=stacked_overlay_baz.fdtoverlay.test.dtb
> +    stacked_targetdtb=stacked_overlay_target.fdoverlay.test.dtb
> +
> +    run_dtc_test -@ -I dts -O dtb -o $stacked_basedtb $stacked_base
> +    run_dtc_test -@ -I dts -O dtb -o $stacked_bardtb $stacked_bar
> +    run_dtc_test -@ -I dts -O dtb -o $stacked_bazdtb $stacked_baz
> +
> +    # test that baz correctly inserted the property
> +    run_fdtoverlay_test baz "/foonode/barnode/baznode" "baz-property" "-ts" ${stacked_basedtb} ${stacked_targetdtb} ${stacked_bardtb} ${stacked_bazdtb}
>  }
>  
>  pylibfdt_tests () {
> diff --git a/tests/stacked_overlay_bar.dts b/tests/stacked_overlay_bar.dts
> new file mode 100644
> index 0000000..c646399
> --- /dev/null
> +++ b/tests/stacked_overlay_bar.dts
> @@ -0,0 +1,13 @@
> +/dts-v1/;
> +/plugin/;
> +/ {
> +	fragment@1 {
> +		target = <&foo>;
> +		__overlay__ {
> +			overlay-1-property;
> +			bar: barnode {
> +				bar-property = "bar";
> +			};
> +		};
> +	};
> +};
> diff --git a/tests/stacked_overlay_base.dts b/tests/stacked_overlay_base.dts
> new file mode 100644
> index 0000000..2916423
> --- /dev/null
> +++ b/tests/stacked_overlay_base.dts
> @@ -0,0 +1,6 @@
> +/dts-v1/;
> +/ {
> +	foo: foonode {
> +		foo-property = "foo";
> +	};
> +};
> diff --git a/tests/stacked_overlay_baz.dts b/tests/stacked_overlay_baz.dts
> new file mode 100644
> index 0000000..a52f0cc
> --- /dev/null
> +++ b/tests/stacked_overlay_baz.dts
> @@ -0,0 +1,13 @@
> +/dts-v1/;
> +/plugin/;
> +/ {
> +	fragment@1 {
> +		target = <&bar>;
> +		__overlay__ {
> +			overlay-2-property;
> +			baz: baznode {
> +				baz-property = "baz";
> +			};
> +		};
> +	};
> +};
> 

Tested-by: Franklin S Cooper Jr <fcooper-l0cyMroinI0@public.gmane.org>

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

end of thread, other threads:[~2017-07-31 13:36 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-25 17:24 [PATCH v3 0/2] stacked overlay support Pantelis Antoniou
     [not found] ` <1501003476-2480-1-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2017-07-25 17:24   ` [PATCH v3 1/2] fdt: Allow stacked overlays phandle references Pantelis Antoniou
     [not found]     ` <1501003476-2480-2-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2017-07-31 13:32       ` David Gibson
2017-07-25 17:24   ` [PATCH v3 2/2] tests: Add stacked overlay tests on fdtoverlay Pantelis Antoniou
     [not found]     ` <1501003476-2480-3-git-send-email-pantelis.antoniou-OWPKS81ov/FWk0Htik3J/w@public.gmane.org>
2017-07-31 13:35       ` David Gibson
     [not found]         ` <20170731133530.GL2652-K0bRW+63XPQe6aEkudXLsA@public.gmane.org>
2017-07-31 13:36           ` David Gibson
  -- strict thread matches above, loose matches on Subject: below --
2017-07-26  1:27 Franklin S Cooper Jr

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).