Zynq

From HW wiki
Jump to: navigation, search

This page applies mostly to Microzed board and to Microzed with our MZ_APO extension board.

  • Toolchain for Debian or Ubuntu
echo "deb http://debian.pengutronix.de/debian/ sid main contrib non-free" >/etc/apt/sources.list.d/pengutronix.list
aptitude update
aptitude install oselas.toolchain-2014.12.2-arm-cortexa8-linux-gnueabihf-gcc-4.9.2-glibc-2.20-binutils-2.24-kernel-3.16-sanitized

Build kernel

mkdir zynq
git clone git://rtime.felk.cvut.cz/zynq/linux-build.git
cd linux-build
git submodule update --init

Check that toolchain location matches CROSS_COMPILE variable in build/xlnx_4.0.8-rt6/linux/GNUmakefile. Then invoke

cd build/xlnx_4.0.8-rt6/linux/
make

U-boot arguments for MicroZed board

bootargs=root=/dev/mmcblk0p2 rw console=ttyPS1,115200 earlyprintk

Install Debian ARMhf distribution to the media on x86 host with use of chroot and qemu

Preparation of FPGA configuration files for direct FPGA configuration by Linux or U-boot requires to prepare system.bif:

all:
{
system.bit
}

then bootgen is used to prepare binary file

bootgen -image system.bif -w -process_bitstream bin

Runtime FPGA reconfiguration

cat system.bit.bin > /dev/xdevcfg

Debian Linux Install

Debootstrap on x86 system

Install

apt-get install binfmt-support qemu qemu-user-static debootstrap

Create directory for target system

mkdir debian_armhf
debootstrap --arch=armhf --foreign --include=debian-keyring,mc,libc6-de,libstdc ++6,busybox,aptitude jessie debian-armhf/ ftp://ftp.cz.debian.org/debian/

Install static version of QEMU which is able to interpret target architecture userspace programs

cp /usr/bin/qemu-arm-static debian_armhf/usr/bin

Finish the second stage of deboostrap

LC_ALL=C LANGUAGE=C LANG=C chroot debian_armhf /debootstrap/debootstrap --second-stage
LC_ALL=C LANGUAGE=C LANG=C chroot debian_armhf dpkg --configure -a

Booting VxWorks

In U-Boot:

dhcp
tftpboot 0x1000000 /zynq/vxWorks
setenv bootaddr 0x101100
setenv bootdev gem(0,0)
bootvx 0x1000000