cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
3,806 Views
Registered: ‎11-17-2017

Petalinux 2016.4 on Windows 10 WSL Ubuntu 16.04lts

I have done an experiment to see if it is possible to get Petalinux 2016.4 to install under Windows 10 WSL (Windows subsystem for Linux) using Ubuntu 16.04 LTS.
I definitely made some progress on getting some of the process to work, but it still needs some work.  I thought I would post my current steps for anyone who may also be interested in doing this.
I have seen where others have gotten Yocto itself working or nearly working, so I think it may actually be possible with some work.

I'm not advocating everyone being build in an unsupported environment, but for those who may be interested, here goes:


The first problem you run into is memory contraints trying to run the installer straight away:

/mnt/c/iso/petalinux-v2016.4-final-installer1.run petalinux-v2016.4   

This can be circumvented by using 7-zip to extract the tarball from the ".run" file.   We will be extracting the tar file manually instead.

From a clean Ubuntu 16.04LTS WSL session, do the following:

$ sudo dpkg --add-architecture i386 && sudo apt-get update
$ sudo apt-get install tofrodos iproute gawk gcc git-core make net-tools     libncurses5-dev tftpd zlib1g-dev libssl-dev flex bison libselinux1     lib32z1 lib32ncurses5  lib32stdc++6 xvfb texinfo gcc-multilib libsdl1.2-dev libglib2.0-dev chrpath socat autoconf libtool zlib1g:i386 tftp lib32stdc++6-4.7-dev screen
$ mkdir petalinux-v2016.4
$ cd petalinux-v2016.4/
$ tar -xvf /mnt/c/iso/petalinux-v2016.4-final-installer1  <== Unpacking the installer manually succeeds

$ sudo dpkg-reconfigure dash    <== select No for use Dash?
$ sudo apt-get install diffstat xterm unzip  
$ source settings.sh   <== should be successful at this point, but we still have further to go

$ cd components/yocto
$ mkdir source
$ cd source
$ ~/petalinux-v2016.4/tools/yocto-esdk/petalinux-glibc-x86_64-petalinux-minimal-aarch64-toolchain-ext-2016.4.sh    <== enter aarch64 for install folder
$ ~/petalinux-v2016.4/tools/yocto-esdk/petalinux-glibc-x86_64-petalinux-minimal-cortexa9hf-neon-toolchain-ext-2016.4.sh <== enter arm for install folder
$ ~/petalinux-v2016.4/tools/yocto-esdk/petalinux-glibc-x86_64-petalinux-minimal-microblazeel-v10.0-bs-cmp-ml-toolchain-ext-2016.4.sh  <== enter microblaze_lite for install folder
$ ~/petalinux-v2016.4/tools/yocto-esdk/petalinux-glibc-x86_64-petalinux-minimal-microblazeel-v10.0-bs-cmp-mh-div-toolchain-ext-2016.4.sh   <== enter microblaze_full for install folder

Note, that above esdk's did not install perfectly clean (there are some warnings and errors I have yet to resolve which could mean we need more pre-req's)
Now that we have extracted everything manually, and installed the yocto esdk's, we can try to build a petalinux project
First get your project from rev system or copy it in (I use svn)

$ sudo apt-get install subversion
$ svn checkout --username user --password 'mypassword' https://server/svn/Repo/MyProj/trunk/MyProj /home/username/MyProj
$ cd MyProj/   
$ sed -i "s,^\(CONFIG_TMP_DIR_LOCATION=\).*,\1'/home/username/MyProj/build/tmp'," project-spec/configs/config            <==  don't forget to change the temp folder!!!
$ mkdir .petalinux     <== don't forget to make the webtalk folder even if you don't use webtalk
$ petalinux-build

At this point, it will start the build and fail internally at xsct.  ERROR: Failed to Kconfig project.  Doing an strace lets you find out that the version of rlwrap referenced is getting a seg fault.
You can replace rlwrap:
   
$ sudo apt-get install rlwrap
$ cd petalinux-v2016.4/tools/hsm/bin/unwrapped/lnx64.o/
$ mv rlwrap Xrlwrap  <== backup Xilinx's ver of rlwrap
$ cp /usr/bin/rlwrap .  <== put in one that works
$ petalinux-build

Now we get quite a bit further (at least in my project).   But it fails in the while generating u-boot config files. (file "/home/username/petalinux-v2016.4/etc/hsm/scripts/petalinux_hsm_bridge.tcl" line 488)
ERROR: Failed to generate u-boot configuration files.

[INFO] building project
[INFO] generating Kconfig for project
[INFO] oldconfig project
[INFO] sourcing bitbake
[INFO] generating plnxtool conf
[INFO] generating meta-plnx-generated layer
~/MyProj/build/misc/plnx-generated ~/MyProj
~/MyProj
[INFO] generating machine configuration
[INFO] generating bbappends for project . This may take time !
~/MyProj/build/misc/plnx-generated ~/MyProj
~/MyProj
[INFO] generating u-boot configuration files
ERROR: Failed to generate u-boot configuration files
ERROR: Failed to build project
webtalk failed:PetaLinux statistics:extra lines detected:notsent_nofile!
webtalk failed:Failed to get PetaLinux usage statistics!



That's as far as I was able to get, but will follow up here if I make any further progress (when time allows)

10 Replies
Highlighted
Moderator
Moderator
3,776 Views
Registered: ‎04-24-2017

Hi @skidaddytn,

 

We don't support installing petalinux on Windows 10 WSL Ubuntu.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Observer
Observer
2,446 Views
Registered: ‎10-08-2018

Installing and using Petalinux 2018.3 on Ubuntu 16.04 WSL works fine (at least so far).

After adding the needed libraries (as you have shown in your answer), I installed it using

bash ../petalinux-v2018.3-final-installer.run

(Yes, the explicit bash call is important to avoid ENOMEM error)

 

A different version of PetaLinux, but maybe it helps :-).

0 Kudos
Highlighted
Moderator
Moderator
2,435 Views
Registered: ‎04-24-2017

Hi @niklaslindskog ,

As I mentioned earlier Yocto/PetaLinux is not supported Windows 10 Ubuntu WSL. AFAIK Yocto doesn't work and community doesn't have any roadmap to support this feature.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
Highlighted
Observer
Observer
2,395 Views
Registered: ‎10-08-2018

And right you were.
Yocto made it very clear they did not support it when looking at their homepage.
As stated earlier, install went fine but usage gave several errors before I finally gave up and started a VM instead :).
0 Kudos
Highlighted
Teacher
Teacher
2,389 Views
Registered: ‎07-09-2009

@sandeepg

the poster makes it perfectly clear this is not supported

but I for one thing it should be commended as a very worthwhile experiment,

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Highlighted
Moderator
Moderator
2,346 Views
Registered: ‎04-24-2017

Hi @drjohnsmith ,

I have tried in 2017.1 release and widows crashed 2-3 times with blue screen. During build its pretty slow on my laptop with Intel Xeon with 32GB RAM.

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Teacher
Teacher
2,333 Views
Registered: ‎07-09-2009

@sandepg

 

Interesting to know what it does not work on,

      the fact you persisted thorugh so many BSOD is a comendation to you wa sit 2 or three you had ?

as for speed, well, the current WSL 1.0 is known to be slow file access, but 2.0 is anounced, with native file access speeds, so that will b einteresting.

But the fact you got it working is the main thing I take for mthis, well done,

 

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos
Highlighted
Observer
Observer
487 Views
Registered: ‎07-09-2008

Good News! Petalinux can run WSL2! Vivado can do too...

 

But WSL2 have no uart,usb, have ethernet. I think it's enough to me.

Highlighted
Moderator
Moderator
431 Views
Registered: ‎04-24-2017

Hi @drjohnsmith ,

That was 3 years back when first Microsoft released WSL when I try to build it crazed the windows I agree that it could have bugs. Yocto project is now compatible with WSLv2 but community is not supporting officially.

As you already know we support other Linux distribution OS mentioned in UG1144 https://www.xilinx.com/support/documentation/sw_manuals/xilinx2019_2/ug1144-petalinux-tools-reference-guide.pdf where customer can use it on native machine or using VM.

 

1.png

My recommendation let’s not go with this path. If you still need please go ahead and there will be no support from Xilinx.

Once Yocto community start supporting Windows 10 WSL https://www.yoctoproject.org/docs/current/mega-manual/mega-manual.html#detailed-supported-distros we will plan to adopt in PetaLinux. Below screen shot is from Yocto 3.1(Dunfell) release. Xilinx latest petalinux release is based on Yocto 3.0 

2.png

 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
0 Kudos
Highlighted
Teacher
Teacher
399 Views
Registered: ‎07-09-2009

@sandeepg Why, after I posted a reply back over a year ago, have you decided to mention me directly. Especially as my comment was about the work the OP had posted.

Such comments as
"My recommendation let’s not go with this path. If you still need please go ahead and there will be no support from Xilinx"

are total in appropriate, read my posts form years back here, and I was thinking you for your work on this at the time...


Especialy as the Op orriginaly made clear that they new the route was not supported, and when

A few days ago, @eric_chen posted that they had WSL2 and pentalinux working I gave them a well done, is this what your having a diatribe against me for !

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
0 Kudos