Getting Started Guide for Xilinx Zynq 7000 ZedBoard
This guide is meant to be used as a reference on how to start using RidgeRun's SDK over AVNet/Digilent Xilinx Zynq 7000 ZedBoard hardware. The first section of this guide shows some general guidelines on how to work with our SDK as well including some very basic procedures that need to be execute before installing / trying to build RidgeRun's SDK (for example setting up a TFTP and NFS server or installing Xilinx ISE tools). Later on, the second section contains instructions about how to configure the SDK to a create a SD card with all the key software components (bootloader, kernel and file system) needed to boot all the way to Linux's shell in the evaluation board.
Please take notice that in the following sections it is assumed that the user has already downloaded and installed Xilinx Vivado ISE Design Suite in the development machine, this is remarkably important since these tools also include the toolchain required to cross-compile the SDK. For this guide, Vivado Design Suite 2012 and ISE Design Suite 14.4 was used; it might be the case that the developer has acquired a more recent hardware revision board with a newer set of tools, in case problems arise for this reason please do not hesitate to contact RidgeRun for further asistance.
- Zynq 7000 All Programmable SoC XC7Z020-CLG484-1
- Memory (512 MB DDR3, 32 MB Quad-SPI Flash)
- Onboard USB JTAG Programming
- 10/100/1000 Ethernet
- USB OTG 2.0 and USB-UART
- PS & PL I/O expansion
- Multiple displays (1080p HDMI, 8-bit VGA, 128x32 OLED)
- I2S Audio codec
Basic preliminary work
Installing Xilinx ISE Tools
As mentioned earlier in the Introduction, it is assumed that the developer has acquired an AVNet / Digilent Zed board. In such case please proceed to use the DVD labeled for Linux in order to install the corresponding Vivado and ISE Design Tools from Xilinx in your Ubuntu desktop and execute the xsetup binary file to start installing the Xilinx Tools.
$(USER)@$(HOST):cd /media/Xilinx_ISE_DS_Lin_14.4_P.49d.3 $(USER)@$(HOST):/media/Xilinx_ISE_DS_Lin_14.4_P.49d.3$ ./xsetup
To check for the latest versions of the Vivado / ISE Design suite please refer to the following link:
Some additional hints for Ubuntu 12.04:
Linux Host Setup
- Configure TFTP:
If you are planning to use the SDK's installer to install images generated by the SDK in NAND, installing a TFTP server you will speed up downloads to the target hardware by using TFTP.
- Configure NFS:
For application development, it is convenient to use root NFS mount file system for the target hardware. This allows you to rebuild your application on the host and immediately run the application on the target hardware with no interveining steps. You host PC needs to be configured as a NFS server for this in order to work properly.
- In case termnet is preferred over minicom as serial console / terminal app, please refer to the short guide below
TERMNET terminal app configuration, alternative to minicom
Please skip below two steps (3.3 and 3.4) and jump to 3.5 if you have purchased a Professional SDK.
Getting the RidgeRun's EVAL SDK Irazu
If you want to get the RidgeRun's EVAL SDK Irazu you need to go to our Evaluation SDK Download Link and select the Evaluation SDK you need. You will be asked for your email address and some information. Once you have submitted the required information you will receive an email with the following information:
Sequence of evaluation sdk download events:
You have to follow the steps below :
When you select and click on the name of evaluation sdk you want to download, shopping cart page will display with the price $0.00 (for eval sdk's)
-> click on 'Go to Checkout'. It will display 'Your Shopping Bag' page
-> click on 'Checkout'. You will get a form to enter your email id and other info
-> click on 'Continue'. It will display a 'Place Order' page
-> click on 'Place Order'. And then Please check your email with a link to download the tar file for the evaluation SDK you have selected.
Installing the EVAL SDK
RidgeRun delivers the SDK in either two ways: a tar file for x86 platforms, or for customers with a established development relationship through a custom SCM (typically GIT) repository. If you are using a shared SCM repository, please contact RidgeRun for a detailed instructions.
Listed below are the minimum recommended requirements for installing and using the RidgeRun SDK:
- A host computer with a 686 or better family processor
- 1 GB free hard disk space
- A Linux distribution configured on the host computer.
- Target hardware for the SDK
- Optional: a network card installed and configured on the host computer
- Optional: Internet connection for SDK updates
Once you have downloaded the tar file of the evaluation SDK you can untar it by running the following command:
tar -xvzf <name of the tar file downloaded>.tar.gz
You may find it convenient to untar the evaluation SDK more than once. For example, you might want one version to be unmodified and another version to be your working development directory. RidgeRun suggests you untar the SDK development directories in your $HOME/work/ directory. When you have more than one development directory installed, just remember to have the DEVDIR shell variable set properly. To set the DEVDIR shell variable use the `make env` command specified at Build_SDK
On the rest of this document, we refer as $DEVDIR to the path where the RidgeRun EVAL SDK for the Zynq 7000 Zed board is installed.
Installing the Professional SDK version
When all the purchase process is done, RidgeRun will provide you a GitHub repository access. For that, the GitHub user ID and other information might be requested. Once you provide that information, you must clone the given repository URL, using the next command:
git clone email@example.com:RidgeRun/<customer>.git
This would have the proper <customer> space modified. With this, you will have the SDK installed on the directory you were when executed the clone command.
RidgeRun suggests you untar the SDK development directories in your $HOME/work/ directory. When you have more than one development directory installed, just remember to have the DEVDIR shell variable set properly. To set the DEVDIR shell variable use the `make env` command specified at RidgeRun_Irazu_SDK_User_Guide#Build_SDK.
On the rest of this document, we refer as $DEVDIR to the path where the RidgeRun Professional SDK for the Zynq 7000 Zed board is installed.
Running RidgeRun SDK
Configuration and build
Please refer to the link below for information on how to configure and build the RidgeRun SDK for the first time:
Booting from SD Card
Setting up Zynq 7000 ZedBoard to boot from a SD card
In order to boot from a SD card you need to set the SD port as the first boot device to try in the Zynq 7000 boot sequence. The ZedBoard uses MIO[5:3] to select the boot mode, SD card boot mode is selected by setting the MIO[5:4] to 3.3V (logical 1) as shown in the image below:
Configuring SDK to deploy firmware to a SD card
1. Set your environment variables
cd $DEVDIR `make env`
2. Open a configuration menu
3. Proceed to the Installer Configuration sub-menu and set the Firmware deployment mode to Deploy all the firmware to a SD card option as shown below:
4. Proceed to the Toolchain Configurations sub-menu and make sure that you have the right binaries path for your toolchain. For this option, what usually changes is the version of ISE installed:
The RidgeRun SDK offers basically 2 ways of creating a bootable SD card:
- By creating a SD card image by creating a loopback device (later on this image is burned into the SD card using dd command.
- By storing the firmware images into a previously partioned (by the SDK) SD card.
For more information about the main configuration settings related to SD card installation options, please refer to the link below: How to boot from SD card using RidgeRun SDK
Booting the Zynq 7000 ZedBoard running RidgeRun SDK
Once the SD card build process is complete, proceed to boot the board:
1. Open your serial console / terminal emulator (minicom, terment, picocom depending on your preference).
2. Insert the SD card into the SD card slot in the Zynq ZedBoard, power ON the board a wait for the board to boot all the way to the Linux Kernel prompt. The log should be similar to the following:
U-Boot 2013.10 (May 20 2014 - 10:04:06) Memory: ECC disabled DRAM: 512 MiB MMC: zynq_sdhci: 0 SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: Gem.e000b000 Hit any key to stop autoboot: 0 Device: zynq_sdhci Manufacturer ID: 27 OEM: 5048 Name: SD04G Tran Speed: 50000000 Rd Block Len: 512 SD version 3.0 High Capacity: Yes Capacity: 3.7 GiB Bus Width: 4-bit reading uEnv.txt 165 bytes read in 8 ms (19.5 KiB/s) Loaded environment from uEnv.txt Importing environment from SD ... Running uenvcmd ... Running uenvcmd ... Copying Linux from SD to RAM... reading uImage 3443416 bytes read in 338 ms (9.7 MiB/s) reading devicetree.dtb 7543 bytes read in 17 ms (432.6 KiB/s) ## Booting kernel from Legacy Image at 03000000 ... Image Name: "RR Compressed Linux Kernel" Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3443352 Bytes = 3.3 MiB Load Address: 01e00000 Entry Point: 01e00000 Verifying Checksum ... OK ## Flattened Device Tree blob at 02a00000 Booting using the fdt blob at 0x2a00000 Loading Kernel Image ... OK Loading Device Tree to 1fb4c000, end 1fb50d76 ... OK Starting kernel ... Uncompressing Linux... done, booting the kernel. Booting Linux on physical CPU 0x0 Linux version 3.12.0-xilinx (cavila@ridgerun-MS-7369) (gcc version 4.6.3 (Sourcery CodeBench Lite 2012.03-79) ) #1 SMP PREEMPT Tue May 20 09:21:19 CST 2014 CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache Machine: Xilinx Zynq Platform, model: Xilinx Zynq Memory policy: Data cache writealloc PERCPU: Embedded 8 pages/cpu @c0a7d000 s8384 r8192 d16192 u32768 Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048 Kernel command line: console=ttyPS0,115200 rw root=/dev/nfs nfsroot=10.251.101.39:/home/cavila/devdirs/devdir-new-zedboard/fs/fs rw ip=dhcp PID hash table entries: 2048 (order: 1, 8192 bytes) Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) Memory: 513048K/524288K available (4498K kernel code, 261K rwdata, 1440K rodata, 184K init, 194K bss, 11240K reserved, 0K highmem) Virtual kernel memory layout: vector : 0xffff0000 - 0xffff1000 ( 4 kB) fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) vmalloc : 0xe0800000 - 0xff000000 ( 488 MB) lowmem : 0xc0000000 - 0xe0000000 ( 512 MB) pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) modules : 0xbf000000 - 0xbfe00000 ( 14 MB) .text : 0xc0008000 - 0xc05d4bc0 (5939 kB) .init : 0xc05d5000 - 0xc06030c0 ( 185 kB) .data : 0xc0604000 - 0xc0645438 ( 262 kB) .bss : 0xc0645444 - 0xc0675ff4 ( 195 kB) Preemptible hierarchical RCU implementation. Dump stacks of tasks blocking RCU-preempt GP. RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2. NR_IRQS:16 nr_irqs:16 16 ps7-slcr mapped to e0802000 Zynq clock init sched_clock: 16 bits at 54kHz, resolution 18432ns, wraps every 1207ms ps7-ttc #0 at e0804000, irq=43 Console: colour dummy device 80x30 Calibrating delay loop... 1325.46 BogoMIPS (lpj=6627328) pid_max: default: 32768 minimum: 301 Mount-cache hash table entries: 512 CPU: Testing write buffer coherency: ok CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 Setting up static identity map for 0xc0440de8 - 0xc0440e40 L310 cache controller enabled l2x0: 8 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x72360000, Cache size: 512 kB CPU1: Booted secondary processor CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 Brought up 2 CPUs SMP: Total of 2 processors activated. CPU: All CPU(s) started in SVC mode. devtmpfs: initialized VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 NET: Registered protocol family 16 DMA: preallocated 256 KiB pool for atomic coherent allocations zynq_gpio e000a000.ps7-gpio: gpio at 0xe000a000 mapped to 0xe0850000 hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers. hw-breakpoint: maximum watchpoint size is 4 bytes. zynq_ocm f800c000.ps7-ocmc: ZYNQ OCM pool: 256 KiB @ 0xe0880000 bio: create slab <bio-0> at 0 vgaarb: loaded SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb pps_core: LinuxPPS API ver. 1 registered pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <firstname.lastname@example.org> PTP clock support registered EDAC MC: Ver: 3.0.0 Advanced Linux Sound Architecture Driver Initialized. Switched to clocksource ttc_clocksource NET: Registered protocol family 2 TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 3, 32768 bytes) TCP: Hash tables configured (established 4096 bind 4096) TCP: reno registered UDP hash table entries: 256 (order: 1, 8192 bytes) UDP-Lite hash table entries: 256 (order: 1, 8192 bytes) NET: Registered protocol family 1 RPC: Registered named UNIX socket transport module. RPC: Registered udp transport module. RPC: Registered tcp transport module. RPC: Registered tcp NFSv4.1 backchannel transport module. hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc. msgmni has been set to 1002 Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250) io scheduler noop registered io scheduler deadline registered io scheduler cfq registered (default) dma-pl330 f8003000.ps7-dma: unable to set the seg size dma-pl330 f8003000.ps7-dma: Loaded driver for PL330 DMAC-2364208 dma-pl330 f8003000.ps7-dma: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16 e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 82, base_baud = 3124999) is a xuartps console [ttyPS0] enabled xdevcfg f8007000.ps7-dev-cfg: ioremap 0xf8007000 to e0864000 brd: module loaded loop: module loaded xqspips e000d000.ps7-qspi: master is unqueued, this is deprecated m25p80 spi0.0: found s25fl256s1, expected n25q128 m25p80 spi0.0: s25fl256s1 (32768 Kbytes) 5 ofpart partitions found on MTD device spi0.0 Creating 5 MTD partitions on "spi0.0": 0x000000000000-0x000000100000 : "qspi-fsbl-uboot" 0x000000100000-0x000000600000 : "qspi-linux" 0x000000600000-0x000000620000 : "qspi-device-tree" 0x000000620000-0x000000c00000 : "qspi-rootfs" 0x000000c00000-0x000001000000 : "qspi-bitstream" xqspips e000d000.ps7-qspi: at 0xE000D000 mapped to 0xE0866000, irq=51 e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k e1000e: Copyright(c) 1999 - 2013 Intel Corporation. libphy: XEMACPS mii bus: probed xemacps e000b000.ps7-ethernet: pdev->id -1, baseaddr 0xe000b000, irq 54 ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver ehci-pci: EHCI PCI platform driver ULPI transceiver vendor/product ID 0x0451/0x1507 Found TI TUSB1210 ULPI transceiver. ULPI integrity check: passed. xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1 xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000 xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00 hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected usbcore: registered new interface driver usb-storage mousedev: PS/2 mouse device common for all mice i2c /dev entries driver xadcps f8007100.ps7-xadc: enabled: yes reference: external zynq-edac f8006000.ps7-ddrc: ecc not enabled sdhci: Secure Digital Host Controller Interface driver sdhci: Copyright(c) Pierre Ossman sdhci-pltfm: SDHCI platform and OF driver helper mmc0: SDHCI controller on e0100000.ps7-sdio [e0100000.ps7-sdio] using ADMA usbcore: registered new interface driver usbhid usbhid: USB HID core driver TCP: cubic registered NET: Registered protocol family 10 NET: Registered protocol family 17 Registering SWP/SWPB emulation handler drivers/rtc/hctosys.c: unable to open rtc device (rtc0) Sending DHCP requests .mmc0: new high speed SDHC card at address 0007 mmcblk0: mmc0:0007 SD04G 3.70 GiB mmcblk0: p1 .xemacps e000b000.ps7-ethernet: Set clk to 24999999 Hz xemacps e000b000.ps7-ethernet: link up (100/FULL) DHCP/BOOTP: Ignoring fragmented reply DHCP/BOOTP: Ignoring fragmented reply DHCP/BOOTP: Ignoring fragmented reply DHCP/BOOTP: Ignoring fragmented reply ., OK IP-Config: Got DHCP answer from 10.251.101.1, my address is 10.251.101.243 IP-Config: Complete: device=eth0, hwaddr=00:0a:35:00:01:22, ipaddr=10.251.101.243, mask=255.255.255.0, gw=10.251.101.1 host=10.251.101.243, domain=cr.ridgerun.com, nis-domain=(none) bootserver=10.251.101.1, rootserver=10.251.101.39, rootpath= nameserver0=188.8.131.52, nameserver1=184.108.40.206 ALSA device list: No soundcards found. VFS: Mounted root (nfs filesystem) on device 0:11. devtmpfs: mounted Freeing unused kernel memory: 184K (c05d5000 - c0603000) Starting System done. Welcome to __________ .__ .___ __________ \______ \|__| __| _/ ____ ____ \______ \ __ __ ____ | _/| | / __ | / ___\ _/ __ \ | _/| | \ / \ | | \| |/ /_/ | / /_/ >\ ___/ | | \| | /| | \ |____|_ /|__|\____ | \___ / \___ >|____|_ /|____/ |___| / \/ \//_____/ \/ \/ \/ Embedded Linux Solutions For further information see: http://www.ridgerun.com Build host: ridgerun-MS-7369 Built by: cavila Build date: Tue, 20 May 2014 10:01:38 -0600 Build tag: zedboard Configuring network interfaces Error while running '/etc/rc.d/S30network'. Starting D-Bus message bus system Starting Dropbear SSH server: dropbear. Starting udev udevd: starting version 182 Please press Enter to activate this console.