We bought an iMX8MP module and the Verdin Development Board to be able to develop an embedded system for our project. When succeeding we will create our own carrier hardware for the SOM.
But I’m stuck. And I do not know anymore what to do.
For weeks I tried the container route. But without success. And I do not like the added complexity. A development environment should be as simple as possible with short iteration times. Containers are (for us) not the way to go. I do not want to spend my time on getting the development environment to work and keep it working. I want to develop a new embedded system.
So we probably need to go the Yocto route. But I’m not an experienced Linux user. Will that be doable? And can we do with a Yocto based Linux what we need to do?
There are many questions:
1: I assume Yocto is Debian based? Does it come with a package handler?
2: Does it come with a graphical user interface? Or is it terminal only?
3: Is it wise to go the Yocto route when not having much experience with Linux?
4: Can we install and run Visual Studio Code on the target?
5: When using OpenCV, does the imshow() function work?
6: Are USB cameras supported?
7: I would consider cross compilation. Can that be done with short iteration times?
Maybe some questions do not make sense, but remember that I do not have much experience with Linux based systems.
1: Yocto is mostly a bunch of recipes and application which parses this recipes. Recipes are a some kind of definition how to build packages and full image which you can flash to a board. Yocto runs on every distribution (Debian, Ubuntu, …).
2: AFAIK terminal only.
3: IMHO no, it takes some time to understand the involved tools, and then too understand the specific parts you have to modify. Most companies I worked for, they often hire people with the specific Yocto knowledge they need.
4: The details depends on which version you are going to use. But in general the answer is yes.
5: If you have a display server running yes. If you use e.g. weston as display server, you can configure it to work without a display and just connect via RDP.
6: Depends on the camera and if a driver is available for arm64 (iMX8MP is arm64), but nowadays the answer is often yes.
7: If you write your application Python or .NET then you don’t have to cross compile. If it’s C/C++ its a bit more involved, but nowadays documented very well. IMHO I would develop the application fully on your host, ideally a Linux, which gives you much faster edit-compile-run cycles, and then as a first step just compile in on the target (with containers, you just spin up a Ubuntu container on your target, install build-essential and your fine to go).
Related to the container solution. IMHO it was an amazing idea to use container from Toradex (I don’t work for Toradex). This simplifies everything enormously. You can mix and match even different Linux distributions if there would be a neccesitty. E.g. .NET from Microsoft for arm64 is not provided as Debian package just a raw tar.gz or as a container. I understand that you may have some issues, but the more you understand about containers, the better, it will help you solve many many other problems. Especially they give you a much more predictable development environment. Now, it’s not that I am docker/podman fanboy, they have downsides, issues, problems. But IMHO I would reconsider your approach especially as a beginner. Compared to Yocto, containers are trivial IMHO.
I was affraid for that.
So Yocto is not the way to go.
I whish Toradex had a ready to go Ubuntu or Debian. After weeks trying to get this container stuff to work I’m at the edge of giving this whole thing up and go back to Jetson or so. I want to program my application! This is so frustrating.
But AFAIK this should be easily possible (I never tried their image, due to some requirements from the company I work for). You take the Toradex image and as a first step you just execute
docker run -it debian:bookworm
And you can do whatever you want inside this container.
It is persistent, just does not have a easy to remember name, add the --name parameter to give it name, you later than can start/stop it with docker container start/stop and go into it again with docker exec. You can also map a directory from outside your container into the container and e.g. leave the source code outside and just compile inside. In this case the persistent stuff is always outside the container.
Just for information: Some people believe containers are some magic and by definition add a lot of overhead. This is not true. There exist a few papers also about this. It would be even quite simple to implement your own super simple docker in C, which can even use the existing docker/podman containers.
IMHO it is really worth to play with it on your Ubuntu/Debian computer first. Spin up a Ubuntu container, inside your Ubuntu, play with it, install, remove things inside the container, stop the container, start it again. This knowledge is invaluable for other things to come which has nothing to do with Toradex e.g. setting up a continuous integration pipeline.