* [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest
@ 2021-03-10 5:35 Viresh Kumar
2021-03-10 5:35 ` [PATCH V11 4/5] of: unittest: Create overlay_common.dtsi and testcases_common.dtsi Viresh Kumar
` (4 more replies)
0 siblings, 5 replies; 8+ messages in thread
From: Viresh Kumar @ 2021-03-10 5:35 UTC (permalink / raw)
To: Masahiro Yamada, Frank Rowand, Michal Marek, Rob Herring
Cc: Viresh Kumar, Vincent Guittot, David Gibson, Michal Simek,
Geert Uytterhoeven, anmar.oueja, Bill Mills, devicetree,
Geert Uytterhoeven, linux-kbuild, linux-kernel, Rob Herring
Hi,
This patchset adds a generic rule for applying overlays using fdtoverlay
tool and then updates unittests to get built statically using the same.
V10->V11:
- Update patch 4/5 to fix checkpatch warning on spaces and tabs.
- Added Acked-by from Masahiro for patch 2/5.
V9->V10:
- Add a new patch to allow .dtso files.
- Update 2/5 to be more efficient and also generate symbols for base
files automatically.
- No need to add lines like DTC_FLAGS_foo_base += -@ in patch 5/5.
- Add Ack by Masahiro for 1/5.
V8->V9:
- Added some comment in patch 3/4 based on Frank's suggestions.
V7->V8:
- Patch 1 is new.
- Platforms need to use dtb-y += foo.dtb instead of overlay-y +=
foo.dtb.
- Use multi_depend instead of .SECONDEXPANSION.
- Use dtb-y for unittest instead of overlay-y.
- Rename the commented dtb filess in unittest Makefile as .dtbo.
- Improved Makefile code (I am learning a lot every day :)
V6->V7:
- Dropped the first 4 patches, already merged.
- Patch 1/3 is new, suggested by Rob and slightly modified by me.
- Adapt Patch 3/3 to the new rule and name the overlay dtbs as .dtbo.
--
Viresh
Rob Herring (1):
kbuild: Add generic rule to apply fdtoverlay
Viresh Kumar (4):
kbuild: Simplify builds with CONFIG_OF_ALL_DTBS
kbuild: Allow .dtso format for overlay source files
of: unittest: Create overlay_common.dtsi and testcases_common.dtsi
of: unittest: Statically apply overlays using fdtoverlay
drivers/of/unittest-data/Makefile | 48 ++++++++++
drivers/of/unittest-data/overlay_base.dts | 90 +-----------------
drivers/of/unittest-data/overlay_common.dtsi | 91 +++++++++++++++++++
drivers/of/unittest-data/static_base_1.dts | 4 +
drivers/of/unittest-data/static_base_2.dts | 4 +
drivers/of/unittest-data/testcases.dts | 23 ++---
.../of/unittest-data/testcases_common.dtsi | 19 ++++
.../of/unittest-data/tests-interrupts.dtsi | 11 +--
scripts/Makefile.lib | 40 ++++++--
9 files changed, 218 insertions(+), 112 deletions(-)
create mode 100644 drivers/of/unittest-data/overlay_common.dtsi
create mode 100644 drivers/of/unittest-data/static_base_1.dts
create mode 100644 drivers/of/unittest-data/static_base_2.dts
create mode 100644 drivers/of/unittest-data/testcases_common.dtsi
base-commit: a38fd8748464831584a19438cbb3082b5a2dab15
--
2.25.0.rc1.19.g042ed3e048af
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH V11 4/5] of: unittest: Create overlay_common.dtsi and testcases_common.dtsi
2021-03-10 5:35 [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Viresh Kumar
@ 2021-03-10 5:35 ` Viresh Kumar
2021-03-10 5:35 ` [PATCH V11 5/5] of: unittest: Statically apply overlays using fdtoverlay Viresh Kumar
` (3 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Viresh Kumar @ 2021-03-10 5:35 UTC (permalink / raw)
To: Masahiro Yamada, Rob Herring, Frank Rowand
Cc: Viresh Kumar, Vincent Guittot, David Gibson, Michal Simek,
Geert Uytterhoeven, anmar.oueja, Bill Mills, Michal Marek,
linux-kernel, devicetree
In order to build-test the same unit-test files using fdtoverlay tool,
move the device nodes from the existing overlay_base.dts and
testcases_common.dts files to .dtsi counterparts. The .dts files now
include the new .dtsi files, resulting in exactly the same behavior as
earlier.
The .dtsi files can now be reused for compile time tests using
fdtoverlay (will be done by a later commit).
This is required because the base files passed to fdtoverlay tool
shouldn't be overlays themselves (i.e. shouldn't have the /plugin/;
tag).
Note that this commit also moves "testcase-device2" node to
testcases.dts from tests-interrupts.dtsi, as this node has a deliberate
error in it and is only relevant for runtime testing done with
unittest.c.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/of/unittest-data/overlay_base.dts | 90 +-----------------
drivers/of/unittest-data/overlay_common.dtsi | 91 +++++++++++++++++++
drivers/of/unittest-data/testcases.dts | 23 ++---
.../of/unittest-data/testcases_common.dtsi | 19 ++++
.../of/unittest-data/tests-interrupts.dtsi | 11 +--
5 files changed, 128 insertions(+), 106 deletions(-)
create mode 100644 drivers/of/unittest-data/overlay_common.dtsi
create mode 100644 drivers/of/unittest-data/testcases_common.dtsi
diff --git a/drivers/of/unittest-data/overlay_base.dts b/drivers/of/unittest-data/overlay_base.dts
index 99ab9d12d00b..ab9014589c5d 100644
--- a/drivers/of/unittest-data/overlay_base.dts
+++ b/drivers/of/unittest-data/overlay_base.dts
@@ -2,92 +2,4 @@
/dts-v1/;
/plugin/;
-/*
- * Base device tree that overlays will be applied against.
- *
- * Do not add any properties in node "/".
- * Do not add any nodes other than "/testcase-data-2" in node "/".
- * Do not add anything that would result in dtc creating node "/__fixups__".
- * dtc will create nodes "/__symbols__" and "/__local_fixups__".
- */
-
-/ {
- testcase-data-2 {
- #address-cells = <1>;
- #size-cells = <1>;
-
- electric_1: substation@100 {
- compatible = "ot,big-volts-control";
- reg = < 0x00000100 0x100 >;
- status = "disabled";
-
- hvac_1: hvac-medium-1 {
- compatible = "ot,hvac-medium";
- heat-range = < 50 75 >;
- cool-range = < 60 80 >;
- };
-
- spin_ctrl_1: motor-1 {
- compatible = "ot,ferris-wheel-motor";
- spin = "clockwise";
- rpm_avail = < 50 >;
- };
-
- spin_ctrl_2: motor-8 {
- compatible = "ot,roller-coaster-motor";
- };
- };
-
- rides_1: fairway-1 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "ot,rides";
- status = "disabled";
- orientation = < 127 >;
-
- ride@100 {
- #address-cells = <1>;
- #size-cells = <1>;
- compatible = "ot,roller-coaster";
- reg = < 0x00000100 0x100 >;
- hvac-provider = < &hvac_1 >;
- hvac-thermostat = < 29 > ;
- hvac-zones = < 14 >;
- hvac-zone-names = "operator";
- spin-controller = < &spin_ctrl_2 5 &spin_ctrl_2 7 >;
- spin-controller-names = "track_1", "track_2";
- queues = < 2 >;
-
- track@30 {
- reg = < 0x00000030 0x10 >;
- };
-
- track@40 {
- reg = < 0x00000040 0x10 >;
- };
-
- };
- };
-
- lights_1: lights@30000 {
- compatible = "ot,work-lights";
- reg = < 0x00030000 0x1000 >;
- status = "disabled";
- };
-
- lights_2: lights@40000 {
- compatible = "ot,show-lights";
- reg = < 0x00040000 0x1000 >;
- status = "disabled";
- rate = < 13 138 >;
- };
-
- retail_1: vending@50000 {
- reg = < 0x00050000 0x1000 >;
- compatible = "ot,tickets";
- status = "disabled";
- };
-
- };
-};
-
+#include "overlay_common.dtsi"
diff --git a/drivers/of/unittest-data/overlay_common.dtsi b/drivers/of/unittest-data/overlay_common.dtsi
new file mode 100644
index 000000000000..08874a72556e
--- /dev/null
+++ b/drivers/of/unittest-data/overlay_common.dtsi
@@ -0,0 +1,91 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * Base device tree that overlays will be applied against.
+ *
+ * Do not add any properties in node "/".
+ * Do not add any nodes other than "/testcase-data-2" in node "/".
+ * Do not add anything that would result in dtc creating node "/__fixups__".
+ * dtc will create nodes "/__symbols__" and "/__local_fixups__".
+ */
+
+/ {
+ testcase-data-2 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ electric_1: substation@100 {
+ compatible = "ot,big-volts-control";
+ reg = < 0x00000100 0x100 >;
+ status = "disabled";
+
+ hvac_1: hvac-medium-1 {
+ compatible = "ot,hvac-medium";
+ heat-range = < 50 75 >;
+ cool-range = < 60 80 >;
+ };
+
+ spin_ctrl_1: motor-1 {
+ compatible = "ot,ferris-wheel-motor";
+ spin = "clockwise";
+ rpm_avail = < 50 >;
+ };
+
+ spin_ctrl_2: motor-8 {
+ compatible = "ot,roller-coaster-motor";
+ };
+ };
+
+ rides_1: fairway-1 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ot,rides";
+ status = "disabled";
+ orientation = < 127 >;
+
+ ride@100 {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ compatible = "ot,roller-coaster";
+ reg = < 0x00000100 0x100 >;
+ hvac-provider = < &hvac_1 >;
+ hvac-thermostat = < 29 > ;
+ hvac-zones = < 14 >;
+ hvac-zone-names = "operator";
+ spin-controller = < &spin_ctrl_2 5 &spin_ctrl_2 7 >;
+ spin-controller-names = "track_1", "track_2";
+ queues = < 2 >;
+
+ track@30 {
+ reg = < 0x00000030 0x10 >;
+ };
+
+ track@40 {
+ reg = < 0x00000040 0x10 >;
+ };
+
+ };
+ };
+
+ lights_1: lights@30000 {
+ compatible = "ot,work-lights";
+ reg = < 0x00030000 0x1000 >;
+ status = "disabled";
+ };
+
+ lights_2: lights@40000 {
+ compatible = "ot,show-lights";
+ reg = < 0x00040000 0x1000 >;
+ status = "disabled";
+ rate = < 13 138 >;
+ };
+
+ retail_1: vending@50000 {
+ reg = < 0x00050000 0x1000 >;
+ compatible = "ot,tickets";
+ status = "disabled";
+ };
+
+ };
+};
+
diff --git a/drivers/of/unittest-data/testcases.dts b/drivers/of/unittest-data/testcases.dts
index a85b5e1c381a..61cdd3d5fccb 100644
--- a/drivers/of/unittest-data/testcases.dts
+++ b/drivers/of/unittest-data/testcases.dts
@@ -2,19 +2,20 @@
/dts-v1/;
/plugin/;
+#include "testcases_common.dtsi"
+
/ {
+ /*
+ * testcase data that intentionally results in an error is located here
+ * instead of in testcases_common.dtsi so that the static overlay apply
+ * tests will not include the error.
+ */
testcase-data {
- changeset {
- prop-update = "hello";
- prop-remove = "world";
- node-remove {
- };
+ testcase-device2 {
+ compatible = "testcase-device";
+ interrupt-parent = <&test_intc2>;
+ interrupts = <1>; /* invalid specifier - too short */
};
};
+
};
-#include "tests-phandle.dtsi"
-#include "tests-interrupts.dtsi"
-#include "tests-match.dtsi"
-#include "tests-address.dtsi"
-#include "tests-platform.dtsi"
-#include "tests-overlay.dtsi"
diff --git a/drivers/of/unittest-data/testcases_common.dtsi b/drivers/of/unittest-data/testcases_common.dtsi
new file mode 100644
index 000000000000..19292bbb4cbb
--- /dev/null
+++ b/drivers/of/unittest-data/testcases_common.dtsi
@@ -0,0 +1,19 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/ {
+ testcase-data {
+ changeset {
+ prop-update = "hello";
+ prop-remove = "world";
+ node-remove {
+ };
+ };
+ };
+};
+
+#include "tests-phandle.dtsi"
+#include "tests-interrupts.dtsi"
+#include "tests-match.dtsi"
+#include "tests-address.dtsi"
+#include "tests-platform.dtsi"
+#include "tests-overlay.dtsi"
diff --git a/drivers/of/unittest-data/tests-interrupts.dtsi b/drivers/of/unittest-data/tests-interrupts.dtsi
index ec175e800725..9b60a549f502 100644
--- a/drivers/of/unittest-data/tests-interrupts.dtsi
+++ b/drivers/of/unittest-data/tests-interrupts.dtsi
@@ -62,11 +62,10 @@ testcase-device1 {
interrupts = <1>;
};
- testcase-device2 {
- compatible = "testcase-device";
- interrupt-parent = <&test_intc2>;
- interrupts = <1>; /* invalid specifier - too short */
- };
+ /*
+ * testcase data that intentionally results in an error is
+ * located in testcases.dts instead of in this file so that the
+ * static overlay apply tests will not include the error.
+ */
};
-
};
--
2.25.0.rc1.19.g042ed3e048af
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH V11 5/5] of: unittest: Statically apply overlays using fdtoverlay
2021-03-10 5:35 [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Viresh Kumar
2021-03-10 5:35 ` [PATCH V11 4/5] of: unittest: Create overlay_common.dtsi and testcases_common.dtsi Viresh Kumar
@ 2021-03-10 5:35 ` Viresh Kumar
2021-03-11 23:27 ` [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Frank Rowand
` (2 subsequent siblings)
4 siblings, 0 replies; 8+ messages in thread
From: Viresh Kumar @ 2021-03-10 5:35 UTC (permalink / raw)
To: Masahiro Yamada, Rob Herring, Frank Rowand
Cc: Viresh Kumar, Vincent Guittot, David Gibson, Michal Simek,
Geert Uytterhoeven, anmar.oueja, Bill Mills, Michal Marek,
linux-kernel, devicetree
Now that fdtoverlay is part of the kernel build, start using it to test
the unitest overlays we have by applying them statically. Create two new
base files static_base_1.dts and static_base_2.dts which includes other
.dtsi files.
Some unittest overlays deliberately contain errors that unittest checks
for. These overlays will cause fdtoverlay to fail, and are thus not
included for static builds.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
drivers/of/unittest-data/Makefile | 48 ++++++++++++++++++++++
drivers/of/unittest-data/static_base_1.dts | 4 ++
drivers/of/unittest-data/static_base_2.dts | 4 ++
3 files changed, 56 insertions(+)
create mode 100644 drivers/of/unittest-data/static_base_1.dts
create mode 100644 drivers/of/unittest-data/static_base_2.dts
diff --git a/drivers/of/unittest-data/Makefile b/drivers/of/unittest-data/Makefile
index 009f4045c8e4..a5d2d9254b2c 100644
--- a/drivers/of/unittest-data/Makefile
+++ b/drivers/of/unittest-data/Makefile
@@ -38,3 +38,51 @@ DTC_FLAGS_testcases += -@
# suppress warnings about intentional errors
DTC_FLAGS_testcases += -Wno-interrupts_property
+
+# Apply overlays statically with fdtoverlay. This is a build time test that
+# the overlays can be applied successfully by fdtoverlay. This does not
+# guarantee that the overlays can be applied successfully at run time by
+# unittest, but it provides a bit of build time test coverage for those
+# who do not execute unittest.
+#
+# The overlays are applied on top of static_base_1.dtb and static_base_2.dtb to
+# create static_test_1.dtb and static_test_2.dtb. If fdtoverlay detects an
+# error than the kernel build will fail. static_test_1.dtb and
+# static_test_2.dtb are not consumed by unittest.
+#
+# Some unittest overlays deliberately contain errors that unittest checks for.
+# These overlays will cause fdtoverlay to fail, and are thus not included
+# in the static test:
+# overlay_bad_add_dup_node.dtbo \
+# overlay_bad_add_dup_prop.dtbo \
+# overlay_bad_phandle.dtbo \
+# overlay_bad_symbol.dtbo \
+
+apply_static_overlay_1 := overlay_0.dtbo \
+ overlay_1.dtbo \
+ overlay_2.dtbo \
+ overlay_3.dtbo \
+ overlay_4.dtbo \
+ overlay_5.dtbo \
+ overlay_6.dtbo \
+ overlay_7.dtbo \
+ overlay_8.dtbo \
+ overlay_9.dtbo \
+ overlay_10.dtbo \
+ overlay_11.dtbo \
+ overlay_12.dtbo \
+ overlay_13.dtbo \
+ overlay_15.dtbo \
+ overlay_gpio_01.dtbo \
+ overlay_gpio_02a.dtbo \
+ overlay_gpio_02b.dtbo \
+ overlay_gpio_03.dtbo \
+ overlay_gpio_04a.dtbo \
+ overlay_gpio_04b.dtbo
+
+apply_static_overlay_2 := overlay.dtbo
+
+static_test_1-dtbs := static_base_1.dtb $(apply_static_overlay_1)
+static_test_2-dtbs := static_base_2.dtb $(apply_static_overlay_2)
+
+dtb-$(CONFIG_OF_OVERLAY) += static_test_1.dtb static_test_2.dtb
diff --git a/drivers/of/unittest-data/static_base_1.dts b/drivers/of/unittest-data/static_base_1.dts
new file mode 100644
index 000000000000..10556cb3f01f
--- /dev/null
+++ b/drivers/of/unittest-data/static_base_1.dts
@@ -0,0 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "testcases_common.dtsi"
diff --git a/drivers/of/unittest-data/static_base_2.dts b/drivers/of/unittest-data/static_base_2.dts
new file mode 100644
index 000000000000..b0ea9504d6f3
--- /dev/null
+++ b/drivers/of/unittest-data/static_base_2.dts
@@ -0,0 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
+/dts-v1/;
+
+#include "overlay_common.dtsi"
--
2.25.0.rc1.19.g042ed3e048af
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest
2021-03-10 5:35 [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Viresh Kumar
2021-03-10 5:35 ` [PATCH V11 4/5] of: unittest: Create overlay_common.dtsi and testcases_common.dtsi Viresh Kumar
2021-03-10 5:35 ` [PATCH V11 5/5] of: unittest: Statically apply overlays using fdtoverlay Viresh Kumar
@ 2021-03-11 23:27 ` Frank Rowand
2021-03-12 4:31 ` Viresh Kumar
2021-03-12 4:32 ` Viresh Kumar
2021-03-15 17:13 ` Rob Herring
4 siblings, 1 reply; 8+ messages in thread
From: Frank Rowand @ 2021-03-11 23:27 UTC (permalink / raw)
To: Viresh Kumar, Masahiro Yamada, Michal Marek, Rob Herring
Cc: Vincent Guittot, David Gibson, Michal Simek, Geert Uytterhoeven,
anmar.oueja, Bill Mills, devicetree, Geert Uytterhoeven,
linux-kbuild, linux-kernel, Rob Herring
On 3/9/21 11:35 PM, Viresh Kumar wrote:
> Hi,
>
> This patchset adds a generic rule for applying overlays using fdtoverlay
> tool and then updates unittests to get built statically using the same.
>
> V10->V11:
> - Update patch 4/5 to fix checkpatch warning on spaces and tabs.
> - Added Acked-by from Masahiro for patch 2/5.
>
> V9->V10:
> - Add a new patch to allow .dtso files.
> - Update 2/5 to be more efficient and also generate symbols for base
> files automatically.
> - No need to add lines like DTC_FLAGS_foo_base += -@ in patch 5/5.
> - Add Ack by Masahiro for 1/5.
>
> V8->V9:
> - Added some comment in patch 3/4 based on Frank's suggestions.
>
> V7->V8:
> - Patch 1 is new.
> - Platforms need to use dtb-y += foo.dtb instead of overlay-y +=
> foo.dtb.
> - Use multi_depend instead of .SECONDEXPANSION.
> - Use dtb-y for unittest instead of overlay-y.
> - Rename the commented dtb filess in unittest Makefile as .dtbo.
> - Improved Makefile code (I am learning a lot every day :)
>
> V6->V7:
> - Dropped the first 4 patches, already merged.
> - Patch 1/3 is new, suggested by Rob and slightly modified by me.
> - Adapt Patch 3/3 to the new rule and name the overlay dtbs as .dtbo.
>
> --
> Viresh
>
> Rob Herring (1):
> kbuild: Add generic rule to apply fdtoverlay
>
> Viresh Kumar (4):
> kbuild: Simplify builds with CONFIG_OF_ALL_DTBS
> kbuild: Allow .dtso format for overlay source files
> of: unittest: Create overlay_common.dtsi and testcases_common.dtsi
> of: unittest: Statically apply overlays using fdtoverlay
>
> drivers/of/unittest-data/Makefile | 48 ++++++++++
> drivers/of/unittest-data/overlay_base.dts | 90 +-----------------
> drivers/of/unittest-data/overlay_common.dtsi | 91 +++++++++++++++++++
> drivers/of/unittest-data/static_base_1.dts | 4 +
> drivers/of/unittest-data/static_base_2.dts | 4 +
> drivers/of/unittest-data/testcases.dts | 23 ++---
> .../of/unittest-data/testcases_common.dtsi | 19 ++++
> .../of/unittest-data/tests-interrupts.dtsi | 11 +--
> scripts/Makefile.lib | 40 ++++++--
> 9 files changed, 218 insertions(+), 112 deletions(-)
> create mode 100644 drivers/of/unittest-data/overlay_common.dtsi
> create mode 100644 drivers/of/unittest-data/static_base_1.dts
> create mode 100644 drivers/of/unittest-data/static_base_2.dts
> create mode 100644 drivers/of/unittest-data/testcases_common.dtsi
>
>
> base-commit: a38fd8748464831584a19438cbb3082b5a2dab15
>
Does not apply to 5.12-rc2 because of a dependency on a patch to
scripts/Makefile.lib. That patch has been merged by Linus
somewhere between -rc2 and -rc3. I had a working version
between -rc2 and -rc3 at commit e6f197677b2e that does have
the required patch, so that is the version I used to test
this series.
There is still confusion caused by the contortions that unittest
goes through to mis-use base DTBs vs overlay DTBs, so _after_
this series is merged by Rob, I will poke around and see if
I can change unittest so that it does not look like it is
mis-using DTBs and overlay DTBs.
Reviewed-by: Frank Rowand <frank.rowand@sony.com>
Tested-by: Frank Rowand <frank.rowand@sony.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest
2021-03-11 23:27 ` [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Frank Rowand
@ 2021-03-12 4:31 ` Viresh Kumar
2021-03-12 6:46 ` Frank Rowand
0 siblings, 1 reply; 8+ messages in thread
From: Viresh Kumar @ 2021-03-12 4:31 UTC (permalink / raw)
To: Frank Rowand
Cc: Masahiro Yamada, Michal Marek, Rob Herring, Vincent Guittot,
David Gibson, Michal Simek, Geert Uytterhoeven, anmar.oueja,
Bill Mills, devicetree, Geert Uytterhoeven, linux-kbuild,
linux-kernel, Rob Herring
On 11-03-21, 17:27, Frank Rowand wrote:
> On 3/9/21 11:35 PM, Viresh Kumar wrote:
> > Viresh Kumar (4):
> > kbuild: Simplify builds with CONFIG_OF_ALL_DTBS
> > kbuild: Allow .dtso format for overlay source files
> > of: unittest: Create overlay_common.dtsi and testcases_common.dtsi
> > of: unittest: Statically apply overlays using fdtoverlay
> >
> > drivers/of/unittest-data/Makefile | 48 ++++++++++
> > drivers/of/unittest-data/overlay_base.dts | 90 +-----------------
> > drivers/of/unittest-data/overlay_common.dtsi | 91 +++++++++++++++++++
> > drivers/of/unittest-data/static_base_1.dts | 4 +
> > drivers/of/unittest-data/static_base_2.dts | 4 +
> > drivers/of/unittest-data/testcases.dts | 23 ++---
> > .../of/unittest-data/testcases_common.dtsi | 19 ++++
> > .../of/unittest-data/tests-interrupts.dtsi | 11 +--
> > scripts/Makefile.lib | 40 ++++++--
> > 9 files changed, 218 insertions(+), 112 deletions(-)
> > create mode 100644 drivers/of/unittest-data/overlay_common.dtsi
> > create mode 100644 drivers/of/unittest-data/static_base_1.dts
> > create mode 100644 drivers/of/unittest-data/static_base_2.dts
> > create mode 100644 drivers/of/unittest-data/testcases_common.dtsi
> >
> >
> > base-commit: a38fd8748464831584a19438cbb3082b5a2dab15
> >
>
> Does not apply to 5.12-rc2
I was based right over the 5.12-rc2 tag.
> because of a dependency on a patch to
> scripts/Makefile.lib. That patch has been merged by Linus
> somewhere between -rc2 and -rc3.
git log --oneline v5.12-rc2..origin/master -- scripts/Makefile.lib
gives no results to me.
> I had a working version
> between -rc2 and -rc3 at commit e6f197677b2e
I have tried both Linus' tree and linux-next, and I don't see this
commit.
> that does have
> the required patch, so that is the version I used to test
> this series.
>
> There is still confusion caused by the contortions that unittest
> goes through to mis-use base DTBs vs overlay DTBs, so _after_
> this series is merged by Rob, I will poke around and see if
> I can change unittest so that it does not look like it is
> mis-using DTBs and overlay DTBs.
>
>
> Reviewed-by: Frank Rowand <frank.rowand@sony.com>
> Tested-by: Frank Rowand <frank.rowand@sony.com>
Thanks.
--
viresh
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest
2021-03-10 5:35 [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Viresh Kumar
` (2 preceding siblings ...)
2021-03-11 23:27 ` [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Frank Rowand
@ 2021-03-12 4:32 ` Viresh Kumar
2021-03-15 17:13 ` Rob Herring
4 siblings, 0 replies; 8+ messages in thread
From: Viresh Kumar @ 2021-03-12 4:32 UTC (permalink / raw)
To: Masahiro Yamada, Frank Rowand, Michal Marek, Rob Herring
Cc: Vincent Guittot, David Gibson, Michal Simek, Geert Uytterhoeven,
anmar.oueja, Bill Mills, devicetree, Geert Uytterhoeven,
linux-kbuild, linux-kernel, Rob Herring
On 10-03-21, 11:05, Viresh Kumar wrote:
> Hi,
>
> This patchset adds a generic rule for applying overlays using fdtoverlay
> tool and then updates unittests to get built statically using the same.
>
> V10->V11:
> - Update patch 4/5 to fix checkpatch warning on spaces and tabs.
> - Added Acked-by from Masahiro for patch 2/5.
>
>
> Rob Herring (1):
> kbuild: Add generic rule to apply fdtoverlay
>
> Viresh Kumar (4):
> kbuild: Simplify builds with CONFIG_OF_ALL_DTBS
> kbuild: Allow .dtso format for overlay source files
> of: unittest: Create overlay_common.dtsi and testcases_common.dtsi
> of: unittest: Statically apply overlays using fdtoverlay
Rob, can you please apply patch 1-2,4-5 from this series ? I will send
a new version of the patch 3/5 (related to .dtso) separately.
--
viresh
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest
2021-03-12 4:31 ` Viresh Kumar
@ 2021-03-12 6:46 ` Frank Rowand
0 siblings, 0 replies; 8+ messages in thread
From: Frank Rowand @ 2021-03-12 6:46 UTC (permalink / raw)
To: Viresh Kumar
Cc: Masahiro Yamada, Michal Marek, Rob Herring, Vincent Guittot,
David Gibson, Michal Simek, Geert Uytterhoeven, anmar.oueja,
Bill Mills, devicetree, Geert Uytterhoeven, linux-kbuild,
linux-kernel, Rob Herring
On 3/11/21 10:31 PM, Viresh Kumar wrote:
> On 11-03-21, 17:27, Frank Rowand wrote:
>> On 3/9/21 11:35 PM, Viresh Kumar wrote:
>>> Viresh Kumar (4):
>>> kbuild: Simplify builds with CONFIG_OF_ALL_DTBS
>>> kbuild: Allow .dtso format for overlay source files
>>> of: unittest: Create overlay_common.dtsi and testcases_common.dtsi
>>> of: unittest: Statically apply overlays using fdtoverlay
>>>
>>> drivers/of/unittest-data/Makefile | 48 ++++++++++
>>> drivers/of/unittest-data/overlay_base.dts | 90 +-----------------
>>> drivers/of/unittest-data/overlay_common.dtsi | 91 +++++++++++++++++++
>>> drivers/of/unittest-data/static_base_1.dts | 4 +
>>> drivers/of/unittest-data/static_base_2.dts | 4 +
>>> drivers/of/unittest-data/testcases.dts | 23 ++---
>>> .../of/unittest-data/testcases_common.dtsi | 19 ++++
>>> .../of/unittest-data/tests-interrupts.dtsi | 11 +--
>>> scripts/Makefile.lib | 40 ++++++--
>>> 9 files changed, 218 insertions(+), 112 deletions(-)
>>> create mode 100644 drivers/of/unittest-data/overlay_common.dtsi
>>> create mode 100644 drivers/of/unittest-data/static_base_1.dts
>>> create mode 100644 drivers/of/unittest-data/static_base_2.dts
>>> create mode 100644 drivers/of/unittest-data/testcases_common.dtsi
>>>
>>>
>>> base-commit: a38fd8748464831584a19438cbb3082b5a2dab15
>>>
>>
>> Does not apply to 5.12-rc2
>
> I was based right over the 5.12-rc2 tag.
I don't know why I failed. Given your report, I went back to
v5.12-rc2 and the patch series applies fine.
Either way, my tags are ok.
>
>> because of a dependency on a patch to
>> scripts/Makefile.lib. That patch has been merged by Linus
>> somewhere between -rc2 and -rc3.
>
> git log --oneline v5.12-rc2..origin/master -- scripts/Makefile.lib
>
> gives no results to me.
>
>> I had a working version
>> between -rc2 and -rc3 at commit e6f197677b2e
>
> I have tried both Linus' tree and linux-next, and I don't see this
> commit.
Sorry about that, the commit id I gave was after applying the patch
series. The commit id I should have reported is 144c79ef3353.
-Frank
>
>> that does have
>> the required patch, so that is the version I used to test
>> this series.
>>
>> There is still confusion caused by the contortions that unittest
>> goes through to mis-use base DTBs vs overlay DTBs, so _after_
>> this series is merged by Rob, I will poke around and see if
>> I can change unittest so that it does not look like it is
>> mis-using DTBs and overlay DTBs.
>>
>>
>> Reviewed-by: Frank Rowand <frank.rowand@sony.com>
>> Tested-by: Frank Rowand <frank.rowand@sony.com>
>
> Thanks.
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest
2021-03-10 5:35 [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Viresh Kumar
` (3 preceding siblings ...)
2021-03-12 4:32 ` Viresh Kumar
@ 2021-03-15 17:13 ` Rob Herring
4 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2021-03-15 17:13 UTC (permalink / raw)
To: Viresh Kumar
Cc: Frank Rowand, Michal Marek, David Gibson, Michal Simek,
Geert Uytterhoeven, Masahiro Yamada, anmar.oueja,
Geert Uytterhoeven, Vincent Guittot, Rob Herring, linux-kernel,
devicetree, linux-kbuild, Bill Mills
On Wed, 10 Mar 2021 11:05:28 +0530, Viresh Kumar wrote:
> Hi,
>
> This patchset adds a generic rule for applying overlays using fdtoverlay
> tool and then updates unittests to get built statically using the same.
>
> V10->V11:
> - Update patch 4/5 to fix checkpatch warning on spaces and tabs.
> - Added Acked-by from Masahiro for patch 2/5.
>
> V9->V10:
> - Add a new patch to allow .dtso files.
> - Update 2/5 to be more efficient and also generate symbols for base
> files automatically.
> - No need to add lines like DTC_FLAGS_foo_base += -@ in patch 5/5.
> - Add Ack by Masahiro for 1/5.
>
> V8->V9:
> - Added some comment in patch 3/4 based on Frank's suggestions.
>
> V7->V8:
> - Patch 1 is new.
> - Platforms need to use dtb-y += foo.dtb instead of overlay-y +=
> foo.dtb.
> - Use multi_depend instead of .SECONDEXPANSION.
> - Use dtb-y for unittest instead of overlay-y.
> - Rename the commented dtb filess in unittest Makefile as .dtbo.
> - Improved Makefile code (I am learning a lot every day :)
>
> V6->V7:
> - Dropped the first 4 patches, already merged.
> - Patch 1/3 is new, suggested by Rob and slightly modified by me.
> - Adapt Patch 3/3 to the new rule and name the overlay dtbs as .dtbo.
>
> --
> Viresh
>
> Rob Herring (1):
> kbuild: Add generic rule to apply fdtoverlay
>
> Viresh Kumar (4):
> kbuild: Simplify builds with CONFIG_OF_ALL_DTBS
> kbuild: Allow .dtso format for overlay source files
> of: unittest: Create overlay_common.dtsi and testcases_common.dtsi
> of: unittest: Statically apply overlays using fdtoverlay
>
> drivers/of/unittest-data/Makefile | 48 ++++++++++
> drivers/of/unittest-data/overlay_base.dts | 90 +-----------------
> drivers/of/unittest-data/overlay_common.dtsi | 91 +++++++++++++++++++
> drivers/of/unittest-data/static_base_1.dts | 4 +
> drivers/of/unittest-data/static_base_2.dts | 4 +
> drivers/of/unittest-data/testcases.dts | 23 ++---
> .../of/unittest-data/testcases_common.dtsi | 19 ++++
> .../of/unittest-data/tests-interrupts.dtsi | 11 +--
> scripts/Makefile.lib | 40 ++++++--
> 9 files changed, 218 insertions(+), 112 deletions(-)
> create mode 100644 drivers/of/unittest-data/overlay_common.dtsi
> create mode 100644 drivers/of/unittest-data/static_base_1.dts
> create mode 100644 drivers/of/unittest-data/static_base_2.dts
> create mode 100644 drivers/of/unittest-data/testcases_common.dtsi
>
>
> base-commit: a38fd8748464831584a19438cbb3082b5a2dab15
> --
> 2.25.0.rc1.19.g042ed3e048af
>
>
>
Applied patches 1,2,4,5, thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-03-15 17:14 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-10 5:35 [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Viresh Kumar
2021-03-10 5:35 ` [PATCH V11 4/5] of: unittest: Create overlay_common.dtsi and testcases_common.dtsi Viresh Kumar
2021-03-10 5:35 ` [PATCH V11 5/5] of: unittest: Statically apply overlays using fdtoverlay Viresh Kumar
2021-03-11 23:27 ` [PATCH V11 0/5] dt: Add fdtoverlay rule and statically build unittest Frank Rowand
2021-03-12 4:31 ` Viresh Kumar
2021-03-12 6:46 ` Frank Rowand
2021-03-12 4:32 ` Viresh Kumar
2021-03-15 17:13 ` Rob Herring
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).