zeus build under WSL

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

zeus build under WSL

6,644 Views
davidvescovi
Contributor V

For some of you building NXP yocto zuse on Windows usiing WSL you may encounter some issues.

For example I was using BSP 5.4.24 to build for iMX8m mini evk. I was using Ubuntu 20.04 under WSL2.

Bitbake progressed ok till it got to the nxp-wlan-sdk package where it barfed with:

 ERROR: nxp-wlan-sdk-git-r0 do_compile: oe_runmake failed
ERROR: nxp-wlan-sdk-git-r0 do_compile: Execution of '/home/david/yocto/zeus/8_21/s/build-xwayland/tmp/work/aarch64-poky-linux/nxp-wlan-sdk/git-r0/temp/run.do_compile.12278' failed with exit code 1:
make -C /lib/modules/4.19.104-microsoft-standard/build M=/home/david/yocto/zeus/8_21/s/build-xwayland/tmp/work/aarch64-poky-linux/nxp-wlan-sdk/git-r0/git/mxm_wifiex/wlan_src modules
make[1]: *** /lib/modules/4.19.104-microsoft-standard/build: No such file or directory. Stop.
make: *** [Makefile:412: default] Error 2
WARNING: exit code 1 from a shell command.

The cause is explained in this thread 

to fix this I had to install and add a link as follows:

sudo apt-get install -y linux-headers-generic
sudo ln -s /lib/modules/5.4.0-42-generic /lib/modules/4.19.104-microsoft-standard

Note: your actual version numbers may be different see: 

https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fwindows%...

Labels (1)
Tags (1)
0 Kudos
Reply
5 Replies

6,585 Views
weidong_sun
NXP TechSupport
NXP TechSupport

Hello David,

I tested it on ubuntu 20.04 LTS, Below is steps:

1. install ubuntu 20.04 on VMware Player 15.0

2. update and upgrade system with the commands:

--sudo apt-get update

--sudo apt-get upgrade

--Installing software packages for compiling linux 5.4.24_2.1.0 BSP

# sudo apt-get install flex bison gperf build-essential zlib1g-dev

# sudo apt-get install lib32ncurses5-dev x11proto-core-dev

# sudo apt-get install libx11-dev lib32z1-dev libgl1-mesa-dev

# sudo apt-get install tofrodos python-markdown libxml2-utils xsltproc

# sudo apt-get install uuid-dev:i386 liblzo2-dev:i386 gcc-multilib g++-multilib

# sudo apt-get install subversion openssh-server openssh-client uuid uuid-dev zlib1g-dev

# sudo apt-get install liblz-dev lzop liblzo2-2 liblzo2-dev git-core curl

# sudo apt-get install python3 python3-pip python3-pexpect python3-git python3-jinja2 pylint3

# sudo apt-get install u-boot-tools mtd-utils

# sudo apt-get install openjdk-8-jdk device-tree-compiler aptitude

# sudo apt-get install libcurl4-openssl-dev nss-updatedb

# sudo apt-get install chrpath texinfo gawk cpio diffstat

# sudo apt-get install libncursesw5-dev libssl-dev libegl1-mesa

# sudo apt-get install net-tools python libsdl1.2-dev xterm socat

# sudo apt-get install icedtea-netx-common icedtea-netx

3. download yocto source of L5.4.24_2.1.0

# mkdir ~/bin

# curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo

# chmod a+x ~/bin/repo

# export PATH=~/bin:$PATH

 

# mkdir imx-yocto-bsp-5.4.24-2.1.0

# cd imx-yocto-bsp-5.4.24-2.1.0

# repo init -u https://source.codeaurora.org/external/imx/imx-manifest -b imx-linux-zeus -m imx-5.4.24-2.1.0.xml

pastedImage_1.png

# cd .repo/manifests

# gedit imx-5.4.24-2.1.0.xml

         Modify git to https like below:

  <remote fetch="https://git.yoctoproject.org/git" name="yocto"/>

  <remote fetch="https://github.com/Freescale" name="community"/>

  <remote fetch="https://github.com/openembedded" name="oe"/>

  <remote fetch="https://github.com/OSSystems" name="OSSystems"/>

  <remote fetch="https://github.com/meta-qt5"  name="QT5"/>

  <remote fetch="https://github.com/TimesysGit"  name="Timesys"/>

  <remote fetch="https://github.com/meta-rust"  name="rust"/>

  <remote fetch="https://git.openembedded.org"  name="python2"/>

  <remote fetch="https://source.codeaurora.org/external/imx" name="CAF"/>

Save it and exit.

# cd ~/ imx-yocto-bsp-5.4.24-2.1.0

# repo sync

4. compiling nxp-wlan-sdk

# DISTRO=fsl-imx-xwayland MACHINE=imx8mmevk source imx-setup-release.sh -b build-xwayland

# bitbake nxp-wlan-sdk -c fetch

# bitbake nxp-wlan-sdk -c compile
pastedImage_10.png

done:

pastedImage_11.png

Then you can continue to compile imx-image-full

# bitbake imx-image-full

Hope above steps are helpful for you.

Have a nice day!

B.R,

Weidong

0 Kudos
Reply

6,585 Views
davidvescovi
Contributor V

Actually this is not helpful at all as you failed to read the very title of post.

I am building under WSL2 (Windows Subsystem for Linux) NOT a VMplayer. Now that Microsoft supports native Linux under Windows 10 there is no need for VM Player, VM workstation or Virtual Box. WSL2 replaces all these and by the way runs much faster.

I posted this for those building yocto on Windows machines ... and it works very well thank you. 

0 Kudos
Reply

6,171 Views
jpkotta
Contributor II

In docker I was able to build without copying my build machine's kernel install.  I added

 

EXTRA_OEMAKE += 'KERNELDIR="${STAGING_KERNEL_DIR}" PREFIX="${D}"'

inherit module

 

to nxp-wlan-sdk_git.bb. 

6,177 Views
jpkotta
Contributor II

I'm having similar issues in docker.  nxp-wlan-sdk is using the build machine's kernel installation (under `/lib/modules/$(uname -r)`).  When I copied that into my container, it worked without issue.  But it seems wrong to depend on the build machine kernel, it should depend on another yocto package.

0 Kudos
Reply

6,501 Views
konradgräfe
Contributor III

Zeus is not compatible with WSL, see the documentation:

The Yocto Project is not compatible with the Windows Subsystem for Linux (WSL). You cannot use a build host that is running WSL. 

For Dunfell, that particular paragraph changed to:

You may use Windows Subsystem For Linux v2 to set up a build host using Windows 10, but validation is not performed against build hosts using WSLv2. 

 

0 Kudos
Reply