Debian GNU / Linux (v2019.2 version) boot image provided for UltraZed / Ultra96 / Ultra96-V2

Introduction

This article provides Boot Loader (U-Boot, etc.), Linux Kernel, and Debian10 (buster) Root File System for UltraZed / Ultra96 / Ultra96-V2 at the following URL, and explains how to install them. If you have trouble building the Boot Loader or Linux Kernel, please.

Overview

Installation

download

Download it from github as follows. The latest version at this time is v2019.2.1. Since some image files are quite large, I use Git LFS (Large File Storage). You need to have git-lfs installed in your environment.

shell$ git clone -b v2019.2.1 git://github.com/ikwzm/ZynqMP-FPGA-Linux
shell$ cd ZynqMP-FPGA-Linux
shell$ git lfs pull

File description

SD-Card format

  1. Create a file system for partition 1 of the SD-Card with the VFAT File System.
  2. Create a file system for partition 2 of the SD-Card with ext4 File System.

For information on how to format the SD-Card on Linux, refer to the following URL.

Writing to SD-Card

0. SD-Card mount

shell# mount /dev/sdc1 /mnt/usb1
shell# mount /dev/sdc2 /mnt/usb2

1. Copy Boot Partition

For Ultra96

Copy the files under target / Ultra96 / boot / to partition 1 of the SD-Card (/ dev / sdc1 in the example below).

shell# cp target/Ultra96/boot/*                                           /mnt/usb1
For Ultra96-V2

Copy the files under target / Ultra96-V2 / boot / to partition 1 of the SD-Card (/ dev / sdc1 in the example below).

shell# cp target/Ultra96-V2/boot/*                                        /mnt/usb1
For UltraZed

Copy the files under target / UltraZed-EG-IOCC / boot to partition 1 of the SD-Card (/ dev / sdc1 in the example below).

shell# cp target/UltraZed-EG-IOCC/boot/*                                  /mnt/usb1

2. Generate RootFS Partition

Extract the contents of debian10-rootfs-vanilla.tgz to partition 2 of the SD-Card (/ dev / sdc2 in the example below). It is a good idea to copy the Debian package of the device driver to home / fpga of the extracted root file system in advance. You can copy it later via the network.

shell# tar xfz debian10-rootfs-vanilla.tgz -C                             /mnt/usb2
shell# mkdir                                                              /mnt/usb2/home/fpga/debian
shell# cp linux-image-4.19.0-xlnx-v2019.2-zynqmp-fpga_4.19.0-xlnx-v2019.2-zynqmp-fpga-2_arm64.deb   /mnt/usb2/home/fpga/debian
shell# cp linux-headers-4.19.0-xlnx-v2019.2-zynqmp-fpga_4.19.0-xlnx-v2019.2-zynqmp-fpga-2_arm64.deb /mnt/usb2/home/fpga/debian
shell# cp fclkcfg-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.3.0-1_arm64.deb       /mnt/usb2/home/fpga/debian
shell# cp udmabuf-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.4.6-0_arm64.deb       /mnt/usb2/home/fpga/debian
shell# cp u-dma-buf-4.19.0-xlnx-v2019.2-zynqmp-fpga_2.1.3-0_arm64.deb     /mnt/usb2/home/fpga/debian

3. Set fstab to make Boot Partition visible

It is convenient to keep the Boot Partition visible from the Linux side at all times. In that case, it is a good idea to set fstab to mount the boot partition in advance. Note that fstab is already set to mount configfs.

shell# mkdir /mnt/usb2/mnt/boot
shell# cat <<EOT >> /mnt/usb2/etc/fstab
/dev/mmcblk0p1	/mnt/boot	auto	defaults	0	0
EOT

Digression: You can write this much in debian10-rootfs-vanilla.tgz in advance, but you may be wondering why you bother to set it later. The reason is that debian10-rootfs-vanilla.tgz is shared with Ultra96 and UltraZed. The Ultra96 SD-Card boot partition is `/ dev / mmcblk0p1```, while the UltraZed SD-Card boot partition is `/ dev / mmcblk1p1```. Moreover, UltraZed also has / dev / mmcblk0p1, and if you write it in debian10-rootfs-vanilla.tgz in advance, UltraZed will mistakenly access another device. Therefore, although it is troublesome, I decided to set it later.

4. network settings

Ultra96 / Ultra96-V2 connects to the network via WiFi. It may be good to create a configuration file on the host side in advance and write it in RootFS. Of course, you can start Ultra96 / Ultra96-V2 later and configure it there.

Here, the SSID is ssssssss, the passphrase is ppppppppp, and the encrypted access key is xxxx.

First, enter the SSID and passphrase in wpa_passphrase to create an encrypted access key.

shell# wpa_passphrase ssssssss ppppppppp
network={
	ssid="ssssssss"
	#psk="ppppppppp"
	psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}
4.1 Directly described in /etc/network/interfaces.d/wlan0

Write the SSID and encrypted access key directly in the network configuration file (/etc/network/interfaces.d/wlan0).

/mnt/usb2/etc/network/interfaces.d/wlan0



auto  wlan0
iface wlan0 inet dhcp
	wpa-ssid ssssssss
	wpa-psk  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
4.2 Described in /etc/wpa_supplicant/wpa_supplicant.conf

In the network configuration file (/etc/network/interfaces.d/wlan0), write that wpa_supplicant.conf should be read at boot time to configure Wifi as follows:

/mnt/usb2/etc/network/interfaces.d/wlan0



auto  wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

Describe the SSID and encrypted access key in the Wifi configuration file (/etc/wpa_supplicant/wpa_supplicant.conf).

/etc/wpa_supplicant/wpa_supplicant.conf


ctrl_interface=/run/wpa_supplicant
update_config=1

network={
	ssid="ssssssss"
	psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}

For stealth SSIDs, you need to force a scan. In this case, add `` `scan_ssid = 1``` to /etc/wpa_supplicant/wpa_supplicant.conf.

/etc/wpa_supplicant/wpa_supplicant.conf


ctrl_interface=/run/wpa_supplicant
update_config=1

network={
	ssid="ssssssss"
	scan_ssid=1
	key_mgmt=WPA-PSK
	psk=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
}

When connecting to an SSID without a passphrase, it seems better to set `` `key_mgmt = NONE``` (NONE is uppercase).

/etc/wpa_supplicant/wpa_supplicant.conf


ctrl_interface=/run/wpa_supplicant
update_config=1

network={
	ssid="ssssssss"
	scan_ssid=1
	key_mgmt=NONE
}

5. Unmount SD-Card

shell# umount /mnt/usb1
shell# umount /mnt/usb2

Installation of device driver packages

Boot Ultra96 / Ultra96-V2 / UltraZed and log in as root

root'password is "admin".

debian-fpga login: root
Password:
root@debian-fpga:~#

Install Linux Image Package

debian10-rootfs-vanilla.tgz already has v2019.2.1 Linux Image Package (linux-image-4.19.0-xlnx-v2019.2-zynqmp-fpga_4.19.0-xlnx-v2019.2-zynqmp-fpga-2_arm64. deb) is installed. Therefore, the following work is not necessary, but please refer to it when reinstalling for some reason.

root@debian-fpga:~# cd /home/fpga/debian
root@debian-fpga:/home/fpga/debian# dpkg -i linux-image-4.19.0-xlnx-v2019.2-zynqmp-fpga_4.19.0-xlnx-v2019.2-zynqmp-fpga-2_arm64.deb
(Reading database ... 26393 files and directories currently installed.)
Preparing to unpack linux-image-4.19.0-xlnx-v2019.2-zynqmp-fpga_4.19.0-xlnx-v2019.2-zynqmp-fpga-2_arm64.deb ...
Unpacking linux-image-4.19.0-xlnx-v2019.2-zynqmp-fpga (4.19.0-xlnx-v2019.2-zynqmp-fpga-2) over (4.19.0-xlnx-v2019.2-zynqmp-fpga-2) ...
Setting up linux-image-4.19.0-xlnx-v2019.2-zynqmp-fpga (4.19.0-xlnx-v2019.2-zynqmp-fpga-2) ...

Install Linux Header Package

Install linux-headers-4.19.0-xlnx-v2019.2-zynqmp-fpga_4.19.0-xlnx-v2019.2-zynqmp-fpga-2_arm64.deb using dpkg.

root@debian-fpga:~# cd /home/fpga/debian
root@debian-fpga:/home/fpga/debian# dpkg -i linux-headers-4.19.0-xlnx-v2019.2-zynqmp-fpga_4.19.0-xlnx-v2019.2-zynqmp-fpga-2_arm64.deb
Selecting previously unselected package linux-headers-4.19.0-xlnx-v2019.2-zynqmp-fpga.
(Reading database ... 26393 files and directories currently installed.)
Preparing to unpack linux-headers-4.19.0-xlnx-v2019.2-zynqmp-fpga_4.19.0-xlnx-v2019.2-zynqmp-fpga-2_arm64.deb ...
Unpacking linux-headers-4.19.0-xlnx-v2019.2-zynqmp-fpga (4.19.0-xlnx-v2019.2-zynqmp-fpga-2) ...
Setting up linux-headers-4.19.0-xlnx-v2019.2-zynqmp-fpga (4.19.0-xlnx-v2019.2-zynqmp-fpga-2) ...
make: Entering directory '/usr/src/linux-headers-4.19.0-xlnx-v2019.2-zynqmp-fpga'
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  YACC    scripts/kconfig/zconf.tab.c
  LEX     scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --syncconfig Kconfig
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o
  HOSTCC  scripts/dtc/data.o
  HOSTCC  scripts/dtc/livetree.o
  HOSTCC  scripts/dtc/treesource.o
  HOSTCC  scripts/dtc/srcpos.o
  HOSTCC  scripts/dtc/checks.o
  HOSTCC  scripts/dtc/util.o
  HOSTCC  scripts/dtc/dtc-lexer.lex.o
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
  CC      scripts/mod/empty.o
  HOSTCC  scripts/mod/mk_elfconfig
  MKELF   scripts/mod/elfconfig.h
  HOSTCC  scripts/mod/modpost.o
  CC      scripts/mod/devicetable-offsets.s
  HOSTCC  scripts/mod/file2alias.o
  HOSTCC  scripts/mod/sumversion.o
  HOSTLD  scripts/mod/modpost
  HOSTCC  scripts/bin2c
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/conmakehash
  HOSTCC  scripts/sortextable
  HOSTCC  scripts/asn1_compiler
  HOSTCC  scripts/extract-cert
make: Leaving directory '/usr/src/linux-headers-4.19.0-xlnx-v2019.2-zynqmp-fpga'

fclkcfg device driver installation

Install fclkcfg-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.3.0-1_arm64.deb using dpkg.

root@debian-fpga:~# cd /home/fpga/debian
root@debian-fpga:/home/fpga/debian# dpkg -i fclkcfg-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.3.0-1_arm64.deb
Selecting previously unselected package fclkcfg-4.19.0-xlnx-v2019.2-zynqmp-fpga.
(Reading database ... 45373 files and directories currently installed.)
Preparing to unpack fclkcfg-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.3.0-1_arm64.deb ...
Unpacking fclkcfg-4.19.0-xlnx-v2019.2-zynqmp-fpga (1.3.0-1) ...
Setting up fclkcfg-4.19.0-xlnx-v2019.2-zynqmp-fpga (1.3.0-1) ...

udmabuf device driver installation

Install udmabuf-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.4.6-0_arm64.deb using dpkg.

root@debian-fpga:~# cd /home/fpga/debian
root@debian-fpga:/home/fpga/debian# dpkg -i udmabuf-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.4.6-0_arm64.deb
Selecting previously unselected package udmabuf-4.19.0-xlnx-v2019.2-zynqmp-fpga.
(Reading database ... 45379 files and directories currently installed.)
Preparing to unpack udmabuf-4.19.0-xlnx-v2019.2-zynqmp-fpga_1.4.6-0_arm64.deb ...
Unpacking udmabuf-4.19.0-xlnx-v2019.2-zynqmp-fpga (1.4.6-0) ...
Setting up udmabuf-4.19.0-xlnx-v2019.2-zynqmp-fpga (1.4.6-0) ...

Starting with v2019.2, we also have a package of u-dma-buf, which is another name for udmabuf. If necessary, it's a good idea to install this as well. The reason for renaming from udmabuf to u-dma-buf is that another kernel module with the same name as udmabuf has been added to Linux Kernel 5.0. Therefore, the name udmabuf is not available in Linux Kernel 5.0 and later. So u-dma-buf is provided instead.

root@debian-fpga:~# cd /home/fpga/debian
root@debian-fpga:/home/fpga/debian# dpkg -i u-dma-buf-4.19.0-xlnx-v2019.2-zynqmp-fpga_2.1.3-0_arm64.deb
Selecting previously unselected package u-dma-buf-4.19.0-xlnx-v2019.2-zynqmp-fpga.
(Reading database ... 45384 files and directories currently installed.)
Preparing to unpack u-dma-buf-4.19.0-xlnx-v2019.2-zynqmp-fpga_2.1.3-0_arm64.deb ...
Unpacking u-dma-buf-4.19.0-xlnx-v2019.2-zynqmp-fpga (2.1.3-0) ...
Setting up u-dma-buf-4.19.0-xlnx-v2019.2-zynqmp-fpga (2.1.3-0) ...

Upgrade from v2019.1

Changes from v2019.1

From v2019.1, the following changes have been made.

Therefore, you can upgrade from v2019.1 to v2019.2 by following the steps below.

Upgrade procedure

1. Debian10 (buster) upgrade

Various applications of Debian10 (buster) have been upgraded. If your Ultra96 / Ultra96-V2 / UltraZed is connected to your network, you can upgrade from v2019.1 to v2019.2 with the apt command. Boot Ultra96 / Ultra96-V2 / UltraZed, log in as root and run apt update and apt upgrade.

debian-fpga login: root
Password:
root@debian-fpga:~# apt update
   :
   (Omission)
   :
root@debian-fpga:~# apt upgrade
   :
   (Omission)
   :

This method will upgrade the entire Package. Be careful if you have a Package that you don't want to upgrade.

2. Linux Image Package upgrade

https://github.com/ikwzm/ZynqMP-FPGA-Linux to linux-image-4.19.0-xlnx-v2019.2-zynqmp-fpga_4.19.0-xlnx-v2019.2-zynqmp-fpga-2_arm64.deb It is prepared, so please install it with dpkg.

3. Linux Header Package upgrade

https://github.com/ikwzm/ZynqMP-FPGA-Linux-linux-headers-4.19.0-xlnx-v2019.2-zynqmp-fpga_4.19.0-xlnx-v2019.2-zynqmp-fpga-2_arm64.deb It is prepared, so please install it with dpkg.

4. Device Driver upgrade

Now that the Linux Kernel version is up, you need to adapt the device driver to the new Linux Kernel version. udmabuf and fclkcfg have a Package on https://github.com/ikwzm/ZynqMP-FPGA-Linux, so install it with dpkg.

5. Install device-tree-compiler

Since the device-tree-compiler version of Debian 9 adopted in v2018.2 is old (it did not support symbols), from https://git.kernel.org/pub/scm/utils/dtc/dtc.git I downloaded, built and installed v1.4.7. In Debian10 adopted in v2019.1, the version of device-tree-compiler is v1.4.7 and supports symbols. However, I didn't notice this when I was making v2019.1 and like v2018.2 from https://git.kernel.org/pub/scm/utils/dtc/dtc.git v1. I downloaded 4.7 and built and installed it. The Debian10 Root File System in v2019.2 has the device-tree-compiler provided by Debian10 installed. When upgrading from v2019.1, it is recommended to remove / usr / local / bin / dtc and install device-tree-compiler with the apt command.

6. Boot Partition Upgrade

Boot Loader, Linux Kernel Image, uEnv for Boot Partition.Contains txt. v2019 from github.2.Download 1 and target/[Ultra96|Ultra96-V2|UltraZed-EG-IOCC]/Copy the files under boot to Boot Partition. However, uEnv.It will also overwrite txt, so uEnv.It's a good idea to make a backup if you have made any significant changes to txt.

For 6.1 Ultra96

Copy the files under target / Ultra96 / boot / to partition 1 of the SD-Card (/ mnt / boot in the example below).

shell# cp target/Ultra96/boot/* /mnt/boot
6.2 For Ultra96-V2

Copy the files under target / Ultra96-V2 / boot / to partition 1 of the SD-Card (/ mnt / boot in the example below).

shell# cp target/Ultra96-V2/boot/*  /mnt/boot
6.3 For UltraZed

Copy the files under target / UltraZed-EG-IOCC / boot to partition 1 of the SD-Card (/ mnt / boot in the example below).

shell# cp target/UltraZed-EG-IOCC/boot/* /mnt/boot

reference

From v2019.2, the build environment of Boot Loader (U-Boot etc.) has been separated into separate repositories for each target. Please refer to the following URL.

The latest version at the moment is v2019.2.1, but please refer to the following articles when installing earlier versions.

Recommended Posts

Debian GNU / Linux (v2019.2 version) boot image provided for UltraZed / Ultra96 / Ultra96-V2
Run X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (LibMali)
Running X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (fbdev)
Running X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Overview)
Running XRT (Xilinx Runtime) on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Overview)
Run X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Video Driver)
Run X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Gnome Desktop)
Running XRT (Xilinx Runtime) on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Practice)
Run XRT (Xilinx Runtime) on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Installation)
Run X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Mali Driver)
Run XRT (Xilinx Runtime) on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Build)
Run XRT (Xilinx Runtime) on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Build) [Unfinished]
Run XRT (Xilinx Runtime) on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Installation) [Unfinished]
Run XRT (Xilinx Runtime) on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Vitis edition)