[oe-commits] [openembedded-core] 51/55: runqemu: Make QB_MEM easier to set
git at git.openembedded.org
git at git.openembedded.org
Mon Feb 25 22:29:47 UTC 2019
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch thud
in repository openembedded-core.
commit ed10ef4f8deaec739ce3713b6ce3b63e134a8c4a
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]
(From OE-Core rev: ad246f5ce0652bd917d85884176baa746e1379ff)
Signed-off-by: Robert Yang <liezhi.yang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
scripts/runqemu | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/scripts/runqemu b/scripts/runqemu
index 5250571..1c96b29 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -674,6 +674,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