Build TorizonCore with crops docker image is broken

When following the procedure here, I get the following error:

$ docker run --rm -it --name=crops -v $PWD:/workdir --workdir=/workdir -e MACHINE=verdin-imx8mm -e IMAGE=torizon-core-docker torizon/crops:dunfell-5.x.y startup-tdx.sh
Unable to find image 'torizon/crops:dunfell-5.x.y' locally
dunfell-5.x.y: Pulling from torizon/crops
6c33745f49b4: Pull complete
a1251559b474: Pull complete
6fb90fb954e2: Pull complete
0e3012cc9eb8: Pull complete
37e34c47cdac: Pull complete
52c362eaec78: Pull complete
06b8b2d54067: Pull complete
ef85a19879de: Pull complete
01cd9dda6578: Pull complete
2df113d063c5: Pull complete
ee6bf26bd822: Pull complete
183f010649b4: Pull complete
Digest: sha256:22bfa322720b1c509429c9cd94576b25644ebf11bcf9a232f3368c093d230c5f
Status: Downloaded newer image for torizon/crops:dunfell-5.x.y

... A new version of repo (2.11) is available.
... New version is available at: /workdir/.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.



project layers/meta-freescale-distro/
project layers/meta-freescale/
  missing (run "repo sync")
  missing (run "repo sync")

project layers/meta-lmp/
  missing (run "repo sync")

project layers/meta-freescale-3rdparty/
  missing (run "repo sync")


project layers/meta-openembedded/
  missing (run "repo sync")
project layers/meta-toradex-bsp-common/
  missing (run "repo sync")

project layers/meta-security/
  missing (run "repo sync")

project layers/meta-toradex-distro/
  missing (run "repo sync")

project layers/meta-toradex-nxp/
  missing (run "repo sync")

project layers/meta-toradex-torizon/
  missing (run "repo sync")


project layers/meta-updater/
project layers/meta-toradex-tegra/
  missing (run "repo sync")
  missing (run "repo sync")

project layers/meta-virtualization/
  missing (run "repo sync")

project layers/openembedded-core/
  missing (run "repo sync")


project layers/openembedded-core/bitbake/
  missing (run "repo sync")
project layers/meta-yocto/
  missing (run "repo sync")
/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=verdin-imx8mm bitbake torizon-core-docker
/usr/bin/startup-tdx.sh: line 84: bitbake: command not found
pokyuser@1e9b46c273d3:/workdir/torizon$

Is this a known issue with the crops docker for the torizon core build?

Also if I attempted to setup and build manually (still inside the container). I get the following:

pokyuser@76cb422c3797:/workdir/torizon/build-torizon$ bitbake $IMAGE
NOTE: Retrying server connection (#1)... (Traceback (most recent call last):
  File "/workdir/torizon/layers/openembedded-core/bitbake/lib/bb/main.py", line 438, in setup_bitbake
    server = bb.server.process.BitBakeServer(lock, sockname, configuration, featureset)
  File "/workdir/torizon/layers/openembedded-core/bitbake/lib/bb/server/process.py", line 407, in __init__
    self.sock.bind(os.path.basename(sockname))
OSError: [Errno 95] Operation not supported
)
WARNING: /workdir/torizon/layers/openembedded-core/bitbake/lib/bb/main.py:469: ResourceWarning: unclosed <socket.socket fd=6, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
  logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc()))

WARNING: /workdir/torizon/layers/openembedded-core/bitbake/lib/bb/main.py:427: ResourceWarning: unclosed file <_io.TextIOWrapper name='/workdir/torizon/build-torizon/bitbake.lock' mode='a+' encoding='UTF-8'>
  topdir, lock = lockBitbake()

NOTE: Reconnecting to bitbake server...
NOTE: Previous bitbake instance shutting down?, waiting to retry...
NOTE: Retrying server connection (#2)...
NOTE: Retrying server connection (#3)... (Traceback (most recent call last):
  File "/workdir/torizon/layers/openembedded-core/bitbake/lib/bb/main.py", line 438, in setup_bitbake
    server = bb.server.process.BitBakeServer(lock, sockname, configuration, featureset)
  File "/workdir/torizon/layers/openembedded-core/bitbake/lib/bb/server/process.py", line 407, in __init__
    self.sock.bind(os.path.basename(sockname))
OSError: [Errno 95] Operation not supported
)
WARNING: /workdir/torizon/layers/openembedded-core/bitbake/lib/bb/main.py:469: ResourceWarning: unclosed <socket.socket fd=8, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
  logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc()))

NOTE: Reconnecting to bitbake server...
NOTE: Previous bitbake instance shutting down?, waiting to retry...
NOTE: Retrying server connection (#4)...
NOTE: Retrying server connection (#5)... (Traceback (most recent call last):
  File "/workdir/torizon/layers/openembedded-core/bitbake/lib/bb/main.py", line 438, in setup_bitbake
    server = bb.server.process.BitBakeServer(lock, sockname, configuration, featureset)
  File "/workdir/torizon/layers/openembedded-core/bitbake/lib/bb/server/process.py", line 407, in __init__
    self.sock.bind(os.path.basename(sockname))
OSError: [Errno 95] Operation not supported
)
WARNING: /workdir/torizon/layers/openembedded-core/bitbake/lib/bb/main.py:469: ResourceWarning: unclosed <socket.socket fd=10, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
  logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc()))

NOTE: Reconnecting to bitbake server...
NOTE: Previous bitbake instance shutting down?, waiting to retry...
NOTE: Retrying server connection (#6)...
NOTE: Retrying server connection (#7)... (Traceback (most recent call last):
  File "/workdir/torizon/layers/openembedded-core/bitbake/lib/bb/main.py", line 438, in setup_bitbake
    server = bb.server.process.BitBakeServer(lock, sockname, configuration, featureset)
  File "/workdir/torizon/layers/openembedded-core/bitbake/lib/bb/server/process.py", line 407, in __init__
    self.sock.bind(os.path.basename(sockname))
OSError: [Errno 95] Operation not supported
)
WARNING: /workdir/torizon/layers/openembedded-core/bitbake/lib/bb/main.py:469: ResourceWarning: unclosed <socket.socket fd=12, family=AddressFamily.AF_UNIX, type=SocketKind.SOCK_STREAM, proto=0>
  logger.info("Retrying server connection (#%d)... (%s)" % (tryno, traceback.format_exc()))

NOTE: Reconnecting to bitbake server...
NOTE: Previous bitbake instance shutting down?, waiting to retry...
NOTE: Retrying server connection (#8)...
ERROR: Unable to connect to bitbake server, or start one (server startup failures would be in bitbake-cookerdaemon.log).

Any ideas?

I found the issue. I am running this on a windows machine and found that if you set the /workdir to somewhere in the Windows FS space it will not work. However, if you set the workdir to a location WITHIN the WSL then everything will work.

Greetings @tprins,

Thank you for the feedback. We’re still testing and haven’t documented the use of CROPs yet too well on Windows machines. But you’re on the right track. The yocto build system has a hard requirement on a Linux based filesystem. Which we can only really get in WSL on Windows. Though I’m glad you were able to progress. We hope to document this better and make it more explicit once we properly test CROPs on Windows. In the meantime please provide anymore feedback you have with CROPs on Windows as it would be very valuable for us.

Best Regards,
Jeremias