defaultenv: update: add nfs support
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
957535c66f
commit
cd614b8f40
|
@ -10,7 +10,7 @@ if [ ! -e "$part" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ x$mode = xtftp ]; then
|
||||
if [ x$mode = xtftp -o x$mode = xnfs ]; then
|
||||
if [ x$ip = xdhcp ]; then
|
||||
dhcp
|
||||
fi
|
||||
|
@ -20,6 +20,7 @@ if [ x$mode = xtftp ]; then
|
|||
echo "Server did not reply! Update aborted."
|
||||
exit 1
|
||||
fi
|
||||
load=$mode
|
||||
fi
|
||||
|
||||
if [ x$mode = xxmodem ]; then
|
||||
|
@ -28,6 +29,7 @@ if [ x$mode = xxmodem ]; then
|
|||
echo "loadb failed or cancelled! Update aborted."
|
||||
exit 1
|
||||
fi
|
||||
load="cp -v"
|
||||
fi
|
||||
|
||||
unprotect $part
|
||||
|
@ -40,11 +42,6 @@ erase $part || exit 1
|
|||
echo
|
||||
echo "flashing $image to $part"
|
||||
echo
|
||||
|
||||
if [ x$mode = xtftp ]; then
|
||||
tftp $image $part || exit 1
|
||||
else
|
||||
cp -v $image $part || exit 1
|
||||
fi
|
||||
$load $image $part || exit 1
|
||||
|
||||
protect $part
|
||||
|
|
|
@ -7,8 +7,8 @@ echo "options"
|
|||
echo " -c to check the crc32 for the image and flashed one"
|
||||
echo ""
|
||||
echo "default mode is tftp"
|
||||
echo "type update -t kernel -d <nor|nand|disk> [-m tftp|xmodem] [-f imagename] to update kernel into flash"
|
||||
echo "type update -t rootfs -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update rootfs into flash"
|
||||
echo "type update -t barebox -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update barebox into flash"
|
||||
echo "type update -t bareboxenv -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update bareboxenv into flash"
|
||||
echo "type update -t xload -d <nor|nand> [-m tftp|xmodem] [-f imagename] to update xload into flash"
|
||||
echo "type update -t kernel -d <nor|nand|disk> [-m tftp|xmodem|nfs] [-f imagename] to update kernel into flash"
|
||||
echo "type update -t rootfs -d <nor|nand> [-m tftp|xmodem|nfs] [-f imagename] to update rootfs into flash"
|
||||
echo "type update -t barebox -d <nor|nand> [-m tftp|xmodem|nfs] [-f imagename] to update barebox into flash"
|
||||
echo "type update -t bareboxenv -d <nor|nand> [-m tftp|xmodem|nfs] [-f imagename] to update bareboxenv into flash"
|
||||
echo "type update -t xload -d <nor|nand> [-m tftp|xmodem|nfs] [-f imagename] to update xload into flash"
|
||||
|
|
|
@ -63,7 +63,7 @@ else
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ x${mode} != xtftp -a x${mode} != xxmodem ] ; then
|
||||
if [ x${mode} != xtftp -a x${mode} != xxmodem -a x${mode} != xnfs ]; then
|
||||
echo "unsupported mode ${mode}."
|
||||
. /env/bin/_update_help
|
||||
exit 1
|
||||
|
|
Loading…
Reference in New Issue