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
84
Issues
84
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
31f38724
Commit
31f38724
authored
Jul 06, 2012
by
Benoit Rat
Committed by
Alessandro Rubini
Jul 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
flasher: adding tar.gz flash & compress, improve waiting
parent
7294dca8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
8 deletions
+27
-8
flash-wrs
build/flash-wrs
+27
-8
No files found.
build/flash-wrs
View file @
31f38724
...
...
@@ -23,7 +23,7 @@ showhelp()
echo
"DEV:
\t
The usb device (by default it is /dev/ttyACM0)"
echo
"Options: "
echo
"
\t
-h|--help
\t\t
Show this help message"
echo
"
\t
-m|--m
emmode
\t\t
can be: default, df (dataflash), nf (nandflash), test
."
echo
"
\t
-m|--m
ode
\t\t
can be: default, df (dataflash), nf (nandflash), test, compress
."
echo
"
\t
-e
\t\t\t
Completely erase the memory (Can erase your configuration)"
echo
"
\t
--build
\t\t\t
Use file that you have build in the WRS_OUTPUT_DIR"
echo
"
\t
--test
\t\t\t
Use file for testing the switch (not available)"
...
...
@@ -146,13 +146,6 @@ if CC=cc make -s -C usb-loader; then true; else
echo
"
$0
: Error compiling usb-loader"
>
&2
;
exit
1
;
fi
# Check if atmel sam-ba is find by lusb
lsusb |
grep
"at91sam SAMBA"
>
/dev/null
if
[
$?
-gt
"0"
]
;
then
echo
"Did not find the sam-ba monitor in lsusb....
\n
Please check that the Dataflash is short-circuited!"
exit
1
;
fi
# parse command line
MAC
=
""
DEV
=
""
...
...
@@ -197,11 +190,37 @@ elif [ "x$memmode" = "xnf" ]; then
nf
=
1
elif
[
"x
$memmode
"
=
"xtest"
]
;
then
test
=
1
elif
[
"x
$memmode
"
=
"xcompress"
]
;
then
cp
${
at91bs
}
/tmp/at91bootstrap.bin
cp
${
barebox
}
/tmp/barebox.bin
cp
${
kernel
}
/tmp/zImage
cp
${
rootfs
}
/tmp/wrs-image.jffs2.img
tar
-czvf
"wrs-firmware-
$(
date
+%y%m%d
)
.tar.gz"
-C
/tmp/ at91bootstrap.bin barebox.bin zImage wrs-image.jffs2.img
exit
0
else
df
=
1
nf
=
1
fi
# Check if atmel sam-ba is find by lusb
msg
=
"Waiting for at91sam SAMBA bootloader on usb
\n
Please check that the Dataflash is short-circuited!
\n
"
while
true
;
do
lsusb |
grep
"at91sam"
>
/dev/null
if
[
"
$?
"
-eq
"0"
]
;
then
break
else
if
[
-n
"
$msg
"
]
;
then
printf
"
$msg
"
msg
=
""
fi
sleep
1
printf
"."
fi
done
if
[
-z
"
$msg
"
]
;
then
printf
"
\t
OK
\n
"
fi
## Flashing DataFlash
if
[
$df
]
;
then
...
...
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