diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2017-06-22 01:30:06 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-06-28 15:21:33 +0100 |
commit | 4d54ebab89595f0df38c58311b7bb012f591ec77 (patch) | |
tree | 8816e9211c056a37d2800d0e51f92efdaceca07c /scripts/runqemu | |
parent | 1b1d6708dd0416e470bd85602449990df36b7ee3 (diff) | |
download | poky-4d54ebab89595f0df38c58311b7bb012f591ec77.tar.gz |
runqemu: drop RPC ports
The following commit has removed rpc ports from runqemu-export-rootfs, so
runqemu should also remove them, otherwise "runqemu nfs" doesn't work. And use
abspath for nfsroot, otherwise it doesn't work when it is a relative path.
commit 6bb9860ef7ba9c84fe9bd3a81aa6555f67ebd38e
Author: Cody P Schafer <dev@codyps.com>
Date: Tue Jun 6 18:30:49 2017 -0400
runqemu-export-rootfs: don't change RPC ports
[YOCTO #11687]
(From OE-Core rev: d7c5c9344de6974997c39097a7767ec338c3cca3)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 26328e5b51..41b870c9f7 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -784,16 +784,12 @@ class BaseConfig(object): | |||
784 | all_instances.sort(key=int) | 784 | all_instances.sort(key=int) |
785 | self.nfs_instance = int(all_instances.pop()) + 1 | 785 | self.nfs_instance = int(all_instances.pop()) + 1 |
786 | 786 | ||
787 | mountd_rpcport = 21111 + self.nfs_instance | ||
788 | nfsd_rpcport = 11111 + self.nfs_instance | ||
789 | nfsd_port = 3049 + 2 * self.nfs_instance | 787 | nfsd_port = 3049 + 2 * self.nfs_instance |
790 | mountd_port = 3048 + 2 * self.nfs_instance | 788 | mountd_port = 3048 + 2 * self.nfs_instance |
791 | 789 | ||
792 | # Export vars for runqemu-export-rootfs | 790 | # Export vars for runqemu-export-rootfs |
793 | export_dict = { | 791 | export_dict = { |
794 | 'NFS_INSTANCE': self.nfs_instance, | 792 | 'NFS_INSTANCE': self.nfs_instance, |
795 | 'MOUNTD_RPCPORT': mountd_rpcport, | ||
796 | 'NFSD_RPCPORT': nfsd_rpcport, | ||
797 | 'NFSD_PORT': nfsd_port, | 793 | 'NFSD_PORT': nfsd_port, |
798 | 'MOUNTD_PORT': mountd_port, | 794 | 'MOUNTD_PORT': mountd_port, |
799 | } | 795 | } |
@@ -801,7 +797,7 @@ class BaseConfig(object): | |||
801 | # Use '%s' since they are integers | 797 | # Use '%s' since they are integers |
802 | os.putenv(k, '%s' % v) | 798 | os.putenv(k, '%s' % v) |
803 | 799 | ||
804 | self.unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,udp,mountport=%s" % (nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port) | 800 | self.unfs_opts="nfsvers=3,port=%s,udp,mountport=%s" % (nfsd_port, mountd_port) |
805 | 801 | ||
806 | # Extract .tar.bz2 or .tar.bz if no nfs dir | 802 | # Extract .tar.bz2 or .tar.bz if no nfs dir |
807 | if not (self.rootfs and os.path.isdir(self.rootfs)): | 803 | if not (self.rootfs and os.path.isdir(self.rootfs)): |
@@ -1006,7 +1002,7 @@ class BaseConfig(object): | |||
1006 | 1002 | ||
1007 | if self.fstype == 'nfs': | 1003 | if self.fstype == 'nfs': |
1008 | self.rootfs_options = '' | 1004 | self.rootfs_options = '' |
1009 | k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, self.rootfs, self.unfs_opts) | 1005 | k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, os.path.abspath(self.rootfs), self.unfs_opts) |
1010 | self.kernel_cmdline = 'root=%s rw highres=off' % k_root | 1006 | self.kernel_cmdline = 'root=%s rw highres=off' % k_root |
1011 | 1007 | ||
1012 | if self.fstype == 'none': | 1008 | if self.fstype == 'none': |