From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sat, 2 Nov 2019 12:02:11 -0600 Subject: [U-Boot] [PATCH v3 016/108] fdt: Show the preprocessed .dts file on error In-Reply-To: References: <20191021033322.217715-2-sjg@chromium.org> <20191021033322.217715-17-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Bin, On Mon, 28 Oct 2019 at 00:47, Bin Meng wrote: > > Hi Simon, > > On Mon, Oct 21, 2019 at 11:33 AM Simon Glass wrote: > > > > When device-tree compilation fails it is sometimes tricky to see which > > line is broken, since the input file to dtc is a pre-processed version > > of the device tree. > > > > Add a line that points to the file that needs to be checked: > > > > Output is something like this: > > > > Error: arch/x86/dts/u-boot.dtsi:137.14-15 syntax error > > To me this already provides enough information for people to look at. > I don't think we need another line to duplicate the report. > > > FATAL ERROR: Unable to parse input tree > > Check /tmp/b/chromebook_coral/arch/x86/dts/.chromebook_coral.dtb.pre.tmp > > Another reason is that if the error does not happen in the dtsi file > but the main dts file, the line you added here is a duplicates of the > error message coming from the dtc. > Part of the problem here is that the commit shows the un-preprocessed filename. I'll fix that and add a longer description. This commit has saved my bacon quite a few times and I think it has value. Hopefully you agree once you try it out, but if not, I'm going to drop it. > > for errors > > > > Signed-off-by: Simon Glass > > --- > > > > Changes in v3: > > - Update example error message to better show the intended purpose > > > > Changes in v2: None > > > > scripts/Makefile.lib | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > Regards, Simon