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
c6bea0b2
Commit
c6bea0b2
authored
Feb 11, 2013
by
Benoit Rat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flashr-wrs: add gateware selection and only use 2 HDL binaries
parent
f4fc2dc5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
flash-wrs
build/flash-wrs
+19
-0
No files found.
build/flash-wrs
View file @
c6bea0b2
...
...
@@ -25,6 +25,7 @@ showhelp()
printf
"Options:
\n
"
printf
" -h|--help
\t
Show this help message
\n
"
printf
" -m|--mode
\t
can be: default (df and nf), df (dataflash),
\n\t\t
nf (nandflash), ddr (ddr memories).
\n
"
printf
" -g|--gateware
\t
Select the gateware: 18p (18 ports, default), 8p (8 ports), LX130T (small FPGA), LX240T (big FGPA)
\n
"
printf
" -e
\t\t
Completely erase the memory (Can erase your configuration)
\n
"
printf
" -b|--build
\t
Use files that you have built in the WRS_OUTPUT_DIR
\n
"
printf
" -m1|--mac1
\t
Default MAC address for the ethernet port on board
\n
"
...
...
@@ -107,6 +108,9 @@ MAC1=$MAC1_DEF
MAC2_DEF
=
"02:34:56:78:9A:00"
MAC2
=
$MAC2_DEF
# By default we select the gateware only for 18ports because
gateware
=
"18p"
DEV
=
""
FLAGS
=
""
...
...
@@ -156,6 +160,19 @@ while [ $# -ge 1 ]; do
fi
memmode
=
"
$2
"
shift
;
shift
;;
-g
|
--gateware
)
# Obtain which gateware type we want to flash
if
[
"
$2
"
=
"18p"
]
||
[
"
$2
"
=
"8p"
]
;
then
gateware
=
"
$2
*.bin"
;
elif
[
"
$2
"
=
"LX240T"
]
||
[
"
$2
"
=
"LX130T"
]
;
then
gateware
=
"*-
$2
.bin"
;
else
echo
"Error: Invalid gateware selection
\"
$2
\"
"
showhelp
exit
1
fi
shift
;
shift
;;
/
*
)
DEV
=
"-s
$1
"
;
shift
;;
...
...
@@ -269,6 +286,8 @@ if [ $nf ]; then
TMPSCRIPT
=
$TMPDIR
/wrsrootfs-script
cat
>
$TMPSCRIPT
<<
EOF
tar --directory
$TMPFS
-xzf
$rootfsgz
# Remove the unnecessary HDL files
find
$TMPFS
/wr/lib/firmware/ -type f \( ! -name ''
${
gateware
}
'' \) -a \( ! -name '*rt_cpu.bin' \) -exec rm -f {} \;
mkfs.jffs2 --little-endian --eraseblock=0x20000 -n --pad -d
$TMPFS
-o
$rootfsjffs2
...
...
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