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
03a8c5fd
Commit
03a8c5fd
authored
Jul 10, 2012
by
Benoit Rat
Committed by
Alessandro Rubini
Jul 16, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: Rename --compress to --pack and move from flasher to build-all script
parent
2d7654cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
20 deletions
+25
-20
flash-wrs
build/flash-wrs
+11
-20
wrs_build-all
build/wrs_build-all
+14
-0
No files found.
build/flash-wrs
View file @
03a8c5fd
...
...
@@ -17,19 +17,17 @@
showhelp
()
{
echo
"Usage:
$0
[options] MAC [<firmware>.tar.gz] [DEV]
\n
"
echo
"MAC:
\t
MAC address in hexadecimal seperated by ':' (i.e, AB:CD:EF:01:23:45)"
echo
"<firmware>.tar.gz: Use the file in the firmware to flash the device"
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|--mode
\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)"
echo
"
\t
--silent
\t\t
Don't ask MAC or S/N and use default 02:0B:AD:C0:FF:EE"
echo
""
printf
"Usage:
$0
[options] MAC [<firmware>.tar.gz] [DEV]
\n\n
"
printf
"MAC:
\t
MAC address in hexadecimal seperated by ':' (i.e, AB:CD:EF:01:23:45)
\n
"
printf
"<firmware>.tar.gz: Use the file in the firmware to flash the device
\n
"
printf
"DEV:
\t
The usb device (by default it is /dev/ttyACM0)
\n
"
printf
"Options:
\n
"
printf
"
\t
-h|--help
\t\t
Show this help message
\n
"
printf
"
\t
-m|--mode
\t\t
can be: default, df (dataflash), nf (nandflash), test.
\n
"
printf
"
\t
-e
\t\t\t
Completely erase the memory (Can erase your configuration)
\n
"
printf
"
\t
--build
\t\t\t
Use file that you have build in the WRS_OUTPUT_DIR
\n
"
printf
"
\t
--test
\t\t\t
Use file for testing the switch (not available)
\n
"
printf
"
\t
--silent
\t\t
Don't ask MAC or S/N and use default 02:0B:AD:C0:FF:EE
\n\n
"
exit
0
}
...
...
@@ -190,13 +188,6 @@ 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
...
...
build/wrs_build-all
View file @
03a8c5fd
...
...
@@ -50,11 +50,24 @@ showhelp() {
echo
" --clean Remove all the previous configuration"
echo
" --fetch Force fetching the new download files"
echo
" --list List the different building steps"
echo
" --pack Create a tar.gz package with the files in
${
WRS_OUTPUT_DIR
}
/images/"
echo
" --step=[00-09] Perform one specific step"
echo
""
exit
0
;
}
pack
()
{
name
=
$(
git describe
--exact-match
--tags
HEAD &> /dev/null
)
if
[
$?
-ne
"0"
]
;
then
name
=
$(
date
+%y%m%d
)
"-"
$(
git log
--abbrev-commit
--pretty
=
oneline
-1
|
cut
-d
" "
-f1
)
fi
echo
"Packing into wrs-firmware-
$name
.tar.gz"
;
tar
-czvf
"wrs-firmware-
$name
.tar.gz"
-C
${
WRS_OUTPUT_DIR
}
/images/ at91bootstrap.bin barebox.bin zImage wrs-image.jffs2.img
exit
0
}
## Menu to select the function in case we have an argument
...
...
@@ -64,6 +77,7 @@ if [ -n "$1" ]; then
--clean
)
rm
-f
$WRS_DONE_DIR
/0
*
;;
--fetch
)
echo
"To be done"
;;
--list
)
cd
$WRS_DONE_DIR
;
ls
0
*
;
exit
0
;;
--pack
)
pack
;
exit
0
;;
--step
=
0[0-9]
)
num
=
`
echo
$1
|
sed
-e
's/--step=//'
`
;
rm
-vf
$WRS_DONE_DIR
/
${
num
}
-
*
;;
*
)
showhelp
;;
esac
...
...
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