News:

Attention: For security reasons,please choose a user name *different* from your login name.
Also make sure to choose a secure password and change it regularly.

Main Menu

petalinux build in wsl 2

Started by rschaefer, December 09, 2021, 04:47:13 PM

Previous topic - Next topic

rschaefer

Hello,

I'm working with the TE0802 DevKit. After I built the project successfully for the Xilinx Toolchain 2019.2 I'm trying to upgrade to 2021.2.
By upgrading the project I'm trying to build the petalinux image in the Windows subsystem for Linux wsl-2 using Ubuntu-20.04.
I can config the project and the roofts.

Now i get stuck by configuring the linux kernel or building the project as yocto tries to (re-)connect to the bitbake server but fails.
I can see that the PRServ and Cooker started. I also removed the bitbake-lock file.

Building the same project in VirtualBox using Ubuntu-20.04 is successful.

Anybody has experience working with wsl-2 ?

JH

Hi,
I get it running on my place (wsl ubunti 20.04 and petalinux 21.2). I have write down  what I've done on my place:
https://wiki.trenz-electronic.de/display/PD/Xilinx+Tools+and+Win10+WSL

--> check your eth setup and if your wsl has enough disc space.
br
John

rschaefer

#2
Hi,

thank you for the fast reply. My disk space is 99GB of free memory. I checked the ethernet connection by ping www.google.com so the DNS works fine and ubuntu upgrade packages as well.

I followed your instructions from the link. I created the /etc/wsl.conf file and also a .wslconfig file in Windows User folder.

both files look like this:

[wsl2]
memory=16GB
processors=4


But free -h gives me 32Gi and lscpu show 12 CPUs. So either way I guess the system config should be working.

Am i still missing some configurations?

JH

Hi,
Quoteethernet connection by ping www.google.com so the DNS works fine and ubuntu upgrade packages as well.
As I know DNS server can be setup on different ways on linux and it can happens that different programs use different ways. I've seen this one time (some time ago), but I've to less experience with linux to help you on this topic.

I've setup DNS server manually on my place, see:
https://wiki.trenz-electronic.de/display/PD/Xilinx+Tools+and+Win10+WSL
--> Setup DNS nameserver

that's the only think I've done to get it working.
br
John


adamschoenwald

#4
I had the same bitbake server reconnecting problem, WSL 2, petalinux 2021.2, ubuntu 20.04. Manually setting the dns server seems to have fixed the error during the import hardware stage but not build stage.

Edit: Turns out I am accidentally on WSL1.

JH

#5
Hi,
petalinux/yocto is not compatible with wsl1. You should use wsl2. In case you has sometime sstate-cache reload problems, use simple local version(scroll down on the link below):
https://www.xilinx.com/support/download/index.html/content/xilinx/en/downloadNav/embedded-design-tools.html

br
John