Software application of ZYNQ Foundation-->linux

Source: Internet
Author: User
Tags vivado

Operating system: Ubuntu 16.04 LTS

Application software: Vivado 2016.2 + petalinux 2016.2

Refer to the Official Application manual: Ug1144-petalinux-tools-reference-guide.pdf

1. Software Installation 1.1 Basic software Installation

Before installing the application software, you need to install the necessary basic software for the ZYNQ development environment, which is clearly indicated on page 11 of the manual.

Note:The TFTP software uses TFTP-HPA as follows:

#1, installationsudoApt-getInstallTFTP-HPA tftpd-hpa#2, create a directorysudo mkdir/Tftpbootsudo chmod 777/tftpboot#3, Configurationsudovim/etc/default/tftpd-hpa# Modify the following two items Tftp_directory="/tftpboot"tftp_options="-l-c-S"#4, startsudoService TFTPD-HPA Restart

Based on this, the Java Development environment and support libraries need to be installed in order to start eclipse:

sudo Install openjdk-8-JREsudoinstall  lib32z1sudo  Install lib32ncurses5sudo install lib32bz2-1.0 (the official said installation is required, but this library is not actually found) sudo Install lib32stdc++6

1.2 Installation Configuration

After completing the 1.1 steps, you need to open the TFTP server and later can update the code directly via Petalinux to Zynq

1.3 Installing the Application software

Refer to the Official Handbook

Note: Open all readable writable executable permissions for the installation directory!

1.4 Application software Configuration

In order to successfully launch Vivado, SDK, and Petalinux, the following steps are required:

1. Increase in/opt/xilinx/sdk/2016.2/.settings64-software_development_kit__sdk_.sh

Export swt_gtk3=0

2. Create a new file in the home directory:. Bash_aliases,

When the console header is launched, Bash automatically calls the. bash_aliases content. Make the following settings:

Echo "<----Auto-start settings---->"Echo "1. Set Shortcut action commands"############################ #重命名 ###########################Echo "2. Setting up the ZYNQ SDK environment"############################ #自动运行 ###########################
Export Extern_compiler=/opt/xilinx/petalinux/petalinux-v2016.2-final/tools/linux-i386/gcc-arm-linux-gnueabi/bin /source/opt/xilinx/petalinux/petalinux-v2016.2-final/settings.SHSource/opt/xilinx/vivado/2016.2/settings64.SH

3, install the application software directory many of the default requires root permissions, if you are using ordinary users to operate the application software, you need to add permissions for many directories.

4. Fix awk Error

The official bug report has the following description:

If you aren't using the AXI BFM IP, you can remove the Ld_library_path setting from settings64.sh

awk errors can be fixed by masking the assignment of "Ld_library_path" in settings64-vivado.sh.

2. Generate embedded file 2.1 Generate hardware description file

Based on system requirements, use Vivado to generate a hardware description file and launch the SDK to generate the hardware description folder.

2.2 Generating Petalinux engineering based on CPU type
Petalinux-create--type Project--template <CPU_TYPE>--name <PROJECT_NAME>= zynqmp or Zynq or mic Roblazeproject_name is the new project name

2.3 Importing a hardware description file into the Petalinux project

Use the command in the Petalinux project directory:

Petalinux-config--get-hw-description=<path-to-directory-which-contains-hardware-description -file>path-to-directory-which-contains-hardware-description-  File: That is ***_wrapper_hw_platform_x

In this process, fsbl,u-boot, kernel, device tree, root file system, etc. are automatically generated.

2.4 Compiling a Build image file

Use the command in the Petalinux project directory:

Petalinux-build-x distcleanlang=c petalinux-build

Generate Uimage file using commands

Petalinux-package--image-c kernel--format uimage

2.5 Generating a startup file

Use the command in the Petalinux project directory:

Petalinux-package--boot--FSBL <fsbl image>--fpga <fpga bitstream>--u-bootFSBL image:fsblfile location, located in. 
    /images/LINUXFPGA bitstream:bit: File, located. /images/linux

After the command is executed, the Boot.bin file is generated in the project directory

2.6 Generating a packaged file

Use the command in the Petalinux project directory:

Petalinux-package--prebuilt--FPGA <FPGA bitstream>

In the project directory, generate the pre-built folder, which has all the files required by the system.

The default login name and password are root

3. Software application

The use of the specified command is used in the Petalinux project root directory !

3.1 Software emulation

Use the following command to invoke software emulation:

Petalinux-boot--qemu--prebuilt  33 represents a start level of 3, which is all started. 1 and 2 respectively for booting to FSBL and U-boot, only for hardware debugging

Exit software emulation Use "CTRL + a" to release and press "X" on it.

You can also specify a new file for emulation:

#调用./images/linux/zimagepetalinux-boot--qemu-kernel# or specify kernel path, device tree path petalinux-boot--qemu-- Image./images/linux/zimage--DTB./images/linux/system.dtb

3.2 Starting the target board with TFTP

On the basis of configuring the TFTP server, you need to run the command:

petalinux-"Image packaging Configuration". #选中   "  Copy final images to Tftpboot"#默认服务器文件位于"/tftpboot ", if different also need to set "tftpboot Directory"

The target board needs to be connected to the network cable, and the U-boot is already running (via SD card loading, etc.). Under U-boot, make the following settings:

; saveenv# start run NetBoot

Software application of ZYNQ Foundation-->linux

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.