[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180620002647.u2d7t3vzc2yinkft@pburton-laptop>
Date: Tue, 19 Jun 2018 17:26:47 -0700
From: Paul Burton <paul.burton@...s.com>
To: Masahiro Yamada <yamada.masahiro@...ionext.com>
CC: Ralf Baechle <ralf@...ux-mips.org>,
James Hogan <jhogan@...nel.org>,
"linux-mips@...ux-mips.org" <linux-mips@...ux-mips.org>,
Kees Cook <keescook@...omium.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 7/7] MIPS: boot: rebuild ITB when contained DTB is updated
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 <yamada.masahiro@...ionext.com>
> ---
>
> 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
Powered by blists - more mailing lists