Sunday 29 October 2017

Building the PlutoSDR Firmware Image

Building the PlutoSDR Firmware Image

This is done on a Ubuntu 17.10

Attention: At the moment the build fails under Ubuntu 17.10, because of the flex package.

>>> host-flex 2.6.4 Building
PATH="/home/dimce/src/plutosdr-bsp/buildroot/output/host/bin:/home/dimce/src/plutosdr-bsp/buildroot/output/host/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin" PKG_CONFIG="/home/dimce/src/plutosdr-bsp/buildroot/output/host/bin/pkg-config" PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1 PKG_CONFIG_ALLOW_SYSTEM_LIBS=1 PKG_CONFIG_LIBDIR="/home/dimce/src/plutosdr-bsp/buildroot/output/host/lib/pkgconfig:/home/dimce/src/plutosdr-bsp/buildroot/output/host/share/pkgconfig"  /usr/bin/make -j9  -C /home/dimce/src/plutosdr-bsp/buildroot/output/build/host-flex-2.6.4/
make[2]: Entering directory '/home/dimce/src/plutosdr-bsp/buildroot/output/build/host-flex-2.6.4'
Making all in src
make[3]: Entering directory '/home/dimce/src/plutosdr-bsp/buildroot/output/build/host-flex-2.6.4/src'
/usr/bin/make  all-am
make[4]: Entering directory '/home/dimce/src/plutosdr-bsp/buildroot/output/build/host-flex-2.6.4/src'
./stage1flex   -o stage1scan.c ./scan.l
Makefile:1688: recipe for target 'stage1scan.c' failed
make[4]: *** [stage1scan.c] Segmentation fault (core dumped)
make[4]: Leaving directory '/home/dimce/src/plutosdr-bsp/buildroot/output/build/host-flex-2.6.4/src'
Makefile:538: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/dimce/src/plutosdr-bsp/buildroot/output/build/host-flex-2.6.4/src'
Makefile:526: recipe for target 'all-recursive' failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/dimce/src/plutosdr-bsp/buildroot/output/build/host-flex-2.6.4'
package/pkg-generic.mk:227: recipe for target '/home/dimce/src/plutosdr-bsp/buildroot/output/build/host-flex-2.6.4/.stamp_built' failed
make[1]: *** [/home/dimce/src/plutosdr-bsp/buildroot/output/build/host-flex-2.6.4/.stamp_built] Error 2
make[1]: Leaving directory '/home/dimce/src/plutosdr-bsp/buildroot'
Makefile:36: recipe for target 'buildroot/output/images/rootfs.cpio.gz' failed
make: *** [buildroot/output/images/rootfs.cpio.gz] Error 2

Xilinx Toolchain

Download the latest version (2017.2 at the moment!) of Vivado which will be used for writing/editing/modelising/whatever all the files. You need to download a Full Installer, whenever it's a Web installer or not (depends of the amount of free space you have). You can download it there.


Download a WebPack License on the Licensing Site (From "node-locked" part).


Installing Vivado

Prepare the install directory

$ sudo mkdir /opt/Xilinx
$ sudo chown <user-name> /opt/Xilinx
$ chmod u+rwX /opt/Xilinx

Go to the folder where you downloaded the installer

$ chmod +x ./Xilinx_Vivado_SDK_2017.2_0616_1_Lin64.bin
$ ./Xilinx_Vivado_SDK_2017.2_0616_1_Lin64.bin


Follow the installation wizard and don’t forget to select “Software Development Kit” on the installation customization page. (Vivado System Edition + SDK)




If you have to choose which boards you want to install, you can choose to install everything, it's the best way for not forgetting anything... Or choose to install all the tools and only the Zynq 7 board.
If not, it's just perfect isn't it?

Import your license

Launching Vivado

Source the architecture shell file:

$ source /opt/Xilinx/Vivado/2017.2/settings64.sh

Then launch it:

$ ./bin/vivado

Linux development host


Prepare the host

$ sudo apt-get install git make u-boot-tools build-essential fakeroot libncurses5-dev libssl-dev ccache dfu-util mtools util-linux

Genimage tool


Get and install from here.

Install additional package:

$ sudo apt-get install libconfuse-common libconfuse-dev libconfuse1
1. Download
2. Extract

$ ./configure
$ make
$ sudo make install

Build Instructions

cd src
git clone https://github.com/PlutoSDR/plutosdr-bsp.git
cd plutosdr-bsp
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
export PATH=$PATH:/opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin
make git-update-all
make update
make


Updating your local repository

make git-pull

Updating buildroot config (zynq_pluto_defconfig file)

make update-buildroot-config

Updating buildroot third-party packages (packages directory)

make update-buildroot-packages





No comments:

Post a Comment