diff --git a/Makefile b/Makefile index 1a7731d6..42f76046 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ CROSS_COMPILE ?= arm-xilinx-linux-gnueabi- NCORES = $(shell grep -c ^processor /proc/cpuinfo) -VIVADO_SETTINGS ?= /opt/Xilinx/Vivado/2017.4/settings64.sh +VIVADO_SETTINGS ?= /opt/Xilinx/Vivado/2018.2/settings64.sh VSUBDIRS = hdl buildroot linux u-boot-xlnx VERSION=$(shell git describe --abbrev=4 --dirty --always --tags) @@ -107,6 +107,7 @@ build/$(TARGET).itb: u-boot-xlnx/tools/mkimage build/zImage build/rootfs.cpio.gz build/system_top.hdf: | build ifeq (1, ${HAVE_VIVADO}) bash -c "source $(VIVADO_SETTINGS) && make -C hdl/projects/$(TARGET) && cp hdl/projects/$(TARGET)/$(TARGET).sdk/system_top.hdf $@" + unzip -l $@ | grep -q ps7_init || cp hdl/projects/$(TARGET)/$(TARGET).srcs/sources_1/bd/system/ip/system_sys_ps7_0/ps7_init* build/ else ifneq ($(HDF_URL),) wget -T 3 -t 1 -N --directory-prefix build $(HDF_URL) diff --git a/README.md b/README.md index 9b34ef91..5ab4d3fd 100644 --- a/README.md +++ b/README.md @@ -6,58 +6,34 @@ Latest binary Release : [![GitHub release](https://img.shields.io/github/release [Instructions from the Wiki: Building the image](https://wiki.analog.com/university/tools/pluto/building_the_image) * Build Instructions - ```bash - sudo apt-get install git build-essential fakeroot libncurses5-dev libssl-dev ccache - sudo apt-get install dfu-util u-boot-tools device-tree-compiler libssl1.0-dev mtools - git clone --recursive https://github.com/analogdevicesinc/plutosdr-fw.git - cd plutosdr-fw - export CROSS_COMPILE=arm-xilinx-linux-gnueabi- - export PATH=$PATH:/opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin - export VIVADO_SETTINGS=/opt/Xilinx/Vivado/2017.4/settings64.sh - make - - ``` +```bash + sudo apt-get install git build-essential fakeroot libncurses5-dev libssl-dev ccache + sudo apt-get install dfu-util u-boot-tools device-tree-compiler libssl1.0-dev mtools + git clone --recursive https://github.com/analogdevicesinc/plutosdr-fw.git + cd plutosdr-fw + export CROSS_COMPILE=arm-linux-gnueabihf- + export PATH=$PATH:/opt/Xilinx/SDK/2018.2/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin + export VIVADO_SETTINGS=/opt/Xilinx/Vivado/2018.2/settings64.sh + make - The project may build also using Vivado 2017.2, 2016.4 or 2016.2. - However 2017.4 is the current tested FPGA systhesis toolchain. - For comatibility reasons with existing targeting workflows we continue to - use the arm-xilinx-linux-gnueabi-gcc toolchain íncluded in the SDK 2017.2. +``` + +The project may build also using Vivado 2017.4, 2017.2, 2016.4 or 2016.2. +However 2018.2 is the current tested FPGA systhesis toolchain. +In the v0.30 release we swithched to the arm-linux-gnueabihf-gcc hard-float toolchain. - If you want to use the arm-linux-gnueabihf-gcc hard-float toolchain included in SDK 2017.4. - Following variables should be exported: +If you want to use the former arm-xilinx-linux-gnueabi-gcc soft-float toolchain included in SDK 2017.2. +Following variables should be exported: ```bash - export CROSS_COMPILE=arm-linux-gnueabihf- - export PATH=$PATH:/opt/Xilinx/SDK/2017.4/gnu/aarch32/lin/gcc-arm-linux-gnueabi/bin + export CROSS_COMPILE=arm-xilinx-linux-gnueabi- + export PATH=$PATH:/opt/Xilinx/SDK/2017.2/gnu/arm/lin/bin + export VIVADO_SETTINGS=/opt/Xilinx/Vivado/2017.4/settings64.sh ``` - This patch must be applied to the buildroot zynq_pluto_defconfig. - - ```diff - diff --git a/configs/zynq_pluto_defconfig b/configs/zynq_pluto_defconfig - index 483ddbe..21cd959 100644 - --- a/configs/zynq_pluto_defconfig - +++ b/configs/zynq_pluto_defconfig - @@ -1,13 +1,13 @@ - BR2_arm=y - BR2_cortex_a9=y - BR2_ARM_ENABLE_NEON=y - +BR2_ARM_ENABLE_VFP=y - BR2_ARM_FPU_NEON=y - BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y - -BR2_TOOLCHAIN_EXTERNAL_PATH="" - -BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-xilinx-linux-gnueabi" - -BR2_TOOLCHAIN_EXTERNAL_GCC_4_9=y - -BR2_TOOLCHAIN_EXTERNAL_HEADERS_3_19=y - +BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-linux-gnueabihf" - +BR2_TOOLCHAIN_EXTERNAL_GCC_6=y - +BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_9=y - BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y - BR2_TOOLCHAIN_EXTERNAL_CXX=y - BR2_TARGET_GENERIC_HOSTNAME="pluto" - ``` +And you need to revert this patch: +https://github.com/analogdevicesinc/buildroot/commit/fea212afc7dc0ee530762a1921d9ae8180778ffa If you receive an error similar to the following: diff --git a/buildroot b/buildroot index 04dceb23..fea212af 160000 --- a/buildroot +++ b/buildroot @@ -1 +1 @@ -Subproject commit 04dceb23760357c2daa2c2b90d24fdaa45637427 +Subproject commit fea212afc7dc0ee530762a1921d9ae8180778ffa diff --git a/hdl b/hdl index d79ca235..401395cd 160000 --- a/hdl +++ b/hdl @@ -1 +1 @@ -Subproject commit d79ca235280afff8cc1051f3d46c0b9093343ffa +Subproject commit 401395cdd1980827fd1f7043ce1a10770f666c64 diff --git a/linux b/linux index 2398d50f..0272a4d0 160000 --- a/linux +++ b/linux @@ -1 +1 @@ -Subproject commit 2398d50f8e88206e2c5b3c498f00e480f108b34a +Subproject commit 0272a4d0c7fc16c791a5773702d1571f8854513e diff --git a/scripts/create_fsbl_project.tcl b/scripts/create_fsbl_project.tcl index 09cc8825..f507e49e 100644 --- a/scripts/create_fsbl_project.tcl +++ b/scripts/create_fsbl_project.tcl @@ -3,6 +3,14 @@ set cpu_name [lindex [hsi get_cells -filter {IP_TYPE==PROCESSOR}] 0] sdk setws ./build/sdk sdk createhw -name hw_0 -hwspec build/system_top.hdf + +# Workaround for broken write_sysdev in vivado 2018.2 +catch { + set copyfiles [glob ./build/ps7_init*] + if {[llength $copyfiles]} { + file copy {*}$copyfiles ./build/sdk/hw_0/ + } +} sdk createapp -name fsbl -hwproject hw_0 -proc $cpu_name -os standalone -lang C -app {Zynq FSBL} configapp -app fsbl build-config release sdk projects -build -type all diff --git a/u-boot-xlnx b/u-boot-xlnx index f5f001e6..89d07540 160000 --- a/u-boot-xlnx +++ b/u-boot-xlnx @@ -1 +1 @@ -Subproject commit f5f001e60ea92e6a57aea3259e3bd1d9235a5af1 +Subproject commit 89d07540f9d489cc63460df5636174357af0a38f