1 # SPDX-License-Identifier: GPL-2.0
2 obj-y += testcases.dtb.o
4 obj-$(CONFIG_OF_OVERLAY) += overlay.dtb.o \
25 overlay_bad_add_dup_node.dtb.o \
26 overlay_bad_add_dup_prop.dtb.o \
27 overlay_bad_phandle.dtb.o \
28 overlay_bad_symbol.dtb.o \
30 overlay_gpio_01.dtb.o \
31 overlay_gpio_02a.dtb.o \
32 overlay_gpio_02b.dtb.o \
33 overlay_gpio_03.dtb.o \
34 overlay_gpio_04a.dtb.o \
35 overlay_gpio_04b.dtb.o
37 # enable creation of __symbols__ node
38 DTC_FLAGS_overlay += -@
39 DTC_FLAGS_overlay_bad_phandle += -@
40 DTC_FLAGS_overlay_bad_symbol += -@
41 DTC_FLAGS_overlay_base += -@
42 DTC_FLAGS_testcases += -@
44 # suppress warnings about intentional errors
45 DTC_FLAGS_testcases += -Wno-interrupts_property \
46 -Wno-node_name_vs_property_name \
49 # Apply overlays statically with fdtoverlay. This is a build time test that
50 # the overlays can be applied successfully by fdtoverlay. This does not
51 # guarantee that the overlays can be applied successfully at run time by
52 # unittest, but it provides a bit of build time test coverage for those
53 # who do not execute unittest.
55 # The overlays are applied on top of static_base_1.dtb and static_base_2.dtb to
56 # create static_test_1.dtb and static_test_2.dtb. If fdtoverlay detects an
57 # error than the kernel build will fail. static_test_1.dtb and
58 # static_test_2.dtb are not consumed by unittest.
60 # Some unittest overlays deliberately contain errors that unittest checks for.
61 # These overlays will cause fdtoverlay to fail, and are thus not included
63 # overlay_bad_add_dup_node.dtbo \
64 # overlay_bad_add_dup_prop.dtbo \
65 # overlay_bad_phandle.dtbo \
66 # overlay_bad_symbol.dtbo \
68 apply_static_overlay_1 := overlay_0.dtbo \
88 overlay_gpio_01.dtbo \
89 overlay_gpio_02a.dtbo \
90 overlay_gpio_02b.dtbo \
91 overlay_gpio_03.dtbo \
92 overlay_gpio_04a.dtbo \
95 apply_static_overlay_2 := overlay.dtbo
97 DTC_FLAGS_static_base_1 += -Wno-interrupts_property \
98 -Wno-node_name_vs_property_name \
101 static_test_1-dtbs := static_base_1.dtb $(apply_static_overlay_1)
102 static_test_2-dtbs := static_base_2.dtb $(apply_static_overlay_2)
104 dtb-$(CONFIG_OF_OVERLAY) += static_test_1.dtb static_test_2.dtb