* [PATCH] scripts/dtc: dt_to_config, use full path for dtx_diff @ 2016-06-25 0:56 Frank Rowand [not found] ` <576DD6B9.2040303-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Frank Rowand @ 2016-06-25 0:56 UTC (permalink / raw) To: Rob Herring Cc: Gaurav Minocha, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org From: Frank Rowand <frank.rowand-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org> Do not require dtx_diff to be in $PATH. dt_to_config already needs to be run from the root directory of a kernel tree so use scripts/dtc/dtx_diff instead of dtx_diff. Signed-off-by: Frank Rowand <frank.rowand-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org> --- scripts/dtc/dt_to_config | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) Index: b/scripts/dtc/dt_to_config =================================================================== --- a/scripts/dtc/dt_to_config +++ b/scripts/dtc/dt_to_config @@ -871,19 +871,10 @@ sub read_dts() exit 3; } - if (! `which dtx_diff`) { - print STDERR "\n"; - print STDERR "file 'dtx_diff' is not executable or does not exist\n"; - print STDERR " Is scripts/dtc/ in the shell \$PATH variable?\n"; - print STDERR " Are you in the root directory of a kernel tree?\n"; - print STDERR "\n"; - exit 3; - } - - if (!open(DT_FILE, "-|", "dtx_diff $file")) { + if (!open(DT_FILE, "-|", "$dtx_diff $file")) { print STDERR "\n"; print STDERR "shell command failed:\n"; - print STDERR " dtx_diff $file\n"; + print STDERR " $dtx_diff $file\n"; print STDERR "\n"; exit 3; } @@ -1207,6 +1198,15 @@ if ($white_list_config) { } } +if (-x "scripts/dtc/dtx_diff") { + $dtx_diff = "scripts/dtc/dtx_diff"; +} else { + + print STDERR "\n"; + print STDERR "$script_name must be run from the root directory of a Linux kernel tree\n"; + print STDERR "\n"; + exit 3; +} for $file (@ARGV) { &read_dts($file); -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <576DD6B9.2040303-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] scripts/dtc: dt_to_config, use full path for dtx_diff [not found] ` <576DD6B9.2040303-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2016-07-18 22:18 ` Rob Herring [not found] ` <CAL_JsqKUFR4uX24rV3hoYCEEZ-osDvycM12v1ome3-R3jNORZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Rob Herring @ 2016-07-18 22:18 UTC (permalink / raw) To: Frank Rowand Cc: Gaurav Minocha, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Fri, Jun 24, 2016 at 7:56 PM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > From: Frank Rowand <frank.rowand-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org> > > Do not require dtx_diff to be in $PATH. > > dt_to_config already needs to be run from the root directory of a kernel > tree so use scripts/dtc/dtx_diff instead of dtx_diff. Okay, now I get a bit further. I get this message even if I set my .config file on the command line: grep: ./.config: No such file or directory The config format still doesn't make sense to me. I'm running this on highbank.dts, and I get mostly options that are not relevant to highbank. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAL_JsqKUFR4uX24rV3hoYCEEZ-osDvycM12v1ome3-R3jNORZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] scripts/dtc: dt_to_config, use full path for dtx_diff [not found] ` <CAL_JsqKUFR4uX24rV3hoYCEEZ-osDvycM12v1ome3-R3jNORZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-07-18 23:12 ` Frank Rowand [not found] ` <578D6279.9020004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Frank Rowand @ 2016-07-18 23:12 UTC (permalink / raw) To: Rob Herring Cc: Gaurav Minocha, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On 07/18/16 15:18, Rob Herring wrote: > On Fri, Jun 24, 2016 at 7:56 PM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> From: Frank Rowand <frank.rowand-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org> >> >> Do not require dtx_diff to be in $PATH. >> >> dt_to_config already needs to be run from the root directory of a kernel >> tree so use scripts/dtc/dtx_diff instead of dtx_diff. > > Okay, now I get a bit further. I get this message even if I set my > .config file on the command line: > > grep: ./.config: No such file or directory All of the following work for me: scripts/dtc/dt_to_config --config .config arch/arm/boot/dts/highbank.dts scripts/dtc/dt_to_config --config=.config arch/arm/boot/dts/highbank.dts scripts/dtc/dt_to_config --config ./.config arch/arm/boot/dts/highbank.dts scripts/dtc/dt_to_config --config=./.config arch/arm/boot/dts/highbank.dts What is the exact command line you are using? Just to confirm, you are in the root directory of the kernel source tree and your .config is in the same directory (since you specified "./.config"). > > The config format still doesn't make sense to me. I'm running this on > highbank.dts, and I get mostly options that are not relevant to > highbank. Yes. dt_to_config is not smart enough to know that you want to configure a highbank, so it offers you all of the choices that match the highbank compatibles, even for other boards. This is the same result that you would get if you were searching manually, but dt_to_config gives you those extraneous results much faster than if you were searching manually. I did some proof of concept code to provide scores for the results, to select which entries are likely to be correct and which are likely to be wrong, but I did not want to add that complexity to the first version of dt_to_config -- it is complex enough already. I now have some slides that provide more examples of using dt_to_config at http://elinux.org/images/5/50/Dt_debugging_part_2.pdf You can skip forward to slide 27, then skim to slide 35, then it starts talking in more detail about using dt_to_config. I'm in Tokyo this week, so I may be somewhat slow responding. -Frank -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <578D6279.9020004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>]
* Re: [PATCH] scripts/dtc: dt_to_config, use full path for dtx_diff [not found] ` <578D6279.9020004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> @ 2016-07-19 2:40 ` Rob Herring [not found] ` <CAL_JsqJO98NsoG2RSSa7osZEzaiC8RrYigiwt_nJBCtUU1a8HA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Rob Herring @ 2016-07-19 2:40 UTC (permalink / raw) To: Frank Rowand Cc: Gaurav Minocha, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Mon, Jul 18, 2016 at 6:12 PM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > On 07/18/16 15:18, Rob Herring wrote: >> On Fri, Jun 24, 2016 at 7:56 PM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> From: Frank Rowand <frank.rowand-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org> >>> >>> Do not require dtx_diff to be in $PATH. >>> >>> dt_to_config already needs to be run from the root directory of a kernel >>> tree so use scripts/dtc/dtx_diff instead of dtx_diff. >> >> Okay, now I get a bit further. I get this message even if I set my >> .config file on the command line: >> >> grep: ./.config: No such file or directory > > All of the following work for me: > > scripts/dtc/dt_to_config --config .config arch/arm/boot/dts/highbank.dts > > scripts/dtc/dt_to_config --config=.config arch/arm/boot/dts/highbank.dts > > scripts/dtc/dt_to_config --config ./.config arch/arm/boot/dts/highbank.dts > > scripts/dtc/dt_to_config --config=./.config arch/arm/boot/dts/highbank.dts > > What is the exact command line you are using? scripts/dtc/dt_to_config -c .build-arm/.config --config-format arch/arm/boot/dts/highbank.dts > > Just to confirm, you are in the root directory of the kernel source tree > and your .config is in the same directory (since you specified "./.config"). I'm in the root, but .config is not. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CAL_JsqJO98NsoG2RSSa7osZEzaiC8RrYigiwt_nJBCtUU1a8HA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] scripts/dtc: dt_to_config, use full path for dtx_diff [not found] ` <CAL_JsqJO98NsoG2RSSa7osZEzaiC8RrYigiwt_nJBCtUU1a8HA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-07-19 3:00 ` Gaurav Minocha [not found] ` <CA+rpMbKm8+S5yrbjAMg7K2J8ThBZhyyQ-iJ8_6+osxHUGqKwtQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Gaurav Minocha @ 2016-07-19 3:00 UTC (permalink / raw) To: Rob Herring Cc: Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Mon, Jul 18, 2016 at 7:40 PM, Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote: > On Mon, Jul 18, 2016 at 6:12 PM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On 07/18/16 15:18, Rob Herring wrote: >>> On Fri, Jun 24, 2016 at 7:56 PM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> From: Frank Rowand <frank.rowand-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org> >>>> >>>> Do not require dtx_diff to be in $PATH. >>>> >>>> dt_to_config already needs to be run from the root directory of a kernel >>>> tree so use scripts/dtc/dtx_diff instead of dtx_diff. >>> >>> Okay, now I get a bit further. I get this message even if I set my >>> .config file on the command line: >>> >>> grep: ./.config: No such file or directory >> >> All of the following work for me: >> >> scripts/dtc/dt_to_config --config .config arch/arm/boot/dts/highbank.dts >> >> scripts/dtc/dt_to_config --config=.config arch/arm/boot/dts/highbank.dts >> >> scripts/dtc/dt_to_config --config ./.config arch/arm/boot/dts/highbank.dts >> >> scripts/dtc/dt_to_config --config=./.config arch/arm/boot/dts/highbank.dts >> >> What is the exact command line you are using? > > scripts/dtc/dt_to_config -c .build-arm/.config --config-format > arch/arm/boot/dts/highbank.dts > Above command works for me. >> >> Just to confirm, you are in the root directory of the kernel source tree >> and your .config is in the same directory (since you specified "./.config"). > > I'm in the root, but .config is not. > > Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CA+rpMbKm8+S5yrbjAMg7K2J8ThBZhyyQ-iJ8_6+osxHUGqKwtQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] scripts/dtc: dt_to_config, use full path for dtx_diff [not found] ` <CA+rpMbKm8+S5yrbjAMg7K2J8ThBZhyyQ-iJ8_6+osxHUGqKwtQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-07-19 4:15 ` Gaurav Minocha [not found] ` <CA+rpMbLeYdrC3RVBN2Yku+uAAwM23ABct+rH5_eZ3QonxjuFfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 0 siblings, 1 reply; 7+ messages in thread From: Gaurav Minocha @ 2016-07-19 4:15 UTC (permalink / raw) To: Rob Herring Cc: Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Mon, Jul 18, 2016 at 8:00 PM, Gaurav Minocha <gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > On Mon, Jul 18, 2016 at 7:40 PM, Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote: >> On Mon, Jul 18, 2016 at 6:12 PM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>> On 07/18/16 15:18, Rob Herring wrote: >>>> On Fri, Jun 24, 2016 at 7:56 PM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>> From: Frank Rowand <frank.rowand-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org> >>>>> >>>>> Do not require dtx_diff to be in $PATH. >>>>> >>>>> dt_to_config already needs to be run from the root directory of a kernel >>>>> tree so use scripts/dtc/dtx_diff instead of dtx_diff. >>>> >>>> Okay, now I get a bit further. I get this message even if I set my >>>> .config file on the command line: >>>> >>>> grep: ./.config: No such file or directory >>> >>> All of the following work for me: >>> >>> scripts/dtc/dt_to_config --config .config arch/arm/boot/dts/highbank.dts >>> >>> scripts/dtc/dt_to_config --config=.config arch/arm/boot/dts/highbank.dts >>> >>> scripts/dtc/dt_to_config --config ./.config arch/arm/boot/dts/highbank.dts >>> >>> scripts/dtc/dt_to_config --config=./.config arch/arm/boot/dts/highbank.dts >>> >>> What is the exact command line you are using? >> >> scripts/dtc/dt_to_config -c .build-arm/.config --config-format >> arch/arm/boot/dts/highbank.dts >> > Above command works for me. > My bad, cleaned my local repo. Now, I can see this error. Will get back! >>> >>> Just to confirm, you are in the root directory of the kernel source tree >>> and your .config is in the same directory (since you specified "./.config"). >> >> I'm in the root, but .config is not. >> >> Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
[parent not found: <CA+rpMbLeYdrC3RVBN2Yku+uAAwM23ABct+rH5_eZ3QonxjuFfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: [PATCH] scripts/dtc: dt_to_config, use full path for dtx_diff [not found] ` <CA+rpMbLeYdrC3RVBN2Yku+uAAwM23ABct+rH5_eZ3QonxjuFfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2016-07-19 4:54 ` Gaurav Minocha 0 siblings, 0 replies; 7+ messages in thread From: Gaurav Minocha @ 2016-07-19 4:54 UTC (permalink / raw) To: Rob Herring Cc: Frank Rowand, devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org On Mon, Jul 18, 2016 at 9:15 PM, Gaurav Minocha <gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > On Mon, Jul 18, 2016 at 8:00 PM, Gaurav Minocha > <gaurav.minocha.os-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >> On Mon, Jul 18, 2016 at 7:40 PM, Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org> wrote: >>> On Mon, Jul 18, 2016 at 6:12 PM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>> On 07/18/16 15:18, Rob Herring wrote: >>>>> On Fri, Jun 24, 2016 at 7:56 PM, Frank Rowand <frowand.list-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: >>>>>> From: Frank Rowand <frank.rowand-mEdOJwZ7QcZBDgjK7y7TUQ@public.gmane.org> >>>>>> >>>>>> Do not require dtx_diff to be in $PATH. >>>>>> >>>>>> dt_to_config already needs to be run from the root directory of a kernel >>>>>> tree so use scripts/dtc/dtx_diff instead of dtx_diff. >>>>> >>>>> Okay, now I get a bit further. I get this message even if I set my >>>>> .config file on the command line: >>>>> >>>>> grep: ./.config: No such file or directory >>>> >>>> All of the following work for me: >>>> >>>> scripts/dtc/dt_to_config --config .config arch/arm/boot/dts/highbank.dts >>>> >>>> scripts/dtc/dt_to_config --config=.config arch/arm/boot/dts/highbank.dts >>>> >>>> scripts/dtc/dt_to_config --config ./.config arch/arm/boot/dts/highbank.dts >>>> >>>> scripts/dtc/dt_to_config --config=./.config arch/arm/boot/dts/highbank.dts >>>> >>>> What is the exact command line you are using? >>> >>> scripts/dtc/dt_to_config -c .build-arm/.config --config-format >>> arch/arm/boot/dts/highbank.dts >>> >> Above command works for me. >> > My bad, cleaned my local repo. Now, I can see this error. Will get back! > Frank, It is coming from dtx_diff, if grep -q "^CONFIG_DTC=y" ${__KBUILD_OUTPUT}/.config ; then you may have to add a check on .config file here. if [ -f "${__KBUILD_OUTPUT}/.config" ] && grep -q "^CONFIG_DTC=y" ${__KBUILD_OUTPUT}/.config; then >>>> >>>> Just to confirm, you are in the root directory of the kernel source tree >>>> and your .config is in the same directory (since you specified "./.config"). >>> >>> I'm in the root, but .config is not. >>> >>> Rob Please let me know if I'm missing something. -- Gaurav Minocha -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-07-19 4:54 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-06-25 0:56 [PATCH] scripts/dtc: dt_to_config, use full path for dtx_diff Frank Rowand [not found] ` <576DD6B9.2040303-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2016-07-18 22:18 ` Rob Herring [not found] ` <CAL_JsqKUFR4uX24rV3hoYCEEZ-osDvycM12v1ome3-R3jNORZw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-07-18 23:12 ` Frank Rowand [not found] ` <578D6279.9020004-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 2016-07-19 2:40 ` Rob Herring [not found] ` <CAL_JsqJO98NsoG2RSSa7osZEzaiC8RrYigiwt_nJBCtUU1a8HA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-07-19 3:00 ` Gaurav Minocha [not found] ` <CA+rpMbKm8+S5yrbjAMg7K2J8ThBZhyyQ-iJ8_6+osxHUGqKwtQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-07-19 4:15 ` Gaurav Minocha [not found] ` <CA+rpMbLeYdrC3RVBN2Yku+uAAwM23ABct+rH5_eZ3QonxjuFfw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> 2016-07-19 4:54 ` Gaurav Minocha
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).