Commit 7ee0e782 authored by Alessandro Rubini's avatar Alessandro Rubini

build: check the tarball is in tftp, using some known tftpboot places

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent fb9f685c
...@@ -163,6 +163,7 @@ while [ $# -ge 1 ]; do ...@@ -163,6 +163,7 @@ while [ $# -ge 1 ]; do
kernel=${WRS_OUTPUT_DIR}/images/zImage kernel=${WRS_OUTPUT_DIR}/images/zImage
initramfs=${WRS_OUTPUT_DIR}/images/wrs-initramfs.gz initramfs=${WRS_OUTPUT_DIR}/images/wrs-initramfs.gz
usrtar=${WRS_OUTPUT_DIR}/images/wrs-usr.tar.gz usrtar=${WRS_OUTPUT_DIR}/images/wrs-usr.tar.gz
tarball=${WRS_OUTPUT_DIR}/images/wrs-firmware.tar
shift;; shift;;
*.tar) *.tar)
...@@ -173,6 +174,7 @@ while [ $# -ge 1 ]; do ...@@ -173,6 +174,7 @@ while [ $# -ge 1 ]; do
kernel=$WRSTMPDIR/zImage kernel=$WRSTMPDIR/zImage
initramfs=$WRSTMPDIR/wrs-initramfs.gz initramfs=$WRSTMPDIR/wrs-initramfs.gz
usrtar=$WRSTMPDIR/wrs-usr.tar.gz usrtar=$WRSTMPDIR/wrs-usr.tar.gz
tarball=$1
shift;; shift;;
-h|--help) showhelp; shift;; -h|--help) showhelp; shift;;
...@@ -230,6 +232,25 @@ if [ "x$usrtar" = "x" ]; then ...@@ -230,6 +232,25 @@ if [ "x$usrtar" = "x" ]; then
showhelp showhelp
fi 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 # Even if not all files are always needed, check all of them immediately
me=$(basename $0) me=$(basename $0)
echo "${me}: Working in $WRSTMPDIR" echo "${me}: Working in $WRSTMPDIR"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment