<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/runqemu, branch yocto-2.6.1</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-2.6.1</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-2.6.1'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2019-01-08T20:14:43+00:00</updated>
<entry>
<title>scripts/runqemu: Fix logic error causing failures with MACHINE from the environment</title>
<updated>2019-01-08T20:14:43+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-11-28T16:09:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=cefe82c765af910d4145fd896418540233788cb0'/>
<id>urn:sha1:cefe82c765af910d4145fd896418540233788cb0</id>
<content type='text'>
MACHINE=qemux86-64 oe-selftest -r runqemu.RunqemuTests.test_boot_machine_slirp_qcow2

fails yet

oe-selftest -r runqemu.RunqemuTests.test_boot_machine_slirp_qcow2

with MACHINE in local.conf would work.

It turns out that:

runqemu slirp wic.qcow2 qemux86-64

works but:

MACHINE=qemux86-64 runqemu slirp wic.qcow2 qemux86-64

does not.

The reason are the misplaced return statements in runqemu, its skipping a block
of logic when MACHINE is set in the environment when it shouldn't. Fix this.

(From OE-Core rev: 98d113ae52cbbc88773a81a17b0933412a8e463b)

(From OE-Core rev: bf2ae1ca01edf02a930d70e50b8e1e71f7ec2237)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
Signed-off-by: Armin Kuster &lt;akuster808@gmail.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scripts/runqemu: Improve lockfile handling for python with close_fd=True</title>
<updated>2018-12-16T14:31:32+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-11-28T17:31:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=b9943e4bfe96e3e1242643014cba915924222fa4'/>
<id>urn:sha1:b9943e4bfe96e3e1242643014cba915924222fa4</id>
<content type='text'>
On python versions with close_fds=True (python 3.2 onwards), the tap
device lockfile isn't passed to the child process.

Since this guards against use of an active interface, we really want this
here, so pass it in pass_fds. This means if the parent exits early, the child
still holds the lock, avoiding messages like:

runqemu - ERROR - Failed to run qemu: qemu-system-x86_64: could not configure /dev/net/tun (tap0): Device or resource busy

(From OE-Core rev: 17a0a067d597c445c5892ff9914e91a2187f7e09)

(From OE-Core rev: 1d03e0d54863124c5a65b59ecdc76dbac13d312a)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scripts/runqemu: Tidy up lock handling code</title>
<updated>2018-12-16T14:31:32+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-11-28T17:30:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7ad6069850af97a63397007069d146b0ff5cc14d'/>
<id>urn:sha1:7ad6069850af97a63397007069d146b0ff5cc14d</id>
<content type='text'>
Various tweaks:
- Balance up the aquire/release functions
- Use debug messge for both acquiring and release message for consistency in logs
- Use None instead of an empty string
- Reset the value of the field if we don't have the lock any more

(From OE-Core rev: 2728394ed75526f338cc9cb6bc62fb0ed6dc605f)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scripts/runqemu: Replace subprocess.run() for compatibilty</title>
<updated>2018-12-16T14:31:32+00:00</updated>
<author>
<name>Michael Halstead</name>
<email>mhalstead@linuxfoundation.org</email>
</author>
<published>2018-11-08T20:58:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fecdb7c64a7c76beab6d8c68949edaf9cf2e7a63'/>
<id>urn:sha1:fecdb7c64a7c76beab6d8c68949edaf9cf2e7a63</id>
<content type='text'>
subprocess.run() was introduced in Python 3.5. We currently support down to
Python 3.4 so I've replaced it with subprocess.check_call() which is available
in that version.

(From OE-Core rev: 4ba803d9834565cbe9a89838eb2fcf0328c44bef)

Signed-off-by: Michael Halstead &lt;mhalstead@linuxfoundation.org&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: fix handling of SIGTERM and the problem of line wrapping</title>
<updated>2018-09-25T22:15:49+00:00</updated>
<author>
<name>Chen Qi</name>
<email>Qi.Chen@windriver.com</email>
</author>
<published>2018-09-25T07:08:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0e10a37618c089dc472896a0354aec10ee332913'/>
<id>urn:sha1:0e10a37618c089dc472896a0354aec10ee332913</id>
<content type='text'>
The current handling of SIGTERM is incorrect as the process pid returned
by Popen call with shell setting to True is actualy the shell instead of
the qemu process. So use shlex to split cmd so that we can avoid using
shell=True. This ensures the child process is the actual qemu process.

Also, as we install a SIGTERM handler, we need handle the situation of
qemu terminated by SIGTERM, otherwise we will get ERROR message in such
case.

Besides, we have a problem that after running qemu, the terminal's behavior
is incorrect regarding long lines or long commands. Long commands or long
outputs should appear in multiple lines, but they appear in the same line,
overriding previous output. Use `tput smam' to fix this problem.

(From OE-Core rev: e8acef383767cfd1ef0c3d3c45d9d6eb1c83b3e7)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: exit gracefully with an error message if qemu system is not evaluated</title>
<updated>2018-08-15T08:44:33+00:00</updated>
<author>
<name>Jagadeesh Krishnanjanappa</name>
<email>jkrishnanjanappa@mvista.com</email>
</author>
<published>2018-08-14T14:35:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=138637e2b81bf2e2f0a797fedbb34cdc134c7a2b'/>
<id>urn:sha1:138637e2b81bf2e2f0a797fedbb34cdc134c7a2b</id>
<content type='text'>
It solves below error:
-- snip --
return 'qemu-system-%s' % qbsys
UnboundLocalError: local variable 'qbsys' referenced before assignment
-- snip --

[YOCTO #12846]

(From OE-Core rev: 519273f54c0b8a6fff36afeb7646d8e37717be22)

Signed-off-by: Jagadeesh Krishnanjanappa &lt;jkrishnanjanappa@mvista.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>logging: use warning instead warn</title>
<updated>2018-07-26T12:16:40+00:00</updated>
<author>
<name>Chen Qi</name>
<email>Qi.Chen@windriver.com</email>
</author>
<published>2018-07-19T05:47:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=869e501544960f638edfe17c9d7500b54d05837e'/>
<id>urn:sha1:869e501544960f638edfe17c9d7500b54d05837e</id>
<content type='text'>
The warn method is deprecated. We should use the documented warning instead.

Quoting from the python's official doc:
"""
Note: There is an obsolete method warn which is functionally identical to warning.
      As warn is deprecated, please do not use it - use warning instead.
"""

(From OE-Core rev: f467fd277eb77336097cfc0f5f329bdc8d0f70cb)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>scripts/runqemu: fix qemumips qemumips64 memory detection kernel panic</title>
<updated>2018-07-10T16:33:00+00:00</updated>
<author>
<name>He Zhe</name>
<email>zhe.he@windriver.com</email>
</author>
<published>2018-07-09T03:14:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=c68e4c6e3eb612bb7afd9d7f1e9a6dc295d44346'/>
<id>urn:sha1:c68e4c6e3eb612bb7afd9d7f1e9a6dc295d44346</id>
<content type='text'>
$ runqemu qemumips64 core-image-minimal nographic qemuparams="-m 512"
...
[    0.000000] Call Trace:
[    0.000000] [&lt;ffffffff801268c0&gt;] clear_page+0x0/0x128
[    0.000000] [&lt;ffffffff80238158&gt;] get_page_from_freelist+0xab8/0xc00
[    0.000000] [&lt;ffffffff80238964&gt;] __alloc_pages_nodemask+0xdc/0xf68
[    0.000000] [&lt;ffffffff80239808&gt;] __get_free_pages+0x18/0x70
[    0.000000] [&lt;ffffffff80122a4c&gt;] setup_zero_pages+0x1c/0xb8
[    0.000000] [&lt;ffffffff80c7c998&gt;] mem_init+0x54/0xa0
[    0.000000] [&lt;ffffffff80c74904&gt;] start_kernel+0x204/0x4d8
[    0.000000] [&lt;ffffffff8091dfb0&gt;] kernel_entry+0x0/0x40
[    0.000000] Code: 02002025  1000f8d9  8e634d7c &lt;34860f80&gt; cc9e0000
cc9e0020  cc9e0040  cc9e0060  cc9e0080
[    0.000000]
[    0.000000] ---[ end trace 0000000000000000 ]---
[    0.000000] Kernel panic - not syncing: Attempted to kill the idle task!
[    0.000000] ---[ end Kernel panic - not syncing: Attempted to kill the idle task!
...

OE uses qemumips to simulate a Malta board by default.

As upstream qemu introduced:
https://git.qemu.org/?p=qemu.git;a=commit;h=94c2b6aff43cdfcfdfb552773a6b6b973a72ef0b

The Malta board can support up to 2GiB of RAM which should
be able to boot a Linux kernel built with CONFIG_HIGHMEM
enabled and passing "-m 2048" to QEMU and appending the
following kernel parameters:
...
mem=256M@0x0 mem=256M@0x90000000 mem=1536M@0x20000000
...

But the following commit in kernel broke above mem=X@Y setting
which added the memory as reserved memory area.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=73fbc1eba7ffa3bf0ad12486232a8a1edb4e4411
...
commit 73fbc1eba7ffa3bf0ad12486232a8a1edb4e4411
Author: Marcin Nowakowski &lt;marcin.nowakowski@imgtec.com&gt;
Date:   Wed Nov 23 14:43:49 2016 +0100

    MIPS: fix mem=X@Y commandline processing
...

So remove `mem=*' to disable user-defined physical RAM map
which let kernel itself caculates memory ranges.

Author: Hongxu Jia &lt;hongxu.jia@windriver.com&gt;
[ Merge the two fixes for qemumips32 and qemumips64 into one patch,
  and make it support all mips cases ]
(From OE-Core rev: 0220cb34a91658ecc3782ec1a4700dcb5ece37d8)

Signed-off-by: He Zhe &lt;zhe.he@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: add SIGTERM handler to make sure things are cleaned up</title>
<updated>2018-06-18T10:07:58+00:00</updated>
<author>
<name>Chen Qi</name>
<email>Qi.Chen@windriver.com</email>
</author>
<published>2018-06-07T07:52:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=27061a274f47c72a2290182f7b1da6d6ec309fc7'/>
<id>urn:sha1:27061a274f47c72a2290182f7b1da6d6ec309fc7</id>
<content type='text'>
Add SIGTERM handler so that runqemu could clean things up correctly
when receving such signal.

This problem was originally observed when running testimage. On
some hosts, after running testimage task, the user has to manually
operate on the tap interface (e.g. `sudo ip link del tap0') in order
for the next runqemu command to launch successfully.

The problem is about runqemu, SIGTERM and network manager on the host.

In testimage task, the runqemu process will receive SIGTERM. In such
situation, its cleanup() function is not run, resulting in tap interface
not cleaned up. On some hosts, the network manager will bring down the
tap interface automatically, thus this problem. I saw this problem on
Fedora21.

I think we'd better just clean up the tap interface ourselves.

So this patch adds to runqemu a SIGTERM handler, in which the actual
qemu process is terminated and other things cleaned up.

(From OE-Core rev: 02709d4709c56f9b9095e3555da35b659b03a8a3)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: Add workaround for APIC hang on pre 4.15 kernels on qemux86</title>
<updated>2018-01-02T17:24:39+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2018-01-02T11:36:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d18003726f561bab2ab07acf16baee074da37cdc'/>
<id>urn:sha1:d18003726f561bab2ab07acf16baee074da37cdc</id>
<content type='text'>
On pre 4.15 host kernels, an APIC window emulation bug can cause qemu
to hang. On 64 bit we can use the x2apic, for 32 bit, we just have to
disable the other timer sources and rely on kvm-clock.

[YOCTO #12301]

(From OE-Core rev: 82e67b82ea8e12aa0b7b9db1d84fec0436dec71b)

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
