Author Topic: petalinux build in wsl 2  (Read 1044 times)

rschaefer

  • Active Member
  • *
  • Posts: 3
petalinux build in wsl 2
« on: December 09, 2021, 04:47:13 PM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1956
Re: petalinux build in wsl 2
« Reply #1 on: December 10, 2021, 07:02:26 AM »
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

  • Active Member
  • *
  • Posts: 3
Re: petalinux build in wsl 2
« Reply #2 on: December 10, 2021, 11:20:39 AM »
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?
« Last Edit: December 10, 2021, 12:22:21 PM by rschaefer »

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1956
Re: petalinux build in wsl 2
« Reply #3 on: December 10, 2021, 01:56:02 PM »
Hi,
Quote
ethernet 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

  • Active Member
  • *
  • Posts: 1
Re: petalinux build in wsl 2
« Reply #4 on: February 02, 2022, 04:53:35 PM »
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.
« Last Edit: February 02, 2022, 05:38:52 PM by adamschoenwald »

JH

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1956
Re: petalinux build in wsl 2
« Reply #5 on: February 02, 2022, 07:54:12 PM »
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
« Last Edit: February 03, 2022, 09:10:02 AM by JH »