• 0
digicloud14

ZYBO Linux Reference Design

Question

Hi all,

I've been working on a custom Vivado design that uses embedded Linux. I have been using Xillinux 1.3 but I've switched to using Vivado 2014.4 and Xillinux is not compatible with anything beyond 2014.1, I am looking to switch to a different distribution of Linux. I have been following the directions of the following tutorial https://www.digilentinc.com/Data/Products/ZYBO/Embedded_Linux_Hands-on_Tutorial.pdf

I already have my own uboot.elf, fsbl.elf, boot.bin, bitstream, and device tree for the custom design. All I'm really looking for is a Linux kernal image for the Zybo Zynq that I can load onto an SD card with my other previously generated files. On page 25 of the tutorial, in the section "Test Kernel Image with Pre-built File System", there is a bullet that says "Pre-built File System Image: ramdisk Image is available in ZYBO Linux Reference Design"

I've done a lot of googling and looking through the forums but I can't seem to find this "Zybo Linux Reference Design." Can anyone point me towards where I can find this? Or can someone provide me with the Linux Kernal image (uimage) for the Zybo?

Share this post


Link to post
Share on other sites

19 answers to this question

Recommended Posts

  • 1

Hi,

As far as I know, there is no Zybo linux reference design so you have to look to the one made for Zedboard. The Zybo tutorial is made to boot on a ramdisk so if you intend to have a graphical interface, you have to change files mentioned.

I think you may find your answers about the kernel you are looking for here  : https://forum.digilentinc.com/topic/430-booting-the-linaro-filesystem-on-zybo/

http://www.instructables.com/files/orig/FAJ/VKWE/I7CCBSBN/FAJVKWEI7CCBSBN.zip

By the way, I am not using Linaro but Ubuntu from Xillinux image. It works better in my opinion and their image is under GPL and free of charge. 

If you can find a way to get a kernel as well as its sources with either VGA or HDMI, please share.

Hope this helps.

Mendeln 

Edited by Mendeln

Share this post


Link to post
Share on other sites
  • 0

Mendeln,

Thank you for the response. After a lot of searching, I don't think the Zybo Linux Reference Design exists or has yet to be released. I'll take a look at the Zedboard one and also the links you posted.

I had been using Ubuntu 12.04 from Xillinux image as well. I really liked the graphical interface, but since I changed my design I removed the VGA out for the GUI and have just been using the UART instead. I'd like to continue using Xillinux if possible just because I have already written some scripts for the project as well, but if I HAVE to switch hopefully nothing I've written will have issues on a different distribution.

Since I made a lot of changes in my Vivado custom design, I had to regenerate a new BOOT.bin to incorporate my new .bit bitstream file, and also a new device tree. When I tried loading the BOOT.bin, bitstream, device tree onto an SD card with the Xillinux Image written on it, I got a boot error that reads "wrong ramdisk image format"

In any case, I'd just like to run Ubuntu on the Zybo.

Thanks,
Chris

Share this post


Link to post
Share on other sites
  • 0

Follow up question: I followed the tutorial here http://www.instructables.com/id/Setting-up-the-Zybot-Software/?ALLSTEPS for booting Linaro (Ubuntu) on the Zybo. I partitioned the SD card as per instruction and have all the files loaded on the SD card. However, instead of following the Zybot project, I'd like to use my own Vivado design. Whenever I loaded my devicetree, BOOT.bin, and bitstream onto the ZYBO_BOOT partition of the SD card and tried to boot, I receive an error saying "wrong ramdisk image format" "ramdisk image is corrupt or invalid"

Is this because I have the wrong uboot.elf or fsbl.elf? From my understanding, the Linaro tutorial is for booting without a ramdisk (there is no mention of it in the tutorial). I believe the uboot.elf and fsbl.elf that I am using in my BOOT.bin are for a linux distribution that uses the ramdisk image. In this case, do I need to regenerate my BOOT.bin with a fsbl.elf and uboot.elf that are made for not using the ramdisk image? I hope what I am asking makes sense, I am very new to Linux and still learning.

Share this post


Link to post
Share on other sites
  • 1

Hi,

This error means that your devicetree is certainly wrong because you didn't modify it to boot on your ext4 partition where your OS is : 

bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1"

Can you tell me which Vivado design and devicetree you are using ?

Mendeln 

 

Edited by Mendeln

Share this post


Link to post
Share on other sites
  • 0

Hello,

I think we do want to do the same thing. I'd like to use Xillinux, but I'm not using any Xillinux (Xillybus) IP cores. Since I didn't think that would work, I tried booting Linaro from the the above tutorial, but I am receiving the same error I did when trying to boot Xillinux. I have my own custom Vivado design, and I just want to boot Ubuntu on the Zybo.

I am using Vivado 2014.4, and have a design I have been working on. From the design, I have generated the .bit bitstream, an fsbl.elf, I am using a uboot.elf from Digilent, and created a devicetree using the SDK. I can post my project or any relevant files you'd like to take a look at.

At this point I don't care if it's Xillinux Ubuntu or the Linaro Ubuntu, I just want to boot one of them. I am just confused as to if I need a different fsbl.elf and uboot.elf. I don't really understand or know what ramdisk is, but it appears that Xillinux uses it and Linaro does not?

Using Linaro, if I make the change to my device tree with that bootargs statement, should I then be able to boot?

Thanks,
Chris

Share this post


Link to post
Share on other sites
  • 1

Hi, 

Ok sorry, I thought you were using Xillinux IP cores. I am using Vivado 2014.4 aswell.

1) Download Xillinux Image and mount it on your SD Card

2) Download kernel and devicetree.dtb

http://www.instructables.com/files/orig/FAJ/VKWE/I7CCBSBN/FAJVKWEI7CCBSBN.zip

3) Download Vivado design and use fsbl, uboot and devicetree.dts

https://forum.digilentinc.com/topic/430-booting-the-linaro-filesystem-on-zybo/

You can start with this design and build your boot.bin With this devicetree.dts, you can build your own devicetree.dtb awell by following Zybo embedded linux tutorial.

4) Load your boot.bin, and if you want your devicetree, into your SD Card

It worked for me. 

Mendeln 

Share this post


Link to post
Share on other sites
  • 1

I may be wrong but I think that ramdisk is used to load your filesystem into a part of your RAM. Thus, it is impossible to load a filesystem like ubuntu within 8MB. You need to boot on your SD Card from your OS Partition. 

Share this post


Link to post
Share on other sites
  • 0

Okay, glad to know that I am trying to do the same thing as you and you got it working.

Just to clarify the steps:
1. I have the Xillinux image mounted on the SD card.
2. I already have a devicetree that is specific to my custom Vivado design. I added the bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1" to my device tree as you suggested.
What do I do with the kernal downloaded from the instructables link? Do I replace the uimage that is on the SD card after mounting the Xillinux image with the kernal image from that download?

3. I have my own Vivado design from which I created a fsbl.elf and a device tree. I am using a uboot.elf I found from digilent. Using those, I made my own BOOT.bin. What uboot.elf did you use to make your BOOT.bin? Did you get it from the linaro project files?

Sorry for so many questions, I am very new to this but your help is immensely appreciated.

Thanks,
Chris

Share this post


Link to post
Share on other sites
  • 1

You can try to change only this line. But if I were you, I would modify the one provided.

Yes, you have to use the kernel uImage as well as uboot.elf from links.

I don't know what do you mean with linaro project files. 

Share this post


Link to post
Share on other sites
  • 0

Mendeln,

I cannot thank you enough. I just got it to boot following your instructions. For anyone else who comes along and has similar issues, here is what I did (thanks to Mendeln):

1. Mount Xillinux  to SD card.
2. Get the uimage kernal from http://www.instructables.com/files/orig/FAJ/VKWE/I7CCBSBN/FAJVKWEI7CCBSBN.zip. Replace the uimage on the sd card with the uimage found in the boot folder.

3. Generate a BOOT.bin with fsbl.elf, your custom Vivado design .bit bitstream file, and the uboot.elf from here https://www.dropbox.com/s/8ldvbwd66k0i94d/zybo_bsd_hdmi.zip?dl=0

4. Using either your own devicetree or the one found here https://www.dropbox.com/s/ilwddtkzn2gdcmj/zybo_robot_dts.zip?dl=0 add the following line:
bootargs = "console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1";

5. Add the devicetree.dtb, the BOOT.bin you generated, and your bitstream file to the sd card. 

You should now be able to boot into Xillinux.

Share this post


Link to post
Share on other sites
  • 1

Hey guys, I'm just dropping in to say this is a great example of a forum topic.

We want our forum members to be helping each other out, which is exactly what happened here. I'm the author of that instructable, but my knowledge of FPGAs is still fairly limited, so I wouldn't have been able to help as much I would have wanted too. (But you guys got everything figured out!)

-Josh

Share this post


Link to post
Share on other sites
  • 0

Mendeln,

You're trying make use of the VGA or HDMI out with this kernal configuration? I currently am just using putty and the UART port to boot, but I am thinking I will try to add either vga or hdmi out to make use of the graphical interface. I have a feeling I'll run into complications with using Xillybus IP cores in my design, but we'll see. Once I start working on it I'll report back here to let you know how it went. Thanks again.

Josh,
Haha glad we could live up to your expectations of the forum. This place has been immensely helpful to me while working on my project, I cannot be thankful enough. Glad we were able to tackle this problem as well.

Thanks all,
Chris

Edited by digicloud14

Share this post


Link to post
Share on other sites
  • 0

Hi Digicloud,

I get the graphical interface because of this kernel which includes HDMI drivers.

For further personal features, you may be in trouble like me. Even though my project belongs to an university curriculum, I am not proud of the way I make things.
For now, I am accessing to registers of my IP cores through MMAP (/dev/mem) but is not very convenient compared to a real driver.

You may be in trouble also if you try to use Xillybus IPs. They provide drivers which are only compatible with their own kernel so then I can't see how you can manage their IP cores.

Mendeln

Share this post


Link to post
Share on other sites
  • 0

Hi Mendeln,

I've since tried adding in the xillybus cores to my Vivado design in an attempt to get the graphical interface back but couldn't manage to successfully synthesize/generate a bitstream for the project. There were more issues than I knew what to do with.

I did have a question for you however: Are you able to use ethernet with your current setup? I have ethernet set up in my Vivado configuration, I have an entry in it for my device tree, but whenever I try to boot Linux and connect to the internet (to install programs/packages), I cannot. When I do an ifconfig, the only address that shows up is that loopback address. I've gone into /etc/network/interfaces and used a text editor to manually assign an ip address, but no luck. When I do a demesg, something relevant I saw was "xemacps e000b000.ps7-ethernet: eth0: no PHY setup"

 I've tried changing the entry in the device tree but can't seem to get it to work. Any advice/tips?

Thank you,
Chris

Share this post


Link to post
Share on other sites
  • 0

Hey, 

I have never encountered this ethernet problem so far. 

Perhaps, this error comes from your devicetree. I understood you modified it. 

Mendeln 

Share this post


Link to post
Share on other sites
  • 0

HI Mendeln,

Are you using the default device tree provided by Xillinux or some other? Yes I made modifications to my device tree to add a UART and VDMA. I can't seem to figure out why doing this messed up the ethernet. If it's not too much trouble, could you post your devicetree so that I can take a look and try to figure out why my ethernet isn't working? 

Thank you,
Chris

Share this post


Link to post
Share on other sites
  • 1

Hi,

Since I can't build my own drivers, I use the .dts of the zybot project. But I can append my own components to it.

I would suggest you to give a try with this one.

Share this post


Link to post
Share on other sites
  • 0

Resolved the issue. Appended the bindings for the ethernet from the zybot device tree into my device tree and the ethernet now works. Thanks for the suggestion Mendeln!

-Chris

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now