ECC errors after flashing ubimg file using TEZI

Greetings,

I set up a working image and wanted to integrate Mender into it. For this I followed the Mender documentation and used the existing Colibri iMX7 integration as a reference. This results in a .ubimg file coming out of the build which I attempted to flash with a TEZI image.json adapted from here: http://tezi.toradex.com/3rdparty/mender-toradex-easyinstaller/image.json and TEZI 1.8-20181019.

After the image is flashed successfully I reset the module. It will appear to boot fine until at one point in the boot many ECC errors appear: gist:3999148383d5aa9ed608316b1cc3b98a · GitHub

After this the filesystem does seem to be mounted and the system is in a semi-usable state I suppose, however if the module is reset once more it’ll fail to boot completely: gist:97c4fbf69991e4a8c1c8a3ee5bd96118 · GitHub

I also asked the same question at the Mender forums and they didn’t immediately see anything wrong with my Mender config. Some searching lead me to this entry of the UBI FAQ: Memory Technology Device (MTD) Subsystem for Linux.

The FAQ suggests that it’s commonly caused by incorrectly flashing the image, which is what TEZI could be doing? I also tried using a config more similar to the default ones where the ubi volumes are specified instead of a single ubimg file to recreate the volumes mender needs:

"mtddevs": [
    {
        "name": "u-boot1",
        "content": {
            "rawfile": {
                "filename": "u-boot-nand.imx",
                "size": 1
            }
        }
    },
    {
        "name": "u-boot2",
        "content": {
            "rawfile": {
                "filename": "u-boot-nand.imx",
                "size": 1
            }
        }
    },
    {
        "name": "u-boot-env",
        "content": {
            "rawfile": {
                "filename": "uboot.env",
                "size": 1
            }
        }
    },
    {
        "name": "ubi",
        "ubivolumes": [
            {
                "name": "rootfsa",
                "content": {
                    "filesystem_type": "ubifs",
                    "filename": "XPAC-Image-colibri-imx6ull.tar.xz",
                    "uncompressed_size": 156.10546875
                }
            },
            {
                "name": "rootfsb",
                "content": {
                    "filesystem_type": "ubifs",
                    "filename": "XPAC-Image-colibri-imx6ull.tar.xz",
                    "uncompressed_size": 156.10546875
                }
            },
            {
                "name": "data",
                "size_kib": 16384,
                "type": "static"
            }
        ]
    }
]

Which results in an error in TEZI after flashing the first partition:

ubimkvol: error!: UBI device does not have free logical eraseblocks

Assuming this was because rootfsa fills all available space, I tried adding this to each of them:

"type": "static",
"size_kib": 204800,

But this resulted in an error about not being to write to a read only volume ‘rootfsa’

Hi @wisse-cp

Thanks for writing to the Toradex Community!

What is your application? What are you trying to do?

Could you share your changes to U-Boot?
Could you reproduce the issue with the regular Bsp 3.0b3 release too?

Best regards,
Jaski

Best regards,
Jaski