Wiki

This version (17 Nov 2022 13:59) was approved by Raluca Chis.The Previously approved version (11 Nov 2022 13:43) is available.Diff

Linux on the Xilinx KC705 Kintex™-7 FPGA development Board

Analog Devices uses six designations to inform our customers where a semiconductor product is in its life cycle. From emerging innovations to products which have been in production for twenty years, we understand that insight into life cycle status is important. Device life cycles are tracked on their individual product pages on analog.com, and should always be consulted before making any design decisions.

This particular articl/edocument/design has been retired or deprecated, which means it is no longer maintained or actively updated, even though the devices themselves may be Recommended for New Designs or in Production. This page is here for historical/reference purposes only.

This guide provides some step-by-step instructions on how to build a Microblaze Linux Kernel image for the AD-FMCOMMS1 FMC board connected to an KC705.

Required Software

Latest released files can be downloaded from here

Build Linux - Step by Step instructions

Get Microblaze Little Endian Toolchain from Xilinx

The Microblaze Little Endian Toolchain can be found in the Xilinx Vitis install folder:

For 64-bit hosts use:
/opt/Xilinx/Vitis/2021.2/gnu/microblaze/linux_toolchain/lin64_le/bin

Get Linux kernel source

This specifies any shell prompt running on the target or development host

Dave@HAL9000:~/fmcomms1$ git clone https://github.com/analogdevicesinc/linux.git
Cloning into 'linux'...
remote: Counting objects: 2757163, done.
remote: Compressing objects: 100% (495484/495484), done.
remote: Total 2757163 (delta 2296596), reused 2687337 (delta 2234506)
Receiving objects: 100% (2757163/2757163), 782.04 MiB | 1.39 MiB/s, done.
Resolving deltas: 100% (2296596/2296596), done.
Dave@HAL9000:~/fmcomms1$

Checkout master branch

This specifies any shell prompt running on the target or development host

Dave@HAL9000:~/fmcomms1$ cd linux/
Dave@HAL9000:~/fmcomms1/linux$ git checkout master
Checking out files: 100% (16412/16412), done.
Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'
Dave@HAL9000:~/fmcomms1/linux$

Set Environmental Variables

This specifies any shell prompt running on the target or development host

Dave@HAL9000:~/fmcomms1/linux$ export PATH=/opt/Xilinx/Vitis/2021.2/gnu/microblaze/linux_toolchain/lin64_le/bin:$PATH
Dave@HAL9000:~/fmcomms1/linux$ export ARCH=microblaze
Dave@HAL9000:~/fmcomms1/linux$ export CROSS_COMPILE=microblazeel-xilinx-linux-gnu-

Configure Kernel for KC705 XCOMM platform (aka FMCOMMS1)

This specifies any shell prompt running on the target or development host

Dave@HAL9000:~/fmcomms1/linux$ make adi_mb_defconfig
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
#
# configuration written to .config
#
Dave@HAL9000:~/fmcomms1/linux$

Get Root File-System

Root File-system (initramfs) rootfs.cpio.gz must be placed in the root of your kernel tree.

This specifies any shell prompt running on the target or development host

Dave@HAL9000:~/linux$ wget http://wiki.analog.com/_media/resources/tools-software/linux-drivers/platforms/rootfs.cpio.gz
--2014-11-21 14:27:54--  http://wiki.analog.com/_media/resources/tools-software/linux-drivers/platforms/rootfs.cpio.gz
Resolving wiki.analog.com (wiki.analog.com)... 195.170.124.184
Connecting to wiki.analog.com (wiki.analog.com)|195.170.124.184|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3006465 (2.9M) [application/octet-stream]
Saving to: `rootfs.cpio.gz'

100%[===================================================================================================================================================================>] 3,006,465   75.1K/s   in 37s     

2014-11-21 14:28:32 (79.2 KB/s) - `rootfs.cpio.gz' saved [3006465/3006465]

Dave@HAL9000:~/linux$

Build kernel

The result of building the kernel is an elf file in arch/microblaze/boot named simpleImage.<dts file name> based on the dts specified.

The build process for the kernel searches in the arch/microblaze/boot/dts directory for a specified device tree file and then builds the device tree into the kernel image.

The following command shows the general format for the build target name. Note that the <dts file name> does not include the file extension “.dts”.

Dave@HAL9000:~/linux$ make simpleImage.<dts file name>

To see what device-trees for the different FPGA carrier and FMC module combination exist type:

Dave@HAL9000:~/linux$ ls -l arch/microblaze/boot/dts

This specifies any shell prompt running on the target or development host

Dave@HAL9000:~/fmcomms1/linux$ make -j5 simpleImage.kc705_fmcomms1
  CHK     include/linux/version.h
  UPD     include/linux/version.h
  HOSTCC  scripts/kallsyms
  HOSTCC  scripts/bin2c
  HOSTCC  scripts/dtc/checks.o
  CC      scripts/mod/empty.o
[--snip--]
  CP      vmlinux arch/microblaze/boot/simpleImage.kc705_fmcomms1.unstrip
  OBJCOPY arch/microblaze/boot/simpleImage.kc705_fmcomms1
  UIMAGE  arch/microblaze/boot/simpleImage.kc705_fmcomms1.ub
Image Name:   Linux-3.5.0-rc4-00817-gbf1afb2
Created:      Tue Dec 18 16:50:37 2012
Image Type:   MicroBlaze Linux Kernel Image (uncompressed)
Data Size:    6178556 Bytes = 6033.75 kB = 5.89 MB
Load Address: c0000000
Entry Point:  c0000000
  STRIP   arch/microblaze/boot/simpleImage.kc705_fmcomms1
Kernel: arch/microblaze/boot/simpleImage.kc705_fmcomms1is ready  (#1)
Dave@HAL9000:~/devel/git/staging_3$

The newly created Linux ELF file can now be loaded using the Xilinx ISE Microprocessor Debugger (XMD). Further instructions can be found here:

AD-FMCOMMS1-EBZ KC705 Quick Start Guide

More information

resources/eval/user-guides/ad-fmcomms1-ebz/software/linux/microblaze_kc705.txt · Last modified: 15 Nov 2022 16:06 by Raluca Chis