]> code.ossystems Code Review - openembedded-core.git/commitdiff
runqemu: use bindir_native property to run ifup/down scripts
authorEd Bartosh <ed.bartosh@linux.intel.com>
Wed, 12 Apr 2017 20:40:59 +0000 (23:40 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 12 Apr 2017 22:55:54 +0000 (23:55 +0100)
Used self.bindir_native to point out to the native sysroot
when running runqemu-ifup and runqemu-ifdown scripts.

[YOCTO #11266]
[YOCTO #11193]

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/runqemu
scripts/runqemu-ifdown
scripts/runqemu-ifup

index 6cdedd8d7e1e8ff34c411ef7bb0092040ae572ff..3744c67409ce7d032302a096560386d878035410 100755 (executable)
@@ -920,7 +920,7 @@ class BaseConfig(object):
             gid = os.getgid()
             uid = os.getuid()
             logger.info("Setting up tap interface under sudo")
-            cmd = 'sudo %s %s %s %s' % (self.qemuifup, uid, gid, self.get('STAGING_DIR_NATIVE'))
+            cmd = 'sudo %s %s %s %s' % (self.qemuifup, uid, gid, self.bindir_native)
             tap = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE).stdout.read().decode('utf-8').rstrip('\n')
             lockfile = os.path.join(lockdir, tap)
             self.lock = lockfile + '.lock'
@@ -1140,7 +1140,7 @@ class BaseConfig(object):
 
     def cleanup(self):
         if self.cleantap:
-            cmd = 'sudo %s %s %s' % (self.qemuifdown, self.tap, self.get('STAGING_DIR_NATIVE'))
+            cmd = 'sudo %s %s %s' % (self.qemuifdown, self.tap, self.bindir_native)
             logger.info('Running %s' % cmd)
             subprocess.call(cmd, shell=True)
         if self.lock_descriptor:
index 8f66cfa2a9bdb047ed3839ced32cb6b8c89a282d..ffbc9de442ef6aee6fe368294ddf14bc4979b2a2 100755 (executable)
@@ -41,11 +41,11 @@ if [ $# -ne 2 ]; then
 fi
 
 TAP=$1
-NATIVE_SYSROOT_DIR=$2
+STAGING_BINDIR_NATIVE=$2
 
-TUNCTL=$NATIVE_SYSROOT_DIR/usr/bin/tunctl
+TUNCTL=$STAGING_BINDIR_NATIVE/tunctl
 if [ ! -e "$TUNCTL" ]; then
-       echo "Error: Unable to find tunctl binary in '$NATIVE_SYSROOT_DIR/usr/bin', please bitbake qemu-helper-native"
+       echo "Error: Unable to find tunctl binary in '$STAGING_BINDIR_NATIVE', please bitbake qemu-helper-native"
        exit 1
 fi
 
index d9bd894123987732ca4b88b46138c0e4c06c85a5..59a15eaa2e6dcdb28f03edc251a2e1c291a8c540 100755 (executable)
@@ -49,11 +49,11 @@ fi
 
 USERID="-u $1"
 GROUP="-g $2"
-NATIVE_SYSROOT_DIR=$3
+STAGING_BINDIR_NATIVE=$3
 
-TUNCTL=$NATIVE_SYSROOT_DIR/usr/bin/tunctl
+TUNCTL=$STAGING_BINDIR_NATIVE/tunctl
 if [ ! -x "$TUNCTL" ]; then
-       echo "Error: Unable to find tunctl binary in '$NATIVE_SYSROOT_DIR/usr/bin', please bitbake qemu-helper-native"
+       echo "Error: Unable to find tunctl binary in '$STAGING_BINDIR_NATIVE', please bitbake qemu-helper-native"
        exit 1
 fi