Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC ADC 100M 14b 4cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC ADC 100M 14b 4cha
Commits
c2071d71
Commit
c2071d71
authored
Jul 02, 2021
by
Federico Vaga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/cicd' into develop
parents
869e65b2
5e3b20b6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
54 deletions
+66
-54
.gitlab-ci.yml
.gitlab-ci.yml
+54
-42
fa-calibration.c
software/kernel/fa-calibration.c
+1
-1
fa-core.c
software/kernel/fa-core.c
+0
-1
fau-calibration.c
software/tools/fau-calibration.c
+11
-10
No files found.
.gitlab-ci.yml
View file @
c2071d71
...
...
@@ -3,20 +3,9 @@
#
# SPDX-License-Identifier: CC0-1.0
---
variables
:
KOJI_TARGET
:
'
ohwr7'
KOJI_DISTTAG
:
'
.el7.cern'
DIST_PATH
:
distribution
BUILD_PATH
:
distribution/build
stages
:
-
static-analysis
-
build
-
dkms
-
srpm
-
kscratch
-
kbuild
reuse
:
stage
:
static-analysis
...
...
@@ -28,47 +17,70 @@ reuse:
cppcheck
:
stage
:
static-analysis
image
:
name
:
gitlab-registry.cern.ch/coht/common-containers/static-analysis:latest
script
:
-
yum install -y cppcheck
-
make -C software cppcheck
build
:
documentation
:
stage
:
build
image
:
name
:
gitlab-registry.cern.ch/coht/common-containers/documentation:latest
script
:
-
yum install -y kernel-deve
l
-
LINUX=/usr/src/kernels/*/ make -C softwar
e
-
make -C doc htm
l
allow_failure
:
tru
e
build_dkms_rpm
:
stage
:
dkms
script
:
-
yum install -y dkms
-
make -C distribution dkms-rpm
.script_fetch_kernel_dep
:
&script_fetch_kernel_dep
-
git clone --depth 1 https://gitlab.cern.ch/coht/fmc.git ~/git/fmc
-
export FMC=~/git/fmc
build_srpm
:
stage
:
srpm
script
:
-
yum-builddep -y ${DIST_PATH}/*.spec
-
LINUX=/usr/src/kernels/*/ make -C distribution srpm
artifacts
:
paths
:
-
distribution/build/SRPMS/${CI_PROJECT_NAME}*src.rpm
expire_in
:
1 day
.script_build_kernel_dep
:
&script_build_kernel_dep
-
make -C $FMC/drivers/fmc all
.koji_deps_template
:
&koji_deps
build-centos-7
:
stage
:
build
variables
:
LINUX
:
/usr/src/kernels/*/
image
:
name
:
gitlab-registry.cern.ch/coht/common-containers/build-centos-7:latest
before_script
:
-
yum install -y koji krb5-workstation rpm-build
-
echo ${OHWR_PASSWORD} | kinit ${OHWR_USER}
-
*script_fetch_kernel_dep
-
*script_build_kernel_dep
script
:
-
make -C software
kscratch
:
<<
:
*koji_deps
stage
:
kscratch
.script_build_kernel_ver
:
&script_build_kernel_ver
-
source /linux-versions.sh
-
fetch $VERSION && prepare $VERSION && export LINUX=$(linux $VERSION)
-
*script_build_kernel_dep
-
make -C software/kernel all
build-kernel-5.4.129
:
stage
:
build
allow_failure
:
true
variables
:
VERSION
:
5.4.129
image
:
name
:
gitlab-registry.cern.ch/coht/common-containers/build-kernel:latest
before_script
:
-
*script_fetch_kernel_dep
script
:
-
koji --config=.koji build --wait --scratch ${KOJI_TARGET} distribution/build/SRPMS/${CI_PROJECT_NAME}*src.rpm
-
*script_build_kernel_ver
kbuild-ohwr
:
<<
:
*koji_deps
stage
:
kbuild
only
:
-
tags
.script_build_kernel_ver
:
&script_build_kernel_ver
-
source /linux-versions.sh
-
fetch $VERSION && prepare $VERSION && export LINUX=$(linux $VERSION)
-
*script_build_kernel_dep
-
make -C software/kernel all
build-kernel-5.10.47
:
stage
:
build
allow_failure
:
true
variables
:
VERSION
:
5.10.47
image
:
name
:
gitlab-registry.cern.ch/coht/common-containers/build-kernel:latest
before_script
:
-
*script_fetch_kernel_dep
script
:
-
koji --config=.koji build --wait ${KOJI_TARGET} distribution/build/SRPMS/${CI_PROJECT_NAME}*src.rpm
-
*script_build_kernel_ver
software/kernel/fa-calibration.c
View file @
c2071d71
...
...
@@ -298,7 +298,7 @@ void fa_calib_config(struct fa_dev *fa)
int32_t
temperature
;
int
i
;
temperature
=
fa_temperature_read
(
fa
);
temperature
=
fa_temperature_read
(
fa
);
spin_lock
(
&
fa
->
zdev
->
cset
->
lock
);
for
(
i
=
0
;
i
<
FA100M14B4C_NCHAN
;
++
i
)
{
fa_calib_adc_config_chan
(
fa
,
i
,
temperature
,
0
);
...
...
software/kernel/fa-core.c
View file @
c2071d71
...
...
@@ -526,7 +526,6 @@ static int __fa_init(struct fa_dev *fa)
/* reset channel offset */
fa
->
user_offset
[
i
]
=
0
;
fa
->
zero_offset
[
i
]
=
0
;
}
/* Set decimation to minimum */
...
...
software/tools/fau-calibration.c
View file @
c2071d71
...
...
@@ -66,7 +66,7 @@ static int fau_calibration_read(char *path, struct fa_calib *calib,
return
ret
;
}
static
void
fau_calibration_dump_stanza
(
struct
fa_calib_stanza
*
stanza
)
static
void
fau_calibration_dump_stanza
(
const
struct
fa_calib_stanza
*
stanza
)
{
fprintf
(
stdout
,
" temperature: %f C
\n
"
,
stanza
->
temperature
*
0
.
01
);
...
...
@@ -86,7 +86,7 @@ static void fau_calibration_dump_stanza(struct fa_calib_stanza *stanza)
* Print calibration data on stdout in humand readable format
* @calib: calibration data
*/
static
void
fau_calibration_dump_human
(
struct
fa_calib
*
calib
)
static
void
fau_calibration_dump_human
(
const
struct
fa_calib
*
calib
)
{
uint16_t
*
data16
=
(
uint16_t
*
)
calib
;
int
i
;
...
...
@@ -95,20 +95,21 @@ static void fau_calibration_dump_human(struct fa_calib *calib)
for
(
i
=
0
;
i
<
sizeof
(
*
calib
)
/
sizeof
(
uint16_t
);
++
i
)
data16
[
i
]
=
le16toh
(
data16
[
i
]);
fputs
(
"ADC Range 10V
\n
"
,
stdout
);
fau_calibration_dump_stanza
(
&
calib
->
adc
[
FA100M14B4C_RANGE_10V
]);
fputs
(
"DAC Range 10V
\n
"
,
stdout
);
fau_calibration_dump_stanza
(
&
calib
->
dac
[
FA100M14B4C_RANGE_10V
]);
fputs
(
"ADC Range 10
0m
V
\n
"
,
stdout
);
fau_calibration_dump_stanza
(
&
calib
->
adc
[
FA100M14B4C_RANGE_10
0m
V
]);
fputs
(
"DAC Range 10
0m
V
\n
"
,
stdout
);
fau_calibration_dump_stanza
(
&
calib
->
dac
[
FA100M14B4C_RANGE_10
0m
V
]);
fputs
(
"ADC Range 1V
\n
"
,
stdout
);
fau_calibration_dump_stanza
(
&
calib
->
adc
[
FA100M14B4C_RANGE_1V
]);
fputs
(
"DAC Range 1V
\n
"
,
stdout
);
fau_calibration_dump_stanza
(
&
calib
->
dac
[
FA100M14B4C_RANGE_1V
]);
fputs
(
"ADC Range 100mV
\n
"
,
stdout
);
fau_calibration_dump_stanza
(
&
calib
->
adc
[
FA100M14B4C_RANGE_100mV
]);
fputs
(
"DAC Range 100mV
\n
"
,
stdout
);
fau_calibration_dump_stanza
(
&
calib
->
dac
[
FA100M14B4C_RANGE_100mV
]);
fputs
(
"ADC Range 10V
\n
"
,
stdout
);
fau_calibration_dump_stanza
(
&
calib
->
adc
[
FA100M14B4C_RANGE_10V
]);
fputs
(
"DAC Range 10V
\n
"
,
stdout
);
fau_calibration_dump_stanza
(
&
calib
->
dac
[
FA100M14B4C_RANGE_10V
]);
fputc
(
'\n'
,
stdout
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment