<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/poky.git/scripts/runqemu, branch 4.2_M3</title>
<subtitle>Mirror of git.yoctoproject.org/poky</subtitle>
<id>https://git.enea.com/cgit/linux/poky.git/atom?h=4.2_M3</id>
<link rel='self' href='https://git.enea.com/cgit/linux/poky.git/atom?h=4.2_M3'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/'/>
<updated>2023-02-23T12:11:29+00:00</updated>
<entry>
<title>runqemu: kill qemu if it hangs</title>
<updated>2023-02-23T12:11:29+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@linaro.org</email>
</author>
<published>2023-02-15T14:50:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=bfb4d48d7c3e2bee595629aaf2b9260075b196bc'/>
<id>urn:sha1:bfb4d48d7c3e2bee595629aaf2b9260075b196bc</id>
<content type='text'>
qemu doesn't always behave well and can hang too.
kill it with force if it was still alive. Move clean up
commands into cleanup() function.

(From OE-Core rev: 079c2935d2f585ce49e1c7daab2155fcf0094c48)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>base: add support for loongarch64</title>
<updated>2023-02-04T17:02:10+00:00</updated>
<author>
<name>Xiaotian Wu</name>
<email>wuxiaotian@loongson.cn</email>
</author>
<published>2023-02-03T07:16:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=324b03e15fb8623690a5c5c64006602fdc7027a2'/>
<id>urn:sha1:324b03e15fb8623690a5c5c64006602fdc7027a2</id>
<content type='text'>
(From OE-Core rev: 759baaceb4dd623d5da12ba0d01540fa080154ba)

Signed-off-by: Xiaotian Wu &lt;wuxiaotian@loongson.cn&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: add process of option QB_NFSROOTFS_EXTRA_OPT</title>
<updated>2023-01-26T22:22:53+00:00</updated>
<author>
<name>Xiangyu Chen</name>
<email>xiangyu.chen@windriver.com</email>
</author>
<published>2023-01-17T02:05:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=6bc30dd4a7d4fdad53d6b5fab3cb574d095ca774'/>
<id>urn:sha1:6bc30dd4a7d4fdad53d6b5fab3cb574d095ca774</id>
<content type='text'>
This extra options to be appended to the nfs rootfs options in kernel
boot arg.

Example config with qemuppc64 in machine config:

add r/w size in the nfs rootfs extra option:
QB_NFSROOTFS_EXTRA_OPT = "wsize=524288,rsize=524288"

re-build and runqemu with nfs again, we can observe the kernel command
line added our defined value in QB_NFSROOTFS_EXTRA_OPT:

Kernel command line: root=/dev/nfs nfsroot=10.0.2.2:/home/xchen5/testing/build/tmp-glibc/deploy/images/qemuppc64/testnfs,nfsvers=3,port=3049,tcp,mountport=3048,wsize=524288,rsize=524288 rw  mem=256M ip=dhcp console=hvc0 console=hvc0 nohugevmalloc

(From OE-Core rev: 43a97f5bf3f90c5c1fd603f7dca2b3db2c0e3040)

Signed-off-by: Xiangyu Chen &lt;xiangyu.chen@windriver.com&gt;
Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: add QB_SETUP_CMD and QB_CLEANUP_CMD</title>
<updated>2022-12-21T10:16:31+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@linaro.org</email>
</author>
<published>2022-12-14T08:54:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0d1023673b356c430a2370507cea973e7c8efa47'/>
<id>urn:sha1:0d1023673b356c430a2370507cea973e7c8efa47</id>
<content type='text'>
These enable running custom shell setup and cleanup commands
before and after qemu. Enables machine configurations to for
example run qemu with swtpm to emulate TPM devices.

Example config with meta-tpm2 based swtpm in machine config:

 * image recipe depens on swtpm-native to get the native tools to PATH,
   same handling as qemu itself

do_testimage[depends] += "swtpm-native:do_populate_sysroot"

 * startup commands for swtpm daemon, note that swtpm
   socket file has 107 character limit and absolute paths to build environment
   will not work

QB_SETUP_CMD = " \
   test -d '${IMAGE_BASENAME}_swtpm' || ( mkdir -p '${IMAGE_BASENAME}_swtpm' &amp;&amp; \
       swtpm_setup --tpmstate '${IMAGE_BASENAME}_swtpm' --tpm2 --pcr-banks sha256 ); \
   swtpm socket --tpmstate dir='${IMAGE_BASENAME}_swtpm' \
         --ctrl type=unixio,path='${IMAGE_BASENAME}_swtpm/swtpm-sock' \
         --log level=40 --tpm2 -t -d \
"

 * qemu startup command in machine config is configured enable swtpm device

QB_OPT_APPEND += "-chardev socket,id=chrtpm,path='${IMAGE_BASENAME}_swtpm/swtpm-sock' -tpmdev emulator,id=tpm0,chardev=chrtpm -device tpm-tis-device,tpmdev=tpm0"

 * in this case, swtpm daemon stops automatically with qemu machine, but
   QB_CLEANUP_CMD could be used to kill a specific process and wipe
   temporary files

Now runqemu and testimage.bbclass can be used with swtpm.

(From OE-Core rev: d5c38964a4458aa31ec37810773ecc4f5d410dbe)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: do not hardcode the ip address of the nfs server when using tap</title>
<updated>2022-11-29T10:29:58+00:00</updated>
<author>
<name>Alexander Kanavin</name>
<email>alex.kanavin@gmail.com</email>
</author>
<published>2022-11-28T10:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=18fc5fb41aa673be646e7863be577f60b069e8af'/>
<id>urn:sha1:18fc5fb41aa673be646e7863be577f60b069e8af</id>
<content type='text'>
Rather, set it similarly to the overall network config.

(From OE-Core rev: d5e2ef31b151825613b62e58034e81f72526a944)

Signed-off-by: Alexander Kanavin &lt;alex@linutronix.de&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: limit slirp host port forwarding to localhost 127.0.0.1</title>
<updated>2022-11-20T08:29:07+00:00</updated>
<author>
<name>Mikko Rapeli</name>
<email>mikko.rapeli@linaro.org</email>
</author>
<published>2022-11-14T15:50:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=aa3cb188b853c3ecec1a3c9a141da1e71f7604e5'/>
<id>urn:sha1:aa3cb188b853c3ecec1a3c9a141da1e71f7604e5</id>
<content type='text'>
With default slirp port forwarding config qemu listens on TCP ports
2222 and 2323 on all IP addresses available on the build host. Most
use cases with runqemu only need it for localhost and it is not
safe to run qemu images with root login without password enabled
and listening on all available, possibly Internet reachable network
interfaces. Limit qemu port forwarding to localhost 127.0.0.1 IP
address. Now qemu machine SSH and telnet ports are only
reachable from the build host machine, not full Internet.

If qemu machine needs to be reachable from network, then it can
be enabled via local.conf or machine config variable QB_SLIRP_OPT:

QB_SLIRP_OPT = "-netdev user,id=net0,hostfwd=tcp::2222-:22"

(From OE-Core rev: c6b1e3d50bf2feea80b70a42c6fad868fa9e6042)

Signed-off-by: Mikko Rapeli &lt;mikko.rapeli@linaro.org&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: Do not perturb script environment</title>
<updated>2022-10-26T11:28:39+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2022-10-21T19:23:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=8b2348a75ec38a1d235c907b2de399bae7bbfaef'/>
<id>urn:sha1:8b2348a75ec38a1d235c907b2de399bae7bbfaef</id>
<content type='text'>
Instead of changing the script environment to affect the child
processes, make a copy of the environment with modifications and pass
that to subprocess.

Specifically, when dri rendering is enabled, LD_PRELOAD was being passed
to all processes created by the script which resulted in other commands
(e.g. stty) exiting with a failure like:

 /bin/sh: symbol lookup error: sysroots-uninative/x86_64-linux/lib/librt.so.1: undefined symbol: __libc_unwind_link_get, version GLIBC_PRIVATE

Making a copy of the environment fixes this because the LD_PRELOAD is
now only passed to qemu itself.

(From OE-Core rev: 2232599d330bd5f2a9e206b490196569ad855de8)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: Fix gl-es argument from causing other arguments to be ignored</title>
<updated>2022-10-26T11:28:39+00:00</updated>
<author>
<name>Joshua Watt</name>
<email>JPEWhacker@gmail.com</email>
</author>
<published>2022-10-21T14:53:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=0cc7ac200d8c8bbdb6b5ed037ab2cd705338d446'/>
<id>urn:sha1:0cc7ac200d8c8bbdb6b5ed037ab2cd705338d446</id>
<content type='text'>
The code to parse arguments was inadvertently skipping all arguments in
the elif block after gl-es if it was specified on the command line.

(From OE-Core rev: 718bb8d56f6a24c86e67830a7d13af54df2ebb4e)

Signed-off-by: Joshua Watt &lt;JPEWhacker@gmail.com&gt;
Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: display host uptime when starting</title>
<updated>2022-09-12T07:33:56+00:00</updated>
<author>
<name>Alexandre Belloni</name>
<email>alexandre.belloni@bootlin.com</email>
</author>
<published>2022-09-09T15:57:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=9140c79bf9d23b62363fea2eaf9cf6ad8ed01fbf'/>
<id>urn:sha1:9140c79bf9d23b62363fea2eaf9cf6ad8ed01fbf</id>
<content type='text'>
In order to be able to debug issues on the host that have an impact on the
guest, it is useful to get the uptime of the host while starting so we can
match with the events in dmesg. Also include the uptime when cleaning up.

(From OE-Core rev: 2d96499823f7de6e16a461426491e015ba63c1ec)

Signed-off-by: Alexandre Belloni &lt;alexandre.belloni@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>runqemu: Add missing space on default display option</title>
<updated>2022-07-28T10:07:33+00:00</updated>
<author>
<name>Mark Hatle</name>
<email>mark.hatle@kernel.crashing.org</email>
</author>
<published>2022-07-26T23:11:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/linux/poky.git/commit/?id=76c40f6489bca6884af1b9c6a391026c0547e019'/>
<id>urn:sha1:76c40f6489bca6884af1b9c6a391026c0547e019</id>
<content type='text'>
(From OE-Core rev: ee9428611fc38bc711b5b3e12cf0d3257b1b5680)

Signed-off-by: Mark Hatle &lt;mark.hatle@kernel.crashing.org&gt;
Signed-off-by: Mark Hatle &lt;mark.hatle@amd.com&gt;
Signed-off-by: Luca Ceresoli &lt;luca.ceresoli@bootlin.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
</entry>
</feed>
