Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr-switch-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
white-rabbit
wr-switch-sw
Commits
7ee0e782
Commit
7ee0e782
authored
Jul 29, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: check the tarball is in tftp, using some known tftpboot places
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
fb9f685c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
flash-wrs
build/flash-wrs
+21
-0
No files found.
build/flash-wrs
View file @
7ee0e782
...
...
@@ -163,6 +163,7 @@ while [ $# -ge 1 ]; do
kernel
=
${
WRS_OUTPUT_DIR
}
/images/zImage
initramfs
=
${
WRS_OUTPUT_DIR
}
/images/wrs-initramfs.gz
usrtar
=
${
WRS_OUTPUT_DIR
}
/images/wrs-usr.tar.gz
tarball
=
${
WRS_OUTPUT_DIR
}
/images/wrs-firmware.tar
shift
;;
*
.tar
)
...
...
@@ -173,6 +174,7 @@ while [ $# -ge 1 ]; do
kernel
=
$WRSTMPDIR
/zImage
initramfs
=
$WRSTMPDIR
/wrs-initramfs.gz
usrtar
=
$WRSTMPDIR
/wrs-usr.tar.gz
tarball
=
$1
shift
;;
-h
|
--help
)
showhelp
;
shift
;;
...
...
@@ -230,6 +232,25 @@ if [ "x$usrtar" = "x" ]; then
showhelp
fi
# Check that there is a tftpboot place with the right thing...
tartftp
=
wrs-firmware.tar
tarsum
=
$(
md5sum
<
$tarball
)
for
n
in
/tftpboot /home/tftpboot
$HOME
/tftpboot
$HOME
/[wW][rR]/tftpboot
;
do
if
[
!
-d
$n
]
;
then continue
;
fi
if
[
!
-f
$n
/
$tartftp
]
;
then continue
;
fi
sum2
=
$(
md5sum
<
$n
/
$tartftp
)
if
[
"
$tarsum
"
!=
"
$sum2
"
]
;
then
echo
"Warning: File
$n
/
$tartftp
not up to date"
;
echo
"Maybe you want to run the following command:"
echo
""
echo
" cp
$tarball
$n
/"
echo
""
echo
"Press enter to continue"
read
a
fi
done
# Even if not all files are always needed, check all of them immediately
me
=
$(
basename
$0
)
echo
"
${
me
}
: Working in
$WRSTMPDIR
"
...
...
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