diff options
Diffstat (limited to 'scripts/runqemu')
| -rwxr-xr-x | scripts/runqemu | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index 55cdd414ec..52505719c9 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
| @@ -188,6 +188,7 @@ class BaseConfig(object): | |||
| 188 | 188 | ||
| 189 | self.qemu_opt = '' | 189 | self.qemu_opt = '' |
| 190 | self.qemu_opt_script = '' | 190 | self.qemu_opt_script = '' |
| 191 | self.qemuparams = '' | ||
| 191 | self.clean_nfs_dir = False | 192 | self.clean_nfs_dir = False |
| 192 | self.nfs_server = '' | 193 | self.nfs_server = '' |
| 193 | self.rootfs = '' | 194 | self.rootfs = '' |
| @@ -455,7 +456,7 @@ class BaseConfig(object): | |||
| 455 | elif arg.startswith('biosfilename='): | 456 | elif arg.startswith('biosfilename='): |
| 456 | self.qemu_opt_script += ' -bios %s' % arg[len('biosfilename='):] | 457 | self.qemu_opt_script += ' -bios %s' % arg[len('biosfilename='):] |
| 457 | elif arg.startswith('qemuparams='): | 458 | elif arg.startswith('qemuparams='): |
| 458 | self.qemu_opt_script += ' %s' % arg[len('qemuparams='):] | 459 | self.qemuparams = ' %s' % arg[len('qemuparams='):] |
| 459 | elif arg.startswith('bootparams='): | 460 | elif arg.startswith('bootparams='): |
| 460 | self.bootparams = arg[len('bootparams='):] | 461 | self.bootparams = arg[len('bootparams='):] |
| 461 | elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)): | 462 | elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)): |
| @@ -662,7 +663,11 @@ class BaseConfig(object): | |||
| 662 | raise RunQemuError("Invalid custombiosdir: %s" % self.custombiosdir) | 663 | raise RunQemuError("Invalid custombiosdir: %s" % self.custombiosdir) |
| 663 | 664 | ||
| 664 | def check_mem(self): | 665 | def check_mem(self): |
| 665 | s = re.search('-m +([0-9]+)', self.qemu_opt_script) | 666 | """ |
| 667 | Both qemu and kernel needs memory settings, so check QB_MEM and set it | ||
| 668 | for both. | ||
| 669 | """ | ||
| 670 | s = re.search('-m +([0-9]+)', self.qemuparams) | ||
| 666 | if s: | 671 | if s: |
| 667 | self.set('QB_MEM', '-m %s' % s.group(1)) | 672 | self.set('QB_MEM', '-m %s' % s.group(1)) |
| 668 | elif not self.get('QB_MEM'): | 673 | elif not self.get('QB_MEM'): |
| @@ -1164,6 +1169,10 @@ class BaseConfig(object): | |||
| 1164 | 1169 | ||
| 1165 | self.qemu_opt += ' ' + self.qemu_opt_script | 1170 | self.qemu_opt += ' ' + self.qemu_opt_script |
| 1166 | 1171 | ||
| 1172 | # Append qemuparams to override previous settings | ||
| 1173 | if self.qemuparams: | ||
| 1174 | self.qemu_opt += ' ' + self.qemuparams | ||
| 1175 | |||
| 1167 | if self.snapshot: | 1176 | if self.snapshot: |
| 1168 | self.qemu_opt += " -snapshot" | 1177 | self.qemu_opt += " -snapshot" |
| 1169 | 1178 | ||
