UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Scholar ronnywebers
Scholar
1,999 Views
Registered: ‎10-10-2014

AR# 66636 - cannot get eth0 working on a ubuntu base image 16.04.3 LTS

Note that I'm using Zynq & Vivado/Petalinux 2017.2, which is slightly different from the Zynq  MPSoC  in AR# 66636

 

Our software guys prefer to use Ubuntu above Petalinux, so I'm trying to get an Ubuntu base image working for them. I'm using Petalinux to generate my BOOT.bin, kernel, dtb, ... 

 

I discovered AR# 66636, which contains instructions to get an Ubuntu 14.04 core image working on a Zynq MPSoC (serial tty and eth0 interface),

 

Using the info from the AR#, I try to get a slightly different image working found here : 

 

ubuntu-base-16.04.3-base-armhf.tar.gz 2017-08-01 11:01 39M

 

this image seems to contain no packages at all, there's no sudo, no ifconfig, ... just nothing.

 

so I'm having a hard time configuring this base image. After lot's of googlling, I have my ttyPS0 working, and can login as user, the instructions on AR# 66636 were not sufficient, there's a 'magic trick' (creating a symlink) that gets the ttyPS0 working, as explained here.

 

now up next is my eth0 interface ... I tried to use eth0 script found in the AR# 66636 :

 

auto eth0
iface eth0 inet dhcp

I did put this file (named 'eth0') in /etc/network/interfaces.d

 

Then I also added a file 'interfaces' in /etc/network, with these contents :

# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:

source /etc/network/interfaces.d/*

but so far my eth0 seems to be dead, if I do 'cat /proc/net/dev', I can see that not 1 single packet is received on by my eth0 interface ...

 

net stats.png

 

there must be something missing in my config ... 

 

Note that using the image on this great blog, I can get my eth0 working, so that proves that my bitstream, dtb and kernel is ok. The blog is however using a highly configured image, but I need to start from this clean base image.

 

 

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
9 Replies
Moderator
Moderator
1,963 Views
Registered: ‎04-24-2017

Re: AR# 66636 - cannot get eth0 working on a ubuntu base image 16.04.3 LTS

Hi @ronnywebers,

 

We don't support Ubuntu file system. Please refer our Embedded SW support page http://www.wiki.xilinx.com/Embedded+SW+Support 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
Scholar ronnywebers
Scholar
1,951 Views
Registered: ‎10-10-2014

Re: AR# 66636 - cannot get eth0 working on a ubuntu base image 16.04.3 LTS

@sandeepg, looking at the following pages, I had the impression Ubuntu is used regularly for Zynq products :

 

Xilinx wiki - Ubuntu on Zynq

Zynq UltraScale+ MPSoC Ubuntu part 1

AR# 66636

...

they all talk about Ubuntu on Zynq (MPSoc)

 

As FPGA designer, I tried to propose Petalinux to our software team, for me that would be much easier. But since they've been using Ubuntu  for many years, they are familiar with Ubuntu and it's packages. They developed many applications on Ubuntu desktop (Qt), and having a Ubuntu rfs on Zynq makes it thus very easy to run their sofware on Zynq.

 

They also told me that Petalinux comes with a limited set of packages, often not in the version they need.  For example they do use Qt, but not the version that comes with Petalinux 2017.2 

 

I do use Petalinux to build BOOT.bin, U-Boot, dtb and kernel, but as rootfs we (try to) use Ubuntu, starting from the base images on the official Ubuntu site.

 

I'm totally not a linux expert, but seen the existence of the above links / wiki's / AR's, it looks like only a small step for Xilinx to explain in a bit more depth / write a tutorial on how to get a bare 'base/core' Ubuntu image working with tty, network, ... I know this kind of support should be get from Ubuntu, but it's also a bit Xilinx/Zynq specific, and with just a little more effort from Xilinx, we would be able to happily use Ubuntu.

 

 

Can you help me with this please : what arguments could I use to convince our software team to use Petalinux instead of Ubuntu? For me as VHDL/Vivado designer it's easier to use Petalinux, but how do I convince them to make the switch?

 

 

 

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
Highlighted
Scholar ronnywebers
Scholar
1,937 Views
Registered: ‎10-10-2014

Re: AR# 66636 - cannot get eth0 working on a ubuntu base image 16.04.3 LTS

to other readers of this post : I found this blog : Creating A Ubuntu Xenial 16.04 rootfs for Zybo and Zynq (Greg's Embedded Software Blog)

 

This blog not only shows the steps on how to get a Ubuntu base image working, but also explains a bit more what these steps doe.

 

It's very similar to the AR#, but with more explanations, and it just works. Unfortunately my ethernet is not yet working, but the blog was of great help.

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
Explorer
Explorer
1,923 Views
Registered: ‎10-04-2017

Re: AR# 66636 - cannot get eth0 working on a ubuntu base image 16.04.3 LTS

I haven’t tried anything with zynq and Ubuntu but my comment would be that you can build any rootfs with the packages you want with Yocto. Building a rootfs from some binary tarball seems like a really bad idea. That tarball is being built from source by someone, I wonder how.

Scholar ronnywebers
Scholar
1,916 Views
Registered: ‎10-10-2014

Re: AR# 66636 - cannot get eth0 working on a ubuntu base image 16.04.3 LTS

thanks @jrhtech, I'm not (yet) familiar with Yocto, but maybe I should go this route ... 

 

Indeed I did not like to use the archive (what's in it, I don't konw)  that I found on the blog, so I decided to start from the official Ubuntu base image, which I found here : http://cdimage.ubuntu.com/ubuntu-base/releases/16.04/release/

 

Then using a bit chroot magic and apt-get I further install the needed packages. 

 

Is this ok as way to work, or would you really recommend to learn Yocto?

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
Explorer
Explorer
1,900 Views
Registered: ‎10-04-2017

Re: AR# 66636 - cannot get eth0 working on a ubuntu base image 16.04.3 LTS

  I  don't understand why you need Ubuntu.  You can build QT in Yocto.  You can build your packages as ipkg and use opkg on the system to install packages that you build with the correct toolchain. 

  This just sounds like the typical case where the high level software guys don't have embedded experience and they want things to work the way they are familiar with.  

  Obviously even situation is different but personally I wouldn't ship a product done this like.

 

jeff

Moderator
Moderator
1,826 Views
Registered: ‎04-24-2017

Re: AR# 66636 - cannot get eth0 working on a ubuntu base image 16.04.3 LTS

Hi @ronnywebers,

 

Some of the wiki content is not maintained and officially supported. 

Thanks,
Sandeep
PetaLinux Yocto | Embedded SW Support

---------------------------------------------------------------------------
Don’t forget to Reply, Kudo, and Accept as Solution.
---------------------------------------------------------------------------
Scholar ronnywebers
Scholar
1,814 Views
Registered: ‎10-10-2014

Re: AR# 66636 - cannot get eth0 working on a ubuntu base image 16.04.3 LTS

thanks @sandeepg, in the meantime I have my eth0 working ... looks like there were some packets missing that I needed to apt-get. If I finished writing our internal doc, I'll post the steps here to get eth0 working.

 

@jrhtech, I talked to the linux guys, and you're right, that's exactly how they think. They are indeed desktop linux programmers, and since we're all on tight schedule, they prefer to keep it that way (for now). They say that it would require them to compile many packages, as wel as Qt etc. Having not much knowledge about linux, I cannot argue enough I guess. 

 

I almost have it working anyway, my eth0 is working now, that leaves me getting my eth1 to work, which is slightly different from eth0, see this post

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos
Scholar ronnywebers
Scholar
1,805 Views
Registered: ‎10-10-2014

Re: AR# 66636 - cannot get eth0 working on a ubuntu base image 16.04.3 LTS

hello @sandeepg, would it be possible somehow to mark wiki pages as 'active' or 'archived', so it's clear what info is still relevant, and what not?

 

Like, I come to discover that I'm trying to get the wrong driver working. I was trying to use :

drivers/net/ethernet/xilinx/xilinx_emacps.c

 

while this Xilinx wiki page on drivers says it's depricated, in favor of drivers/net/ethernet/cadence/macb.c

 

how should we know that at some point (Petalinux version / kernel version) the switch is made from xilinx_emacps.c to macb.c driver? 

 

I also checked the macb.c file, there's no mention of the GMII2RGMII IP, as in xilinx_emacps.c 

Seems that for this purpose, this dedicated driver was created? drivers/net/phy/xilinx_gmii2rgmii.c

 

So if my current understanding is correct, the older, depricated way was to use xilnx_emacps.c, which also supports the GMII2RGMII IP.

 

But the 'new' way of doing this is to use the macb.c and xilinx_gmii2rgmii.c drivers ?

 

 

 

** kudo if the answer was helpful. Accept as solution if your question is answered **
0 Kudos