1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2f0570d91SFrank Rowandobj-y += testcases.dtb.o 3f0570d91SFrank Rowand 4bd6dc70bSMasahiro Yamadaobj-$(CONFIG_OF_OVERLAY) += overlay.dtb.o \ 539a751a4SFrank Rowand overlay_0.dtb.o \ 639a751a4SFrank Rowand overlay_1.dtb.o \ 739a751a4SFrank Rowand overlay_2.dtb.o \ 839a751a4SFrank Rowand overlay_3.dtb.o \ 939a751a4SFrank Rowand overlay_4.dtb.o \ 1039a751a4SFrank Rowand overlay_5.dtb.o \ 1139a751a4SFrank Rowand overlay_6.dtb.o \ 1239a751a4SFrank Rowand overlay_7.dtb.o \ 1339a751a4SFrank Rowand overlay_8.dtb.o \ 1439a751a4SFrank Rowand overlay_9.dtb.o \ 1539a751a4SFrank Rowand overlay_10.dtb.o \ 1639a751a4SFrank Rowand overlay_11.dtb.o \ 1739a751a4SFrank Rowand overlay_12.dtb.o \ 1839a751a4SFrank Rowand overlay_13.dtb.o \ 1939a751a4SFrank Rowand overlay_15.dtb.o \ 20a68238a1SFrank Rowand overlay_bad_add_dup_node.dtb.o \ 212fe0e876SFrank Rowand overlay_bad_add_dup_prop.dtb.o \ 22bd6dc70bSMasahiro Yamada overlay_bad_phandle.dtb.o \ 23bd6dc70bSMasahiro Yamada overlay_bad_symbol.dtb.o \ 24f4056e70SFrank Rowand overlay_base.dtb.o \ 25f4056e70SFrank Rowand overlay_gpio_01.dtb.o \ 26f4056e70SFrank Rowand overlay_gpio_02a.dtb.o \ 27f4056e70SFrank Rowand overlay_gpio_02b.dtb.o \ 28f4056e70SFrank Rowand overlay_gpio_03.dtb.o \ 29f4056e70SFrank Rowand overlay_gpio_04a.dtb.o \ 30f4056e70SFrank Rowand overlay_gpio_04b.dtb.o 3160a0004cSFrank Rowand 3281d0848fSFrank Rowand# enable creation of __symbols__ node 3339a751a4SFrank RowandDTC_FLAGS_overlay += -@ 3439a751a4SFrank RowandDTC_FLAGS_overlay_bad_phandle += -@ 3539a751a4SFrank RowandDTC_FLAGS_overlay_bad_symbol += -@ 3639a751a4SFrank RowandDTC_FLAGS_overlay_base += -@ 3739a751a4SFrank RowandDTC_FLAGS_testcases += -@ 3839a751a4SFrank Rowand 3939a751a4SFrank Rowand# suppress warnings about intentional errors 40*b68d0924SRob HerringDTC_FLAGS_testcases += -Wno-interrupts_property \ 41*b68d0924SRob Herring -Wno-node_name_vs_property_name \ 42*b68d0924SRob Herring -Wno-interrupt_map 433b2dccc6SViresh Kumar 443b2dccc6SViresh Kumar# Apply overlays statically with fdtoverlay. This is a build time test that 453b2dccc6SViresh Kumar# the overlays can be applied successfully by fdtoverlay. This does not 463b2dccc6SViresh Kumar# guarantee that the overlays can be applied successfully at run time by 473b2dccc6SViresh Kumar# unittest, but it provides a bit of build time test coverage for those 483b2dccc6SViresh Kumar# who do not execute unittest. 493b2dccc6SViresh Kumar# 503b2dccc6SViresh Kumar# The overlays are applied on top of static_base_1.dtb and static_base_2.dtb to 513b2dccc6SViresh Kumar# create static_test_1.dtb and static_test_2.dtb. If fdtoverlay detects an 523b2dccc6SViresh Kumar# error than the kernel build will fail. static_test_1.dtb and 533b2dccc6SViresh Kumar# static_test_2.dtb are not consumed by unittest. 543b2dccc6SViresh Kumar# 553b2dccc6SViresh Kumar# Some unittest overlays deliberately contain errors that unittest checks for. 563b2dccc6SViresh Kumar# These overlays will cause fdtoverlay to fail, and are thus not included 573b2dccc6SViresh Kumar# in the static test: 583b2dccc6SViresh Kumar# overlay_bad_add_dup_node.dtbo \ 593b2dccc6SViresh Kumar# overlay_bad_add_dup_prop.dtbo \ 603b2dccc6SViresh Kumar# overlay_bad_phandle.dtbo \ 613b2dccc6SViresh Kumar# overlay_bad_symbol.dtbo \ 623b2dccc6SViresh Kumar 633b2dccc6SViresh Kumarapply_static_overlay_1 := overlay_0.dtbo \ 643b2dccc6SViresh Kumar overlay_1.dtbo \ 653b2dccc6SViresh Kumar overlay_2.dtbo \ 663b2dccc6SViresh Kumar overlay_3.dtbo \ 673b2dccc6SViresh Kumar overlay_4.dtbo \ 683b2dccc6SViresh Kumar overlay_5.dtbo \ 693b2dccc6SViresh Kumar overlay_6.dtbo \ 703b2dccc6SViresh Kumar overlay_7.dtbo \ 713b2dccc6SViresh Kumar overlay_8.dtbo \ 723b2dccc6SViresh Kumar overlay_9.dtbo \ 733b2dccc6SViresh Kumar overlay_10.dtbo \ 743b2dccc6SViresh Kumar overlay_11.dtbo \ 753b2dccc6SViresh Kumar overlay_12.dtbo \ 763b2dccc6SViresh Kumar overlay_13.dtbo \ 773b2dccc6SViresh Kumar overlay_15.dtbo \ 783b2dccc6SViresh Kumar overlay_gpio_01.dtbo \ 793b2dccc6SViresh Kumar overlay_gpio_02a.dtbo \ 803b2dccc6SViresh Kumar overlay_gpio_02b.dtbo \ 813b2dccc6SViresh Kumar overlay_gpio_03.dtbo \ 823b2dccc6SViresh Kumar overlay_gpio_04a.dtbo \ 833b2dccc6SViresh Kumar overlay_gpio_04b.dtbo 843b2dccc6SViresh Kumar 853b2dccc6SViresh Kumarapply_static_overlay_2 := overlay.dtbo 863b2dccc6SViresh Kumar 87*b68d0924SRob HerringDTC_FLAGS_static_base_1 += -Wno-interrupts_property \ 88*b68d0924SRob Herring -Wno-node_name_vs_property_name \ 89*b68d0924SRob Herring -Wno-interrupt_map 90*b68d0924SRob Herring 913b2dccc6SViresh Kumarstatic_test_1-dtbs := static_base_1.dtb $(apply_static_overlay_1) 923b2dccc6SViresh Kumarstatic_test_2-dtbs := static_base_2.dtb $(apply_static_overlay_2) 933b2dccc6SViresh Kumar 943b2dccc6SViresh Kumardtb-$(CONFIG_OF_OVERLAY) += static_test_1.dtb static_test_2.dtb 95