mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* Re: [ptxdist] ptxdist-2022.01.1 commit 2fafa7c4308db8d1e79dc3b5d2c9cb3400a16ff8
       [not found] ` <71d6ac45-ef44-327d-c65f-7c1a507fc22d@benfm.de>
@ 2022-02-11  7:21   ` Michael Olbrich
  2022-02-11  7:23     ` [ptxdist] [PATCH] ptxd_make_dtb: fix dtc selection Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Michael Olbrich @ 2022-02-11  7:21 UTC (permalink / raw)
  To: Felix Mellmann; +Cc: ptxdist, rich_ogrady

Hi,

On Thu, Feb 10, 2022 at 05:49:19PM +0100, Felix Mellmann wrote:
> On 10.02.22 15:28, rich_ogrady@grayhill.com wrote:
> > It seems that the subject commit breaks ptxd_make_dtb()(for me at least).
> > 
> > ptxd_make_dtb()is using the variable dtb_kernel_dir to locate both the
> > dtc script and the dts files.
> > The dtc command needs to be from the build tree yet the dts files will
> > be from the src tree.  If building the kernel OOT this causes the dtc
> > command to not be found.
> Ah, thats the reason. I was also wondering why I ran into strange errors. At
> the moment I manually build host-dtc before targetinstall kernel.

And I have a dtc in $PATH so I never noticed that this was broken :-/.
Sorry about that.

> Maybe one could add host-dtc to the dependencies when building the device
> trees along with the kernel?

You can do that for now, but the real fix is to use the correct path.
The dtc is in the kernel build tree not the source tree...

Michael

> > The patch that fixes it for me is below but I cant tell if that breaks
> > the original intent.
> > 
> > --- a/scripts/lib/ptxd_make_world_dtb.sh
> > +++ b/scripts/lib/ptxd_make_world_dtb.sh
> > @@ -14,7 +14,7 @@
> > 
> >  dtb_kernel_dir="${pkg_kernel_src:-${pkg_dir}}"
> > 
> > -  dtc="${dtb_kernel_dir}/scripts/dtc/dtc"
> > +  dtc="${pkg_build_dir}/scripts/dtc/dtc"
> >      if [ ! -x "${dtc}" ]; then
> >          dtc=dtc
> >      fi
> > 
> > Rich OGrady
> > 
> > _______________________________________________
> > ptxdist mailing list
> > ptxdist@pengutronix.de
> > To unsubscribe, send a mail with subject "unsubscribe" toptxdist-request@pengutronix.de
> Best regards,
> 
> Felix
> 

> _______________________________________________
> ptxdist mailing list
> ptxdist@pengutronix.de
> To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [ptxdist] [PATCH] ptxd_make_dtb: fix dtc selection
  2022-02-11  7:21   ` [ptxdist] ptxdist-2022.01.1 commit 2fafa7c4308db8d1e79dc3b5d2c9cb3400a16ff8 Michael Olbrich
@ 2022-02-11  7:23     ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2022-02-11  7:23 UTC (permalink / raw)
  To: ptxdist; +Cc: Michael Olbrich, rich_ogrady, flix.ptxdist

The dtc is located in the build dir not the source dir of the kernel.

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 rules/post/ptxd_make_world_dtbo.make | 3 ++-
 scripts/lib/ptxd_make_world_dtb.sh   | 5 +++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/rules/post/ptxd_make_world_dtbo.make b/rules/post/ptxd_make_world_dtbo.make
index 61babc653660..e484f35c59b5 100644
--- a/rules/post/ptxd_make_world_dtbo.make
+++ b/rules/post/ptxd_make_world_dtbo.make
@@ -11,7 +11,8 @@ world/dtbo/env = \
 	pkg_dtso_path="$($(1)_DTSO_PATH)" \
 	pkg_dtso="$($(1)_DTSO)" \
 	pkg_dtbo_dir="$($(1)_DTBO_DIR)" \
-	pkg_kernel_src="$($(1)_KERNEL_DIR)" \
+	pkg_kernel_dir="$($(1)_KERNEL_DIR)" \
+	pkg_kernel_build_dir="$($(1)_KERNEL_DIR)" \
 	pkg_arch="$(GENERIC_KERNEL_ARCH)"
 
 world/dtbo = \
diff --git a/scripts/lib/ptxd_make_world_dtb.sh b/scripts/lib/ptxd_make_world_dtb.sh
index f78d2f885114..f2eee99e4a95 100644
--- a/scripts/lib/ptxd_make_world_dtb.sh
+++ b/scripts/lib/ptxd_make_world_dtb.sh
@@ -12,9 +12,10 @@ ptxd_make_dtb() {
     dts="${dtb_source}"
     dtb="${dtb_target}"
 
-    dtb_kernel_dir="${pkg_kernel_src:-${pkg_dir}}"
+    dtb_kernel_dir="${pkg_kernel_dir:-${pkg_dir}}"
+    dtb_kernel_build_dir="${pkg_kernel_build_dir:-${pkg_build_dir}}"
 
-    dtc="${dtb_kernel_dir}/scripts/dtc/dtc"
+    dtc="${dtb_kernel_build_dir}/scripts/dtc/dtc"
     if [ ! -x "${dtc}" ]; then
 	dtc=dtc
     fi
-- 
2.30.2


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de
To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-02-11  7:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <OF0FB74C20.BA6A5443-ON862587E5.004F768C-862587E5.004F8280@grayhill.com>
     [not found] ` <71d6ac45-ef44-327d-c65f-7c1a507fc22d@benfm.de>
2022-02-11  7:21   ` [ptxdist] ptxdist-2022.01.1 commit 2fafa7c4308db8d1e79dc3b5d2c9cb3400a16ff8 Michael Olbrich
2022-02-11  7:23     ` [ptxdist] [PATCH] ptxd_make_dtb: fix dtc selection Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox