aboutsummaryrefslogtreecommitdiff
path: root/scripts/disk_image
diff options
context:
space:
mode:
authorStefano Stabellini2021-04-16 13:36:20 -0700
committerStefano Stabellini2021-05-17 14:50:54 -0700
commita2b5ba41fed282f50b34f80e72e1a3d6c8ee3b4d (patch)
tree6fe05cecc0331f669fa8feeab659537c9d488e8a /scripts/disk_image
parenta277dc17751ffb5eef3e6452e05a5a4e0f5953d3 (diff)
Add LOAD_CMD parsing to disk_image
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> Reviewed-by: Brian Woods <brian.woods@xilinx.com>
Diffstat (limited to 'scripts/disk_image')
-rwxr-xr-xscripts/disk_image25
1 files changed, 23 insertions, 2 deletions
diff --git a/scripts/disk_image b/scripts/disk_image
index 0f43165..eeb888f 100755
--- a/scripts/disk_image
+++ b/scripts/disk_image
@@ -69,11 +69,16 @@ function write_rootfs()
function print_help
{
echo "usage:"
- echo " $0 -c CONFIG_FILE -d UBOOT_DIRECTORY <-w WORK_DIRECTORY> -o IMG_FILE"
+ echo " $0 -c CONFIG_FILE -d UBOOT_DIRECTORY -t UBOOT_TYPE <-w WORK_DIRECTORY> -o IMG_FILE"
echo " $0 -h"
echo "where:"
echo " -c CONFIG_FILE - configuration file"
echo " -d UBOOT_DIRECTORY - root directory for the paths specified in CONFIG_FILE"
+ echo " -t UBOOT_TYPE can be:"
+ echo " sd - alias for \"mmc load 0:1\" for uboot load commands"
+ echo " scsi - alias for \"scsi load 0:1\" for uboot load commands"
+ echo " tftp - alias for \"tftpb\" for uboot load cammnds"
+ echo " < > - used for uboot load commands"
echo " -w WORK_DIRECTORY - work directory used when building the image"
echo " -o IMG_FILE - the output img file "
echo "Example:"
@@ -87,9 +92,25 @@ then
exit 1
fi
-while getopts ":w:d:c:o:h" opt
+while getopts ":w:d:c:t:o:h" opt
do
case ${opt} in
+ t )
+ case $OPTARG in
+ scsi )
+ LOAD_CMD="load scsi 0:1"
+ ;;
+ sd )
+ LOAD_CMD="load mmc 0:1"
+ ;;
+ tftp )
+ LOAD_CMD="tftpb"
+ ;;
+ * )
+ LOAD_CMD="$OPTARG"
+ ;;
+ esac
+ ;;
w )
DESTDIR=$OPTARG
;;