I’m trying to modify the generation of the Toradex Easy Installer image on a custom IMX8X based board, because I need custom partitions for OTA.
I stumbled across this Add partition to Easy Installer image built with Yocto so I tried following it.
The problem is that no matter the approach I keep getting an overwrite error on the image.json file:
Based on the error message it seems that more than one function tries to write the JSON image description file. The Python functions that write the file are the original
rootfs_tezi_json() and my custom one, so to make sure that only one function writes to that file I just edited the old one to fit my needs. But the error doesn’t go away.
Is there something I can do to track down what’s wrong? I’m starting to feel like BitBake’s error message is misleading and the problem is somewhere else, but I’m not sure…
It could be that some other image recipe, perhaps other version of your bcn3-*-image, which uses same deploy folder, has created this json file. To solve error you need to bitbake -c clean your_old_image.
That’s the first thing I thought of, in fact I’ve tried deleting the
tmp/ and the
deploy/ directories entirely, but the problem persists.
I think I’ve nailed it!
I’ve added this to the custom distro configuration file:
IMAGE_CLASSES_remove = "image_type_tezi image_types_sdcard"
IMAGE_CLASSES += "image_type_tar_overlayfs image_type_tezi_bcn3d create_update_file"
image_type_tezi_bcn3d is the name of the custom class that I’ve created.
Then I 've nuked the build directory entirely and re-run the entire build and it appears that now the image is built correctly. Now I can’t boot anymore but that’s another problem xD
I’m sure deleting deploy doesn’t help. bitbake -c clean image or even bitbake -c cleanall your_old_image should help.
Hi @miervasi !
Thanks for the feedback about your solution.
As a side comment, I would like to add that TorizonCore already has the OTA Stack ready to use, so you won’t need to develop it by yourself. Maybe you would like to check it:
Also, thanks @Edward for your help
Yeah I knew about that, but I’m actually porting a pre-existant solution from another hardware so I was asked to keep the changes at a minimum