Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
Simple VME FMC Carrier SVEC - Software
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
Simple VME FMC Carrier SVEC - Software
Commits
f7d152de
Commit
f7d152de
authored
Feb 04, 2013
by
Juan David González Cobas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
svec: install: add installation scripts (preliminary)
parent
3fecf13e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
87 additions
and
0 deletions
+87
-0
install_fd.sh
kernel/install_fd.sh
+38
-0
svec.awk
kernel/svec.awk
+49
-0
No files found.
kernel/install_fd.sh
0 → 100755
View file @
f7d152de
#!/bin/sh
TRANSFER
=
/etc/transfer.ref
DEVICE_NAME
=
SVECFDELAY
DRIVER_NAME
=
fmc-fine-delay
# symlink to true GOLDEN="fmc/golden-svec-20130114-1000.bin"
GOLDEN
=
"fmc/svec_golden.bin"
# symlink to true FDELAY="fmc/svec-fine-delay-20121218-1549.bin"
FDELAY
=
"fmc/svec_top.bin"
OUTPUT
=
":"
RUN
=
""
while
getopts
hvnc:D:d:t: o
do case
$o
in
v
)
OUTPUT
=
"echo"
;;
# verbose
n
)
RUN
=
":"
;;
# dry run
D
)
DEVICE_NAME
=
"
$OPTARG
"
;;
d
)
DRIVER_NAME
=
"
$OPTARG
"
;;
c
)
CRATECONFIG
=
"
$OPTARG
"
;;
t
)
TRANSFER
=
"
$OPTARG
"
;;
[
h?]
)
echo
>
&2
"usage:
$0
[-?hvn] [-D device_name] [-d driver_name] [-t transfer]"
exit
;;
esac
done
$OUTPUT
"
$DRIVER_NAME
install"
echo
Installing zio and fmc drivers ...
/sbin/insmod zio.ko
&&
/sbin/insmod fmc.ko
echo
Installing fine delay driver...
/sbin/insmod
$DRIVER_NAME
.ko
gateware
=
$FDELAY
timer_ms
=
10
INSMOD_ARGS
=
"
`
awk
-f
./svec.awk FMC-SVEC
$TRANSFER
`
level=2 fw_name=
$GOLDEN
echo -n "
svec: insmod with
$INSMOD_ARGS
"
/sbin/insmod svec.ko
$INSMOD_ARGS
kernel/svec.awk
0 → 100755
View file @
f7d152de
#
# svec.awk - extract insmod parameters from transfer.ref
#
# usage: svec.awk DEVICE_NAME [transfer_file]
#
# e.g.:
# $ awk -f svec.awk FMC_SVEC /acc/dsc/tst/cfv-864-cdv28/etc/transfer.ref
# $ awk -f svec.awk FMC-SVEC /acc/dsc/tst/cfv-864-cdv28/etc/transfer.ref
#
# produces
# vmebase1=a0000000 vmebase2=a0000000 vector=0x00
#
BEGIN
{
device_name
=
ARGV
[
1
]
delete
ARGV
[
1
]
slot
=
""
csr_base_addr
=
""
a32_base_addr
=
""
vector
=
""
}
/^#
\+
#/
&&
$6
==
device_name
&&
$4
==
"VME"
{
# decode transfer.ref line
lun
=
lun
","
$7
slot
=
slot
","
$20
csr_base_addr
=
sprintf
(
"%s,0x%x"
,
csr_base_addr
,
$20
*
0
x80000
)
a32_base_addr
=
a32_base_addr
","
$11
vector
=
vector
","
$23
}
END
{
insmod_params
=
" "
# take away the first comma in each vector of params
if
(
lun
)
insmod_params
=
insmod_params
" lun="
substr
(
lun
,
2
)
if
(
csr_base_addr
)
insmod_params
=
insmod_params
" vmebase1="
substr
(
csr_base_addr
,
2
)
if
(
a32_base_addr
)
insmod_params
=
insmod_params
" vmebase2="
substr
(
a32_base_addr
,
2
)
if
(
vector
)
insmod_params
=
insmod_params
" vector="
substr
(
vector
,
2
)
print
substr
(
insmod_params
,
3
)
}
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