Skip to content

Commit

Permalink
dt: OF_UNITTEST make dependency broken
Browse files Browse the repository at this point in the history
If CONFIG_OF_UNITTEST=y then a kernel image make will always cause .version to
be incremented, even if there are not source changes.  This is caused by
a lack of dependency tracking and checking for
drivers/of/unittest-data/testcases.dtb.o.

Signed-off-by: Frank Rowand <frank.rowand@sonymobile.com>
Signed-off-by: Rob Herring <robh@kernel.org>
  • Loading branch information
Frank Rowand authored and Rob Herring committed Mar 25, 2015
1 parent 2bb65f5 commit f0570d9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/of/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ obj-$(CONFIG_OF_PROMTREE) += pdt.o
obj-$(CONFIG_OF_ADDRESS) += address.o
obj-$(CONFIG_OF_IRQ) += irq.o
obj-$(CONFIG_OF_NET) += of_net.o
obj-$(CONFIG_OF_UNITTEST) += of_unittest.o
of_unittest-objs := unittest.o unittest-data/testcases.dtb.o
obj-$(CONFIG_OF_UNITTEST) += unittest.o
obj-$(CONFIG_OF_MDIO) += of_mdio.o
obj-$(CONFIG_OF_PCI) += of_pci.o
obj-$(CONFIG_OF_PCI_IRQ) += of_pci_irq.o
Expand All @@ -16,5 +15,7 @@ obj-$(CONFIG_OF_RESERVED_MEM) += of_reserved_mem.o
obj-$(CONFIG_OF_RESOLVE) += resolver.o
obj-$(CONFIG_OF_OVERLAY) += overlay.o

obj-$(CONFIG_OF_UNITTEST) += unittest-data/

CFLAGS_fdt.o = -I$(src)/../../scripts/dtc/libfdt
CFLAGS_fdt_address.o = -I$(src)/../../scripts/dtc/libfdt
2 changes: 2 additions & 0 deletions drivers/of/unittest-data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
testcases.dtb
testcases.dtb.S
7 changes: 7 additions & 0 deletions drivers/of/unittest-data/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
obj-y += testcases.dtb.o

targets += testcases.dtb testcases.dtb.S

.SECONDARY: \
$(obj)/testcases.dtb.S \
$(obj)/testcases.dtb

0 comments on commit f0570d9

Please sign in to comment.