Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
White Rabbit Switch - Software
Manage
Activity
Members
Labels
Plan
Issues
85
Issue boards
Milestones
Wiki
Code
Merge requests
4
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Projects
White Rabbit Switch - Software
Commits
03a8c5fd
Commit
03a8c5fd
authored
12 years ago
by
Benoit Rat
Committed by
Alessandro Rubini
12 years ago
Browse files
Options
Downloads
Patches
Plain Diff
build: Rename --compress to --pack and move from flasher to build-all script
parent
2d7654cc
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
build/flash-wrs
+11
-20
11 additions, 20 deletions
build/flash-wrs
build/wrs_build-all
+14
-0
14 additions, 0 deletions
build/wrs_build-all
with
25 additions
and
20 deletions
build/flash-wrs
+
11
−
20
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
...
...
This diff is collapsed.
Click to expand it.
build/wrs_build-all
+
14
−
0
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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment