The author provides Debian GNU / Linux for Ultra96 / Ultra96-V2 (ZynqMP) [1]. The Debian GNU / Linux provided is CUI-based, but this time we have made the X Window System run on Ultra96 / Ultra96-V2 to support the GUI.
Therefore, the procedure for operating the X Window System on Ultra96 / Ultra96-V2 is explained in several parts.
This article provides steps to build the Debian Package for the Video Driver (xserver-xorg-video-armsoc-xilinx) and install it on ZynqMP-FPGA-Linux.
A DDX Driver (Video Driver) for the X Window Server that supports ZynqMP. You can get display information and set the display through DRM / KMS (Kernel Module Setting) of Kernel Module (xlnx_drv) provided by Xilinx.
Fig.1 xserver-xorg-video-armsoc-xilinx
This chapter provides steps to create a Debian Package for xserver-xorg-video-armsoc-xilinx.
The repository generated by the procedure explained here is prepared at the following URL. If you have trouble creating a repository, please use the following repository.
We also have a pre-built xserver-xorg-video-armsoc-xilinx Debian Package in the following repositories. If you have trouble building, please use this.
https://github.com/ikwzm/ZynqMP-FPGA-Xserver
There is one caveat to the build environment. That is, xserver-xorg-video-armsoc-xilinx must be built as a plugin module for xserver-xorg-core. To do this, you need an environment where you have built xserver-xorg-core. At that time, if the target environment (in this case Debian 10 (ARM64)) and the build environment (for example, Ubuntu (amd64)) are different, problems such as not being able to build normally may occur.
The quickest way to solve this problem is to (self) build xserver-xorg-video-armsoc on Debian 10 running Ultra96 / Ultra96-V2. This article describes the steps to build on Debian 10 running Ultra96 / Ultra96-V2.
xserver-xorg-video-armsoc-xilinx is based on xf86-video-armsoc. However, there are actually several versions of xf86-video-armsoc. You can find 32 repositories just by searching on github. In addition to github, there are git repositories on Linaro.org and freedesktop.org. It's a mixture of hundreds of flowers and boulders. Below is a brief introduction to the repositories found.
Of the repositories listed above, xserver-xorg-video-armsoc-xilinx uses the one provided by freedesktop.org. I chose this repository because it is (probably) used by PetaLinux provided by Xilinx. I've tried other repositories, but none of them build or display well.
The freedesktop.org repository is not github and cannot be forked. Therefore, create a local repository by following the steps below.
shell$ mkdir xserver-xorg-video-armsoc-xilinx
shell$ cd xserver-xorg-video-armsoc-xilinx
shell$ git init
shell$ git remote add freedesktop https://anongit.freedesktop.org/git/xorg/driver/xf86-video-armsoc.git
shell$ git fetch freedesktop
shell$ git merge freedesktop
Xilinx's PetaLinux is built by patching the repository provided by freedesktop.org. The patch file can be found at the following URL:
Download this patch file and patch the repository. I also do a git commit.
shell$ git clone https://github.com/Xilinx/meta-xilinx/
Cloning into 'meta-xilinx'...
remote: Enumerating objects: 1209, done.
remote: Counting objects: 100% (1209/1209), done.
remote: Compressing objects: 100% (605/605), done.
remote: Total 11725 (delta 678), reused 1045 (delta 551), pack-reused 10516
Receiving objects: 100% (11725/11725), 8.88 MiB | 6.21 MiB/s, done.
Resolving deltas: 100% (6448/6448), done.
shell$
shell$ patch -p1 < meta-xilinx/meta-xilinx-bsp/recipes-graphics/xorg-driver/xf86-video-armsoc/0001-src-drmmode_xilinx-Add-the-dumb-gem-support-for-Xili.patch
patching file src/Makefile.am
patching file src/armsoc_driver.c
patching file src/drmmode_driver.h
patching file src/drmmode_xilinx/drmmode_xilinx.c
shell$
shell$ git add --update
shell$ git add src/drmmode_xilinx
shell$ git commit -m "[add] src/drmmode_xilinx"
[master 84e3cef] [add] src/drmmode_xilinx
4 files changed, 80 insertions(+), 1 deletion(-)
create mode 100644 src/drmmode_xilinx/drmmode_xilinx.c
Create a debian directory and add the following files.
debian/
These files are not described here. See https://github.com/ikwzm/xf86-video-armsoc-xilinx for more information.
After adding the file, git commit.
shell$ git add debian/
shell$ git commit -m "[add] debian/"
[master 3961b1d] [add] debian/
8 files changed, 68 insertions(+)
create mode 100644 debian/README.Debian
create mode 100644 debian/README.source
create mode 100644 debian/changelog
create mode 100644 debian/compat
create mode 100644 debian/control
create mode 100644 debian/copyright
create mode 100755 debian/rules
create mode 100644 debian/xserver-xorg-video-armsoc-xilinx.docs
create mode 100644 debian/xserver-xorg-video-armsoc-xilinx.install
The following packages are required to build the Debian Package for xserver-xorg-video-armsoc. Please install with apt install.
First run autogen.sh to generate configure and Makefile. You must then run make distclean to clear the intermediate files generated by autogen.sh.
shell$ autogen.sh
:
Omission
:
shell$ make distclean
:
Omission
Run debian / rule binary to build the Debian Package for xserver-xorg-video-armsoc-xilinx. The built package will be created in the directory one level above.
shell$ sudo debian/rule binary
:
Omission
:
shell$ dpkg --info ../xserver-xorg-video-armsoc-xilinx_1.4-1_arm64.deb
new Debian package, version 2.0.
size 32924 bytes: control archive=856 bytes.
540 bytes, 12 lines control
611 bytes, 7 lines md5sums
Package: xserver-xorg-video-armsoc-xilinx
Source: xf86-video-armsoc-xilinx
Version: 1.4-1
Architecture: arm64
Maintainer: ikwzm <[email protected]>
Installed-Size: 100
Depends: libc6 (>= 2.17), libdrm2 (>= 2.4.36), libpixman-1-0, xorg-video-abi-24, xserver-xorg-core (>= 2:1.18.99.901)
Provides: xorg-driver-video
Section: x11
Priority: optional
Homepage: <https://github.com/ikwzm/xf86-video-armsoc-xilinx>
Description: X.Org X Server -- ARM SoC display driver for rockchip, amlogic, sunxi and Xilinx(ZynqMP) DRM (mainline kernel)
This section describes the steps to install the xserver-xorg-video-armsoc-xilinx Debian Package built in the previous chapter on ZynqMP-FPGA-Linux.
The pre-built Debian Package is available in the following repositories. You can install this.
https://github.com/ikwzm/ZynqMP-FPGA-Xserver
The procedure to install here is when rendering by GPU (Mali-400) is not performed. Rendering on the GPU requires the installation of the libMali and Mali Kernel drivers, which complicates the installation process. Please refer to the following article for details.
First, install the X Window System.
shell$ apt install x-window-system-core
:
Omission
Then install xserver-xorg-video-armsoc-xilinx_1.4-1_arm64.deb.
shell$ sudo dpkg -i xserver-xorg-video-armsoc-xilinx_1.4-1_arm64.deb
[sudo] password for fpga:
(Reading database ... 66644 files and directories currently installed.)
Preparing to unpack xserver-xorg-video-armsoc-xilinx_1.4-1_arm64.deb ...
Unpacking xserver-xorg-video-armsoc-xilinx (1.4-1) over (1.4-1) ...
Setting up xserver-xorg-video-armsoc-xilinx (1.4-1) ...
Processing triggers for man-db (2.8.5-2) ...
Install your favorite window manager.
shell$ apt install jwm
:
Omission
You must specify armsoc for the Driver property in the Device section of /etc/X11/xorg.conf.
/etc/X11/xorg.conf
Section "Device"
Identifier "ZynqMP"
Driver "armsoc"
Option "DEBUG" "true"
EndSection
Section "Screen"
Identifier "DefaultScreen"
Device "ZynqMP"
EndSection
Log in as root and try starting with startx.
shell# startx &
:
Omission
If you see X Windows on your display, you're good to go.
[Overview]: https://qiita.com/ikwzm/items/fdec04519268b3fb9a50 "" Running X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Overview) "@Qiita" [Video Driver Edition]: https://qiita.com/ikwzm/items/2a0fbfd2938a893e57d4 "" Running X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Video Driver Edition) "@Qiita" [Mali Driver Edition]: https://qiita.com/ikwzm/items/8c96d75e03cdcb91e5b2 "" Running X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (Mali Driver Edition) "@Qiita" [LibMali edition]: https://qiita.com/ikwzm/items/85fa889def8eb07a9e94 "" Running X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (libMali edition) "@Qiita" [fbdev edition]: https://qiita.com/ikwzm/items/f922f7e17aa2382d5c76 "" Running X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (fbdev edition) "@Qiita" [glmark2 edition]: https://qiita.com/ikwzm/items/5065fb0b6c01ea706571 "" Running X Window on Debian GNU / Linux for Ultra96 / Ultra96-V2 (glmark2 edition) "@ Qiita" [1]: https://qiita.com/ikwzm/items/0c6f110aa19e368af03d "Debian GNU / Linux for UltraZed / Ultra96 / Ultra96-V2 (v2019.1 version) Boot image provided" @Qiita "
Recommended Posts