<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>8891</bug_id>
          
          <creation_ts>2016-01-07 01:19:50 +0000</creation_ts>
          <short_desc>qemuarm64 cannot correctly boot up</short_desc>
          <delta_ts>2016-02-24 12:09:52 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>General Runtime</product>
          <component>General Runtime</component>
          <version>2.1</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>VERIFIED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>2.1 M2</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chen Qi">Qi.Chen</reporter>
          <assigned_to name="Chen Qi">Qi.Chen</assigned_to>
          <cc>bogdanx.a.voiculescu</cc>
    
    <cc>liezhi.yang</cc>
    
    <cc>ross.burton</cc>
          
          <qa_contact name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>57604</commentid>
    <comment_count>0</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2016-01-07 01:19:50 +0000</bug_when>
    <thetext>Error message as below:

systemd[1]: systemd 228 running in system mode. (-PAM -AUDIT -SELINUX +IMA -APPARMOR +SMACK +SYSVINIT +UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS +ACL +XZ -LZ4 -SECCOMP +BLKID -ELFUTILS +KMOD -IDN)
systemd[1]: unhandled level 1 translation fault (11) at 0xd51c1576f0, esr 0x90000005
pgd = ffffffc018f8f000
[d51c1576f0] *pgd=0000000000000000, *pud=0000000000000000

CPU: 0 PID: 1 Comm: systemd Not tainted 4.1.15-yocto-standard #2
Hardware name: linux,dummy-virt (DT)
task: ffffffc01a8d0000 ti: ffffffc01a8d8000 task.ti: ffffffc01a8d8000
PC is at 0x5588fc2ae0
LR is at 0x5588fc2ac8
pc : [&lt;0000005588fc2ae0&gt;] lr : [&lt;0000005588fc2ac8&gt;] pstate: 00000000
sp : 0000007ff85649c0
x29: 0000007ff85649e0 x28: 0000000000000000 
x27: 00000055890a0000 x26: 00000055890a32a0 
x25: 000528b3d93604f7 x24: 00000055890a2000 
x23: 00000055890a2000 x22: 00000055890a2000 
x21: 00000055890a1000 x20: 0000007ff8565528 
x19: 00000055890a42a0 x18: 0000000000000001 
x17: 0000007f92eeafc0 x16: 00000055890a05f8 
x15: 0000000000000038 x14: 534c495455464c45 
x13: 2d2044494b4c422b x12: 20504d4f43434553 
x11: 2d20345a4c2d205a x10: 582b204c43412b20 
x9 : 0000007ff8563e70 x8 : 0000000000000042 
x7 : 7f7f7f7f7f7f7f7f x6 : 6c1f2f2f32ff284d 
x5 : 00000000000000b0 x4 : 0000000000000010 
x3 : 0000000000000001 x2 : 000000000000001c 
x1 : 0000007f930b76f0 x0 : 00000055890a0000 

systemd[1]: Caught &lt;SEGV&gt;, dumped core as pid 40.
systemd[1]: Freezing execution.


Hi Cris,

I see you&apos;ve worked on related issues. Do you have any idea about this error?
If you know how to solve it, please just take this bug. If not, I&apos;ll work on this problem.

Regards,
Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57638</commentid>
    <comment_count>1</comment_count>
    <who name="Richard Purdie">richard.purdie</who>
    <bug_when>2016-01-07 16:21:36 +0000</bug_when>
    <thetext>Is this just with systemd? Autobuilder is showing qemuarm64 is ok?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57639</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-01-07 16:22:25 +0000</bug_when>
    <thetext>For reference https://autobuilder.yoctoproject.org/main/builders/nightly-arm64/builds/237 is a sysvinit qemuarm64 passing sanity.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57660</commentid>
    <comment_count>3</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2016-01-08 03:20:47 +0000</bug_when>
    <thetext>Yes. The problem is only with systemd.
I&apos;ve verified locally that sysvinit is OK for qemuarm64.

// Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57938</commentid>
    <comment_count>4</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2016-01-19 08:36:27 +0000</bug_when>
    <thetext>The strange thing is if I add a &apos;printf&apos; statement in the detect_vm() function before the invocation of detect_vm_cpuid(), the target could start up.

=============================================================================
chenqi@pek-hostel-deb01:~/poky/build-systemd/tmp/work/aarch64-poky-linux/systemd/1_228+gitAUTOINC+dd050decb6-r0/git [2] $ git diff src/basic/virt.c
diff --git a/src/basic/virt.c b/src/basic/virt.c
index 1e5d6ee..7a7b38e 100644
--- a/src/basic/virt.c
+++ b/src/basic/virt.c
@@ -266,6 +266,8 @@ int detect_vm(void) {
         static thread_local int cached_found = _VIRTUALIZATION_INVALID;
         int r;
 
+        printf(&quot;HELLO WORLD\n&quot;);
+        log_info(&quot;[DEBUG]: 1\n&quot;);
         if (cached_found &gt;= 0)
                 return cached_found;
 
==============================================================================

I&apos;m wondering why printf would make such a difference.

// Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58218</commentid>
    <comment_count>5</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2016-01-26 09:44:41 +0000</bug_when>
    <thetext>It seems that the problem is related to binutils.

Khem&apos;s patch below could fix it.
https://github.com/kraj/openembedded-core/tree/kraj/binutils-2.26

// Qi</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>58991</commentid>
    <comment_count>6</comment_count>
    <who name="Chen Qi">Qi.Chen</who>
    <bug_when>2016-02-15 06:10:11 +0000</bug_when>
    <thetext>commit c85c54f7f8cf253687464cfbe19cf7f305868578
Author: Khem Raj &lt;raj.khem@gmail.com&gt;
Date:   Sat Jan 30 06:28:38 2016 +0000

    binutils: Upgrade to 2.26
    
    (From OE-Core rev: 86ade2cc2553c942d9526c5323a11ae151653505)
    
    Signed-off-by: Khem Raj &lt;raj.khem@gmail.com&gt;
    Signed-off-by: Richard Purdie &lt;richard.purdie@linuxfoundation.org&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59428</commentid>
    <comment_count>7</comment_count>
    <who name="Bogdan Alexandru Voiculescu">bogdanx.a.voiculescu</who>
    <bug_when>2016-02-24 12:09:52 +0000</bug_when>
    <thetext>Verified on: 

Build Configuration:
BB_VERSION        = &quot;1.29.0&quot;
BUILD_SYS         = &quot;x86_64-linux&quot;
NATIVELSBSTRING   = &quot;Ubuntu-14.04&quot;
TARGET_SYS        = &quot;aarch64-poky-linux&quot;
MACHINE           = &quot;qemuarm64&quot;
DISTRO            = &quot;poky&quot;
DISTRO_VERSION    = &quot;2.0+snapshot-20160224&quot;
TUNE_FEATURES     = &quot;aarch64&quot;
TARGET_FPU        = &quot;&quot;
meta
meta-yocto
meta-yocto-bsp    = &quot;master:36b43b233c841b3c09fc17e04686b4b758780963&quot;


with systemd setup in local.conf

DISTRO_FEATURES_append = &quot; systemd&quot;
VIRTUAL-RUNTIME_init_manager = &quot;systemd&quot;
DISTRO_FEATURES_BACKFILL_CONSIDERED = &quot;sysvinit&quot;
VIRTUAL-RUNTIME_initscripts = &quot;&quot;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>