It doesn't work currently: MACHINE = "qemuarm64" DEFAULTTUNE = "aarch64_be" $ 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]
checking current master.
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 "LE". 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.
for master I would mark this as "Works for me". Do we want old branches check like back to Thud?
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't had anyone asking for this, so it likely isn't worth the effort, or extra support cost.
For what it'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.