Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Switch - Software
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
86
Issues
86
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
CI / CD
CI / CD
Pipelines
Schedules
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
White Rabbit Switch - Software
Commits
daa99f80
Commit
daa99f80
authored
Oct 26, 2016
by
Federico Vaga
Committed by
Adam Wujek
Dec 01, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace:startup: make clear why FPGA and LM32 must be programmed in order
Signed-off-by:
Federico Vaga
<
federico.vaga@cern.ch
>
parent
978907f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
startup-mb.sh
userspace/rootfs_override/wr/sbin/startup-mb.sh
+19
-9
No files found.
userspace/rootfs_override/wr/sbin/startup-mb.sh
View file @
daa99f80
...
...
@@ -57,13 +57,31 @@ else
echo
"load_error"
>
$LOAD_FPGA_STATUS_FILE
fi
# FIXME
# Don't try to do **anything** here. The LM32 **must** be programed
# before doing anything else. We do not know yet the reson but without
# the following step the FPGA cannot be access properly
$WR_HOME
/bin/load-lm32
$LM_FILE
scb_ver
=
${
scb_ver
}
if
[
$?
-eq
0
]
;
then
echo
"load_ok"
>
$LOAD_LM32_STATUS_FILE
else
echo
"Fatal: load LM32 failed"
>
& 2
echo
"load_error"
>
$LOAD_LM32_STATUS_FILE
fi
# FIXME also this sleep is necessary because the LM32 does some magic
sleep
1
# At this offset there is an ID. Just check that it's there as a
# small proof that we correctly programmed the FPGA
CHK_ADDR
=
0x10030034
CHK_EXP
=
0xcafebabe
CHK_VAL
=
$(
devmem
$CHK_ADDR
|
tr
'[:upper:]'
'[:lower:]'
)
if
[
$CHK_VAL
!
=
$CHK_EXP
]
if
[
$CHK_VAL
=
=
$CHK_EXP
]
then
echo
"The FPGA and the LM32 are programmed"
else
echo
"The bitstream
$FP_FILE
is not correct or there something is not working with the FPGA"
echo
"Expected: [
$CHK_ADDR
] =
$CHK_EXP
"
echo
"Current: [
$CHK_ADDR
] =
$CHK_VAL
"
...
...
@@ -71,14 +89,6 @@ then
exit
fi
$WR_HOME
/bin/load-lm32
$LM_FILE
scb_ver
=
${
scb_ver
}
if
[
$?
-eq
0
]
;
then
echo
"load_ok"
>
$LOAD_LM32_STATUS_FILE
else
echo
"Fatal: load LM32 failed"
>
& 2
echo
"load_error"
>
$LOAD_LM32_STATUS_FILE
fi
insmod
$WR_HOME
/lib/modules/at91_softpwm.ko
insmod
$WR_HOME
/lib/modules/wr_vic.ko
...
...
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