- Files adapted from other projects carry both licences: StrongPixelSet.cpp,
SpotExtractorGPU.cu and the four GEMMI-derived structure_refinement files
"GPL-3.0-only AND MPL-2.0"; FFBIDXIndexerCPU.cpp, LMSolver.{h,cpp} and
xds-plugin/plugin.* "GPL-3.0-only AND BSD-3-Clause"; fpga/hls/parallel_stream.h
"CERN-OHL-S-2.0 AND Apache-2.0"; fpga/hls/icmp.cpp and ip_header_checksum.h
(HPCN UAM, with PSI modifications) "CERN-OHL-S-2.0 AND BSD-3-Clause".
- writer/H5FDpoison_sec2.{c,h} and tests/enospc_shim.c: "OR HDF5" is not an
SPDX id; now "OR LicenseRef-HDF5", with the text named (licenses/hdf5.txt).
The poison driver wraps the stock sec2 driver rather than copying it (only
the H5FD_class_t initialiser layout matches H5FDsec2.c), so the files stay
dual-licensed (OR), not derived (AND).
- 151 first-party files without a tag (CMake, shell, Python, frontend, docs
JS, a few C++) get one: GPL-3.0-only, CERN-OHL-S-2.0 for fpga/, fpga/hls/
and fpga/scripts/, with the copyright line of the neighbouring files and the
year the file was added. Generated and vendored code is not touched;
fpga/pcie_driver/postinstall.sh and preuninstall.sh are left untagged, as
they say they are taken from a blog post.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UqXYdJDrM65gxsCn2PrbfK
62 lines
1.7 KiB
Bash
62 lines
1.7 KiB
Bash
#!/bin/bash
|
|
# SPDX-FileCopyrightText: 2023 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
|
|
# SPDX-License-Identifier: CERN-OHL-S-2.0
|
|
|
|
HLS_IP_DIR=$PWD/action/ip
|
|
|
|
rm -rf action
|
|
|
|
# Create directories
|
|
mkdir -p action/hdl
|
|
mkdir -p action/ip
|
|
mkdir -p action/scripts
|
|
|
|
for i in hls/psi_ch*.zip
|
|
do
|
|
x=${i##hls/psi_ch_}
|
|
y=${x%%.zip}
|
|
unzip -qq -d action/ip/$y $i
|
|
done
|
|
|
|
cp ${SRC_DIR}/hdl/*.v action/hdl
|
|
|
|
# Update action type and release level based on jfjoch_fpga.h
|
|
REVISION=`grep "#define JFJOCH_FPGA_REVISION 0x" ${SRC_DIR}/pcie_driver/jfjoch_fpga.h | awk '{print $3}'`
|
|
|
|
MAX_MODULES_FPGA=`grep "#define MAX_MODULES_FPGA " ${SRC_DIR}/pcie_driver/jfjoch_fpga.h |tr -s " " |cut -f3 -d" "`
|
|
FPGA_ROI_COUNT=`grep "#define FPGA_ROI_COUNT" ${SRC_DIR}/pcie_driver/jfjoch_fpga.h |tr -s " " |cut -f3 -d" "`
|
|
|
|
git describe --match=NeVeRmAtCh --always --abbrev=8
|
|
if [ $? -eq 0 ]; then
|
|
GIT_SHA1=`git describe --match=NeVeRmAtCh --always --abbrev=8`
|
|
else
|
|
GIT_SHA1=0
|
|
fi
|
|
|
|
SRC="define JFJOCH_VARIANT 32'h.*"
|
|
DST="define JFJOCH_VARIANT 32'h${VARIANT}"
|
|
sed -i "s/$SRC/$DST/" action/hdl/action_config.v
|
|
|
|
SRC="define GIT_SHA1 32'h.*"
|
|
DST="define GIT_SHA1 32'h${GIT_SHA1}"
|
|
sed -i "s/$SRC/$DST/" action/hdl/action_config.v
|
|
|
|
TIME_EPOCH=`date +%s`
|
|
|
|
SRC="define JFJOCH_SYNTH_TIME 32'd*"
|
|
DST="define JFJOCH_SYNTH_TIME 32'd${TIME_EPOCH}"
|
|
sed -i "s/$SRC/$DST/" action/hdl/action_config.v
|
|
|
|
SRC="define MAX_MODULES_FPGA 32'd.*"
|
|
DST="define MAX_MODULES_FPGA 32'd${MAX_MODULES_FPGA}"
|
|
sed -i "s/$SRC/$DST/" action/hdl/action_config.v
|
|
|
|
SRC="define FPGA_ROI_COUNT 32'd.*"
|
|
DST="define FPGA_ROI_COUNT 32'd${FPGA_ROI_COUNT}"
|
|
sed -i "s/$SRC/$DST/" action/hdl/action_config.v
|
|
|
|
cat <<EOF > action/scripts/pcie_release.tcl
|
|
set pcie_subsystem_id ${VARIANT}
|
|
set pcie_revision ${REVISION}
|
|
EOF
|