Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id 049ECE007A2; Tue, 1 Nov 2016 22:06:00 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] Received: from mail5.wrs.com (mail5.windriver.com [192.103.53.11]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id 9EE81E0071C for ; Tue, 1 Nov 2016 22:05:57 -0700 (PDT) Received: from ALA-HCA.corp.ad.wrs.com (ala-hca.corp.ad.wrs.com [147.11.189.40]) by mail5.wrs.com (8.15.2/8.15.2) with ESMTPS id uA255r5M021625 (version=TLSv1 cipher=AES128-SHA bits=128 verify=OK); Tue, 1 Nov 2016 22:05:53 -0700 Received: from [128.224.162.198] (128.224.162.198) by ALA-HCA.corp.ad.wrs.com (147.11.189.50) with Microsoft SMTP Server (TLS) id 14.3.294.0; Tue, 1 Nov 2016 22:05:52 -0700 To: Zhenhua Luo References: <3d9f6d21-d4d7-e77e-2117-fd0a32d47888@windriver.com> <95ebffeb-b741-8eaf-3d72-54b2cd50bd7a@windriver.com> From: Yi Zhao Message-ID: <2e44762d-46a0-4981-e9e0-d2fb3db25784@windriver.com> Date: Wed, 2 Nov 2016 13:05:49 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: X-Originating-IP: [128.224.162.198] Cc: "meta-freescale@yoctoproject.org" Subject: Re: Invalid instruction with qemu-ppc64 for ppc64e6500 X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Nov 2016 05:06:00 -0000 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Hi Zhenhuan, 在 2016年11月02日 11:50, Zhenhua Luo 写道: > Hi Yi, > > Due to the ppc64 support limitation of qemu-native, please don't add the following line in local.conf, the core-image-sato can be built with default configuration. > > QEMU_TARGETS_append = " ppc64" Remove this line would also generate a failure for running intercept scripts: tmp/sysroots/p5040ds-64b/usr/bin/crossscripts/qemuwrapper: line 2: qemu-ppc64: command not found Regrads, Yi > > > Best Regards, > > Zhenhua > >> -----Original Message----- >> From: Yi Zhao [mailto:yi.zhao@windriver.com] >> Sent: Tuesday, November 01, 2016 5:40 PM >> To: Zhenhua Luo ; meta-freescale@yoctoproject.org >> Cc: Kevin Hao >> Subject: Re: Invalid instruction with qemu-ppc64 for ppc64e6500 >> >> Hi Zhenhua, >> >> I use morty branch for both poky and meta-fsl-ppc, machine is t4240rdb-64b. >> >> Add the following line in conf/local.conf: >> >> QEMU_TARGETS_append = " ppc64" >> >> Then run bitbake core-image-sato >> >> You could check the log in >> tmp/work/t4240rdb_64b-poky-linux/core-image-sato/1.0- >> r0/temp/log.do_rootfs >> >> >> Thanks, >> >> Yi >> >> >> 在 2016年10月31日 21:58, Zhenhua Luo 写道: >>> Hi Yi, >>> >>> Due to ppce6500 is not supported by qemu-native, the patch is a workaround >> for the limitation. >>> May I know which version of poky and meta-fsl-ppc can reproduce the >> problem? >>> >>> Best Regards, >>> >>> Zhenhua >>> >>>> -----Original Message----- >>>> From: Yi Zhao [mailto:yi.zhao@windriver.com] >>>> Sent: Monday, October 31, 2016 5:13 PM >>>> To: meta-freescale@yoctoproject.org >>>> Cc: Zhenhua Luo ; Kevin Hao >>>> >>>> Subject: Invalid instruction with qemu-ppc64 for ppc64e6500 >>>> >>>> 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 >>>> 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 >>>> Signed-off-by: Richard Purdie >>>> >>>> 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 >>>>