Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7503

Advanced users • What is the official stance on big endian Linux with the Raspberry Pi 5?

$
0
0
Note: I am just doing this for fun. There is no need to tell me to "just use Raspberry Pi OS", "everyone uses little endian", etc.

I tried compiling raspberrypi/linux (from tag stable_20250702) for the Raspberry Pi 5 following the official instructions (https://www.raspberrypi.com/documentati ... probe.html), but, after

Code:

make bcm2712_defconfig
, I did

Code:

make menuconfig
and changed it to boot into big endian mode. Of course, this won't work with Raspberry Pi OS, which has userspace compiled for little endian, so I extracted Gentoo's stage3-aarch64_be-openrc into a different partition and tried booting into it (after a bit of configuration like setting a password, changing /etc/inittab to run agetty on /dev/ttyAMA10, copying firmware, creating a big endian initramfs, etc.)

Unfortunately, it seems that at least the RTC, Ethernet, and Wi-Fi do not work with big endian.

Anything on the RTC just seems to fail:

Code:

[    0.012888] /soc@107c000000/interrupt-controller@7fff9000: Fixed dependency cycle(s) with /soc@107c000000/interrupt-controller@7fff9000[    1.046790] raspberrypi-firmware soc@107c000000:firmware: Request 0x00000001 returned status 0x01000080[    1.060230] raspberrypi-firmware soc@107c000000:firmware: Request 0x00000003 returned status 0x01000080[    1.073664] raspberrypi-firmware soc@107c000000:firmware: Request 0x00030046 returned status 0x01000080[    1.524848] irq_brcmstb_l2: registered L2 intc (/soc@107c000000/interrupt-controller@7d510600, parent irq: 27)[    1.534945] irq_brcmstb_l2: registered L2 intc (/soc@107c000000/interrupt-controller@7c502000, parent irq: 28)[    1.545029] irq_brcmstb_l2: registered L2 intc (/soc@107c000000/intc@7d508380, parent irq: 29)[    1.553710] irq_brcmstb_l2: registered L2 intc (/soc@107c000000/intc@7d508400, parent irq: 30)[    1.562392] irq_brcmstb_l2: registered L2 intc (/soc@107c000000/intc@7d503000, parent irq: 31)[    1.579558] raspberrypi-firmware soc@107c000000:firmware: Request 0x00010007 returned status 0x01000080[    1.589002] raspberrypi-clk soc@107c000000:firmware:clocks: probe with driver raspberrypi-clk failed with error -22[    1.600401] raspberrypi-firmware soc@107c000000:firmware: Request 0x00030030 returned status 0x01000080[    1.710550] raspberrypi-firmware soc@107c000000:firmware: Request 0x00038087 returned status 0x01000080[    1.720840] raspberrypi-firmware soc@107c000000:firmware: Request 0x00038087 returned status 0x01000080[    1.730275] rpi-rtc soc@107c000000:rpi_rtc: failed to set trickle charge voltage to 3000000uV: -22[    1.740127] raspberrypi-firmware soc@107c000000:firmware: Request 0x00030087 returned status 0x01000080[    1.749601] rpi-rtc soc@107c000000:rpi_rtc: registered as rtc0[    1.756310] raspberrypi-firmware soc@107c000000:firmware: Request 0x00030087 returned status 0x01000080[    1.765744] rpi-rtc soc@107c000000:rpi_rtc: hctosys: unable to read the hardware clock
The Ethernet seems to work initially:

Code:

[    2.787964] macb 1f00100000.ethernet eth0: Cadence GEM rev 0x00070109 at 0x1f00100000 irq 112 (xx:xx:xx:xx:xx:xx)[    3.318334] macb 1f00100000.ethernet eth0: PHY [1f00100000.ethernet-ffffffff:01] driver [Broadcom BCM54213PE] (irq=POLL)[    3.329307] macb 1f00100000.ethernet eth0: configuring for phy/rgmii-id link mode[    3.339558] macb 1f00100000.ethernet: gem-ptp-timer ptp clock registered.[    5.395164] macb 1f00100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control tx[    5.417262] IP-Config: Complete:[    5.420497]      device=eth0, hwaddr=xx:xx:xx:xx:xx:xx, ipaddr=192.168.0.40, mask=255.255.255.0, gw=192.168.0.1[    5.430630]      host=pi, domain=, nis-domain=(none)[    5.435697]      bootserver=255.255.255.255, rootserver=255.255.255.255, rootpath=
However, when I try to use it to do anything, it does not seem to work (no ping from or to it, no dns, no dhcp, etc.) . And when I try to set the link down (ip link set down dev end0) or try to power off the Raspberry Pi 5, I get a kernel panic. For example:

Code:

root@pi ~ # ip link set down dev end0[  184.621241] Internal error: Oops: 0000000096000145 [#1] PREEMPT SMP[  184.627539] Modules linked in: ipv6 vc4 snd_soc_hdmi_codec binfmt_misc drm_display_helper hci_uart cec btbcm drm_dma_helper bluetooth spidev snd_soc_core v3d gpu_sched drm_shmem_helper brcmfmac snd_compress aes_ce_blk ecdh_generic drm_kms_helper aes_ce_cipher ghash_ce gf128mul sha2_ce brcmutil ecc sha256_arm64 snd_pcm_dmaengine sha1_ce sha1_generic rpi_hevc_dec cfg80211 i2c_brcmstb libaes drm snd_pcm v4l2_mem2mem pisp_be videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 snd_timer spi_bcm2835 videodev snd drm_panel_orientation_quirks rfkill raspberrypi_gpiomem videobuf2_common rp1_adc rp1_pio rp1_mailbox mc backlight pwm_fan rp1_fw nvmem_rmem gpio_keys uio_pdrv_genirq uio btrfs blake2b_generic xor xor_neon raid6_pq[  184.691444] CPU: 2 UID: 0 PID: 1428 Comm: ip Not tainted 6.12.34-v8-16k #2[  184.698347] Hardware name: Raspberry Pi 5 Model B Rev 1.0 (DT)[  184.704200] pstate: 00400009 (nzcv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)[  184.711190] pc : dcache_inval_poc+0x28/0x58[  184.715392] lr : arch_sync_dma_for_cpu+0x34/0x50[  184.720026] sp : ffffc0008298b410[  184.723347] x29: ffffc0008298b410 x28: 0000000000000000 x27: 0000000000000000[  184.730513] x26: ffffd06fcf2a1bd0 x25: ffff800140a25010 x24: ffffffffffffffff[  184.737679] x23: 0000000000000600 x22: 0000000000000000 x21: 0000000000000002[  184.744845] x20: 8000c03c028178c0 x19: ffffffffffffffff x18: 0000000000000000[  184.752010] x17: ffffaf9070348000 x16: ffffc00080010000 x15: 00007fffe6785c40[  184.759176] x14: 0000000000000004 x13: ffff8000c0007610 x12: 0000000000000000[  184.766342] x11: 0000000000000000 x10: 0000000000000001 x9 : ffffd06fce554258[  184.773507] x8 : 0000000000000000 x7 : ffff8000c09f1b48 x6 : 8000c03c028178c0[  184.780673] x5 : 0000000008000000 x4 : 0000000000000000 x3 : 000000000000003f[  184.787838] x2 : 0000000000000040 x1 : 00000000000005c0 x0 : ffffffffffffffff[  184.795004] Call trace:[  184.797453]  dcache_inval_poc+0x28/0x58[  184.801301]  dma_unmap_page_attrs+0x238/0x258[  184.805673]  gem_free_rx_buffers+0xa8/0x148[  184.809871]  macb_free_consistent+0x74/0x190[  184.814155]  macb_close+0xac/0xf0[  184.817477]  __dev_close_many+0xbc/0x170[  184.821412]  __dev_change_flags+0x180/0x220[  184.825609]  dev_change_flags+0x2c/0x80[  184.829456]  do_setlink+0x28c/0xf10[  184.832954]  __rtnl_newlink+0x538/0x8b0[  184.836801]  rtnl_newlink+0x58/0x90[  184.840299]  rtnetlink_rcv_msg+0x138/0x3b0[  184.844407]  netlink_rcv_skb+0x68/0x140[  184.848256]  rtnetlink_rcv+0x20/0x38[  184.851840]  netlink_unicast+0x320/0x388[  184.855775]  netlink_sendmsg+0x19c/0x3f8[  184.859710]  __sock_sendmsg+0x64/0xc0[  184.863383]  ____sys_sendmsg+0x268/0x2a0[  184.867317]  ___sys_sendmsg+0xb8/0x118[  184.871077]  __sys_sendmsg+0x90/0xf8[  184.874662]  __arm64_sys_sendmsg+0x2c/0x40[  184.878771]  invoke_syscall+0x50/0x120[  184.882532]  el0_svc_common.constprop.0+0x48/0xf0[  184.887253]  do_el0_svc+0x24/0x38[  184.890577]  el0_svc+0x30/0x100[  184.893727]  el0t_64_sync_handler+0x100/0x130[  184.898099]  el0t_64_sync+0x190/0x198[  184.901773] Code: d1000443 ea03003f 8a230021 54000040 (d50b7e21)[  184.907889] ---[ end trace 0000000000000000 ]---
Thankfully, I can use a USB-Ethernet adapter and not set up the built-in Ethernet at all to avoid this kernel panic.

As for the Wi-Fi, the device does not appear at all, and I'm not sure what part of the kernel messages I should post here.

I did try booting into Gentoo's stage3-arm64-openrc to make sure these issues are not a configuration mistake on my part, etc., and I can confirm that the RTC, Ethernet, and Wi-Fi work on little endian Gentoo.

Also, I am sorry for not posting the full kernel log. I am just unsure what parts are "safe" to post publicly online in a forum. I've already seen a serial number and Ethernet mac address (which I have replaced with xx:xx:xx:xx:xx:xx in this post) in the logs. I don't know if there is anything else I should not be posting...

Anyway, back to the subject line, should this be working and no one noticed, or is big endian just not supported at all? Should I be reporting these bugs on GitHub? Should I even bother trying to fix this or will the pull requests just be ignored?

Statistics: Posted by koiq — Fri Sep 26, 2025 11:12 am — Replies 3 — Views 256



Viewing all articles
Browse latest Browse all 7503

Trending Articles