Skip to content
This repository was archived by the owner on Feb 2, 2021. It is now read-only.

Commit fff11e4

Browse files
committed
General fixes for some 2017.4 BOOT.BIN generation
Signed-off-by: Travis Collins <travis.collins@analog.com>
1 parent 85bf175 commit fff11e4

File tree

23 files changed

+337
-18
lines changed

23 files changed

+337
-18
lines changed

+adi/Version.m

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
classdef Version
2+
%Version
3+
% BSP Version information
4+
properties(Constant)
5+
HDL = 'hdl_2018_r1';
6+
Vivado = '2017.4.1';
7+
MATLAB = 'R2018b';
8+
Release = '18.2';
9+
end
10+
properties(Dependent)
11+
VivadoShort
12+
end
13+
14+
methods
15+
function value = get.VivadoShort(obj)
16+
value = obj.Vivado(1:6);
17+
end
18+
end
19+
end
20+

.gitlab-ci.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,24 @@ test_installer:2018_R1_Installer:
7878
reports:
7979
junit: test/BSPTestResults.xml
8080

81+
# Test weekly fully sythesized design
82+
test:Synthesize:
83+
when: manual
84+
tags:
85+
- matlab
86+
- vivado
87+
stage: test
88+
dependencies:
89+
- build:2018_R1
90+
script:
91+
- ./CI/scripts/dockermake test_synth
92+
artifacts:
93+
when: always
94+
name: "$CI_COMMIT_REF_NAME"
95+
paths:
96+
- test/
97+
- Report.pdf
98+
8199
# Test streaming interfaces with hardware
82100
test_hardware:Streaming_Hardware:
83101
tags:

CI/projects/adrv9371x/zc706/system_project_rxtx.tcl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ adi_project_files adrv9371x_zc706 [list \
1010
"system_top.v" \
1111
"system_constr.xdc"\
1212
"$ad_hdl_dir/library/xilinx/common/ad_iobuf.v" \
13+
"$ad_hdl_dir/projects/common/zc706/zc706_plddr3_constr.xdc" \
1314
"$ad_hdl_dir/projects/common/zc706/zc706_system_constr.xdc" ]
1415

1516
adi_project_run adrv9371x_zc706

CI/projects/common/boot/bl31.elf

95.5 KB
Binary file not shown.

CI/projects/common/boot/zynq.bif

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
the_ROM_image:
2+
{
3+
[bootloader]./fsbl.elf
4+
./system_top.bit
5+
./u-boot.elf
6+
}

CI/projects/common/boot/zynqmp.bif

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
the_ROM_image:
2+
{
3+
[fsbl_config] a53_x64
4+
[bootloader] ./fsbl.elf
5+
[pmufw_image] ./pmufw.elf
6+
[destination_device=pl] ./system_top.bit
7+
[destination_cpu=a53-0,exception_level=el-3,trustzone] ./bl31.elf
8+
[destination_cpu=a53-0,exception_level=el-2] ./u-boot-zcu.elf
9+
}

CI/projects/scripts/fixmake.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
grep "CC_FLAGS :=" pmufw/Makefile | grep -e "-Os" || sed -i '/-mxl-soft-mul/ s/$/ -Os -flto -ffat-lto-objects/' pmufw/Makefile
2+
cd pmufw
3+
make

CI/projects/scripts/fsbl_build.tcl

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2+
if { $argc != 3 } {
3+
set fpga_board "ZC706"
4+
} else {
5+
set fpga_board [lindex $argv 1]
6+
}
7+
puts "==========="
8+
puts $fpga_board
9+
puts "==========="
10+
111
set cdir [pwd]
212
set sdk_loc $cdir/vivado_prj.sdk
313

@@ -6,9 +16,26 @@ hsi open_hw_design $sdk_loc/system_top.hdf
616
set cpu_name [lindex [hsi get_cells -filter {IP_TYPE==PROCESSOR}] 0]
717
sdk set_workspace $sdk_loc
818
sdk create_hw_project -name hw_0 -hwspec $sdk_loc/system_top.hdf
9-
sdk create_app_project -name fsbl -hwproject hw_0 -proc $cpu_name -os standalone -lang C -app {Zynq FSBL}
19+
20+
# Create project
21+
if {$fpga_board eq "ZCU102"} {
22+
sdk create_app_project -name fsbl -hwproject hw_0 -proc $cpu_name -os standalone -lang C -app {Zynq MP FSBL}
23+
} else {
24+
sdk create_app_project -name fsbl -hwproject hw_0 -proc $cpu_name -os standalone -lang C -app {Zynq FSBL}
25+
}
26+
1027
sdk configapp -app fsbl build-config release
1128
sdk build_project -type all
1229

30+
# Collect necessary files
31+
file copy -force $cdir/projects/common/boot/zynq.bif $cdir/boot/zynq.bif
32+
file copy -force $sdk_loc/fsbl/Release/fsbl.elf $cdir/boot/fsbl.elf
33+
file copy -force $sdk_loc/hw_0/system_top.bit $cdir/boot/system_top.bit
34+
cd $cdir/boot
35+
1336
# Create the BOOT.bin
37+
if {$fpga_board eq "ZCU102"} {
38+
exec bootgen -image $cdir/boot/zynqmp.bif -w -o i $cdir/boot/BOOT.BIN
39+
} else {
1440
exec bootgen -image $cdir/boot/zynq.bif -w -o i $cdir/boot/BOOT.BIN
41+
}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
3+
### Calling script must have system_top.hdf u-boot.elf
4+
5+
6+
set cdir [pwd]
7+
set sdk_loc $cdir/vivado_prj.sdk
8+
9+
### Create fsbl
10+
hsi open_hw_design $sdk_loc/system_top.hdf
11+
set cpu_name [lindex [hsi get_cells -filter {IP_TYPE==PROCESSOR}] 0]
12+
sdk setws $sdk_loc
13+
sdk createhw -name hw_0 -hwspec $sdk_loc/system_top.hdf
14+
sdk createapp -name fsbl -hwproject hw_0 -proc $cpu_name -os standalone -lang C -app {Zynq FSBL}
15+
configapp -app fsbl build-config release
16+
sdk projects -build -type all
17+
18+
### Copy common zynq.bif file
19+
file copy -force $cdir/projects/common/boot/zynq.bif $cdir/boot/zynq.bif
20+
21+
### Copy fsbl and system_top.bit into the output folder
22+
file copy -force $sdk_loc/fsbl/Release/fsbl.elf $cdir/boot/fsbl.elf
23+
file copy -force $sdk_loc/hw_0/system_top.bit $cdir/boot/system_top.bit
24+
25+
### Build BOOT.BIN
26+
cd $cdir/boot
27+
exec bootgen -arch zynq -image zynq.bif -o BOOT.BIN -w
28+
exit
29+

0 commit comments

Comments
 (0)