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
2db75ae4
Commit
2db75ae4
authored
Jul 16, 2012
by
Federico Vaga
Committed by
Alessandro Rubini
Jul 17, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wrs-build.in: Flashing chapter update
Signed-off-by:
Federico Vaga
<
federico.vaga@gmail.com
>
parent
94763841
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
74 additions
and
89 deletions
+74
-89
wrs-build.in
doc/wrs-build.in
+74
-89
No files found.
doc/wrs-build.in
View file @
2db75ae4
...
...
@@ -442,14 +442,12 @@ directory by deleting all compiled modules (except downloaded files), just call:
@c ##########################################################################
@node
Quick
Flashing of WRS-3
@chapter
Quick
Flashing of WRS-3
@node Flashing of WRS-3
@chapter Flashing of WRS-3
This chapter quickly resumes the different steps to install the WRS-3 with the
correct firmware. This procedure described the installation of the switch
with a @i{SCB v3.2} and a @i{Mini-Backplane v3.2}.
If you have an older
with a @i{SCB v3.2} and a @i{Mini-Backplane v3.2}. If you have an older
version you might look at the @ref{v3.0 & v3.1} and the various footnotes.
@menu
...
...
@@ -512,29 +510,16 @@ If things go well, the device is enumerated as shown;
you must @b{remove} the jumper at this point or you will
not be able to write the new information to dataflash
@c =============================================================================
@node USB-Loader
@section USB-Loader
To flash the firmware into the switch you need to use the @i{USB-loader}
program. You can also use the flash-wrs script that ease the procedure.
@c ==========================================================================
@node The Flasher Script
@section The Flasher Script
A script has been written to easily flash a firmware into the
switch. It is invoked in the following way:
@example
./build/flash-wrs [options] MAC [<firmware>.tar.gz] [DEV]
@end example
By default the code will only flash @i{at91boot.bin} or @i{barebox.bin}
situated in the @i{binaries} subdirectory into the dataflash.
To understand better all the options of the script you should look at
@ref{USB-Loader} or use the @code{--help} option.
However we strongly recommend to first erase the whole memory and then
flash using a @i{tar.gz} package. The execution should be similar as:
The script can be invoked in the following ways to flash a packege@footnote{read
@ref{Release Package} to undestand how to create a package} into
the switch, from the toplevel directory of @code{wr-switch-sw}:
@example
wr-switch-sw/build/flash-wrs -e wrs-firmware-<revision>.tar.gz
...
...
@@ -543,6 +528,7 @@ flash using a @i{tar.gz} package. The execution should be similar as:
The output you must expect from the flasher is like the following, and
the process takes 3 minutes more or less:
@c FIXME better example with timestamp
@smallexample
Initializing SAM-BA: CPU ID: 0x819b05a2
[...]
...
...
@@ -551,7 +537,7 @@ the process takes 3 minutes more or less:
[...]
Programming done!
Programming NandFlash Done!!!
Closing...
Closing...
@end smallexample
If you look at the serial port, during programming, you will see
...
...
@@ -565,6 +551,67 @@ messages like these:
-I- End of applet (command : 2 --- status : 0)
@end smallexample
@c -------------------------------------------------------------------
@node flash-script
@subsection Flash Script
The @code{flash-wrs} script can be used to quickly flash the White Rabbit switch
as seen above. However it admits other functionalities detailed in this chapter.
You might also want to check its embedded documentations using:
@smallexample
$ ./build/flash-wrs --help
Usage: ./build/flash-wrs [options] MAC [<firmware>.tar.gz] [DEV]
MAC: MAC address in hexadecimal seperated by '
:
' (i.e, AB:CD:EF:01:23:45)
<firmware>.tar.gz: Use the file in the firmware to flash the device
DEV: The usb device (by default it is /dev/ttyACM0)
Options:
-h|--help Show this help message
-m|--mode can be: default, df (dataflash), nf (nandflash), test.
-e Completely erase the memory (Can erase your configuration)
-b|--build Use file that you have build in the WRS_OUTPUT_DIR
--test Use file for testing the switch (not available)
--silent Don'
t
ask
MAC
or
S
/
N
and
use
default
02
:
0
B
:
AD
:
C0
:
FF
:
EE
@
end
smallexample
The
@
i
{
DEV
}
is
optional
.
It
defaults
to
@
code
{/
dev
/
ttyACM0
}.
If
your
system
maps
the
Atmel
ROM
to
a
different
device
name
,
please
pass
the
name
on
the
command
line
.
The
script
wants
a
full
pathname
starting
with
@
code
{/}.
If
the
@
code
{--
silent
}
flag
is
used
the
MAC
will
be
by
default
02
:
0
B
:
AD
:
C0
:
FF
:
EE
;
otherwise
MAC
is
mandatory
.
If
MAC
is
not
specified
the
script
exit
.
If
you
want
to
flash
your
own
@
i
{
at91boot
.
bin
}
or
@
i
{
barebox
.
bin
}
you
can
just
place
them
in
the
@
i
{
binaries
}
subdirectory
before
calling
the
script
.
You
can
also
flash
the
image
you
have
build
using
@
ref
{
Building
}
by
adding
the
tag
@
code
{-
b
|--
build
}.
Finally
you
can
select
a
mode
using
the
@
code
{-
m
|--
mode
}
flag
to
choose
to
write
in
dataflash
(
df
),
nandflash
(
nf
),
both
(
default
)
or
ddr
memories
(
ddr
).
You
can
also
erase
the
selected
memory
before
write
your
binaries
;
to
do
this
add
the
option
@
code
{-
e
}.
The
script
performs
the
following
steps
:
@
itemize
@
bullet
@
item
It
compiles
the
loader
(@
i
{
usb
-
loader
/}
subdir
).
@
item
Check
if
SAMBA
bootloader
is
present
.
@
item
It
picks
the
correct
binaries
according
to
the
options
.
@
item
Optionally
,
it
changes
the
default
MAC
address
in
@
i
{
barebox
}
default
environment
,
so
you
can
make
all
switches
different
.
@
item
It
erases
the
memory
selected
by
mode
.
@
item
And
finally
,
it
writes
the
corresponding
binaries
to
@
i
{
dataflash
},
@
i
{
nandflash
}
or
@
i
{
ddr
}.
@
end
itemize
@
c
==========================================================================
@
node
Quick
Barebox
@
section
Quick
Barebox
...
...
@@ -927,68 +974,6 @@ password -- though empty. The script authorizes the key of the user
running the script and all keys listed in the file @code{authorized_keys}
in the main directory of this package, if present.
@
c
##########################################################################
@
node
USB
-
Loader
@
chapter
USB
-
Loader
To
flash
the
firmware
into
the
switch
you
need
to
use
the
@
i
{
USB
-
loader
}
program
.
You
can
also
use
the
flash
-
wrs
script
that
ease
the
procedure
.
The
script
can
be
invoked
in
the
following
ways
,
from
the
toplevel
directory
of
@
code
{
wr
-
switch
-
sw
}:
@
smallexample
$
build
/
flash
-
wrs
--
help
Usage
:
build
/
flash
-
wrs
[
options
]
MAC
[<
firmware
>.
tar
.
gz
]
[
DEV
]
MAC
:
MAC
address
in
hexadecimal
seperated
by
':'
(
i
.
e
,
AB
:
CD
:
EF
:
01
:
23
:
45
)
<
firmware
>.
tar
.
gz
:
Use
the
file
in
the
firmware
to
flash
the
device
DEV
:
The
usb
device
(
by
default
it
is
/
dev
/
ttyACM0
)
Options
:
-
h
|--
help
Show
this
help
message
-
m
|--
mode
can
be
:
default
,
df
(
dataflash
),
nf
(
nandflash
),
test
.
-
e
Completely
erase
the
memory
(
Can
erase
your
configuration
)
--
build
Use
file
that
you
have
build
in
the
WRS_OUTPUT_DIR
--
test
Use
file
for
testing
the
switch
(
not
available
)
--
skip
Don
't ask MAC or S/N and use default 02:0B:AD:C0:FF:EE
@end smallexample
The @i{DEV} is optional. It defaults to @code{/dev/ttyACM0}.
If your system maps the Atmel ROM to a different device name, please
pass the name on the command line. The script wants a full pathname
starting with @code{/}.
The MAC address is mandatory, if not specified it is asked in the next step.
The script checks that the address is properly formed before applying
it to the @i{barebox}. If the @code{--skip} flag is used the MAC will
be by default 02:0B:AD:C0:FF:EE
If you want to flash your own @i{at91boot.bin} or @i{barebox.bin} you
can just place them in the @i{binaries} subdirectory before calling
the script.
You can also flash the image you have build using @ref{Quick Build} by
adding the tag @code{--build}
Finally you can select a mode using the @code{-m|--mode} flag to choose
to write in dataflash, nandflash, both (default mode) or ddr memories.
The script performs the following steps:
@itemize @bullet
@item It compiles the loader (@i{usb-loader/} subdir).
@item Check if SAMBA bootloader is present.
@item It picks the correct binaries according to the options.
@item Optionally, it changes the default MAC address in @i{barebox}
default environment, so you can make all switches different.
@item It erases the memory selected by mode.
@item And finally, it writes the corresponding binaries to @i{dataflash},
@i{nandflash} or @i{ddr}.
@end itemize
@c ==========================================================================
@node Booting with Barebox
...
...
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