Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-init
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-init
Commits
9685f884
Commit
9685f884
authored
Mar 02, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SSD mux script calling for Eyesis4Pi
parent
20229ca9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
12 deletions
+25
-12
init_elphel393.py
src/init_elphel393.py
+25
-12
No files found.
src/init_elphel393.py
View file @
9685f884
...
@@ -41,7 +41,7 @@ import os
...
@@ -41,7 +41,7 @@ import os
#params
#params
SENSOR_TYPE
=
5
SENSOR_TYPE
=
5
IPADDR
=
"192.168.0.
9
"
IPADDR
=
"192.168.0.
8
"
NETMASK
=
"255.255.255.0"
NETMASK
=
"255.255.255.0"
IMGSRV_PORT
=
2323
IMGSRV_PORT
=
2323
CAMOGM_PORT
=
3456
CAMOGM_PORT
=
3456
...
@@ -133,25 +133,38 @@ def init_imgsrv(port):
...
@@ -133,25 +133,38 @@ def init_imgsrv(port):
def
init_autoexp_daemon
(
index
):
def
init_autoexp_daemon
(
index
):
shout
(
"autoexposure -p "
+
index
+
" -c 0 -b 0 -d 1 &"
)
shout
(
"autoexposure -p "
+
index
+
" -c 0 -b 0 -d 1 &"
)
def
init_sata
(
sata_en
,
pydir
):
def
init_sata
(
sata_en
):
if
os
.
path
.
isfile
(
"/sys/devices/soc0/elphel393-pwr@0/detected_10389"
):
if
os
.
path
.
isfile
(
"/sys/devices/soc0/elphel393-pwr@0/detected_10389"
):
if
(
sata_en
==
1
):
if
(
sata_en
==
1
):
if
not
get_fpga
():
if
not
get_fpga
():
log_msg
(
"Waiting for the FPGA to be programmed to start SATA"
,
4
)
log_msg
(
"Waiting for the FPGA to be programmed to start SATA"
,
4
)
if
not
fpga_OK
(
TIMEOUT
):
if
not
fpga_OK
(
TIMEOUT
):
print
()
log_msg
(
"Timeout while waiting for the FPGA to be programmed"
,
2
)
log_msg
(
"Timeout while waiting for the FPGA to be programmed"
,
2
)
return
return
else
:
else
:
log_msg
(
"Done waiting for the FPGA"
,
4
)
log_msg
(
"Done waiting for the FPGA"
,
4
)
shout
(
pydir
+
"/x393sata.py"
)
# Should be after modprobe? Wait for the FPGA should be before it
# the default connection is zynq <-> internal ssd
# default init will connect to internal SSD
shout
(
pydir
+
"/x393sata_control.py set_zynq_ssd"
)
shout
(
PYDIR
+
"/x393sata.py"
)
# Should be after modprobe? Wait for the FPGA should be before it
# uncomment the line below for zynq <-> external ssd connection at boot
# shout(pydir+"/x393sata_control.py set_zynq_esata")
# for Eyesis4Pi (temporary fix)
shout
(
"modprobe ahci_elphel &"
)
if
switch
[
'eyesis'
]
!=
0
:
shout
(
"sleep 2"
)
shout
(
"echo 1 > /sys/devices/soc0/amba@0/80000000.elphel-ahci/load_module"
)
log_msg
(
"Setting VSC3304 for Eyesis4Pi (driver will be loaded)"
,
4
)
log_msg
(
" Details : /var/log/x393sata_eyesis4pi.log"
)
log_msg
(
" State : /var/state/ssd"
)
# Option 1: use internal SSDs: zynq <-> internal ssd
# uncomment for use
#shout(PYDIR+"/x393sata_eyesis4pi_control.py set_zynq_ssd")
# Option 2: use external SSDs: zynq <-> external ssd
# uncomment for use
shout
(
PYDIR
+
"/x393sata_eyesis4pi_control.py set_zynq_esata"
)
else
:
shout
(
"modprobe ahci_elphel &"
)
shout
(
"sleep 2"
)
shout
(
"echo 1 > /sys/devices/soc0/amba@0/80000000.elphel-ahci/load_module"
)
else
:
else
:
log_msg
(
"10389 was not detected: skipping SATA init"
)
log_msg
(
"10389 was not detected: skipping SATA init"
)
...
@@ -272,7 +285,7 @@ if switch ['autocampars'] == 1:
...
@@ -272,7 +285,7 @@ if switch ['autocampars'] == 1:
#6
#6
if
switch
[
'sata'
]
==
1
:
if
switch
[
'sata'
]
==
1
:
log_msg
(
"init SATA"
)
log_msg
(
"init SATA"
)
init_sata
(
SATA_EN
,
PYDIR
)
init_sata
(
SATA_EN
)
else
:
else
:
log_msg
(
"skip SATA"
)
log_msg
(
"skip SATA"
)
...
...
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