Thanks. Unfortunately it again revealed nothing. It’s quite incredible how well hidden this is.
I have one more thing for you to try: Let’s enable full script debugging in the fw_printenv script itself. In addition to your existing changes, can you add this change to mender-convert, re-convert, and then rerun the deployment:
diff --git a/mender-convert-modify b/mender-convert-modify
index cf8f215..c064662 100755
--- a/mender-convert-modify
+++ b/mender-convert-modify
@@ -222,6 +222,7 @@ EOF
run_and_log_cmd "make 2>&1"
run_and_log_cmd "sudo make DESTDIR=../ BOOT_DIR=boot install-boot-files"
run_and_log_cmd "sudo make DESTDIR=../rootfs install-tools"
+ sed -i -e '2 i set -x' ../rootfs/usr/bin/fw_printenv
cd - > /dev/null 2>&1
# Remove conflicting boot files. These files do not necessarily effect the
$ head /usr/bin/fw_printenv
#!/bin/sh
set -x
# This script mimicks the behavior of fw_printenv/fw_setenv from U-Boot.
# Here is how the environment works. We've got three problems to overcome:
# 1. GRUB doesn't support checksumming the environment.
# 2. There is a hashsum command, but it can only be used to verify checksums,
# not generate them.
# 3. We want to store the environment on the boot partition, which is FAT, and
$ ls -l /usr/bin/fw_setenv
lrwxrwxrwx 1 root root 11 Jun 18 03:34 /usr/bin/fw_setenv -> fw_printenv
At this point, I’m really clueless. I can’t see anything wrong anywhere, and still it’s failing. Your best bet at this point might be to start stepping through the code with a debugger, near the place where it fails. Or if you have the means, look into our consulting services and have someone do board integration where we look into this problem on our side, using a board you send us.