summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu-gen-tapdevs
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/runqemu-gen-tapdevs')
-rwxr-xr-xscripts/runqemu-gen-tapdevs10
1 files changed, 5 insertions, 5 deletions
diff --git a/scripts/runqemu-gen-tapdevs b/scripts/runqemu-gen-tapdevs
index 49e1efce7c..11de318c1a 100755
--- a/scripts/runqemu-gen-tapdevs
+++ b/scripts/runqemu-gen-tapdevs
@@ -23,13 +23,13 @@
23# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. 23# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 24
25usage() { 25usage() {
26 echo "Usage: sudo $0 <uid> <gid> <num> <native-sysroot-basedir>" 26 echo "Usage: sudo $0 <uid> <gid> <num> <staging_bindir_native>"
27 echo "Where <uid> is the numeric user id the tap devices will be owned by" 27 echo "Where <uid> is the numeric user id the tap devices will be owned by"
28 echo "Where <gid> is the numeric group id the tap devices will be owned by" 28 echo "Where <gid> is the numeric group id the tap devices will be owned by"
29 echo "<num> is the number of tap devices to create (0 to remove all)" 29 echo "<num> is the number of tap devices to create (0 to remove all)"
30 echo "<native-sysroot-basedir> is the path to the build system's native sysroot" 30 echo "<native-sysroot-basedir> is the path to the build system's native sysroot"
31 echo "e.g. $ bitbake qemu-helper-native" 31 echo "e.g. $ bitbake qemu-helper-native"
32 echo "$ sudo $0 1000 1000 4 tmp/sysroots-components/x86_64/qemu-helper-native/" 32 echo "$ sudo $0 1000 1000 4 tmp/sysroots-components/x86_64/qemu-helper-native/usr/bin"
33 exit 1 33 exit 1
34} 34}
35 35
@@ -46,9 +46,9 @@ fi
46TUID=$1 46TUID=$1
47GID=$2 47GID=$2
48COUNT=$3 48COUNT=$3
49SYSROOT=$4 49STAGING_BINDIR_NATIVE=$4
50 50
51TUNCTL=$SYSROOT/usr/bin/tunctl 51TUNCTL=$STAGING_BINDIR_NATIVE/tunctl
52if [[ ! -x "$TUNCTL" || -d "$TUNCTL" ]]; then 52if [[ ! -x "$TUNCTL" || -d "$TUNCTL" ]]; then
53 echo "Error: $TUNCTL is not an executable" 53 echo "Error: $TUNCTL is not an executable"
54 usage 54 usage
@@ -87,7 +87,7 @@ if [ $COUNT -gt 0 ]; then
87 echo "Creating $COUNT tap devices for UID: $TUID GID: $GID..." 87 echo "Creating $COUNT tap devices for UID: $TUID GID: $GID..."
88 for ((index=0; index < $COUNT; index++)); do 88 for ((index=0; index < $COUNT; index++)); do
89 echo "Creating tap$index" 89 echo "Creating tap$index"
90 ifup=`$RUNQEMU_IFUP $TUID $GID $SYSROOT 2>&1` 90 ifup=`$RUNQEMU_IFUP $TUID $GID $STAGING_BINDIR_NATIVE 2>&1`
91 if [ $? -ne 0 ]; then 91 if [ $? -ne 0 ]; then
92 echo "Error running tunctl: $ifup" 92 echo "Error running tunctl: $ifup"
93 exit 1 93 exit 1