diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/runqemu | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index c4a0ca811d..10f61e4c7f 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -189,6 +189,7 @@ class BaseConfig(object): | |||
189 | 189 | ||
190 | self.qemu_opt = '' | 190 | self.qemu_opt = '' |
191 | self.qemu_opt_script = '' | 191 | self.qemu_opt_script = '' |
192 | self.qemuparams = '' | ||
192 | self.clean_nfs_dir = False | 193 | self.clean_nfs_dir = False |
193 | self.nfs_server = '' | 194 | self.nfs_server = '' |
194 | self.rootfs = '' | 195 | self.rootfs = '' |
@@ -460,7 +461,7 @@ class BaseConfig(object): | |||
460 | elif arg.startswith('biosfilename='): | 461 | elif arg.startswith('biosfilename='): |
461 | self.qemu_opt_script += ' -bios %s' % arg[len('biosfilename='):] | 462 | self.qemu_opt_script += ' -bios %s' % arg[len('biosfilename='):] |
462 | elif arg.startswith('qemuparams='): | 463 | elif arg.startswith('qemuparams='): |
463 | self.qemu_opt_script += ' %s' % arg[len('qemuparams='):] | 464 | self.qemuparams = ' %s' % arg[len('qemuparams='):] |
464 | elif arg.startswith('bootparams='): | 465 | elif arg.startswith('bootparams='): |
465 | self.bootparams = arg[len('bootparams='):] | 466 | self.bootparams = arg[len('bootparams='):] |
466 | elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)): | 467 | elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)): |
@@ -667,7 +668,11 @@ class BaseConfig(object): | |||
667 | raise RunQemuError("Invalid custombiosdir: %s" % self.custombiosdir) | 668 | raise RunQemuError("Invalid custombiosdir: %s" % self.custombiosdir) |
668 | 669 | ||
669 | def check_mem(self): | 670 | def check_mem(self): |
670 | s = re.search('-m +([0-9]+)', self.qemu_opt_script) | 671 | """ |
672 | Both qemu and kernel needs memory settings, so check QB_MEM and set it | ||
673 | for both. | ||
674 | """ | ||
675 | s = re.search('-m +([0-9]+)', self.qemuparams) | ||
671 | if s: | 676 | if s: |
672 | self.set('QB_MEM', '-m %s' % s.group(1)) | 677 | self.set('QB_MEM', '-m %s' % s.group(1)) |
673 | elif not self.get('QB_MEM'): | 678 | elif not self.get('QB_MEM'): |
@@ -1169,6 +1174,10 @@ class BaseConfig(object): | |||
1169 | 1174 | ||
1170 | self.qemu_opt += ' ' + self.qemu_opt_script | 1175 | self.qemu_opt += ' ' + self.qemu_opt_script |
1171 | 1176 | ||
1177 | # Append qemuparams to override previous settings | ||
1178 | if self.qemuparams: | ||
1179 | self.qemu_opt += ' ' + self.qemuparams | ||
1180 | |||
1172 | if self.snapshot: | 1181 | if self.snapshot: |
1173 | self.qemu_opt += " -snapshot" | 1182 | self.qemu_opt += " -snapshot" |
1174 | 1183 | ||