cancel
Showing results for 
Search instead for 
Did you mean: 

Using ST Yocto SDK with Docker for Windows

TOlli
Senior

Hi,

I've been trying to setup a cross compile environment using Docker for Windows, and I've run into a bit of trouble.

I've setup the dockerfile so that during the build process of the image, I copy the SDK into the image and execute the .sh script.

This is step 4 in the getting started section of the wiki, under "Develop on Arm Cortex-A7"/"Install the SDK":

https://wiki.st.com/stm32mpu/wiki/Getting_started/STM32MP1_boards/STM32MP157C-DK2/Develop_on_Arm%C2%AE_Cortex%C2%AE-A7/Install_the_SDK

The problem:

Executing the SDK installation script does not work due to the following error:

ST OpenSTLinux - Weston - (A Yocto Project Based Distro) SDK installer version 2.6-openstlinux-4.19-thud-mp1-19-02-20
=====================================================================================================================
You are about to install the SDK to "/STM32MPU_workspace/STM32MP15-Ecosystem-v1.0.0/Developer-Package/SDK". Proceed[Y/n]? Y
Extracting SDK.................................................................................................................................................
.................tar: ./sysroots/cortexa7t2hf-neon-vfpv4-openstlinux_weston-linux-gnueabi/usr/share/dbus-1/services: Directory renamed before its status could
be extracted
tar: ./sysroots/cortexa7t2hf-neon-vfpv4-openstlinux_weston-linux-gnueabi/usr/share/dbus-1: Directory renamed before its status could be extracted
tar: ./sysroots/cortexa7t2hf-neon-vfpv4-openstlinux_weston-linux-gnueabi/usr/share: Directory renamed before its status could be extracted
tar: Exiting with failure status due to previous errors

The issue is present during run time execution as well.

Apparently it's an underlying issue with some path names. Anyways, I have been trying out some of the suggested solutions:

  1. Switch to overlay2 file system driver with Docker [Did not help]
  2. Try to substitute tar with bsdtar during the execution [does not really help inside a .sh file]
  3. Add --absolute-names argument to the tar call on row 235 inside the .sh file [helps]

Right now, the edit to add the argument is a manual edit, but any chance to get this suggestion all the way to the developers so it could be used as an optional flag?

Best regards,

1 ACCEPTED SOLUTION

Accepted Solutions
Bernard PUEL
ST Employee

On Windows 10 you can use WSL2: https://docs.microsoft.com/en-us/windows/wsl/wsl2-index

We did some tests on it is working well.

Then what we tested successfully also is VMware (you can find some guidelines in the wiki).

But we did not tried Docker. What is the Linux base image you install in your docker (ubuntu) ?

View solution in original post

7 REPLIES 7
Bernard PUEL
ST Employee

Which Windows version are you using ?

TOlli
Senior

I'm using Windows 10 Version 1903

Bernard PUEL
ST Employee

On Windows 10 you can use WSL2: https://docs.microsoft.com/en-us/windows/wsl/wsl2-index

We did some tests on it is working well.

Then what we tested successfully also is VMware (you can find some guidelines in the wiki).

But we did not tried Docker. What is the Linux base image you install in your docker (ubuntu) ?

TOlli
Senior

Hi,

I'm using Ubuntu 18.04 .

I have not looked into WSL2, maybe I will have a look at that. VMWare I have used in the past so that would be a familiar choice for me.

I just decided to try out docker for the giggles when I saw the requirement for running things in Linux.

Bumsik Kim
Senior

Docker on Windows is not a real Linux kernel. You will come across a lot of unsolvable issues when using it for Linux development. The safest workaround is VM with shared folders disabled.

TOlli
Senior

Hello Bumsik,

What are these unsolvable issues you talk about? Have you tried this? If you could give me some pointers or examples, maybe I can get a little further on getting the compile environment in Docker going.

I'm going for ligthweight, running a full-blown VM is not really it.

Bumsik Kim
Senior

@TOlli​ 

Hi Tero,

Yes I did, not exactly this SDK but I ended up switching to native Linux after trying Yocto development on Docker for Windows.

I might overstate to say "unsolvable" but if the tool like Docker requires you workarounds that need time and effort it's not lightweight anymore.

The notable issues is the filesystem. Not being native filesystem there are some inconsistencies with the filesystem. The one case is the 260 char path name limit (I actually suspect your issue is this, but I'm not sure), which you can easily exceed while Linux development. Also, speaking of overlay2, it didn't solve the problem because Docker for Windows does not support overlay2. Docker on Windows is not real Linux.