diff options
author | Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com> | 2017-02-21 17:18:08 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-04 23:18:18 +0000 |
commit | b4b2d6dec41b8b6c7a1e7c521e26e2d0345a94a0 (patch) | |
tree | d9b220c2cae111a2d42015efda9d031d030d3a1b /scripts/runqemu | |
parent | 86d6b790eb70c330e351b2ab4d9a9787c114bdf4 (diff) | |
download | poky-b4b2d6dec41b8b6c7a1e7c521e26e2d0345a94a0.tar.gz |
scripts/runqemu: avoid overridden user input for bootparams
Currently runqemu hardcodes the "ip=" kernel boot parameter
when configuring QEMU to use tap or slirp networking. This makes
the guest system to have a network interface pre-configured
by kernel and causes systemd to fail renaming the interface
to whatever pleases it:
Feb 21 10:10:20 intel-corei7-64 systemd-udevd[201]: Error changing
net interface name 'eth0' to 'enp0s3': Device or resource busy,
Always append user input for kernel boot params after the ones
added by the script. This way user input has priority over runqemu's
default params.
(From OE-Core rev: 3f68b5c8d24b52aed5bb3ed970dd8f779b65b1b3)
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-x | scripts/runqemu | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/runqemu b/scripts/runqemu index b6c6a8747c..c5fa88e341 100755 --- a/scripts/runqemu +++ b/scripts/runqemu | |||
@@ -188,6 +188,7 @@ class BaseConfig(object): | |||
188 | self.kernel = '' | 188 | self.kernel = '' |
189 | self.kernel_cmdline = '' | 189 | self.kernel_cmdline = '' |
190 | self.kernel_cmdline_script = '' | 190 | self.kernel_cmdline_script = '' |
191 | self.bootparams = '' | ||
191 | self.dtb = '' | 192 | self.dtb = '' |
192 | self.fstype = '' | 193 | self.fstype = '' |
193 | self.kvm_enabled = False | 194 | self.kvm_enabled = False |
@@ -411,7 +412,7 @@ class BaseConfig(object): | |||
411 | elif arg.startswith('qemuparams='): | 412 | elif arg.startswith('qemuparams='): |
412 | self.qemu_opt_script += ' %s' % arg[len('qemuparams='):] | 413 | self.qemu_opt_script += ' %s' % arg[len('qemuparams='):] |
413 | elif arg.startswith('bootparams='): | 414 | elif arg.startswith('bootparams='): |
414 | self.kernel_cmdline_script += ' %s' % arg[len('bootparams='):] | 415 | self.bootparams = arg[len('bootparams='):] |
415 | elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)): | 416 | elif os.path.exists(arg) or (re.search(':', arg) and re.search('/', arg)): |
416 | self.check_arg_path(os.path.abspath(arg)) | 417 | self.check_arg_path(os.path.abspath(arg)) |
417 | elif re.search(r'-image-|-image$', arg): | 418 | elif re.search(r'-image-|-image$', arg): |
@@ -1091,7 +1092,9 @@ class BaseConfig(object): | |||
1091 | 1092 | ||
1092 | def start_qemu(self): | 1093 | def start_qemu(self): |
1093 | if self.kernel: | 1094 | if self.kernel: |
1094 | kernel_opts = "-kernel %s -append '%s %s %s'" % (self.kernel, self.kernel_cmdline, self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND')) | 1095 | kernel_opts = "-kernel %s -append '%s %s %s %s'" % (self.kernel, self.kernel_cmdline, |
1096 | self.kernel_cmdline_script, self.get('QB_KERNEL_CMDLINE_APPEND'), | ||
1097 | self.bootparams) | ||
1095 | if self.dtb: | 1098 | if self.dtb: |
1096 | kernel_opts += " -dtb %s" % self.dtb | 1099 | kernel_opts += " -dtb %s" % self.dtb |
1097 | else: | 1100 | else: |