[oe-commits] [openembedded-core] 07/10: runqemu: Make QB_MEM easier to set
git at git.openembedded.org
git at git.openembedded.org
Fri Feb 15 16:06:43 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch master
in repository openembedded-core.
commit ad246f5ce0652bd917d85884176baa746e1379ff
Author: Robert Yang <liezhi.yang at windriver.com>
AuthorDate: Fri Feb 15 16:14:52 2019 +0800
runqemu: Make QB_MEM easier to set
It only could be set as the following in the past:
QB_MEM = "-m 256"
Now it also can be set as:
QB_MEM = "-m 256M (or m)"
QB_MEM = "256M (or m)"
[YOCTO #11522]
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
---
scripts/runqemu | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/scripts/runqemu b/scripts/runqemu
index 10f61e4..d171c4f 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -679,6 +679,17 @@ class BaseConfig(object):
logger.info('QB_MEM is not set, use 512M by default')
self.set('QB_MEM', '-m 512')
+ # Check and remove M or m suffix
+ qb_mem = self.get('QB_MEM')
+ if qb_mem.endswith('M') or qb_mem.endswith('m'):
+ qb_mem = qb_mem[:-1]
+
+ # Add -m prefix it not present
+ if not qb_mem.startswith('-m'):
+ qb_mem = '-m %s' % qb_mem
+
+ self.set('QB_MEM', qb_mem)
+
mach = self.get('MACHINE')
if not mach.startswith('qemumips'):
self.kernel_cmdline_script += ' mem=%s' % self.get('QB_MEM').replace('-m','').strip() + 'M'
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list