
On Mon, May 20, 2024 at 9:00 AM Jiaxun Yang jiaxun.yang@flygoat.com wrote:
diff --git a/arch/xtensa/config.mk b/arch/xtensa/config.mk index b0809999e403..3ec936272f25 100644 --- a/arch/xtensa/config.mk +++ b/arch/xtensa/config.mk @@ -7,3 +7,6 @@ PLATFORM_CPPFLAGS += -D__XTENSA__ -mlongcalls -mforce-no-pic \ -ffunction-sections -fdata-sections
LDFLAGS_FINAL += --gc-sections
+PLATFORM_ELFFLAGS += -B xtensa -O elf32-xtensa-le
This fixes endianness as little for the whole architecture, but xtensa cores may be either little or big endian.
Thanks for reviewing, I can just add a branch with ifdef CONFIG_SYS_BIG_EDNIAN if you wish, but I think all CPUs U-Boot support are little endian only?
I have an ongoing series[1] fixing endian selection options, please let me know if U-Boot do work with big endian Xtensa.
I had an impression that there's nothing endian-specific in the xtensa port, so it should work for both little- and big-endian cores. Let me test whether it's true though (: