I’ve successfully built a tdx-reference-minimal-image on my BSP5.0 Apalis i.MX8 board. I’ve even added a few packages as I’ve gotten to learn Yocto more.
That being said, I can’t use Torizon, but would like to add similar docker functionality to my Yocto reference image. As far as I can tell, adding “docker-ce” as a package won’t work because I would need to add the meta-virtualization layer to the build, but I’m not sure if I should use devtool to accomplish that or if there’s a guide out there that best describes what I’m trying to do.
You are right about the meta-virtualization, you will need to add this layer to your layers folder and then add it to your bblayers.conf file. Then, after adding the package to your local.conf file, you should be able to install Docker in your image.
Despite that, I recommend you go with TorizonCore, since it’s easier to work with Docker and develop containers. It’s also supported in Apalis iMX8.
ERROR: Layer virtualization-layer is not compatible with the core layer which only supports these series: dunfell (layer is compatible with kirkstone)
I currently have my u-boot and kernel on the i.MX8’s eMMC. Bundled into the kernel image is an initramfs. When it boots, the kernel unpacks the initramfs and looks for my SATA connected SSD to then switch_root to the real rootfs on the SSD. This tdx-reference-minimal-image is that real rootfs on the SSD.
As an aside:
I would like to use TorizonCore for this application, but when I generate a rootfs with Torizon (say torizon-core-docker-apalis-imx8.rootfs.tar.gz) and extract it to the SSD, my initramfs successfully switch_root’s to run Torizon’s /sbin/init and then gets tons of errors before crashing. The tdx-reference-minimal-image boots just fine on the SSD, I just need docker on it and I’d be good to go.