diff options
author | Yongqin Liu <yongqin.liu@linaro.org> | 2013-08-01 18:00:58 +0800 |
---|---|---|
committer | Vishal Bhoj <vishal.bhoj@linaro.org> | 2013-08-02 16:20:44 +0530 |
commit | b327762182364f28585a8e87ec6ff2f7c24faec0 (patch) | |
tree | 16b67b2f3ab4bf33ec7dc9e5b76b3b443721df8c /nfs-sample.sh | |
parent | 7344816517e646fdaac97acb5bcb2065e6bde9ed (diff) | |
download | linaro-android-tools-b327762182364f28585a8e87ec6ff2f7c24faec0.tar.gz |
nfs tools: add support to boot from nfs
Add the script for creating root file system to support booting from
nfs, and script to create the boot.scr script to use boot from nfs.
Change-Id: I0397da5db416f47bc846a37e9cc41f4c941df4d4
Signed-off-by: Yongqin Liu <yongqin.liu@linaro.org>
Diffstat (limited to 'nfs-sample.sh')
-rwxr-xr-x | nfs-sample.sh | 35 |
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" |