Skip to content

Commit 47fab79

Browse files
mvidalpinolJenkins CI
authored andcommitted
Updates
Allow for alpha and beta releases
1 parent 15515bb commit 47fab79

File tree

4 files changed

+61
-34
lines changed

4 files changed

+61
-34
lines changed

Dockerfile

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ ARG RELEASE_TAG
101101
#LIBNUMA
102102
WORKDIR /tmp/work/
103103

104-
ARG numactl_ver=2.0.18
104+
ARG numactl_ver=2.0.19
105105
RUN wget "https://github.com/numactl/numactl/releases/download/v${numactl_ver}/numactl-${numactl_ver}.tar.gz" \
106106
&& tar -zxf numactl-${numactl_ver}.tar.gz \
107107
&& rm numactl-${numactl_ver}.tar.gz
@@ -110,9 +110,6 @@ WORKDIR /tmp/work/numactl-${numactl_ver}
110110

111111
RUN autoreconf -ifv
112112

113-
# We need to patch syscall.c to add arm32 set_mempolicy_home_node syscall number (450)
114-
RUN sed -Ei '144s/(.*)/\1\ \|\|\ defined\(__arm__\)/' syscall.c
115-
116113
#ARM64
117114
RUN ./configure --prefix=$INSTALLATION_PREFIX/arm64/libnuma --host=aarch64-linux-gnu \
118115
&& make install \
@@ -131,12 +128,13 @@ RUN ./configure --prefix=$INSTALLATION_PREFIX/x86_64/libnuma --host=x86_64-linux
131128
#HWLOC
132129
WORKDIR /tmp/work/
133130

134-
ARG hwloc_ver=2.9.3
135-
RUN wget "https://download.open-mpi.org/release/hwloc/v2.9/hwloc-${hwloc_ver}.tar.gz" \
136-
&& tar -zxf hwloc-${hwloc_ver}.tar.gz \
137-
&& rm hwloc-${hwloc_ver}.tar.gz
131+
ARG hwloc_ver_long=2.12.2
132+
ARG hwloc_ver_short=2.12
133+
RUN wget "https://download.open-mpi.org/release/hwloc/v${hwloc_ver_short}/hwloc-${hwloc_ver_long}.tar.gz" \
134+
&& tar -zxf hwloc-${hwloc_ver_long}.tar.gz \
135+
&& rm hwloc-${hwloc_ver_long}.tar.gz
138136

139-
WORKDIR /tmp/work/hwloc-${hwloc_ver}
137+
WORKDIR /tmp/work/hwloc-${hwloc_ver_long}
140138

141139
RUN autoreconf -ifv
142140

@@ -174,10 +172,9 @@ WORKDIR /tmp/work
174172

175173
#ARM64
176174
RUN make \
177-
TARGET=aarch64-linux-gnu \
175+
TARGET_ARCH=arm64 \
178176
PREFIX_TARGET=$INSTALLATION_PREFIX/arm64/ompss-2/${RELEASE_TAG} \
179177
PREFIX_HOST=$INSTALLATION_PREFIX/x86_64/ompss-2/${RELEASE_TAG} \
180-
OVNI_CONFIG_FLAGS="-DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc" \
181178
NANOS6_CONFIG_FLAGS="--with-libnuma=$INSTALLATION_PREFIX/arm64/libnuma --with-symbol-resolution=indirect" \
182179
hwloc_CFLAGS="-I$INSTALLATION_PREFIX/arm64/hwloc/include" \
183180
hwloc_LIBS="-L$INSTALLATION_PREFIX/arm64/hwloc/lib -lhwloc" \
@@ -189,10 +186,9 @@ RUN make \
189186

190187
#ARM32
191188
RUN make \
192-
TARGET=arm-linux-gnueabihf \
189+
TARGET_ARCH=arm32 \
193190
PREFIX_TARGET=$INSTALLATION_PREFIX/arm32/ompss-2/${RELEASE_TAG} \
194191
PREFIX_HOST=$INSTALLATION_PREFIX/x86_64/ompss-2/${RELEASE_TAG} \
195-
OVNI_CONFIG_FLAGS="-DCMAKE_C_COMPILER=arm-linux-gnueabihf-gcc" \
196192
NANOS6_CONFIG_FLAGS="--with-libnuma=$INSTALLATION_PREFIX/arm32/libnuma --with-symbol-resolution=indirect" \
197193
hwloc_CFLAGS="-I$INSTALLATION_PREFIX/arm32/hwloc/include" \
198194
hwloc_LIBS="-L$INSTALLATION_PREFIX/arm32/hwloc/lib -lhwloc" \

Makefile

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,18 @@ ifndef BUILDCPUS
44
BUILDCPUS := $(shell nproc)
55
endif
66

7-
ifndef TARGET
8-
TARGET := $(gcc -dumpmachine)
7+
ifndef TARGET_ARCH
8+
TARGET := $(shell gcc -dumpmachine)
9+
else
10+
ifeq ($(TARGET_ARCH),arm64)
11+
TARGET := aarch64-linux-gnu
12+
export CROSS_COMPILE := $(TARGET)-
13+
else
14+
ifeq ($(TARGET_ARCH),arm32)
15+
TARGET := arm-linux-gnueabihf
16+
export CROSS_COMPILE := $(TARGET)-
17+
endif
18+
endif
919
endif
1020

1121
ifndef PLATFORM
@@ -20,7 +30,17 @@ ifndef XTASKS_PLATFORM
2030
XTASKS_PLATFORM := $(PLATFORM)
2131
endif
2232

23-
export CROSS_COMPILE := $(TARGET)-
33+
ifndef PREFIX
34+
PREFIX := /opt/bsc
35+
endif
36+
37+
ifndef PREFIX_TARGET
38+
PREFIX_TARGET := $(PREFIX)
39+
endif
40+
41+
ifndef PREFIX_HOST
42+
PREFIX_HOST := $(PREFIX)
43+
endif
2444

2545
all: xdma-install xtasks-install ovni-install nanos6-install llvm-install ait-install envscript-install
2646

@@ -46,7 +66,7 @@ ovni-config:
4666
cmake \
4767
-DCMAKE_INSTALL_PREFIX=$(PREFIX_TARGET)/libovni \
4868
-DUSE_MPI=OFF \
49-
$(OVNI_CONFIG_FLAGS) \
69+
-DCMAKE_C_COMPILER=$(CROSS_COMPILE)gcc \
5070
../ovni
5171

5272
ovni-build: ovni-config
@@ -116,9 +136,17 @@ llvm-install: llvm-build
116136
.PHONY: ait-install
117137

118138
ait-install:
139+
ifeq ($(AIT_EXTRA_CONFIG),offline)
140+
cd ait; \
141+
export DEB_PYTHON_INSTALL_LAYOUT=deb_system; \
142+
rm -rf $(PREFIX_HOST)/ait; \
143+
python3 ./setup.py bdist_wheel; \
144+
python3 -m pip install ./dist/ait_bsc-*.whl --no-index -t $(PREFIX_HOST)/ait
145+
else
119146
export DEB_PYTHON_INSTALL_LAYOUT=deb_system; \
120147
rm -rf $(PREFIX_HOST)/ait; \
121148
python3 -m pip install ./ait -t $(PREFIX_HOST)/ait
149+
endif
122150

123151
.PHONY: envscript-install
124152

@@ -153,8 +181,8 @@ help:
153181
@echo " PLATFORM Fallback board platform that xtasks and xdma backends will target if no specific one has been defined (e.g. zynq, qdma) [def: qdma]"
154182
@echo " XDMA_PLATFORM Board platform that xdma backend will target (e.g. zynq, qdma) [def: PLATFORM]"
155183
@echo " XTASKS_PLATFORM Board platform that xtasks backend will target (e.g. zynq, qdma) [def: PLATFORM]"
156-
@echo " PREFIX_HOST Installation prefix for the host tools (e.g. llvm, ait) [def: /]"
157-
@echo " PREFIX_TARGET Installation prefix for the target tools (e.g. nanos6, libxdma) [def: /]"
184+
@echo " PREFIX_HOST Installation prefix for the host tools (e.g. llvm, ait) [def: /opt/bsc]"
185+
@echo " PREFIX_TARGET Installation prefix for the target tools (e.g. nanos6, libxdma) [def: /opt/bsc]"
158186
@echo " BUILDCPUS Number of processes used for building [def: nproc]"
159187
@echo "Targets:"
160188
@echo " xdma Build xdma library"

dockerImageFiles/example/README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,23 @@ The example comes with a Makefile that allows easily building the bitstream (and
1111
##### Environment setup
1212

1313
The environment variables that we may need to set up for the compilation process are:
14-
* `CROSS_COMPILE` [Def: ""] Cross compiler prefix. The docker image has the tool-chain supporting:
15-
* `aarch64-linux-gnu-` (ARM 64bits).
16-
* `arm-linux-gnueabihf-` (ARM 32bits).
17-
* `CFLAGS` [Def: ""] Compiler flags.
18-
* `LDFLAGS` [Def: ""] Linker flags.
19-
* `PETALINUX_BUILD` [Def: ""] Petalinux project directory (only needed when building boot files)
2014

21-
**NOTE: Do not source petalinux and/or vivado settings as they may break toolchain configuration.**
15+
* `CROSS_COMPILE` [Def: ""] Cross compiler prefix. The docker image supports the following cross-compilers:
16+
* `aarch64-linux-gnu-` (ARM 64bits).
17+
* `arm-linux-gnueabihf-` (ARM 32bits).
18+
* `NANOS6_HOME` [Def: ""] Path to Nanos6 library to be used during compilation. The docker image has the following Nanos6 installations:
19+
* `/opt/bsc/x86_64/ompss-2/RELEASE_TAG/nanos6/` (Will be used by default)
20+
* `/opt/bsc/arm64/ompss-2/RELEASE_TAG/nanos6/`
21+
* `/opt/bsc/arm32/ompss-2/RELEASE_TAG/nanos6/`
22+
* `CFLAGS` [Def: ""] Compiler flags.
23+
* `LDFLAGS` [Def: ""] Linker flags.
24+
* `PETALINUX_BUILD` [Def: ""] Petalinux project directory (only needed when building boot files)
2225

2326
For example, we will set the following environment variables to build the example application for the ZCU102:
2427

2528
```bash
2629
export CROSS_COMPILE=aarch64-linux-gnu-
30+
export NANOS6_HOME=/opt/bsc/arm64/ompss-2/RELEASE_TAG/nanos6/
2731
```
2832

2933
##### Bitstream
@@ -48,8 +52,6 @@ Assuming that Xilinx software version 2021.1 is available in `/opt/xilinx` folde
4852
export PATH=$PATH:/opt/xilinx/Vivado/2021.1/bin
4953
```
5054

51-
**NOTE: Do not source vivado settings as it may break the toolchain configuration.**
52-
5355
##### Boot Files
5456

5557
The Makefile has a target to build the boot once the bitstream has been created.
@@ -74,8 +76,9 @@ make dotprodut-p dotproduct-d dotproduct-i
7476

7577
We should copy the files to the board and after that we can proceed with the following steps.
7678
The files should include at least:
77-
* dotproduct.bin (bitstream).
78-
* dotproduct-d, dotproduct-i, dotproduct-p (executables).
79+
80+
* dotproduct.bin (bitstream).
81+
* dotproduct-d, dotproduct-i, dotproduct-p (executables).
7982

8083
##### Load the bitstream
8184

scripts/commit_release.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ VERSION=$1
99
#NOTE: Ensure running in the repo root dir
1010
pushd $(dirname ${BASH_SOURCE[0]})/../ >/dev/null
1111

12-
CHANGELOG_VER=$(head -n1 Changelog.md | grep -oE "[0-9.]*(-rc[0-9]*)?")
12+
CHANGELOG_VER=$(head -n1 Changelog.md | grep -oE "[0-9.]*(-alpha|-beta|-rc[0-9]*)?")
1313
if [ "$CHANGELOG_VER" != "$VERSION" ] ; then
1414
echo -e "ERROR:\tThe changelog version does not match the release version"
1515
column -t -s ':' <<< "
@@ -25,7 +25,7 @@ pushd $(dirname ${BASH_SOURCE[0]})/../ >/dev/null
2525
fi
2626

2727
# Set user-guide URL
28-
sed -i "s/\(user-guide-\)\([0-9]\|[.]\)*\(-rc[0-9]*\)\?/\1${VERSION}/" README.md
28+
sed -i "s/\(user-guide-\)\([0-9]\|[.]\)*\(-alpha\|-beta\|-rc[0-9]*\)\?/\1${VERSION}/" README.md
2929

3030
# Enable the cache mode for credentials in meta-repository and every submodule
3131
git config credential.helper cache
@@ -38,8 +38,8 @@ pushd $(dirname ${BASH_SOURCE[0]})/../ >/dev/null
3838
#git submodule foreach git push origin ompss-2-at-fpga-release/${VERSION}
3939
#git submodule foreach git credential-cache exit
4040

41-
git push origin --delete $(git tag --list '[0-9]\.[0-9]\.[0-9]-rc[0-9]*')
42-
git tag --delete $(git tag --list '[0-9]\.[0-9]\.[0-9]-rc[0-9]*')
41+
git tag --list '[0-9]\.[0-9]\.[0-9]-rc[0-9]*' | xargs --no-run-if-empty git push origin --delete
42+
git tag --list '[0-9]\.[0-9]\.[0-9]-rc[0-9]*' | xargs --no-run-if-empty git tag --delete
4343
fi
4444

4545
# Stash the updated subrepos and commit the changes + create the tag

0 commit comments

Comments
 (0)