Signed-off-by: Vinay Kumar <[email protected]>
---
scripts/runqemu | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/scripts/runqemu b/scripts/runqemu
index dd92a64553..c623f38838 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1055,7 +1055,8 @@ class BaseConfig(object):
logger.info("Network configuration:%s", netconf)
self.kernel_cmdline_script += netconf
# Port mapping
- hostfwd = ",hostfwd=tcp::2222-:22,hostfwd=tcp::2323-:23"
+ # port 12345 is for rust testing.
+ hostfwd =
",hostfwd=tcp::12345-:12345,hostfwd=tcp::2323-:22,hostfwd=tcp::2222-:22"
qb_slirp_opt_default = "-netdev user,id=net0%s,tftp=%s" % (hostfwd,
self.get('DEPLOY_DIR_IMAGE'))
qb_slirp_opt = self.get('QB_SLIRP_OPT') or qb_slirp_opt_default
# Figure out the port
@@ -1084,6 +1085,21 @@ class BaseConfig(object):
mac += 1
if p != p_new:
ports.append(p_new)
+ temp=__file__.split(os.path.basename(__file__))[0]
+ # To get the mapped port of 22. We use this port number to
copy remote-test-server to image.
+ with open(temp+"../meta/recipes-devtools/rust/rust-test.inc",
'r+') as f:
+ text = f.readlines()
+ temp1=[]
+ for i in text:
+ temp = re.sub(r'(\S+\s)(-.)(\s\d+)( -o
StrictHostKeyChecking=no .*)', r'\1\2 '+str(p_new)+'\\4', i)
+ temp1.append(temp)
+ temp2=''
+ for i in temp1:
+ temp2=temp2+i
+ f.seek(0)
+ f.write(temp2)
+ f.truncate()
+
qb_slirp_opt = re.sub(':%s-' % p, ':%s-' % p_new, qb_slirp_opt)
logger.info("Port forward changed: %s -> %s" % (p, p_new))
mac = "%s%02x" % (self.mac_slirp, mac)
--
2.17.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#150467):
https://lists.openembedded.org/g/openembedded-core/message/150467
Mute This Topic: https://lists.openembedded.org/mt/82112827/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-