Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
wr-switch-sw
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Analyze
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
This is an archived project. Repository and other project resources are read-only.
white-rabbit
wr-switch-sw
Commits
7ee0e782
Commit
7ee0e782
authored
10 years ago
by
Alessandro Rubini
Browse files
Options
Downloads
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
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
build/flash-wrs
+21
-0
21 additions, 0 deletions
build/flash-wrs
with
21 additions
and
0 deletions
build/flash-wrs
+
21
−
0
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
"
...
...
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