Re: [OE-core] [PATCH] qemu: upgrade to 1.6.1
On Tue, Oct 29, 2013 at 4:30 PM, Saul Wold s...@linux.intel.com wrote: On 10/29/2013 01:20 PM, Chris Patterson wrote: On Tue, Oct 29, 2013 at 3:27 AM, Laurentiu Palcu laurentiu.pa...@intel.com mailto:laurentiu.palcu@intel.**comlaurentiu.pa...@intel.com wrote: Hi Chris, On Mon, Oct 28, 2013 at 07:54:51PM -0400, Chris Patterson wrote: I'm not terribly familiar with the nativesdk, and (foolishly) neglected to test that. However, I looked into it, and it looks like the relocatable_sdk.patch affects a linker script that is no longer available. I dropped the patch and tested installing an oe-core sdk sysroot (via bitbake -c populate_sdk core-image-minimal) and qemu appears to work fine from within the sdk environment. I'm open to suggestions for further testing this upgrade (particularly a case to cover what relocatable_sdk.patch was originally intended to resolve). I'm certainly not the expert here, but am willing to help out. To test this particular case, build meta-toolchain and install it in a different location than the default one. Then, just do a 'readelf -s on any qemu binary and make sure the .interp section has a size of 0x1000 bytes. If it does, then it's ok to drop the patch. That patch was needed because qemu happened to use their own linker scripts and, in order to have the SDK relocatable, we needed to reseve space in the .interp section to squeeze the new path. Thanks Laurentiu - I did validate that the interp section looks to be 0x1000 bytes for the qemu-* binaries: $ /usr/local/oecore-x86_64/**sysroots/x86_64-oesdk-linux/** usr/bin/qemu-system-arm --version QEMU emulator version 1.6.1, Copyright (c) 2003-2008 Fabrice Bellard $ readelf -S /usr/local/oecore-x86_64/**sysroots/x86_64-oesdk-linux/** usr/bin/qemu-system-arm There are 29 section headers, starting at offset 0x5a14b8: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0 0 0 [ 1] .interp PROGBITS 0270 0270 1000 A 0 0 1 [ 2] .note.ABI-tag NOTE 1270 1270 0020 A 0 0 4 [ 3] .note.gnu.build-i NOTE 1290 1290 ... If anyone has any other suggestions to test, I will gladly attempt them before posting a v2. Your last message said you tested core-image-minimal, did you do any testing with a graphical image like core-image sato? We really apperciate the work you put in here. I built core-image-sato for qemuarm and it appears to work fine. Are there any other typical methods/scripts which invoke nativesdk-qemu or qemu-native besides runqemu? runqemu works fine for qemu-native, but runqemu doesn't work for me within the sdk (missing python fnctl module dependency). Instead I have tested nativesdk-qemu by directly invoking qemu-*. Thanks Thanks Sau! Cheers! -Chris ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] qemu: upgrade to 1.6.1
Hi Chris, On Mon, Oct 28, 2013 at 07:54:51PM -0400, Chris Patterson wrote: I'm not terribly familiar with the nativesdk, and (foolishly) neglected to test that. However, I looked into it, and it looks like the relocatable_sdk.patch affects a linker script that is no longer available. I dropped the patch and tested installing an oe-core sdk sysroot (via bitbake -c populate_sdk core-image-minimal) and qemu appears to work fine from within the sdk environment. I'm open to suggestions for further testing this upgrade (particularly a case to cover what relocatable_sdk.patch was originally intended to resolve). I'm certainly not the expert here, but am willing to help out. To test this particular case, build meta-toolchain and install it in a different location than the default one. Then, just do a 'readelf -s on any qemu binary and make sure the .interp section has a size of 0x1000 bytes. If it does, then it's ok to drop the patch. That patch was needed because qemu happened to use their own linker scripts and, in order to have the SDK relocatable, we needed to reseve space in the .interp section to squeeze the new path. Laurentiu ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] qemu: upgrade to 1.6.1
On Tue, Oct 29, 2013 at 3:27 AM, Laurentiu Palcu laurentiu.pa...@intel.comwrote: Hi Chris, On Mon, Oct 28, 2013 at 07:54:51PM -0400, Chris Patterson wrote: I'm not terribly familiar with the nativesdk, and (foolishly) neglected to test that. However, I looked into it, and it looks like the relocatable_sdk.patch affects a linker script that is no longer available. I dropped the patch and tested installing an oe-core sdk sysroot (via bitbake -c populate_sdk core-image-minimal) and qemu appears to work fine from within the sdk environment. I'm open to suggestions for further testing this upgrade (particularly a case to cover what relocatable_sdk.patch was originally intended to resolve). I'm certainly not the expert here, but am willing to help out. To test this particular case, build meta-toolchain and install it in a different location than the default one. Then, just do a 'readelf -s on any qemu binary and make sure the .interp section has a size of 0x1000 bytes. If it does, then it's ok to drop the patch. That patch was needed because qemu happened to use their own linker scripts and, in order to have the SDK relocatable, we needed to reseve space in the .interp section to squeeze the new path. Thanks Laurentiu - I did validate that the interp section looks to be 0x1000 bytes for the qemu-* binaries: $ /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/qemu-system-arm --version QEMU emulator version 1.6.1, Copyright (c) 2003-2008 Fabrice Bellard $ readelf -S /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/qemu-system-arm There are 29 section headers, starting at offset 0x5a14b8: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0 0 0 [ 1] .interp PROGBITS 0270 0270 1000 A 0 0 1 [ 2] .note.ABI-tag NOTE 1270 1270 0020 A 0 0 4 [ 3] .note.gnu.build-i NOTE 1290 1290 ... If anyone has any other suggestions to test, I will gladly attempt them before posting a v2. Cheers! -Chris ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] qemu: upgrade to 1.6.1
On 10/29/2013 01:20 PM, Chris Patterson wrote: On Tue, Oct 29, 2013 at 3:27 AM, Laurentiu Palcu laurentiu.pa...@intel.com mailto:laurentiu.pa...@intel.com wrote: Hi Chris, On Mon, Oct 28, 2013 at 07:54:51PM -0400, Chris Patterson wrote: I'm not terribly familiar with the nativesdk, and (foolishly) neglected to test that. However, I looked into it, and it looks like the relocatable_sdk.patch affects a linker script that is no longer available. I dropped the patch and tested installing an oe-core sdk sysroot (via bitbake -c populate_sdk core-image-minimal) and qemu appears to work fine from within the sdk environment. I'm open to suggestions for further testing this upgrade (particularly a case to cover what relocatable_sdk.patch was originally intended to resolve). I'm certainly not the expert here, but am willing to help out. To test this particular case, build meta-toolchain and install it in a different location than the default one. Then, just do a 'readelf -s on any qemu binary and make sure the .interp section has a size of 0x1000 bytes. If it does, then it's ok to drop the patch. That patch was needed because qemu happened to use their own linker scripts and, in order to have the SDK relocatable, we needed to reseve space in the .interp section to squeeze the new path. Thanks Laurentiu - I did validate that the interp section looks to be 0x1000 bytes for the qemu-* binaries: $ /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/qemu-system-arm --version QEMU emulator version 1.6.1, Copyright (c) 2003-2008 Fabrice Bellard $ readelf -S /usr/local/oecore-x86_64/sysroots/x86_64-oesdk-linux/usr/bin/qemu-system-arm There are 29 section headers, starting at offset 0x5a14b8: Section Headers: [Nr] Name Type Address Offset Size EntSize Flags Link Info Align [ 0] NULL 0 0 0 [ 1] .interp PROGBITS 0270 0270 1000 A 0 0 1 [ 2] .note.ABI-tag NOTE 1270 1270 0020 A 0 0 4 [ 3] .note.gnu.build-i NOTE 1290 1290 ... If anyone has any other suggestions to test, I will gladly attempt them before posting a v2. Your last message said you tested core-image-minimal, did you do any testing with a graphical image like core-image sato? We really apperciate the work you put in here. Thanks Sau! Cheers! -Chris ___ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [OE-core] [PATCH] qemu: upgrade to 1.6.1
Hey Saul, My tests built qemu-native, qemu-helper-native, qemuwrapper-cross, and qemu for MACHINE_LIST=qemuarm qemumips qemuppc qemux86 qemux86-64 qemux86 sugarbay. For each machine, I tested running core-image-minimal in the qemu instance using runqemu. I should add that my tests were all on a x86-64 build system. I'm not terribly familiar with the nativesdk, and (foolishly) neglected to test that. However, I looked into it, and it looks like the relocatable_sdk.patch affects a linker script that is no longer available. I dropped the patch and tested installing an oe-core sdk sysroot (via bitbake -c populate_sdk core-image-minimal) and qemu appears to work fine from within the sdk environment. I'm open to suggestions for further testing this upgrade (particularly a case to cover what relocatable_sdk.patch was originally intended to resolve). I'm certainly not the expert here, but am willing to help out. Other notes: - I did notice that qemu-native should possibly depend on libsdl for the qemu-native instance. For users of qemu-native (such as myself), you do not necessarily get an automatic (SDL) video window unless libsdl development libraries are installed on the build system. This is perhaps because there does not appear to be a libsdl-native dependency available for qemu, but from my testing seemingly pretty straightforward to add. However, from docs I've seen online (getting started - openembedded) imply you should install libsdl-dev for the build environemnt, and this does enable SDL support (assuming libsdl is available). In short, nativesdk does specify nativesdk-libsdl as a dependency and native does not (in fact, there is no libsdl-native), and as a result, user may see differences in behavior. I assume this is intended...? - I'm using bitbake from master and have a missing fcntl python module dependency in my sdk in order to use runqemu wrapper from within the sdk environment. I assume that this is not supposed to work and running qemu-system-* directly within the sdk environment bypasses this issue. Cheers, Chris On Thu, Oct 24, 2013 at 4:48 AM, Saul Wold s...@linux.intel.com wrote: On 10/15/2013 05:15 PM, Chris Patterson wrote: This update also drops the following patches which appear to have been resolved upstream: - ftd_header.patch - target-i386-Fix-aflag-logic-**for-CODE64-and-the-0x67-.patch - target-ppc_fix_bit_extraction.**patch There seems to be a problem with one of the patches when building for the nativesdk ERROR: Command Error: exit status: 1 Output: Applying patch relocatable_sdk.patch can't find file to patch at input line 13 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |Upstream-Status: Inappropriate [SDK specific] | |In order to be able to change the dynamic loader path when relocating |binaries, the interp section has to be made big enough to accomodate |the new path (4096 is the maximum path length in Linux). | |Signed-off-by: Laurentiu Palcu laurentiu.pa...@intel.com | |Index: qemu-1.4.0/ldscripts/i386.ld |=**==** |--- qemu-1.4.0.orig/ldscripts/**i386.ld 2013-02-15 15:05:35.0 -0800 |+++ qemu-1.4.0/ldscripts/i386.ld 2013-02-28 22:55:36.138816418 -0800 -- No file to patch. Skipping patch. 1 out of 1 hunk ignored can't find file to patch at input line 26 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -- |Index: qemu-1.4.0/ldscripts/x86_64.ld |=**==** |--- qemu-1.4.0.orig/ldscripts/x86_**64.ld2013-02-15 15:05:35.0 -0800 |+++ qemu-1.4.0/ldscripts/x86_64.ld 2013-02-28 22:55:36.138816418 -0800 -- No file to patch. Skipping patch. 1 out of 1 hunk ignored Patch relocatable_sdk.patch does not apply (enforce with -f) ERROR: Function failed: patch_do_patch Also, since qemu is core to the testing and developmen, can you clarify for us what kind of testing you have done across the architectures. Thanks Sau! Signed-off-by: Chris Patterson cjp...@gmail.com --- meta/recipes-devtools/qemu/**files/fdt_header.patch | 39 --- ...-Fix-aflag-logic-for-**CODE64-and-the-0x67-.patch | 79 -- .../qemu/files/target-ppc_fix_**bit_extraction.patch | 70 --- meta/recipes-devtools/qemu/**qemu.inc| 2 +- .../qemu/{qemu_1.5.0.bb = qemu_1.6.1.bb} | 15 ++-- 5 files changed, 9 insertions(+), 196 deletions(-) delete mode 100644 meta/recipes-devtools/qemu/**files/fdt_header.patch delete mode 100644 meta/recipes-devtools/qemu/** files/target-i386-Fix-aflag-**logic-for-CODE64-and-the-0x67-**.patch delete mode 100644 meta/recipes-devtools/qemu/** files/target-ppc_fix_bit_**extraction.patch