OE4T / tegra-demo-distro

Reference/demonstration distro for meta-tegra
MIT License
73 stars 74 forks source link

swupdate cannot find tegra234-p3737-0000+p3701-0000-nv.dtb image file L4T 36.3.0 #303

Closed Bmkool closed 1 week ago

Bmkool commented 2 months ago

Hello,

I am attempting to build the swupdate-image-tegra for the AGX Orin devkit on L4T 36.3.0. I am running into this error:

ERROR: swupdate-image-tegra-1.0-r0 do_swuimage: swupdate cannot find tegra234-p3737-0000+p3701-0000-nv.dtb image file

Looks like dtb's are located under the devicetree/ subfolder in the deploy directory starting with L4T 36.3.0.

AndersGnistrup commented 2 weeks ago

I am also bumping into this problem. I have solved it by this patch in meta-swupdate:

index 0367f81..cf583d0 100644
--- a/classes-recipe/swupdate-common.bbclass
+++ b/classes-recipe/swupdate-common.bbclass
@@ -299,7 +299,9 @@ def swupdate_add_artifacts(d, list_for_cpio):
                     bb.fatal("swupdate cannot find image file: %s" % os.path.join(deploydir, imagebase + fstype))
         else:  # Allow also complete entries like "image.ext4.gz" in SWUPDATE_IMAGES
             if not add_image_to_swu(d, deploydir, image, s, encrypted, list_for_cpio):
-                bb.fatal("swupdate cannot find %s image file" % image)
+                devicetreedir = os.path.join(deploydir ,"devicetree")
+                if not add_image_to_swu(d, devicetreedir, image, s, encrypted, list_for_cpio):
+                    bb.fatal("swupdate cannot find %s image file" % image)

But I am not sure this is the correct solution.

Another option is to make a bbappend file and re-implement the swupdate_add_artifacts(..) function.

Islam-Hussein-11 commented 2 weeks ago

I've used ${DEPLOY_DIR_IMAGE}/devicetree/${DTBFILE} instead of ${DTBFILE} in swupdate-image-tegra.bb and it worked the problem here is that swupdate-image-tegra doesn't cover all the cases. So in t234 machine the DTBs are placed in devicetree directory in depoly directory.

dwalkes commented 1 week ago

Sorry I'm just seeing this thread now. I suspect this was already handled with https://github.com/OE4T/tegra-demo-distro/pull/305/commits/4e1cdca9936bad099db330ca5126ca4244bfc970 in https://github.com/OE4T/tegra-demo-distro/pull/305 and this just needs a backport to scarthgap.

dwalkes commented 1 week ago

Verified build succeeds with https://github.com/OE4T/tegra-demo-distro/pull/309 - if someone with jetson-agx-orin-devkit could help test it I would appreciate, I don't have access to that platform.

dwalkes commented 1 week ago

Resolved with https://github.com/OE4T/tegra-demo-distro/pull/309 based on element discussion

AndersGnistrup commented 1 week ago

Thanks, verified to work for the jetson-orin-nano-devkit-nvme.