<feed xmlns='http://www.w3.org/2005/Atom'>
<title>openembedded-core.git/meta/classes/qemu.bbclass, branch dylan</title>
<subtitle>Mirror of openembedded-core</subtitle>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/'/>
<entry>
<title>Revert "qemu.bbclass: Use the correct qemu binary in multilib cases"</title>
<updated>2013-05-20T15:06:13+00:00</updated>
<author>
<name>Laurentiu Palcu</name>
<email>laurentiu.palcu@intel.com</email>
</author>
<published>2013-04-26T08:04:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=e57f9b992192f7d7877fbb69af764357a21fce70'/>
<id>e57f9b992192f7d7877fbb69af764357a21fce70</id>
<content type='text'>
This reverts commit 9f5a6f89d9f4a6c7bed3b163e6eaa764d762f523.

The reason for reverting this is:
 * qemuwrapper has now a fallback method;
 * when using multilib, calling qemu_target_binary from recipes would
   always point to the qemu binary corresponding to the machine
   architecture. Hence, postinstalls needing to use qemu would call the
   wrong qemu user emulation binary;

(From OE-Core master rev: 15408466515cec7cbb4c394aa203c87b6165f884)

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This reverts commit 9f5a6f89d9f4a6c7bed3b163e6eaa764d762f523.

The reason for reverting this is:
 * qemuwrapper has now a fallback method;
 * when using multilib, calling qemu_target_binary from recipes would
   always point to the qemu binary corresponding to the machine
   architecture. Hence, postinstalls needing to use qemu would call the
   wrong qemu user emulation binary;

(From OE-Core master rev: 15408466515cec7cbb4c394aa203c87b6165f884)

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>postinst-intercepts, qemu.bbclass: fix segfaults in postinstalls</title>
<updated>2013-04-10T11:53:58+00:00</updated>
<author>
<name>Laurentiu Palcu</name>
<email>laurentiu.palcu@intel.com</email>
</author>
<published>2013-04-10T11:25:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=48e8b613b3f5c7b1d917bf3147606d44072ce49e'/>
<id>48e8b613b3f5c7b1d917bf3147606d44072ce49e</id>
<content type='text'>
Postinstalls that use qemu are throwing a segmentation fault when
building for qemux86-64 on a 64bit host (it might also happen for
qemux86 if building on a 32bit host but I didn't test). It looks like
qemu looks for ld.so.cache which is not found because it is generated
after rootfs_(rpm|ipk|deb)_do_rootfs is called and then it tries to load
libraries from the default paths (which are the host's). In order to
avoid this, pass the LD_LIBRARY_PATH explicitly to the target's dynamic
loader.

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Postinstalls that use qemu are throwing a segmentation fault when
building for qemux86-64 on a 64bit host (it might also happen for
qemux86 if building on a 32bit host but I didn't test). It looks like
qemu looks for ld.so.cache which is not found because it is generated
after rootfs_(rpm|ipk|deb)_do_rootfs is called and then it tries to load
libraries from the default paths (which are the host's). In order to
avoid this, pass the LD_LIBRARY_PATH explicitly to the target's dynamic
loader.

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>postinst-intercepts, qemu.bbclass: fix issue on 32 bit hosts</title>
<updated>2013-04-05T16:34:17+00:00</updated>
<author>
<name>Laurentiu Palcu</name>
<email>laurentiu.palcu@intel.com</email>
</author>
<published>2013-04-05T16:12:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=78f91e08c8a7b0f0c831a087f7c89e2c76047e7a'/>
<id>78f91e08c8a7b0f0c831a087f7c89e2c76047e7a</id>
<content type='text'>
The intercept scripts fail to run on 32 bit hosts. Apparently, the
current approach worked on 64 bit hosts due to the larger virtual address
space (probably). On 32 bit hosts, however, calling the target binary like:

qemu-arm ld-linux.so --library-path /lib:/usr/lib arm_binary

fails with:

arm_binary: error while loading shared libraries: arm_binary: failed to
map segment from shared object: Operation not permitted

When run like this, qemu-arm fails to map the arm_binary executable in
memory because it's hitting the lower limit of
/proc/sys/vm/mmap_min_addr. That's because it loads the
ld-linux.so binary successfully, taking into account mmap_min_addr, runs
it, and then ld-linux.so will map the arm_binary at a fixed address but this
will fail because it is below mmap_min_addr. The qemu's guest base probing,
apparently, doesn't work fine when a program runs inside other.

One way around this would be to set mmap_min_addr to 0 (on recent
distributions is set to 65536 to avoid "kernel NULL pointer dereference"
defects) but this approach is not safe.

The other way is to call the binary directly but providing qemu with a
prefix (-L option) in order to find the elf interpreter correctly. This
way, both the target binary and dynamic loader are mapped into memory
under qemu's control and, only after, the dynamic loader is started.

[YOCTO #4179]

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The intercept scripts fail to run on 32 bit hosts. Apparently, the
current approach worked on 64 bit hosts due to the larger virtual address
space (probably). On 32 bit hosts, however, calling the target binary like:

qemu-arm ld-linux.so --library-path /lib:/usr/lib arm_binary

fails with:

arm_binary: error while loading shared libraries: arm_binary: failed to
map segment from shared object: Operation not permitted

When run like this, qemu-arm fails to map the arm_binary executable in
memory because it's hitting the lower limit of
/proc/sys/vm/mmap_min_addr. That's because it loads the
ld-linux.so binary successfully, taking into account mmap_min_addr, runs
it, and then ld-linux.so will map the arm_binary at a fixed address but this
will fail because it is below mmap_min_addr. The qemu's guest base probing,
apparently, doesn't work fine when a program runs inside other.

One way around this would be to set mmap_min_addr to 0 (on recent
distributions is set to 65536 to avoid "kernel NULL pointer dereference"
defects) but this approach is not safe.

The other way is to call the binary directly but providing qemu with a
prefix (-L option) in order to find the elf interpreter correctly. This
way, both the target binary and dynamic loader are mapped into memory
under qemu's control and, only after, the dynamic loader is started.

[YOCTO #4179]

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qemu.bbclass: fix segfaults when running through pseudo</title>
<updated>2013-02-07T16:50:40+00:00</updated>
<author>
<name>Laurentiu Palcu</name>
<email>laurentiu.palcu@intel.com</email>
</author>
<published>2013-02-07T16:13:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=688e9485980de0f29aa00e24ce53a3efd3a3a7cc'/>
<id>688e9485980de0f29aa00e24ce53a3efd3a3a7cc</id>
<content type='text'>
qemu user binaries sometimes segfault when running them through pseudo.
So, set PSEUDO_UNLOAD to 1 before running any qemu binary.

[YOCTO #3788]

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
qemu user binaries sometimes segfault when running them through pseudo.
So, set PSEUDO_UNLOAD to 1 before running any qemu binary.

[YOCTO #3788]

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qemu.bbclass: Use the correct qemu binary in multilib cases</title>
<updated>2013-02-07T15:24:57+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2013-02-07T13:34:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=e8ec13a26217bf473504ae4aab22b134dd9dffff'/>
<id>e8ec13a26217bf473504ae4aab22b134dd9dffff</id>
<content type='text'>
For example with a lib32 multilib, we need to still use the 64 bit
qemu binary in case we do encounter a 64 bit binary.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For example with a lib32 multilib, we need to still use the 64 bit
qemu binary in case we do encounter a 64 bit binary.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qemu.bbclass: return qemuwrapper instead of qemu-allarch</title>
<updated>2013-02-06T09:35:02+00:00</updated>
<author>
<name>Laurentiu Palcu</name>
<email>laurentiu.palcu@intel.com</email>
</author>
<published>2013-01-31T08:27:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=149a564bba7d3e1c2054ae6d908835ebd95b9084'/>
<id>149a564bba7d3e1c2054ae6d908835ebd95b9084</id>
<content type='text'>
When qemu bbclass is inherited from a recipe that is not architecture
dependent, qemu_run_binary will return "qemu-allarch". However this
binary does not exist. Instead, return "qemuwrapper" which will, in
turn, execute the right binary for the target the image was built for.

[YOCTO #2599]

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When qemu bbclass is inherited from a recipe that is not architecture
dependent, qemu_run_binary will return "qemu-allarch". However this
binary does not exist. Instead, return "qemuwrapper" which will, in
turn, execute the right binary for the target the image was built for.

[YOCTO #2599]

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qemu.bbclass: add qemu_run_binary() function</title>
<updated>2013-01-10T00:40:38+00:00</updated>
<author>
<name>Laurentiu Palcu</name>
<email>laurentiu.palcu@intel.com</email>
</author>
<published>2012-12-20T13:15:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=2cfbe0bd9d02ab8c054e5bc879a2181c6a7e3719'/>
<id>2cfbe0bd9d02ab8c054e5bc879a2181c6a7e3719</id>
<content type='text'>
[YOCTO #3602]

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[YOCTO #3602]

Signed-off-by: Laurentiu Palcu &lt;laurentiu.palcu@intel.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qemu.bbclass: Map the qemu binary name for powerpc64</title>
<updated>2012-07-26T13:39:48+00:00</updated>
<author>
<name>Khem Raj</name>
<email>raj.khem@gmail.com</email>
</author>
<published>2012-07-22T23:54:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=b9c7b050eb3e51c98f95feb8cf19f45ff2cc8700'/>
<id>b9c7b050eb3e51c98f95feb8cf19f45ff2cc8700</id>
<content type='text'>
Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
Signed-off-by: Saul Wold &lt;sgw@linux.intel.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove a number of unneeded import os/bb calls</title>
<updated>2012-07-19T11:24:05+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2012-07-18T13:08:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=7d674820958be3a7051ea619effe1a6061d9cbe2'/>
<id>7d674820958be3a7051ea619effe1a6061d9cbe2</id>
<content type='text'>
The bb and os modules are always imported so having these extra import calls
are a waste of space/execution time. They also set a bad example for people
copy and pasting code so clean them up.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The bb and os modules are always imported so having these extra import calls
are a waste of space/execution time. They also set a bad example for people
copy and pasting code so clean them up.

Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert tab indentation in python functions into four-space</title>
<updated>2012-07-19T09:17:30+00:00</updated>
<author>
<name>Richard Purdie</name>
<email>richard.purdie@linuxfoundation.org</email>
</author>
<published>2012-07-11T17:33:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.multitech.net/cgit/openembedded-core.git/commit/?id=604d46c686d06d62d5a07b9c7f4fa170f99307d8'/>
<id>604d46c686d06d62d5a07b9c7f4fa170f99307d8</id>
<content type='text'>
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
