Skip to contentSkip to conversation

tune-corei7.inc: tell qemu to emulate a matching processor

PATCH In review Ross Burton 2 participants 3 messages Feb 8, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tune-corei7.inc: tell qemu to emulate a matching processor

If tune-corei7 is in use then the target binaries may contain instructions that qemu-x86-64 can't execute by default, resulting in errors on rootfs construction:

NOTE: Running intercept scripts:
NOTE: > Executing update_font_cache intercept ...
qemu: uncaught target signal 4 (Illegal instruction) - core dumped

In this case the instruction is popcnt, part of SSE4.2, so tell Qemu to emulate the CPU that the tune targets (in this case, Nehalem).

[ YOCTO #8888 ]

---
 meta/conf/machine/include/tune-corei7.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/conf/machine/include/tune-corei7.inc +2 -0
index d245d9f..197558f 100644
@@ -11,6 +11,8 @@ DEFAULTTUNE ?= "corei7-64"
 # Pull in the previous tune in to pull in PACKAGE_EXTRA_ARCHS
 require conf/machine/include/tune-core2.inc
 
+QEMU_EXTRAOPTIONS_corei7-64 = " -cpu Nehalem,check=false"
+
 # Extra tune features
 TUNEVALID[corei7] = "Enable corei7 specific processor optimizations"
 TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'corei7', ' -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2', '', d)}"
Signature · 1 line
2.7.0
#1 lore raw
Quoted 22 lines · Ross Burton

If tune-corei7 is in use then the target binaries may contain instructions that qemu-x86-64 can't execute by default, resulting in errors on rootfs construction:

NOTE: Running intercept scripts:
NOTE: > Executing update_font_cache intercept ...
qemu: uncaught target signal 4 (Illegal instruction) - core dumped

In this case the instruction is popcnt, part of SSE4.2, so tell Qemu to emulate the CPU that the tune targets (in this case, Nehalem).

[ YOCTO #8888 ]

---
 meta/conf/machine/include/tune-corei7.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/conf/machine/include/tune-corei7.inc +0 -0
index d245d9f..197558f 100644

meta/conf/machine/include/tune-corei7.inc DEFAULTTUNE ?= "corei7-64" · line 14

Quoted 4 lines
meta/conf/machine/include/tune-corei7.inc +1 -0
@@ -11,6 +11,8 @@ DEFAULTTUNE ?= "corei7-64"
 # Pull in the previous tune in to pull in PACKAGE_EXTRA_ARCHS
 require conf/machine/include/tune-core2.inc
 
+QEMU_EXTRAOPTIONS_corei7-64 = " -cpu Nehalem,check=false"

What about corei7-32 and corei7-64-x32 ?

Quoted 11 lines
meta/conf/machine/include/tune-corei7.inc +0 -1
 # Extra tune features
 TUNEVALID[corei7] = "Enable corei7 specific processor optimizations"
 TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'corei7', ' -march=corei7 -mtune=corei7 -mfpmath=sse -msse4.2', '', d)}"
--

2.7.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw
Quoted 2 lines · Andre McCurdy

What about corei7-32 and corei7-64-x32 ?

Yeah probably sensible to read the entire tune file isn't it. V2 incoming.

Ross