Reproduced HDMI on Zedboard with Petalinux.

Source: Internet
Author: User
Tags git clone vivado

This is step-by-step tutorial in how to build reference design for Analog Devices ADV7511 HDMI encoder used on Zedboard WI Th petalinux 2013.10. It'll be mostly based on ad HDL reference design http://wiki.analog.com/resources/fpga/xilinx/kc705/adv7511 and ad Linux Drivers wiki page http://wiki.analog.com/resources/tools-software/linux-drivers/platforms/zynq and Xilinx petalinux Documentation Http://www.wiki.xilinx.com/PetaLinux.

As of today, "to"-Create HDL design for ADV7511 from scratch, we have the use of Vivado 2013.4, even though Vivado 2014.1 is already available. The reason is some changes in a Xilinx IP ' s (which I didn ' t had a chance to figure out yet) prevent HDL design from build/ Work properly.

    1. First step is to download HDL libraries and projects from analogdevices repositories on a Github:https://github.com/analo Gdevicesinc/hdl. You can clone it or download a ZIP. I'll download a ZIP and extract ' Hdl-master ' in my projects/fpga/folder on Windows7 machine.
    2. Second step is to build a few Analog Devices IP required to create Zedboard HDMI design. Run Xilinx Vivado 2013.4, open a TCL console, change directories and ' source ' a. tcl scripts. For example, to build Axi_clkgen IP:

      CD C:/projects/fpga/hdl-master/library/axi_clkgen
      source./axi_clkgen_ip.tcl

      After script finish, close created project and build the next. For Zedboard we have build the next IP ' s:

      • Hdl-master/library/axi_clkgen
      • Hdl-master/library/axi_hdmi_tx
      • Hdl-master/library/axi_i2s_adi
      • Hdl-master/library/axi_spdif_tx
      • Hdl-master/library/util_i2c_mixer
    3. after we do with all required IP ' s, we can build ADV7511 reference design for Zedboard. In a Tcl Console change directory to ADV7511 and run ' system_project ' script.

       

      CD c:/projects/fpga/hdl-master/projects/adv7511/zed/
      source./SYSTEM_PROJECT.TCL

      Script would create block design, run synthesis and implementation, generate bitstream and even export software to SDK (with Out opening it). This is the case on my system-everything went smoothly. We are doing with Vivado and can close it.

      We have to create the HDL in Vivado 2013.4, but later we can import created project into the Vivado 2014.1 and update it to use Latest Xilinx IP ' s.

    4. Let ' s build a FSBL. We need very typical ZYNQ first stage boot loader and I covered creation of it before, so now just a short description:
      • Run XSDK.
      • Create new ' Hardware Platform specification ' project (I named it ' ZEDBOARD-HDMI-HW ') and specify HW created in a previous Step.
      • Create Application project (named ' ZEDBOARD-HDMI-FSBL ') using our new ' Hardware Platform ' and select-to-Create new BSP for It. Don ' t forget to use ' Zynq FSBL ' template. Build it if this does not do automatically.
    5. Next step is to create Petalinux BSP. This is also very typical petalinux BSP, just don ' t forget to change ' configuration ' to reflect Zedboard configuration and Name it ' zedboard-hdmi-petalinux_bsp '.

      We are doing with the Xilinx SDK. You can close it.

    6. Next step is to create Petalinux project and set ' hardware description '. I'll call it ' ZEDBOARD-HDMI ' Petalinux project:

      Petalinux-create-t Project-n Zedboard-hdmi
      CD ~/projects/zedboard-hdmi-petalinux_bsp/
      Petalinux-config--get-hw-description-p. /zedboard-hdmi/
      CD ~/projects/zedboard-hdmi/
      Rm-r hw-description

    7. Now, as of today, the ADV7511 Linux driver not in a mainstream kernel. So, we need to get Kernel from Analog Devices repository with appropriate patches. Current version is 3.14.0. Let ' s clone it, and checkout ' XCOMM_ZYNQ ' branch.

      CD ~/projects/
      git clone https://github.com/analogdevicesinc/linux.git Analogdevices-kernel
      CD analogdevices-kernel/
      git checkout Xcomm_zynq

    8. Create necessary directories and copy ' XCOMM_ZYNQ ' branch to our Petalinux project directory.

      CD ~/projects/
      mkdir ~/projects/zedboard-hdmi/components
      mkdir ~/projects/zedboard-hdmi/components/linux-kernel
      Cp-a Analogdevices-kernel ~/projects/zedboard-hdmi/components/linux-kernel/

    9. Run ' petalinux-config ' and change kernel to ' analogdevices-kernel ' and system boot device to ' SD card '.

CD ZEDBOARD-HDMI
Petalinux-config

    1. Next We need to configure Linux kernel for petalinux and we need to enable all options required by ADV7511. Analogdevices Kernel support Special configuration option ' Zynq_xcomm_adv7511_defconfig ', but we cannot run it with Petali Nux. So, we had to pre-configure kernel separately (' Make Arch=arm zynq_xcomm_adv7511_defconfig ') and just copy resulted Confi G into ' Zedboard-hdmi/subsystems/linux/configs/kernel '. So, I do it and also copied it into Petalinux Kernel configs directory '/opt/petalinux-v2013.10-final/etc/template/projec T/template-zynq/subsystems/linux/configs/kernel '. So, I can later reuse it. Also Notice that kernel default Config file has dot in the front and petalinux files don ' t.
      Anyway, where is link to My resulted kernel config file:http://blog.idv-tech.com/wp-content/uploads/2014/05/config_hdmi_3_14.config
    2. We also, with the Modify ' devices tree ' generated by Petalinux for our project. Analogdecices Linux kernel has template for Zedboard which you can find in ' Arch/arm/boot/dts/zynq-zed-adv7511.dts ', so W E basically has to copy the missing devices from AD into our tree.
      Link to my resulted DTS file for Zedboard:http://blog.idv-tech.com/wp-content/uploads/2014/05/adv7511_dts.config.
    3. We are basically-done. At the want to modify Petalinux project, for example, include QT5 Library and test app to check frame buffer Device later. I covered this topics in my previous post, so I wont repeat it here.

      Build Petalinux project, create BOOT. BIN and copy it together with the Linux image file ' Image.ub ' on SD card:

      Petalinux-build
      Petalinux-package--boot--FSBL. /zedboard-hdmi-fsbl/release/zedboard-hdmi-fsbl.elf--FPGA. /zedboard-hdmi-hw/system_top.bit--uboot--force-o images/linux/boot. BIN

    4. Insert SD card into slots of Zedboard and turn it on. During boot kernel should detect ADV7511 (HDMI) and ADAU1761 (sound) devices and create '/dev/fb0 ' device. So, below partial bootlog from my zedboard:
... [DRM] Initialized DRM 1.1.0 20060810/analogdevices-kernel/drivers/gpu/drm/adi_axi_hdmi/axi_hdmi_drv.c:axi_hdmi_platform _probe[176]platform 70e00000.axi_hdmi:driver AXI-HDMI requests probe deferral...adv7511-hdmi-snd Adv7511_hdmi_snd.2: adv7511<75C00000.AXI-SPDIF-TX Mapping ok...zed-adau1761-snd Zed_sound.3:adau-hifi<-77600000.axi-i2s Mapping OK ... Console:switching to colour frame buffer device 180x56axi-hdmi 70e00000.axi_hdmi:fb0:frame buffer Deviceaxi-hdmi 70e00 000.axi_hdmi:registered Panic NOTIFIER[DRM] Initialized axi_hdmi_drm 1.0.0 20120930 on minor 0/analogdevices-kernel/  Drivers/rtc/hctosys.c:unable to open RTC Device (RTC0) ALSA device list: #0: HDMI monitor #1: ZED adau1761freeing Unused           Kernel memory:23356k (c062b000-c1cfa000) init:version 2.88 bootingstarting bootlog daemon:bootlogd .... _____ _ _      _|         ___ \     | |    | |     (_)| |_/ / ___ | |_   __ _ | |  _  _ __   _   _ __  __| __/ / _ \| __| / _` ||    | | ||   ' _ \ | | | |\ \/| |  | __/| |_ | (_| | | |____| | | | | | | | |_| | ><\_| \___| \__| \__,_|\_____/|_||_| |_| \__,_|/_/\_Petalinuxv2013.10 (Yocto1.4)ZedboardTtyPS0ZedboardLoginRootPassword:login[923]:RootLoginOn 'TtyPS0 '[Email protected]zedboard:~#ls/dev/fb0/dev /fb0[email protected]zedboard:~# span class= "attribute" >uname -alinux  Zedboard 3.14.0-g681a2d8-dirty #2 SMP span class= "attribute" >preempt sun may 25 span class= "attribute" >22:46:28 edt 2014  armv7l gnu/linux[email protected]< span class= "attribute" >zedboard:~#            
    1. This was basically it-once you had a framebuffer device you can start using it. So I ran my Qt5 test app and it worked. We obviously don ' t has any hardware acceleration with this HDL design, but we got basic FB device and HDMI output. congratulations!

Reproduced HDMI on Zedboard with Petalinux.

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.