11-08-2017 01:54 AM - edited 11-08-2017 01:58 AM
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 :
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 ...
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.
11-08-2017 06:50 PM
We don't support Ubuntu file system. Please refer our Embedded SW support page http://www.wiki.xilinx.com/Embedded+SW+Support
11-08-2017 11:26 PM - edited 11-09-2017 04:30 AM
@sandeepg, looking at the following pages, I had the impression Ubuntu is used regularly for Zynq products :
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?
11-09-2017 04:37 AM - edited 11-09-2017 04:38 AM
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.
11-09-2017 08:55 AM
11-10-2017 03:05 AM
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?
11-10-2017 10:18 AM
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.
11-13-2017 05:19 PM
Some of the wiki content is not maintained and officially supported.
11-13-2017 11:32 PM
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.
11-14-2017 01:30 AM - edited 11-14-2017 01:37 AM
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 :
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 ?