From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg0-f45.google.com (mail-pg0-f45.google.com [74.125.83.45]) by mail.openembedded.org (Postfix) with ESMTP id 1F31B77E7C for ; Thu, 22 Jun 2017 14:57:12 +0000 (UTC) Received: by mail-pg0-f45.google.com with SMTP id f127so8839064pgc.0 for ; Thu, 22 Jun 2017 07:57:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=RYKJ2NVOosCJJI1mBVYnWIMNT8LP5jKMBb1VXXvtan8=; b=sM+CoJ0beFa57AsxXJ8eXQ23uRtAvjuGy0Ce8jEYu6vStHHOO9PQBiKtgLQy3CBND3 PkIBuigyXRNjzSzeFERmEV8FMwBmWTLG6AUNn5C9DAUbSdeA/JIYLkMBOaPULyZ+uiE1 k7BvgtJ+81vHB+wbzTVKL6ZAhp75IFeCSF4C1o1LCq+bbVbBT1XzaZh9Q9BIb/sEw/SC 8VIANugazfCwcmUcWPNxFT9reCCVmgrrAIJESPzjueIBiu4LWtIfBib0s07lKaVJlMCK d8LPt1w5E8HPAvxSd7mOEvFDYwcfrzYz3dzPgc+Cj7gl52qGGxF1dvFdUcMwnU+qAFcb 61JA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=RYKJ2NVOosCJJI1mBVYnWIMNT8LP5jKMBb1VXXvtan8=; b=fIQCX7/gnpHEQ07g7IhP3GfzKSTKyDQY3qGwNU2pultEHel+RPBMuWkkegY03IeDDI IasATdCtJ5hFJUxjaG3+N/u6RFGfedKKcGUwqQ8Jx6xna7fUgDpIBAvj/68VNQuN/pMm kg9SjuPwXsceTX35dQcyvb22wmtSjwoXQCivS5Sv1DWPTKTl+K49eyy05zeq0OP50yEU HYF0CW88/0Dxya38vHBWoNiXvQi5wGohv2CI5ZvTky4jm8P9Yamv1LJZfMD0TBteUzXe O+aNA/VzA7UGHLbCjjHv1GlhI76NcYU1qIVo6uG5FNS0ahCAV6miy6NH8Xcs0S0PKK9+ 1kqw== X-Gm-Message-State: AKS2vOwmBurm/twEHCu+JHumQPvjGuGSYk2vI8kzmF8y9dAIGam9mgom e+3rtKO1B4td3jBWvu2f0/linZUHTQ== X-Received: by 10.98.75.79 with SMTP id y76mr3043514pfa.39.1498143433745; Thu, 22 Jun 2017 07:57:13 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.130.201 with HTTP; Thu, 22 Jun 2017 07:57:13 -0700 (PDT) In-Reply-To: <8134a5ecf72045c33cdfc80a0b647aee7674035e.1498120161.git.liezhi.yang@windriver.com> References: <8134a5ecf72045c33cdfc80a0b647aee7674035e.1498120161.git.liezhi.yang@windriver.com> From: Brian Avery Date: Thu, 22 Jun 2017 07:57:13 -0700 Message-ID: To: Robert Yang Cc: Patches and discussions about the oe-core layer Subject: Re: [PATCH 1/1] runqemu: drop RPC ports X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jun 2017 14:57:14 -0000 Content-Type: multipart/alternative; boundary="001a1135dd1230e84605528db359" --001a1135dd1230e84605528db359 Content-Type: text/plain; charset="UTF-8" looks good 2 me! ty, b an intel employee On Thu, Jun 22, 2017 at 1:30 AM, Robert Yang wrote: > 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 > Date: Tue Jun 6 18:30:49 2017 -0400 > > runqemu-export-rootfs: don't change RPC ports > > [YOCTO #11687] > > Signed-off-by: Robert Yang > --- > scripts/runqemu | 8 ++------ > 1 file changed, 2 insertions(+), 6 deletions(-) > > diff --git a/scripts/runqemu b/scripts/runqemu > index 26328e5b512..41b870c9f7c 100755 > --- a/scripts/runqemu > +++ b/scripts/runqemu > @@ -784,16 +784,12 @@ class BaseConfig(object): > all_instances.sort(key=int) > self.nfs_instance = int(all_instances.pop()) + 1 > > - mountd_rpcport = 21111 + self.nfs_instance > - nfsd_rpcport = 11111 + self.nfs_instance > nfsd_port = 3049 + 2 * self.nfs_instance > mountd_port = 3048 + 2 * self.nfs_instance > > # Export vars for runqemu-export-rootfs > export_dict = { > 'NFS_INSTANCE': self.nfs_instance, > - 'MOUNTD_RPCPORT': mountd_rpcport, > - 'NFSD_RPCPORT': nfsd_rpcport, > 'NFSD_PORT': nfsd_port, > 'MOUNTD_PORT': mountd_port, > } > @@ -801,7 +797,7 @@ class BaseConfig(object): > # Use '%s' since they are integers > os.putenv(k, '%s' % v) > > - self.unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,udp,mountport=%s" > % (nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port) > + self.unfs_opts="nfsvers=3,port=%s,udp,mountport=%s" % > (nfsd_port, mountd_port) > > # Extract .tar.bz2 or .tar.bz if no nfs dir > if not (self.rootfs and os.path.isdir(self.rootfs)): > @@ -1006,7 +1002,7 @@ class BaseConfig(object): > > if self.fstype == 'nfs': > self.rootfs_options = '' > - k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, > self.rootfs, self.unfs_opts) > + k_root = '/dev/nfs nfsroot=%s:%s,%s' % (self.nfs_server, > os.path.abspath(self.rootfs), self.unfs_opts) > self.kernel_cmdline = 'root=%s rw highres=off' % k_root > > if self.fstype == 'none': > -- > 2.11.0 > > -- > _______________________________________________ > Openembedded-core mailing list > Openembedded-core@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core > --001a1135dd1230e84605528db359 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
looks good 2 me!
ty,
b=C2=A0
an in= tel employee

On Thu, Jun 22, 2017 at 1:30 AM, Robert Yang <<= a href=3D"mailto:liezhi.yang@windriver.com" target=3D"_blank">liezhi.yang@w= indriver.com> wrote:
The fo= llowing commit has removed rpc ports from runqemu-export-rootfs, so
runqemu should also remove them, otherwise "runqemu nfs" doesn= 9;t work. And use
abspath for nfsroot, otherwise it doesn't work when it is a relative pa= th.

commit 6bb9860ef7ba9c84fe9bd3a81aa6555f67ebd38e
Author: Cody P Schafer <dev@codyps.com= >
Date:=C2=A0 =C2=A0Tue Jun 6 18:30:49 2017 -0400

=C2=A0 =C2=A0 runqemu-export-rootfs: don't change RPC ports

[YOCTO #11687]

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
---
=C2=A0scripts/runqemu | 8 ++------
=C2=A01 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index 26328e5b512..41b870c9f7c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -784,16 +784,12 @@ class BaseConfig(object):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0all_instances.sort(key=3Din= t)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.nfs_instance =3D int(a= ll_instances.pop()) + 1

-=C2=A0 =C2=A0 =C2=A0 =C2=A0 mountd_rpcport =3D 21111 + self.nfs_instance -=C2=A0 =C2=A0 =C2=A0 =C2=A0 nfsd_rpcport =3D 11111 + self.nfs_instance
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0nfsd_port =3D 3049 + 2 * self.nfs_instanc= e
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0mountd_port =3D 3048 + 2 * self.nfs_insta= nce

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Export vars for runqemu-export-rootfs =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0export_dict =3D {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'NFS_INSTANCE': sel= f.nfs_instance,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'MOUNTD_RPCPORT': mountd= _rpcport,
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 'NFSD_RPCPORT': nfsd_rpc= port,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'NFSD_PORT': nfsd_p= ort,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0'MOUNTD_PORT': moun= td_port,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0}
@@ -801,7 +797,7 @@ class BaseConfig(object):
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Use '%s' since th= ey are integers
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0os.putenv(k, '%s' %= v)

-=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.unfs_opts=3D"nfsvers=3D3,port= =3D%s,mountprog=3D%s,nfsprog=3D%s,udp,mountport=3D%s" % (nfsd_por= t, mountd_rpcport, nfsd_rpcport, mountd_port)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 self.unfs_opts=3D"nfsvers=3D3,port= =3D%s,udp,mountport=3D%s" % (nfsd_port, mountd_port)

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0# Extract .tar.bz2 or .tar.bz if no nfs dir
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if not (self.rootfs and os.path.isdir(sel= f.rootfs)):
@@ -1006,7 +1002,7 @@ class BaseConfig(object):

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if self.fstype =3D=3D 'nfs':
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.rootfs_options =3D = 9;'
-=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 k_root =3D '/dev/nfs nfsroot= =3D%s:%s,%s' % (self.nfs_server, self.rootfs, self.unfs_opts)
+=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 k_root =3D '/dev/nfs nfsroot= =3D%s:%s,%s' % (self.nfs_server, os.path.abspath(self.rootfs), self.unf= s_opts)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0self.kernel_cmdline =3D = 9;root=3D%s rw highres=3Doff' % k_root

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0if self.fstype =3D=3D 'none':
--
2.11.0

--
_______________________________________________
Openembedded-core mailing list
Openembedded-co= re@lists.openembedded.org
http://lists.openembedded.org/m= ailman/listinfo/openembedded-core

--001a1135dd1230e84605528db359--