[meta-freescale] Invalid instruction with qemu-ppc64 for ppc64e6500

Yi Zhao yi.zhao at windriver.com
Mon Oct 31 02:12:38 PDT 2016


Hi folks,

I tried to build an image with nxp4xxx (DEFAULTTUNE="ppc64e6500"), when 
do_rootfs tried to run intercept scripts, I got an invalid instruction 
error:

NOTE: Running intercept scripts:
NOTE: > Executing update_gio_module_cache intercept ...
Invalid instruction
NIP 00000000008046ac LR 0000000000000000 CTR 0000000000000000 XER 
0000000000000000 CPU#0
MSR 8000000000006000 HID0 0000000000000000 HF 0000000000006000 iidx 0 didx 0
TB 00510390 2192111342502858
[snip]
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
/buildarea/build-nxp/tmp/sysroots/nxp-t4xxx/usr/bin/crossscripts/qemuwrapper: 
line 2: 25969 Illegal instruction (core dumped) qemu-ppc64 -r 3.2.0 -cpu 
e500mc "$@"
WARNING: The postinstall intercept hook 'update_gio_module_cache' failed 
(exit code: 132)! See log for details!
WARNING: The postinstalls for the following packages will be postponed 
for first boot: libglib-2.0-0

The issue is most likely introduced by the commit:

commit 27e202f2d9114a64b67c83eb7eafeb12de5ceea7
Author: Zhenhua Luo <zhenhua.luo at nxp.com>
Date:   Thu Apr 14 17:26:44 2016 +0800

     meta/classes/qemu.bbclass: set -cpu of ppce5500/ppce6500 to e500mc

     The e5500 and e6500 cpu types are not supported by native qemu, set 
the value
     of -cpu to e500mc. Without this change, build will fail for 
packages which use
     qemuwrapper in compile phase due to the following error.
     | Unable to find CPU definition

     e.g. gobject-introspection

     (From OE-Core rev: e06c5c5447350049ebd1a6245fc2dd2608b265e5)

     Signed-off-by: Zhenhua Luo <zhenhua.luo at nxp.com>
     Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

diff --git a/meta/classes/qemu.bbclass b/meta/classes/qemu.bbclass
index f3d3be8..75739db 100644
--- a/meta/classes/qemu.bbclass
+++ b/meta/classes/qemu.bbclass
@@ -52,8 +52,8 @@ QEMU_OPTIONS[vardeps] += 
"QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}"

  QEMU_EXTRAOPTIONS_ppce500v2 = " -cpu e500v2"
  QEMU_EXTRAOPTIONS_ppce500mc = " -cpu e500mc"
-QEMU_EXTRAOPTIONS_ppce5500 = " -cpu e5500"
-QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e5500"
-QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e6500"
-QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e6500"
+QEMU_EXTRAOPTIONS_ppce5500 = " -cpu e500mc"
+QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e500mc"
+QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e500mc"
+QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e500mc"
  QEMU_EXTRAOPTIONS_ppc7400 = " -cpu 7400"


For my limited knowledge, the ppc64e6500 is a 64bit cpu but e500mc is 
32bit, so when qemuwrapper running command qemu-ppc64 -r 3.2.0 -cpu 
e500mc "$@" would cause this failure.
Since the qemu native still doesn't support e6500 cpu, I just remove the 
line: QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e500mc", and the qemuwrapper 
could work.

Is it a appropriate method to solve this issue ?  I'm not familiar with 
ppc, so don't know if this change could break something else?

Thanks,
Yi




More information about the meta-freescale mailing list