The uid:gid for "/workdir" is "0:0". The uid and gid must be non-zero. Please check to make sure the "volume" or "bind" specified using either "-v" or "--mount" to docker, exists and has a non-zero uid:gid.
If I omit the --workdir, it appears to no longer have permissions issues, as suggested here.
2. Cannot find bitbake
When running the image and accepting the EULA, I immediately see the following error:
/usr/bin/startup-tdx.sh: line 84: bitbake: command not found
It seems like others have posted similar issues, but I wanted to check to see if others within the Toradex community have faced anything similar with the base example, as it seems like I am doing something wrong?
Can you please check the ownership and permissions of your ~/yocto-workdir? From the error you are getting, seems like this folder is owned by 0:0.
On the other hand, if the folder ~/yocto-workdir doesn’t exist beforehand, it is created with ownership 0:0. This together with the --workdir=/workdir makes the error occur. As you can see from our documentation (Build Torizon OS from Source With Yocto Project/OpenEmbedded | Toradex Developer Center), the section Linux Setup recommends the creation of the yocto-workdir folder beforehand.
So, if this is the case:
Delete de ~/yocto-workdir from your computer (you can check if it is owned by 0:0 before deleting it just as a sanity check )
Create ~/yocto-workdir before launching the container
2.1. Just to be sure, check its ownership and permission after creating it
Thanks for the info @henrique.tx - I’ve tried those items to no avail. It seems like the way in which Docker for Mac mounts volumes is one of, if not the primary, issue. While I’m currently using gRPC FUSE for file sharing as opposed to osxfx, it seems like the issue is quite similar as written about here.
Has anyone gotten this to work using MacOS (Monterey in this case)? I tried manually specifying the uid:gid but that also didn’t seem to help much.
Has anyone gotten this to work using MacOS (Monterey in this case)? I tried manually specifying the uid:gid but that also didn’t seem to help much.
Unfortunately, I don’t know any of our customers who have used our containerized crops build on MacOS. Also none of our core developers in Toradex develop on MacOS either to be honest.
While it’s far from an ideal solution, would a Linux VM of some kind be an option?
Not really. The goal was to develop this locally and then build out a GitHub action so that builds are triggered on any merged PR, but it looks like I may need to just skip the first step and try it all remotely.
I just did, and that does seem to fix the volumes issue; however, I still run into the following:
... A new version of repo (2.36) is available.
... New version is available at: /workdir/torizon/.repo/repo/repo
... The launcher is run from: /bin/repo
!!! The launcher is not writable. Please talk to your sysadmin or distro
!!! to get an update installed.
fatal: error parsing manifest /workdir/torizon/.repo/manifest.xml: [Errno 2] No such file or directory: '/workdir/torizon/.repo/manifest.xml'
/usr/bin/startup-tdx.sh: line 53: setup-environment: No such file or directory
grep: /workdir/torizon/build-torizon*/conf/local.conf: No such file or directory
You have to accept freescale EULA. Read it carefully and then accept it.
Press "space" to scroll down and "q" to exit
/workdir/torizon/layers/meta-freescale/EULA: No such file or directory
Do you accept the EULA? [y/n] y
EULA accepted
/usr/bin/startup-tdx.sh: line 69: /workdir/torizon/build-torizon*/conf/local.conf: No such file or directory
Build environment configured. Building target image torizon-core-docker
> DISTRO= MACHINE=colibri-imx8x bitbake torizon-core-docker
/usr/bin/startup-tdx.sh: line 84: bitbake: command not found
This causes the whole setup to fail, therefore bitbake can’t be found because nothing got setup properly.
I was able to reproduce this error on my Linux machine using this non-existent branch you specified. Therefore this part has nothing to do with MacOS. Please specify a valid branch name, or none at all and the setup will default to the dunfell branch.