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