aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xjetson/1-prepare-disk.sh21
1 files changed, 17 insertions, 4 deletions
diff --git a/jetson/1-prepare-disk.sh b/jetson/1-prepare-disk.sh
index 83df27c..02ec9d1 100755
--- a/jetson/1-prepare-disk.sh
+++ b/jetson/1-prepare-disk.sh
@@ -8,15 +8,17 @@ if [ x`whoami` != x"root" ]; then
fi
board="auto"
+distro="auto"
disk=/dev/sda
fs_type=ext4
mnt=/mnt
-rootfs_tar="default"
+rootfs_tar="auto"
-OPTS="`getopt -o v -l board:,rootfs: -- "$@"`"
+OPTS="`getopt -o v -l board:,distro:,rootfs: -- "$@"`"
while test $# -gt 0; do
case $1 in
--board) board="$2"; shift ;;
+ --distro) distro="$2"; shift ;;
--rootfs) rootfs_tar="$2"; shift ;;
-v) set -x ;;
esac
@@ -34,8 +36,19 @@ if [ x"$board" = x"auto" ]; then
esac
fi
-if [ x"$rootfs_tar" = x"default" ]; then
- rootfs_tar="http://images.validation.linaro.org/nvidia/$board/trusty.tar.gz"
+if [ x"$distro" = x"auto" ]; then
+ case "$board" in
+ "tk1") distro="trusty" ;;
+ "tx1") distro="xenial" ;;
+ *)
+ echo "ERROR: ASSERT"
+ exit 1
+ ;;
+ esac
+fi
+
+if [ x"$rootfs_tar" = x"auto" ]; then
+ rootfs_tar="http://images.validation.linaro.org/nvidia/$board/$distro.tar.gz"
fi
echo "ABOUT TO PARTITION AND FORMAT $disk"