
在2024年5月20日五月 下午4:18,Max Filippov写道:
On Sun, May 19, 2024 at 1:53 PM Jiaxun Yang jiaxun.yang@flygoat.com wrote:
u-boot.elf target requiures it to work.
Typo.
Signed-off-by: Jiaxun Yang jiaxun.yang@flygoat.com
arch/xtensa/config.mk | 3 +++ 1 file changed, 3 insertions(+)
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.
Hi Max,
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.
Thanks.
[1]: https://patchwork.ozlabs.org/project/uboot/patch/20240519-aarch64-be-v1-11-7...
-- Thanks. -- Max