I have a tegra tx2 device running yocto (3.0.3) and mender (2.2). I use the mender-community layer.
The tegra-state-script.bb recipe is successfully appended by
The two Artifact* scripts get properly installed and work.
Q: Why can’t i integrate a Download* script like i do it with Artifact* scripts?
No error is thrown while building an artifact with the Download* script. It’s just that i expected that script to end up on my device under /etc/mender/scripts <- this folder exists and contains the version file
I do something similar in my distro and it works fine for me. Nothing jumps out at me when looking at your bbappend, but start by verifying that it actually took effect:
Check the image/etc/mender/scripts directory in the recipe working tree (under $BUILDDIR/tmp/work/...). If the files don’t show up there, then you need to figure out why your bbappend didn’t get applied.
If the files are there in step 1, next step is to look at the rootfs/etc/mender/scripts directory for your image build to see if they got installed there. If not, you need to check on why the tegra-state-scripts package isn’t being installed into the image.
If you see the files in both 1 and 2 above, but you still don’t see the files on the target after you install the built image, then I’m not sure what to try next, other than to verify that you actually installed that image and not some other one by mistake.
I can not find my state script Download_Enter_85 in $BUILDDIR/tmp/work/... , or anywhere else.
The bbappend seems to get applied because i can find the two Artifact* scripts in $BUILDDIR/tmp/deploy/images/jetson-tx2/mender-state-scripts/. Or is that a wrong conclusion?
The -v will give you more verbose output, including echo all of the shell script commands that get executed, so you can see if your Download script is getting installed or not.
I have now added tegra-state-scripts to my .inc file and voila also my non-artifact state scripts are in $BUILDDIR/tmp/work/ and get deployed. So that works now.
But i still don’t know why this recipe works for Artifact* scripts even without putting it into my .inc.
Thanks @madisox, i will keep that -v option in mind for my next debugging session.