summaryrefslogtreecommitdiff
path: root/nfs-sample.sh
diff options
context:
space:
mode:
Diffstat (limited to 'nfs-sample.sh')
-rwxr-xr-xnfs-sample.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/nfs-sample.sh b/nfs-sample.sh
new file mode 100755
index 0000000..1347af6
--- /dev/null
+++ b/nfs-sample.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+rootfs_dir="/srv/linaro/android/nfs_root/test"
+images_dir="/data/linaro/linaro-android/tracking/stable/out/target/product/pandaboard"
+server_ip="192.168.9.109"
+gateway="192.168.9.1"
+netmask="255.255.255.0"
+board_ip="192.168.9.110"
+#board_ip="dhcp"
+
+rm -fr "${rootfs_dir}"
+if [ $? -ne 0 ]; then
+ echo "Faild to remove the old ${rootfs_dir}"
+ exit 1
+fi
+if [ "X${board_ip}" = "Xdhcp" ]; then
+ ./linaro-android-nfs-tool.sh batch \
+ --rootfs-dir "${rootfs_dir}" \
+ --boot "${images_dir}/boot.tar.bz2" \
+ --system "${images_dir}/system.tar.bz2" \
+ --userdata "${images_dir}/userdata.tar.bz2" \
+ --device "panda" \
+ --board-ip "dhcp" \
+ --server-ip "${server_ip}"
+else
+ ./linaro-android-nfs-tool.sh batch \
+ --rootfs-dir "${rootfs_dir}" \
+ --boot "${images_dir}/boot.tar.bz2" \
+ --system "${images_dir}/system.tar.bz2" \
+ --userdata "${images_dir}/userdata.tar.bz2" \
+ --device "panda" \
+ --board-ip "${board_ip}" --gateway "${gateway}" --netmask "${netmask}" \
+ --server-ip "${server_ip}"
+fi
+echo "Please copy the contents in $rootfs_dir/boot to your boot partition(normal the first vfat partition), and reboot your board"