xref: /linux/drivers/of/unittest-data/Makefile (revision a1c613ae4c322ddd58d5a8539dbfba2a0380a8c0)
1# SPDX-License-Identifier: GPL-2.0
2obj-y += testcases.dtbo.o
3
4obj-$(CONFIG_OF_OVERLAY) += overlay.dtbo.o \
5			    overlay_0.dtbo.o \
6			    overlay_1.dtbo.o \
7			    overlay_2.dtbo.o \
8			    overlay_3.dtbo.o \
9			    overlay_4.dtbo.o \
10			    overlay_5.dtbo.o \
11			    overlay_6.dtbo.o \
12			    overlay_7.dtbo.o \
13			    overlay_8.dtbo.o \
14			    overlay_9.dtbo.o \
15			    overlay_10.dtbo.o \
16			    overlay_11.dtbo.o \
17			    overlay_12.dtbo.o \
18			    overlay_13.dtbo.o \
19			    overlay_15.dtbo.o \
20			    overlay_16.dtbo.o \
21			    overlay_17.dtbo.o \
22			    overlay_18.dtbo.o \
23			    overlay_19.dtbo.o \
24			    overlay_20.dtbo.o \
25			    overlay_bad_add_dup_node.dtbo.o \
26			    overlay_bad_add_dup_prop.dtbo.o \
27			    overlay_bad_phandle.dtbo.o \
28			    overlay_bad_symbol.dtbo.o \
29			    overlay_base.dtbo.o \
30			    overlay_gpio_01.dtbo.o \
31			    overlay_gpio_02a.dtbo.o \
32			    overlay_gpio_02b.dtbo.o \
33			    overlay_gpio_03.dtbo.o \
34			    overlay_gpio_04a.dtbo.o \
35			    overlay_gpio_04b.dtbo.o \
36			    overlay_pci_node.dtbo.o \
37			    overlay_bad_unresolved.dtbo.o
38
39# enable creation of __symbols__ node
40DTC_FLAGS_overlay += -@
41DTC_FLAGS_overlay_bad_phandle += -@
42DTC_FLAGS_overlay_bad_symbol += -@
43DTC_FLAGS_overlay_base += -@
44DTC_FLAGS_testcases += -@
45
46# suppress warnings about intentional errors
47DTC_FLAGS_testcases += -Wno-interrupts_property \
48	-Wno-node_name_vs_property_name \
49	-Wno-interrupt_map
50
51# Apply overlays statically with fdtoverlay.  This is a build time test that
52# the overlays can be applied successfully by fdtoverlay.  This does not
53# guarantee that the overlays can be applied successfully at run time by
54# unittest, but it provides a bit of build time test coverage for those
55# who do not execute unittest.
56#
57# The overlays are applied on top of static_base_1.dtb and static_base_2.dtb to
58# create static_test_1.dtb and static_test_2.dtb.  If fdtoverlay detects an
59# error than the kernel build will fail.  static_test_1.dtb and
60# static_test_2.dtb are not consumed by unittest.
61#
62# Some unittest overlays deliberately contain errors that unittest checks for.
63# These overlays will cause fdtoverlay to fail, and are thus not included
64# in the static test:
65#			  overlay_bad_add_dup_node.dtbo \
66#			  overlay_bad_add_dup_prop.dtbo \
67#			  overlay_bad_phandle.dtbo \
68#			  overlay_bad_symbol.dtbo \
69
70apply_static_overlay_1 := overlay_0.dtbo \
71			  overlay_1.dtbo \
72			  overlay_2.dtbo \
73			  overlay_3.dtbo \
74			  overlay_4.dtbo \
75			  overlay_5.dtbo \
76			  overlay_6.dtbo \
77			  overlay_7.dtbo \
78			  overlay_8.dtbo \
79			  overlay_9.dtbo \
80			  overlay_10.dtbo \
81			  overlay_11.dtbo \
82			  overlay_12.dtbo \
83			  overlay_13.dtbo \
84			  overlay_15.dtbo \
85			  overlay_16.dtbo \
86			  overlay_17.dtbo \
87			  overlay_18.dtbo \
88			  overlay_19.dtbo \
89			  overlay_20.dtbo \
90			  overlay_gpio_01.dtbo \
91			  overlay_gpio_02a.dtbo \
92			  overlay_gpio_02b.dtbo \
93			  overlay_gpio_03.dtbo \
94			  overlay_gpio_04a.dtbo \
95			  overlay_gpio_04b.dtbo
96
97apply_static_overlay_2 := overlay.dtbo
98
99DTC_FLAGS_static_base_1 += -Wno-interrupts_property \
100	-Wno-node_name_vs_property_name \
101	-Wno-interrupt_map
102
103static_test_1-dtbs := static_base_1.dtb $(apply_static_overlay_1)
104static_test_2-dtbs := static_base_2.dtb $(apply_static_overlay_2)
105
106dtb-$(CONFIG_OF_OVERLAY) += static_test_1.dtb static_test_2.dtb
107