From: Rasmus Villemoes Date: Wed, 10 Jul 2024 07:16:10 +0000 (+0200) Subject: test: overlay: rename overlay source files to .dtso X-Git-Tag: v2024.10~93^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=03e36e38e86a123be148259c7dc97da6ceab700e;p=platform%2Fkernel%2Fu-boot.git test: overlay: rename overlay source files to .dtso Distinguish more clearly between source files meant for producing .dtb from those meant for producing .dtbo. In this case, the files are really meant to be compiled to .dtbo -> .dtbo.S -> .dtbo.o that get embedded in the image, which means that the begin/end symbols generated by the makefile rule changes to __dtbo_ rather than __dtb, so the consuming .c file needs updating, but this should not result in any functional change. Note that in the linux tree, all device tree overlay sources have been renamed to .dtso, and the .dts->.dtbo rule is gone since v6.5 (commit 81d362732bac). So this is also a step towards staying closer to linux with respect to both Kbuild and device tree sources. Cc: Maxime Ripard Cc: Simon Glass Signed-off-by: Rasmus Villemoes --- diff --git a/test/overlay/Makefile b/test/overlay/Makefile index 2deec929ab..47937e3c10 100644 --- a/test/overlay/Makefile +++ b/test/overlay/Makefile @@ -10,5 +10,5 @@ DTC_FLAGS += -@ # DT overlays obj-y += test-fdt-base.dtb.o -obj-y += test-fdt-overlay.dtb.o -obj-y += test-fdt-overlay-stacked.dtb.o +obj-y += test-fdt-overlay.dtbo.o +obj-y += test-fdt-overlay-stacked.dtbo.o diff --git a/test/overlay/cmd_ut_overlay.c b/test/overlay/cmd_ut_overlay.c index bcb29a26e2..256afd115d 100644 --- a/test/overlay/cmd_ut_overlay.c +++ b/test/overlay/cmd_ut_overlay.c @@ -21,8 +21,8 @@ #define FDT_COPY_SIZE (4 * SZ_1K) extern u32 __dtb_test_fdt_base_begin; -extern u32 __dtb_test_fdt_overlay_begin; -extern u32 __dtb_test_fdt_overlay_stacked_begin; +extern u32 __dtbo_test_fdt_overlay_begin; +extern u32 __dtbo_test_fdt_overlay_stacked_begin; static void *fdt; @@ -216,8 +216,8 @@ int do_ut_overlay(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) const int n_ents = UNIT_TEST_SUITE_COUNT(overlay_test); struct unit_test_state *uts; void *fdt_base = &__dtb_test_fdt_base_begin; - void *fdt_overlay = &__dtb_test_fdt_overlay_begin; - void *fdt_overlay_stacked = &__dtb_test_fdt_overlay_stacked_begin; + void *fdt_overlay = &__dtbo_test_fdt_overlay_begin; + void *fdt_overlay_stacked = &__dtbo_test_fdt_overlay_stacked_begin; void *fdt_overlay_copy, *fdt_overlay_stacked_copy; int ret = -ENOMEM; diff --git a/test/overlay/test-fdt-overlay-stacked.dts b/test/overlay/test-fdt-overlay-stacked.dts deleted file mode 100644 index 6411adec53..0000000000 --- a/test/overlay/test-fdt-overlay-stacked.dts +++ /dev/null @@ -1,20 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (c) 2016 NextThing Co - * Copyright (c) 2016 Free Electrons - * Copyright (c) 2018 Konsulko Group - */ - -/dts-v1/; -/plugin/; - -/ { - /* Test that we can reference an overlay symbol */ - fragment@0 { - target = <&local>; - - __overlay__ { - stacked-test-int-property = <43>; - }; - }; -}; diff --git a/test/overlay/test-fdt-overlay-stacked.dtso b/test/overlay/test-fdt-overlay-stacked.dtso new file mode 100644 index 0000000000..6411adec53 --- /dev/null +++ b/test/overlay/test-fdt-overlay-stacked.dtso @@ -0,0 +1,20 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2016 NextThing Co + * Copyright (c) 2016 Free Electrons + * Copyright (c) 2018 Konsulko Group + */ + +/dts-v1/; +/plugin/; + +/ { + /* Test that we can reference an overlay symbol */ + fragment@0 { + target = <&local>; + + __overlay__ { + stacked-test-int-property = <43>; + }; + }; +}; diff --git a/test/overlay/test-fdt-overlay.dts b/test/overlay/test-fdt-overlay.dts deleted file mode 100644 index 5a21b346d0..0000000000 --- a/test/overlay/test-fdt-overlay.dts +++ /dev/null @@ -1,95 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0+ -/* - * Copyright (c) 2016 NextThing Co - * Copyright (c) 2016 Free Electrons - */ - -/dts-v1/; -/plugin/; - -/ { - /* Test that we can change an int by another */ - fragment@0 { - target = <&test>; - - __overlay__ { - test-int-property = <43>; - }; - }; - - /* Test that we can replace a string by a longer one */ - fragment@1 { - target = <&test>; - - __overlay__ { - test-str-property = "foobar"; - }; - }; - - /* Test that we add a new property */ - fragment@2 { - target = <&test>; - - __overlay__ { - test-str-property-2 = "foobar2"; - }; - }; - - /* Test that we add a new node (by phandle) */ - fragment@3 { - target = <&test>; - - __overlay__ { - new-node { - new-property; - }; - }; - }; - - /* Test that we add a new node (by path) */ - fragment@4 { - target-path = "/"; - - __overlay__ { - new-node { - new-property; - }; - }; - }; - - fragment@5 { - target-path = "/"; - - __overlay__ { - local: new-local-node { - new-property; - }; - }; - }; - - fragment@6 { - target-path = "/"; - - __overlay__ { - test-phandle = <&test>, <&local>; - }; - }; - - fragment@7 { - target-path = "/"; - - __overlay__ { - test-several-phandle = <&local>, <&local>; - }; - }; - - fragment@8 { - target = <&test>; - - __overlay__ { - sub-test-node { - new-sub-test-property; - }; - }; - }; -}; diff --git a/test/overlay/test-fdt-overlay.dtso b/test/overlay/test-fdt-overlay.dtso new file mode 100644 index 0000000000..5a21b346d0 --- /dev/null +++ b/test/overlay/test-fdt-overlay.dtso @@ -0,0 +1,95 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2016 NextThing Co + * Copyright (c) 2016 Free Electrons + */ + +/dts-v1/; +/plugin/; + +/ { + /* Test that we can change an int by another */ + fragment@0 { + target = <&test>; + + __overlay__ { + test-int-property = <43>; + }; + }; + + /* Test that we can replace a string by a longer one */ + fragment@1 { + target = <&test>; + + __overlay__ { + test-str-property = "foobar"; + }; + }; + + /* Test that we add a new property */ + fragment@2 { + target = <&test>; + + __overlay__ { + test-str-property-2 = "foobar2"; + }; + }; + + /* Test that we add a new node (by phandle) */ + fragment@3 { + target = <&test>; + + __overlay__ { + new-node { + new-property; + }; + }; + }; + + /* Test that we add a new node (by path) */ + fragment@4 { + target-path = "/"; + + __overlay__ { + new-node { + new-property; + }; + }; + }; + + fragment@5 { + target-path = "/"; + + __overlay__ { + local: new-local-node { + new-property; + }; + }; + }; + + fragment@6 { + target-path = "/"; + + __overlay__ { + test-phandle = <&test>, <&local>; + }; + }; + + fragment@7 { + target-path = "/"; + + __overlay__ { + test-several-phandle = <&local>, <&local>; + }; + }; + + fragment@8 { + target = <&test>; + + __overlay__ { + sub-test-node { + new-sub-test-property; + }; + }; + }; +};