cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
1,900 Views
Registered: ‎05-04-2020

Installing Ubuntu on Zynq Ultrascale+ ZCU102

I am trying to install Ubuntu Desktop onto my Zynq Ultrascale+ ZCU102. I am following the tutorial found at: https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841937/Zynq+UltraScale+MPSoC+Ubuntu+part+2+-+Building+and+Running+the+Ubuntu+Desktop+From+Sources

 

I downloaded the Ubuntu_Desktop_Release_2018_3.zip file provided in the tutorial. Instead of creating the hardware design using Vivado, I used the prebuilt hardware description file design_1_wrapper.hdf, that was provided in the Ubuntu Desktop Release zip (/Ubuntu_Desktop_Release_2018_3/ HDF_file). I did this because I was struggling to get Vivado to work. I then created the petalinux project by downloading the Petalinux petalinux-v2018.3-installer.run and ZCU102 BSP files. It required downloading two BSP files, but only ended up using one, so I am not sure if I used the wrong one. I then followed the instructions to create and build the petalinux project and then configure the kernel.

I then followed the instructions to prepare the SD card with bootable images. I was confused by the instructions if I should use the BOOT.bin and image.ub files created by petalinux, or if I should use the ZCU102_UbuntuDesktop_2018_3.img" in \Ubuntu_Desktop_Release_2018_3/Ready_to_test_images directory. I tried to burn the SD card with both, and neither worked.

I then followed the instructions to power on the board, with it connected to a monitor, and to a laptop via USB to monitor the serial output. The monitor was blank, but I did receieve serial output on Tera Term. It was all in symbols I could not interpret though. 

I am unsure where I went wrong. Did I burn the wrong images to the SD card. Or should I have used the 2019.2 versions of the files, rather than 2018.3? Is there a way to configure Tera Term or Putty to output readable text to understand what is going on? I also set sw6 as the tutorial instructed, but I am not sure if the rest of my board configuration is accurate.

If anyone has any information that could help me install Ubuntu I would be very grateful. Thanks in advance!

0 Kudos
27 Replies
Highlighted
Voyager
Voyager
1,887 Views
Registered: ‎06-28-2018

Hi @cwolfe 

BOOT.bin usually contains FSBL (first stage boot loader), FPGA bitstream and U-booot (second stage boot loader). Its contents depend on what options you gave to petalinux-package command.

image.ub contains the Linux kernel, device tree and INITRAMFS (rootfs).

You need to put both of these files into the FAT32 partition of your SD card.

As for the rootfs, you can either use the PetaLinux generated rootfs or a pre-installed rootfs like these or these. To use a pre-installed one, all you have to do is select SD card as the rootfs type in petalinux-config and extract the .tar.xz file to the EXT4 partition of your SD card.

0 Kudos
Highlighted
Observer
Observer
1,869 Views
Registered: ‎05-04-2020

Thanks for the response! How do I put both of them in? The instructions say to first burn the ZCU102_UbuntuDesktop_2018_3.img file onto the SD card. Do I then add the BOOT.bin and image.ub from images/linux (from the Petalinux build)?

Is it okay to use the 2018.3 files? Or should I use 2019.2 (or a more recent one)? I was able to find the 2019.2 version of thePetalinux .run file, but could not find it for the Ubuntu Desktop Release zip. 

0 Kudos
Highlighted
Voyager
Voyager
1,848 Views
Registered: ‎06-28-2018

@cwolfe 

Forget the tutorial, you can download an image from the links I provided. I've tested them, they're working.

In case of .img files you can first burn the image onto the SD card and replace the contents of the boot partition with BOOT.bin and image.ub files.

0 Kudos
Highlighted
Observer
Observer
1,788 Views
Registered: ‎05-04-2020

I think the issue is that I did not see a boot partition and a FAT32 partition. After I burned the image onto the SD card, the SD card just had 3 files in it. It wasn't partitioned. 

I am attaching the serial output I get in Tera Term when I try to boot with the SD card now.

0 Kudos
Highlighted
Voyager
Voyager
1,774 Views
Registered: ‎06-28-2018

@cwolfe 

Don't waste your time trying to solve this issue, just use another Ubuntu image.

There is a nice tutorial here. It's for Zynq but steps are the same for ZynqMP.

Since you're going to use the reference design inside the BSP you can skip the hardware design part. And instead of creating a project from template you're going to give the BSP as input to petalinux-create command.

0 Kudos
Highlighted
Observer
Observer
1,700 Views
Registered: ‎05-04-2020

Okay so now when I power on the board, I see it try to boot ubuntu, but several things fail. I am also not getting display on my monitor that I connected with an HDMI. I wonder if Ubuntu Desktop is running and I need to be interfacing with it. Do I need to use DisplayPort? Or is there any way to get the display to work?

I will paste some of the failures, and attach the entire log as well:

[FAILED] Failed to start Load Kernel Modules.

[FAILED] Failed to start Remount Root and Kernel File Systems.

[FAILED] Failed to start Avahi mDNS/DNS-SD Stack.

[FAILED] Failed to start FUSE filesystem for LXC.

[FAILED] Failed to start Manage, Install and Generate Color Profiles.

[FAILED] Failed to start Locale Service.

I then am prompted to login, and I am able to using the username 'root'.  I tried to run the run_desktop.sh executable and got the following output:

 

root@ubuntu:~# chmod +x run_desktop.sh
root@ubuntu:~# ./run_desktop.sh

X.Org X Server 1.18.4
Release Date: 2016-07-19
X Protocol Version 11, Revision 0
Build Operating System: Linux 4.4.0-131-generic aarch64 Ubuntu
Current Operating System: Linux ubuntu 4.14.0-xilinx-v2018.3 #1 SMP Tue May 5 19:17:28 UTC 2020 aarch64
Kernel command line: earlycon console=ttyPS0,115200 clk_ignore_unused root=/dev/mmcblk0p2 rw rootwait
Build Date: 10 August 2018 12:01:21PM
xorg-server 2:1.18.4-0ubuntu0.8 (For technical support please see http://www.ubuntu.com/support)
Current version of pixman: 0.33.6
Before reporting problems, check http://wiki.x.org
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice, (II) informational,
(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.0.log", Time: Thu Oct 26 16:00:04 2017
(==) Using config directory: "/etc/X11/xorg.conf.d"
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
libGL error: unable to load driver: xlnx_dri.so
libGL error: driver pointer missing
libGL error: failed to load driver: xlnx

(nautilus:4128): Gtk-WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
Obt-Message: Xinerama extension is not present on the server
Openbox-Message: Unable to find a valid menu file "/var/lib/openbox/debian-menu.xml"

** (gnome-panel:4158): WARNING **: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

(gnome-panel:4158): Gtk-CRITICAL **: gtk_widget_get_preferred_height_for_width: assertion 'width >= 0' failed

(gnome-panel:4158): Gtk-WARNING **: gtk_widget_size_allocate(): attempt to allocate widget with width -1 and height 24

(gnome-panel:4158): Wnck-WARNING **: Unhandled action type _OB_WM_ACTION_UNDECORATE
root@ubuntu:~# run
(unity-settings-daemon:4179): power-plugin-WARNING **: failed to turn the panel on: Could not change DPMS mode

** (unity-settings-daemon:4179): WARNING **: Unable to register client: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

** (process:4203): WARNING **: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files

(unity-settings-daemon:4179): media-keys-plugin-WARNING **: Grab failed for some keys, another application may already have access the them.

(unity-settings-daemon:4179): color-plugin-WARNING **: failed to connect to colord: Error calling StartServiceByName for org.freedesktop.ColorManager: Timeout was reached

(unity-settings-daemon:4179): keyboard-plugin-WARNING **: Failed to contact localed: Error calling StartServiceByName for org.freedesktop.locale1: Timeout was reached

(unity-settings-daemon:4179): AccountsService-WARNING **: Could not get current seat: No data available.

0 Kudos
Highlighted
Observer
Observer
1,697 Views
Registered: ‎05-04-2020

Also I am still unsure what to do about the fact that my SD card does not have partitions after I burn the img file. It seems I need a FAT32 partition and an EXT4 partition. Is there a way to generate these partitions using Windows? 

0 Kudos
Highlighted
Voyager
Voyager
1,686 Views
Registered: ‎06-28-2018

@cwolfe 

You're obviously successfully booting into Ubuntu, there is nothing wrong with your SD card image.

Read the DisplayPort related messages in the log, they may give you a hint about what's wrong with the display

[ 3.281074] OF: graph: no port node found in /amba/zynqmp-display@fd4a0000
[ 4.401314] zynqmp-display fd4a0000.zynqmp-display: ZynqMP DisplayPort Subsystem driver probed
[ 5.024864] #0: DisplayPort monitor

The first line suggests that there is something wrong. There is another forum post about this issue, which is not solved yet but the replies might help. There may be more posts on this subject, search the forums.

0 Kudos
Highlighted
Observer
Observer
1,559 Views
Registered: ‎05-04-2020

I am still struggling with this issue. I tried downloading a pre-installed rootFS and tried following the tutorial and neither worked. I wonder if it is because I am using Ubuntu 18.04.4 which I now see is unsupported by all versions of petalinux and Vivado. I don’t see why everything would work except connecting to a display but do you think this is likely the source of the problem? 

0 Kudos
Highlighted
Observer
Observer
1,497 Views
Registered: ‎05-04-2020

I have just tried two new builds using the ZCU102 ZU9 ES2 bsp files. I think using the wrong bsp file could have been contributing to the issue. I am attaching 2 log files. 
 
The prebuilt_images.log file uses the BOOT.bin and image.ub file that are generated by running dd if=\Ubuntu_Desktop_Release_2018_3/Ready_to_test_images​/ZCU102_UbuntuDesktop_2018_3.img of=/dev/sdb. It seems that in this boot, I am able to recognize that there is a monitor, but for some reason cannot connect to it. There are many errors that occur while booting up and I have to imagine these are important.
 
The bootable_images.log uses the BOOT.bin and image.ub from the petalinux project in the images/linux directory. In this case, I am not able to successfully boot up at all and am not sure what the errors are.
 
While I was booting both times, the board had a red light on it, I am not sure what that means. I will attach a picture of the board for you to see. 
 
Is it possible that I am using files that are not compatible with my board? Do you need any info about my board?​
IMG_7838.jpg
IMG_7837.jpg
0 Kudos
Highlighted
Voyager
Voyager
1,485 Views
Registered: ‎06-28-2018

Hi @cwolfe 


I have just tried two new builds using the ZCU102 ZU9 ES2 bsp files

Is your chip an engineering sample (ES)? Use the correct BSP.

I think your issue is related to the incorrect DDR memory settings in the hardware design (since your kit is rev1.1).

In this case, I suggest you create and use your own hardware design (.hdf or .xsa file generated by Vivado) rather than the one included in the BSPs (run petalinux-create with --template option rather than -s).

In the block design, double click on the Zynq MPSoC IP, go to the DDR settings and make the changes given at the end of this AR.

I don't know if 2018.3 BSP contains a design with the updated DDR settings. If this issue is resolved in newer PetaLinux/BSP versions you may swicth to them.

0 Kudos
Highlighted
Observer
Observer
1,466 Views
Registered: ‎05-04-2020

How do I determine which BSP I need to use? And which version of vivado should I use?

0 Kudos
Highlighted
Observer
Observer
1,464 Views
Registered: ‎05-04-2020

also I only have computers with either Ubuntu 18.04.6 or 16.04.6, neither or which are listed as compatible with vivado (2018.3, 2019.2, 2019.3). Is there a vivado version that should work with my Ubuntu?

0 Kudos
Highlighted
Voyager
Voyager
1,450 Views
Registered: ‎06-28-2018

@cwolfe 


also I only have computers with either Ubuntu 18.04.6 or 16.04.6, neither or which are listed as compatible with vivado (2018.3, 2019.2, 2019.3). Is there a vivado version that should work with my Ubuntu?


I haven't had any issue running Vivado on those Ubuntu versions. You should be OK.


How do I determine which BSP I need to use?

For ZCU102 there are two alternatives, ES or not, choose one. https://www.xilinx.com/support/answers/41464.html


And which version of vivado should I use?

You can use any version as long as Vivado and PetaLinux versions match. I suggest using the latest if you don't need any specific version.

0 Kudos
Highlighted
Observer
Observer
1,436 Views
Registered: ‎05-04-2020

Can I just source the project.tcl file in the Vivado GUI TCL console with the command: source /Ubuntu_Desktop_Release_2018_3/Hardware/project.tcl

Or do I need to create a new project as described in the medium article? Are there any differences between their Vivado configuration and mine since they use the ZYNQ-7000 as opposed to me using Zynq Ultrascale+ zcu102?

When I call petalinux-create, should I use --template zynqMP, or is there another template I should use?

0 Kudos
Highlighted
Observer
Observer
1,384 Views
Registered: ‎05-04-2020

I tried the solution you suggested using 2018.3 and 2019.2 and still is not working. The errors are mostly the same. Something that was strange is that when I built the petalinux package, there was no BOOT.bin file. There was a image.ub file though.

I am attaching the logs for both boots below.

0 Kudos
Highlighted
Teacher
Teacher
1,375 Views
Registered: ‎06-16-2013

Hi @cwolfe 

 

I'm interesting this issue.

So, I confirmed your log files.

 

According to them, you have already booted linux with Ubuntu rootfs.

What is your problem ?

If your issue was X Window issue, would you share Xorg.log file ?

 

I guess it seems DRM issue.

 

Also, "DISPLAY" is environment parameter name. You must use "export" command, if you use bash or sh as shell.

 

Best regards,

0 Kudos
Highlighted
Observer
Observer
1,314 Views
Registered: ‎05-04-2020

I just tried rebooting with an ethernet connection and the output is very different.​ There are still many failures during the boot though. Can you review these new boot logs and see if you know why it is failing? I am especially concerned that I am not able to ping out. The ethernet is connected and the connection works on my laptop. But when I connect it to the board I cannot succesfully ping anything.
 
Perhaps these new boot logs will help clarify the issue with the monitor. For instance, line 480 says:
    [    3.398037] ALSA device list:
    [    3.400994]   #0: DisplayPort monitor
 

​And then lines 761-769:

    
[   75.664573] rc.local[3833]: Unable to init server: Could not connect: Connection refused
[   75.680381] rc.local[3833]: (nautilus:4167): Gtk-WARNING **: cannot open display: :0.0
[   76.821489] rc.local[3833]: Openbox-Message: Failed to open the display from the DISPLAY environment variable.
[   76.836692] rc.local[3833]: How are you gentlemen? All your base are belong to us. (Openbox received signal 4)
[  OK  ] Started System Logging Service.
[   78.818634] rc.local[3833]: Failed to connect to Mir: Failed to connect to server socket: No such file or directory
[   78.836791] rc.local[3833]: Unable to init server: Could not connect: Connection refused
[   78.852583] rc.local[3833]: (gnome-panel:4178): Gtk-WARNING **: cannot open display: :0.0
[   80.794149] rc.local[3833]: Failed to connect to Mir: Failed to connect to server socket: No such file or directory
 
And line 818:
    ​
[  207.875067] EXT4-fs error (device mmcblk0p2): ext4_iget:4829: inode #84295: comm bash: bad extended attribute block 4278190080
[  207.891364] Aborting journal on device mmcblk0p2-8.
[  207.898455] EXT4-fs (mmcblk0p2): Remounting filesystem read-only
[  207.906540] EXT4-fs error (device mmcblk0p2): ext4_journal_check_start:61: Detected aborted journal
0 Kudos
Highlighted
Teacher
Teacher
1,308 Views
Registered: ‎06-16-2013

Hi @cwolfe 

 

>[207.875067] EXT4-fs error (device mmcblk0p2): ext4_iget:4829: inode #84295: comm bash: bad extended attribute block 4278190080
>[ 207.891364] Aborting journal on device mmcblk0p2-8.
>[ 207.898455] EXT4-fs (mmcblk0p2): Remounting filesystem read-only
>[ 207.906540] EXT4-fs error (device mmcblk0p2): ext4_journal_check_start:61: Detected aborted journal

 

There are something wrong, ex. bad block and so on, on mmcblk0p2.

Would you do fsck command to this partition on ex. host PC ?

 

Best regards,

0 Kudos
Highlighted
Observer
Observer
1,300 Views
Registered: ‎05-04-2020

Sure but how do I run commands on the partition from my host pc? 

I can boot the board and run the command from a serial connection to it

0 Kudos
Highlighted
Teacher
Teacher
1,296 Views
Registered: ‎06-16-2013

Hi @cwolfe 

 

What kind of device are you using as mmblk0 ? SD card ? MMC ? or other ?

If you use SD card as mmblk0, you can execute fsck on your host linux pc.

 

Best regards,

Highlighted
Observer
Observer
1,231 Views
Registered: ‎05-04-2020

I cannot run fsck on mmblk0 because the SD card does not mount as mmblk0. It mounts as sda, and the ext3 partition is sda2. Here is the output of sudo fsck/dev/sda2:

$ sudo fsck /dev/sda2
fsck from util-linux 2.27.1
e2fsck 1.42.13 (17-May-2015)
Backing up journal inode block information.

ROOT contains a file system with errors, check forced.
Pass 1: Checking inodes, blocks, and sizes
The bad block inode looks invalid. Clear<y>?

 

0 Kudos
Teacher
Teacher
1,212 Views
Registered: ‎06-16-2013

Hi @cwolfe 

 

You must enter "Y" when you execute fsck.

"fsck" asks you whethr you fix broken block or not.

 

Best regards,

0 Kudos
Highlighted
Observer
Observer
1,199 Views
Registered: ‎05-04-2020

I tried this and it didn't fix anything unfortunately. 

The board is not booting when I connect it to ethernet. I get the following logs, and you can see it does fully boot and let me login to ubuntu. This happened before I ran fsck as well, so it's not related. But since I cannot connect to my monitor, I would like to at least figure out how to get ethernet working with the board.

0 Kudos
Highlighted
Teacher
Teacher
1,192 Views
Registered: ‎06-16-2013

Hi @cwolfe 

 

I confirmed your whole boot log file.

Unfortunately, It seems SD card is broken. So, you encounter some problems. (SD card read error, X Window error and so on.)

 

Would you change SD card ?

 

Best regards,

0 Kudos
Highlighted
Observer
Observer
1,108 Views
Registered: ‎05-04-2020

I rebuilt with a new SD card and it still does not work. Attached are the logs, one had ethernet connected, the other did not. I am not able to get internet still, and it won't connect to a monitor either. On top of that, the booting has several errors. I would really appreciate any suggestions to fix any of these issues.

0 Kudos
Highlighted
Teacher
Teacher
979 Views
Registered: ‎06-16-2013

Hi @cwolfe 

 

I'm very confusing.

What device are you using to output video signal to monitor ? How do you connect to monitor ?

If you want to use displaylink device to output video signal to monitor, you must install proper kernel driver.

But I could not find proper kernel driver in www.displaylink.com.

 

If you want to use DP Tx to output video signal to monitor on MPSoC, you must install xlnx_drm driver.

It seems drm driver issue, if my understanding was correct.

Make sure it.

 

Best regards,

 

0 Kudos