<?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>9480</bug_id>
          
          <creation_ts>2016-04-19 01:37:07 +0000</creation_ts>
          <short_desc>linux-yocto: make it work with arm big endian</short_desc>
          <delta_ts>2025-03-06 16:22:10 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>OE-Core</product>
          <component>kernel</component>
          <version>2.2</version>
          <rep_platform>x86</rep_platform>
          <op_sys>arm64</op_sys>
          <bug_status>ACCEPTED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>  </status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>Future</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Robert Yang">liezhi.yang</reporter>
          <assigned_to name="Bruce Ashfield">bruce.ashfield</assigned_to>
          <cc>akuster808</cc>
    
    <cc>juro.bystricky</cc>
    
    <cc>randy.macleod</cc>
    
    <cc>ross.burton</cc>
    
    <cc>tom.zanussi</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Yes (doc changes required)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>61368</commentid>
    <comment_count>0</comment_count>
    <who name="Robert Yang">liezhi.yang</who>
    <bug_when>2016-04-19 01:37:07 +0000</bug_when>
    <thetext>It doesn&apos;t work currently:

MACHINE = &quot;qemuarm64&quot;
DEFAULTTUNE = &quot;aarch64_be&quot;

$ bitbake linux-yocto


aarch64_be-poky-linux-ld.bfd: usr/initramfs_data.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file usr/initramfs_data.o
make[3]: *** [usr/built-in.o] Error 1
  CC      kernel/exec_domain.o
make[2]: *** [usr] Error 2
make[2]: *** Waiting for unfinished jobs....
  OBJCOPY arch/arm64/kernel/vdso/vdso.so
  VDSOSYM arch/arm64/kernel/vdso/vdso-offsets.h
  CC      security/keys/keyring.o
  CC      kernel/panic.o
  CC      kernel/cpu.o
  AS      arch/arm64/kernel/vdso/vdso.o
  CC      kernel/exit.o
  CC      kernel/softirq.o
  LD      security/integrity/integrity.o
  CC      kernel/resource.o
aarch64_be-poky-linux-ld.bfd: security/integrity/iint.o: compiled for a little endian system and target is big endian  CC      fs/open.o

aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file security/integrity/iint.o
make[4]: *** [security/integrity/integrity.o] Error 1
make[3]: *** [security/integrity] Error 2
make[3]: *** Waiting for unfinished jobs....

[snip]
  LD      arch/arm64/mm/built-in.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/dma-mapping.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/dma-mapping.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/extable.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/extable.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/fault.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/fault.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/init.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/init.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/cache.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/cache.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/copypage.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/copypage.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/flush.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/flush.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/ioremap.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/ioremap.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/mmap.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/mmap.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/pgd.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/pgd.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/mmu.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/mmu.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/context.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/context.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/proc.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/proc.o
aarch64_be-poky-linux-ld.bfd: arch/arm64/mm/pageattr.o: compiled for a little endian system and target is big endian
aarch64_be-poky-linux-ld.bfd: failed to merge target specific data of file arch/arm64/mm/pageattr.o
make[3]: *** [arch/arm64/mm/built-in.o] Error 1
make[2]: *** [arch/arm64/mm] Error 2
  CC      fs/exec.o
[snip]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86104</commentid>
    <comment_count>1</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2020-01-23 16:27:15 +0000</bug_when>
    <thetext>checking current master.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86106</commentid>
    <comment_count>2</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2020-01-23 17:58:31 +0000</bug_when>
    <thetext>in current master I am seeing this:

ERROR: linux-yocto-5.2.28+gitAUTOINC+dd6019025c_992280855e-r0 do_package_qa: QA Issue: Endiannes did not match (0 to 1) on /work/qemuarm64-oe-linux/linux-yocto/5.2.28+gitAUTOINC+dd6019025c_992280855e-r0/packages-split/kernel-module-watchdog-5.2.28-yocto-standard/lib/modules/5.2.28-yocto-standard/kernel/drivers/watchdog/watchdog.ko [arch]


which makes sense as qemuarm64 kernel config is &quot;LE&quot;.

I manually configured the kernel to enable BE and I will see how it goes. 

I suspect we will need to different MACHINES for Endlessness configurations.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>86107</commentid>
    <comment_count>3</comment_count>
    <who name="akuster">akuster808</who>
    <bug_when>2020-01-23 18:28:38 +0000</bug_when>
    <thetext>for master I would mark this as &quot;Works for me&quot;.

Do we want old branches check like back to Thud?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>89539</commentid>
    <comment_count>4</comment_count>
    <who name="Bruce Ashfield">bruce.ashfield</who>
    <bug_when>2021-03-09 13:10:31 +0000</bug_when>
    <thetext>It is simple to add BE support via a dedicated machine (since that is how we typically define such options). Alternatively, KERNEL_FEATURES could be used to trigger on the TUNE variable and add a fragment on top of the existing ARM BSPs.

Either will work, but we still haven&apos;t had anyone asking for this, so it likely isn&apos;t worth the effort, or extra support cost.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101316</commentid>
    <comment_count>5</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2025-03-06 16:22:10 +0000</bug_when>
    <thetext>For what it&apos;s worth, some time ago I had to build a big-endian system and documented the few things I had to do:

https://www.burtonini.com/blog/2023/03/06/big-endian/

I can see an argument for two small fragments that just set the right endian flag that BSPs can pull in if required.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>