From patchwork Thu Mar 12 05:33:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Rowand X-Patchwork-Id: 5990731 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A8C2B9F2A9 for ; Thu, 12 Mar 2015 05:33:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C4F7920386 for ; Thu, 12 Mar 2015 05:33:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D436020379 for ; Thu, 12 Mar 2015 05:33:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751775AbbCLFdm (ORCPT ); Thu, 12 Mar 2015 01:33:42 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:42600 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750909AbbCLFdl (ORCPT ); Thu, 12 Mar 2015 01:33:41 -0400 Received: by padfa1 with SMTP id fa1so17517229pad.9; Wed, 11 Mar 2015 22:33:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; bh=o8ceBVPuIdf15rSQ0vKoyJJsLFbnJkI3OCPsO+ySJtQ=; b=KIzTb65VdtABfzZH62fwuqDvBnsw/xNCumO9ilzvYYns+wtpU+whUyLIu0lZsjHeds zwReobtWYCJ5t/gjF6nbo7ePml+aUT5FLWFMYeLrGIUWlcS3fKgM2Fi+uD10zbOnN38J rLiVKciLciNuY+GyqZQyRdmly017/XWRVsFgN5+t4g8GaUGusGDRWLCxbfEvCX+oHca3 yjJV//gPtTOaBRcdF4TUA34YqVF7VbsKP4ZInxHNJ1vCpdWAen0LwIPEr0hJ2NFLdbO0 +alKrZBl6sUthK4MeZ0a8ajOjWqOK38i4Rawk8bSWHnRB1hAmfyuawIYKpsoVtzK4y0+ 8iYQ== X-Received: by 10.70.26.100 with SMTP id k4mr85842026pdg.125.1426138420498; Wed, 11 Mar 2015 22:33:40 -0700 (PDT) Received: from [172.26.78.249] ([64.211.224.253]) by mx.google.com with ESMTPSA id r8sm8853108pdp.10.2015.03.11.22.33.38 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Mar 2015 22:33:39 -0700 (PDT) Message-ID: <55012531.8040608@gmail.com> Date: Wed, 11 Mar 2015 22:33:37 -0700 From: Frank Rowand Reply-To: frowand.list@gmail.com User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130801 Thunderbird/17.0.8 MIME-Version: 1.0 To: Grant Likely , Rob Herring , Michal Marek , Linux Kernel list , "devicetree@vger.kernel.org" , linux-kbuild@vger.kernel.org Subject: [Patch 1/3] dt: OF_UNITTEST make dependency broken, framework fixes Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Frank Rowand This 3 patch series is not bisectable. If CONFIG_OF_UNITTEST=y then the kernel will not build with just patch 1 or just patches 1 and 2 applied. 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. Fixing the problem was made more complicated by the fact that testcases.dtb.o was linked into ../of_unittest.o. Patch 1 modifies makefiles to move of_unittest.c into unittest-data/ and creates missing dependency tracking for testcases.dtb.o. Patch 2 will move of_unittest.c into unittest-data/ Patch 3 will fix an of_unittest.c include path to account for the move. Signed-off-by: Frank Rowand --- drivers/of/Makefile | 4 ++-- drivers/of/unittest-data/Makefile | 9 +++++++++ scripts/Makefile.lib | 5 +++-- 3 files changed, 14 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: b/drivers/of/Makefile =================================================================== --- a/drivers/of/Makefile +++ b/drivers/of/Makefile @@ -6,8 +6,6 @@ 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_MDIO) += of_mdio.o obj-$(CONFIG_OF_PCI) += of_pci.o obj-$(CONFIG_OF_PCI_IRQ) += of_pci_irq.o @@ -16,5 +14,7 @@ obj-$(CONFIG_OF_RESERVED_MEM) += of_rese 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 Index: b/scripts/Makefile.lib =================================================================== --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -276,10 +276,11 @@ cmd_dt_S_dtb= \ echo '__dtb_$(*F)_end:'; \ echo '.global __dtb_$(*F)_end'; \ echo '.balign STRUCT_ALIGNMENT'; \ -) > $@ +) > $@ ; \ + touch $(depfile) $(obj)/%.dtb.S: $(obj)/%.dtb - $(call cmd,dt_S_dtb) + $(call if_changed_dep,dt_S_dtb) quiet_cmd_dtc = DTC $@ cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ Index: b/drivers/of/unittest-data/Makefile =================================================================== --- /dev/null +++ b/drivers/of/unittest-data/Makefile @@ -0,0 +1,9 @@ + +obj-$(CONFIG_OF_UNITTEST) += of_unittest.o +of_unittest-objs := unittest.o testcases.dtb.o + +targets += testcases.dtb testcases.dtb.S + +.SECONDARY: \ + $(obj)/testcases.dtb.S \ + $(obj)/testcases.dtb