<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/runqemu, branch yocto-2.5.3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-2.5.3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=yocto-2.5.3'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2019-02-25T22:27:45+00:00</updated>
<entry>
<title>runqemu: clean up subprocess usage</title>
<updated>2019-02-25T22:27:45+00:00</updated>
<author>
<name>Ross Burton</name>
<email>ross.burton@intel.com</email>
</author>
<published>2018-09-21T15:11:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=d28969259f1b8f4343dcbf1cd43b9523df5c4bae'/>
<id>urn:sha1:d28969259f1b8f4343dcbf1cd43b9523df5c4bae</id>
<content type='text'>
Where possible pass lists instead of strings, don't use a subshell, and call
check*() instead of using Popen directly.

(From OE-Core rev: d2374623444752af1ad748ed36b68ea58f629bf6)

(From OE-Core rev: a2cbc5954d44b0922136fc3d75f891064a948298)

Signed-off-by: Ross Burton &lt;ross.burton@intel.com&gt;
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:26+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=30148ab8742e39277e833300f26760d84e818a84'/>
<id>urn:sha1:30148ab8742e39277e833300f26760d84e818a84</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: d3b3c55ddc312039380ce8e23e68dd8bb2439388)

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:26+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=d99e6afb8d6a7c3cfc8cf2eeab3db24dd9702d7f'/>
<id>urn:sha1:d99e6afb8d6a7c3cfc8cf2eeab3db24dd9702d7f</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: d3c052e6ccd81d544b23a3bee80ba00cafaedbbd)

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:26+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=f7b5f33ae1ef9560917c39904c0813b28ae8ee7b'/>
<id>urn:sha1:f7b5f33ae1ef9560917c39904c0813b28ae8ee7b</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: 1c61f3017a6a2d95747883c722c376763ec77c9d)

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-10-18T10:08:53+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=30a244ba7b61c025402f541a7b9b05ffb2bf8224'/>
<id>urn:sha1:30a244ba7b61c025402f541a7b9b05ffb2bf8224</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)

(From OE-Core rev: a2ee5c8a1ff449250e6f37fccf01b85a7361b24c)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
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>runqemu: exit gracefully with an error message if qemu system is not evaluated</title>
<updated>2018-10-18T10:08:53+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=fff3aa6b075ba68d150e3dc76af96b14a29bb517'/>
<id>urn:sha1:fff3aa6b075ba68d150e3dc76af96b14a29bb517</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)

(From OE-Core rev: bc030c9f5af4af5a8bad48bc8beca9324a65d25b)

Signed-off-by: Jagadeesh Krishnanjanappa &lt;jkrishnanjanappa@mvista.com&gt;
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>runqemu: add SIGTERM handler to make sure things are cleaned up</title>
<updated>2018-10-18T10:08:53+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=edc09e102e888aed1e0de086c4cf8906a6bd1c46'/>
<id>urn:sha1:edc09e102e888aed1e0de086c4cf8906a6bd1c46</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)

(From OE-Core rev: 05c2a590980819e31acee29e1e7282d2ed3586b7)

Signed-off-by: Chen Qi &lt;Qi.Chen@windriver.com&gt;
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>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>
<entry>
<title>runqemu: Allow the user to override the device tree option</title>
<updated>2017-12-02T11:25:34+00:00</updated>
<author>
<name>Alistair Francis</name>
<email>alistair.francis@xilinx.com</email>
</author>
<published>2017-11-22T00:43:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=fae2e2f42de8212e90f75ac0035ffb65db10bb6c'/>
<id>urn:sha1:fae2e2f42de8212e90f75ac0035ffb65db10bb6c</id>
<content type='text'>
Update the runqemu script to allow the user to specify a device tree
to boot when calling runqemu.

This involves creating a seperate check_dtb() function incase the user
has specified 'none' for the kernel but still wants a device tree.

(From OE-Core rev: 867ac1370b294bfd1ee31f94abb63688f77081a1)

Signed-off-by: Alistair Francis &lt;alistair.francis@xilinx.com&gt;
Reviewed-by: Ben Levinsky &lt;ben.levinsky@xilinx.com&gt;
Cc: Ben Levinsky &lt;ben.levinsky@xilinx.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>runqemu: Allow the user to override the Kernel option</title>
<updated>2017-12-02T11:25:34+00:00</updated>
<author>
<name>Alistair Francis</name>
<email>alistair.francis@xilinx.com</email>
</author>
<published>2017-11-22T00:43:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=7159b281e7c2ec235034205d4dae664c87a9afca'/>
<id>urn:sha1:7159b281e7c2ec235034205d4dae664c87a9afca</id>
<content type='text'>
Update the runqemu script to allow the user to specify a Kernel to boot
when calling runqemu.

(From OE-Core rev: eaf2793a98cb27d82561da0f8993f2b4b304ecc2)

Signed-off-by: Alistair Francis &lt;alistair.francis@xilinx.com&gt;
Cc: Ben Levinsky &lt;ben.levinsky@xilinx.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>
</feed>
