Embedded Engineers have my sympathies

I recently already wrote about BitBake and Yocto. This is another adventure in this realm.

Dante's picturesque Hell has another layer

Okay, I just got done trying to update some recipes and add another one that would install WasmEdge. I wanted to experiment with WasmEdge and AI and WASM binaries with regards to OTA. So that is the context I am working in.

I first try to add WasmEdge. Normally you can just add a recipe to BitBake project and make it inherit cmake and then automagically things work. Not this time. It would not compile for some reason. I wanted to fix all those errors by applying the best practices that the developers/creators of these libraries were advising to other devs. I am working on my .patch files and I am getting further and further until I need to add a fmt::streamed() call. It does not exist in the fmt library I am using, and why does it not exist? Because it is too low of a version. I do not give up, but instead of trying to update the recipe for the fmt library, I just compile the binary on a spare Raspberry Pi3 and then host the binary on a site I own and install it that way.

Well forget it, when I try to do it that way, it is complaining that the libwasmedge.so needs LLVM 14+ and I only have LLVM 13. I stop at this point, trying to add WasmEdge.

Upgrading containerd-shim

I also have a containerd-shim that provides the WASM runtime for Docker to run the .wasm files directly inside Docker containers. I was trying to update that one from 0.3.0 –> 0.7.0. There are a ton of dependencies and each and every one of them needs to be specified manually. There is a tool called cargo bitbake and it does not work on this project because of virtual workspaces/modules. I went painstakingly through every error message, updating the dependencies as I go. I then come to one dependency that I need for the new version, and it needs rustc version 1.76.0 or higher and I am running 1.75.0.

At this point I am stopping. I completely agree with any embedded engineer that does not want to upgrade. I thought it was bad in my normal dev experiences relating to DevOps, backend or frontend engineering work. Especially the frontend is quite known for stuff just breaks when you happen to look at it. Well with embedded engineering it breaks just by having the thought of wanting to upgrade.

Conclusion

One cannot simply add stuff to your BitBake/Yocto recipe cookbook. You really need to carefully start at the bottom and see how far up the chain you can go. For me it would be first do 0.4.0 for the containerd-shim and maybe an older version of WasmEdge.

Then once you got an older version working, take a break. Then later try to make a new one work. Also it is far easier to run a DietPi distro on a Raspberry Pi, install some software on it, or compile it on there. Will it support OTA, no. However sometimes you do not care if it is just your own device that needs to run something.

So maybe I will just run the experiments there. I also have some RISC-V boards lying on my desk, waiting to be flashed and for me to do something with it. That will be an entirely new hellish experience that I will do once I have regained enough stamina from this foray into this corner of Hell.