Re: [PATCH 1/2] dtc: allow label on root node of devicetree -- request help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




On Sun, 25 Feb 2018, frowand.list@xxxxxxxxx wrote:

> From: Frank Rowand <frank.rowand@xxxxxxxx>
>
> From: Frank Rowand <frowand.list@xxxxxxxxx>
>
> Signed-off-by: Frank Rowand <frowand.list@xxxxxxxxx>
> ---
>
> This patch does not work.
>
> After applying this patch, I get a syntax error when I try to
> compile a devicetree source with a label on the root node:
>
>    $ dtc -O dts junk_lab.dts >junk
>    Error: junk_lab.dts:3.9-10 syntax error
>    FATAL ERROR: Unable to parse input tree

You have some shift reduce conflicts.  It is making a choice that is
diffeernt than what you expect.  The problem seems to be with memreserves.
That comes just before a devicetree and can also start with a DT_LABEL, so
when it sees a DT_LABEL, it doesn't know if it is for memreserves or for
devicetree.

I figured this out using bison --verbose dtc-parser.y.  This gives you a
dtc-parser.output file.  But no one likes looking at these...

julia

>
>
>
>  dtc-parser.y | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/dtc-parser.y b/dtc-parser.y
> index 44af170abfea..821dba228d79 100644
> --- a/dtc-parser.y
> +++ b/dtc-parser.y
> @@ -162,6 +162,11 @@ devicetree:
>  		{
>  			$$ = name_node($2, "");
>  		}
> +	| DT_LABEL devicetree
> +		{
> +			add_label(&$2->labels, $1);
> +			$$ = $2;
> +		}
>  	| devicetree '/' nodedef
>  		{
>  			$$ = merge_nodes($1, $3);
> --
> Frank Rowand <frank.rowand@xxxxxxxx>
>
> --
> To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree-compiler" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Device Tree]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux