Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp126357imm; Tue, 19 Jun 2018 17:29:04 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIDrMEgUl0ATXQvNA3SDL38605o/hWs8CjVFK2VkR/5jzlwnGB65o3rY9VXow+at1ynDnqe X-Received: by 2002:aa7:860e:: with SMTP id p14-v6mr20303901pfn.155.1529454544155; Tue, 19 Jun 2018 17:29:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529454544; cv=none; d=google.com; s=arc-20160816; b=UhP/50/I7DpfMWb3dxE503jWR/agHYbs0X5uZaTj0lQCgON1/hU95/nA5IWfeoquM6 KCx2YtKJ/IZeBtVHbTRN7GKiosNZiJK9SCqpy89UgmNcUOhA5DiV9zSPMhRIryroM3f/ JkGqF6pmSN/PkqIEToeicui9EOzsIqzwdoH0txlHWG3Cy2ui88SgtMTOHdfwsU7Cw87O koGlS+xTvsXIpl09d//mPweJs0HGgpzzI1HDjIHlC7+j2SJqZdYRq5iKQIQNIvs7aUrO cf/oGsWlYMMFjF7PcY2MnOeNuqVu8Q1i6UCmYsI/6xXj7s4bf5L7ucckT6y9sz29ZhaR xFtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=PQubQ46B7M7cBg+yb9JX9p7N9okEVeUNUWwVBLCR0y8=; b=AcXrFQ0UJs6dPakgUma5hiOmXkCbmDcZPsuETWBft6xh/0JqY8z9KN//NZmtC8hvPr P2q1rq64YTUVpYCb11myCozS62egG1yY4LHfSeIzvScIohG/cFay057sf5O0rhwzt6Zz v3jULF2PYFLTG2IjSXKgF8GKlF5z+fZ5t4fqlFgbvsdjJOmlgn7mW5WWtv4pxY+rqD5O MGCuDB74M0jK7lJJelEQelHrdl8Q7wTK9yLcx9i3AS9nXiPh7oPc2F172j786+5VoOqX S34DPPBmaKWZ3JvNSQ81WqDHuevATgBXEg2KtNIE2R1eYnZ1KjF3oECGm0/jqbVxZ7Mf 0Ixg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 67-v6si804737pgc.64.2018.06.19.17.28.50; Tue, 19 Jun 2018 17:29:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754272AbeFTA1F (ORCPT + 99 others); Tue, 19 Jun 2018 20:27:05 -0400 Received: from 9pmail.ess.barracuda.com ([64.235.154.210]:53704 "EHLO 9pmail.ess.barracuda.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754201AbeFTA04 (ORCPT ); Tue, 19 Jun 2018 20:26:56 -0400 Received: from mipsdag02.mipstec.com (mail2.mips.com [12.201.5.32]) by mx1414.ess.rzc.cudaops.com (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA256 bits=128 verify=NO); Wed, 20 Jun 2018 00:26:47 +0000 Received: from mipsdag02.mipstec.com (10.20.40.47) by mipsdag02.mipstec.com (10.20.40.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1415.2; Tue, 19 Jun 2018 17:26:46 -0700 Received: from localhost (10.20.2.29) by mipsdag02.mipstec.com (10.20.40.47) with Microsoft SMTP Server id 15.1.1415.2 via Frontend Transport; Tue, 19 Jun 2018 17:26:46 -0700 Date: Tue, 19 Jun 2018 17:26:47 -0700 From: Paul Burton To: Masahiro Yamada CC: Ralf Baechle , James Hogan , "linux-mips@linux-mips.org" , Kees Cook , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 7/7] MIPS: boot: rebuild ITB when contained DTB is updated Message-ID: <20180620002647.u2d7t3vzc2yinkft@pburton-laptop> References: <1523890067-13641-1-git-send-email-yamada.masahiro@socionext.com> <1523890067-13641-8-git-send-email-yamada.masahiro@socionext.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1523890067-13641-8-git-send-email-yamada.masahiro@socionext.com> User-Agent: NeoMutt/20180512 X-BESS-ID: 1529454407-531716-21947-19827-1 X-BESS-VER: 2018.7-r1806151722 X-BESS-Apparent-Source-IP: 12.201.5.32 X-BESS-Envelope-From: Paul.Burton@mips.com X-BESS-Outbound-Spam-Score: 0.00 X-BESS-Outbound-Spam-Report: Code version 3.2, rules version 3.2.2.194209 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------- 0.00 BSF_BESS_OUTBOUND META: BESS Outbound X-BESS-Outbound-Spam-Status: SCORE=0.00 using account:ESS59374 scores of KILL_LEVEL=7.0 tests=BSF_BESS_OUTBOUND X-BESS-Orig-Rcpt: yamada.masahiro@socionext.com,ralf@linux-mips.org,jhogan@kernel.org,linux-mips@linux-mips.org,keescook@chromium.org,linux-kernel@vger.kernel.org X-BESS-BRTS-Status: 1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Masahiro, On Mon, Apr 16, 2018 at 07:47:47AM -0700, Masahiro Yamada wrote: > Since now, the unnecessary rebuild of ITB has been fixed. Another > problem to be taken care of is, missed rebuild of ITB. > > For example, board-boston.its.S includes boston.dtb by the /incbin/ > directive. If boston.dtb is updated, vmlinux.*.dtb must be rebuilt. > Currently, the dependency between ITB and contained DTB files is not > described anywhere. Previously, this problem was hidden since > vmlinux.*.itb was always rebuilt even if nothing is updated. By > fixing the spurious rebuild, this is a real problem now. > > Use the same strategy for automatic generation of the header file > dependency. DTC works as a backend of mkimage, and DTC supports -d > option. It outputs the dependencies, including binary files pulled > by the /incbin/ directive. > > The implementation is simpler than cmd_dtc in scripts/Makefile.lib > since we do not need CPP here. Just pass -d $(depfile) to DTC, and > let the resulted $(depfile) processed by fixdep. > > It might be unclear why "$(obj)/dts/%.dtb: ;" is needed. With this > commit, *.cmd files will contain dependency on DTB files. In the > next invocation of build, the *.cmd files will be included, then > Make will try to find a rule to update *.dtb files. Unfortunately, > it is found in scripts/Makefile.lib. The build rule of $(obj)/%.dtb > is invoked by if_changed_dep, so it needs to include *.cmd files > of DTB, but they are not included because we are in arch/mips/boot, > but those *.cmd files reside in arch/mips/boot/dts/*/. Cancel the > pattern rule in scripts/Makefile.lib to suppress unneeded rebuilding > of DTB. > > Signed-off-by: Masahiro Yamada > --- > > arch/mips/boot/Makefile | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) Thanks - this looks good to me except that it starts outputting a "Don't know how to preprocess itb-image" message after building the .itb. I presume we just need an extra case adding to ksym_dep_filter. Do you want to add that in & resubmit this one? Thanks, Paul