package/gnu-efi: disable on ARM and AArch64 big-endian
PATCH 1/3 package/gnu-efi: disable on ARM and AArch64 big-endian
Since the bump of gnu-efi to version 3.0.17 in Buildroot commit fa9893ad8fb94278d7e8b80cd3e795469223faf0, the build of gnu-efi fails on ARM big endian and AArch64 big endian.
Indeed, since that bump, gnu-efi builds some "apps", using a special linker file part of gnu-efi that explicitly sets the architecture:
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")
Due to this, big endian builds are now failing:
armeb-buildroot-linux-gnueabi-ld: ../gnuefi/crt0-efi-arm.o: compiled for a big endian system and target is little endian armeb-buildroot-linux-gnueabi-ld: failed to merge target specific data of file ../gnuefi/crt0-efi-arm.o
Since we are not really interested in supporting gnu-efi on ARM big endian and AArch64 big endian and it is not supported upstream, let's disabled on those architectures.
Fixes:
http://autobuild.buildroot.org/results/4d385d6759346e19664d0bded1e419f004f82b47/ (ARM big endian)
http://autobuild.buildroot.net/results/b6df43408ca4cd469962c96d49d9ac7935b6dbe9/ (AArch64 big endian)
--- package/gnu-efi/Config.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
package/gnu-efi/Config.in +1 -2
@@ -1,9 +1,8 @@ config BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS bool - default y if BR2_ARM_CPU_HAS_ARM + default y if BR2_arm && BR2_ARM_CPU_HAS_ARM default y if BR2_RISCV_64 default y if BR2_aarch64 - default y if BR2_aarch64_be default y if BR2_i386 default y if BR2_x86_64
Signature · 6 lines
2.46.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/3 package/gnu-efi: only supported on MMU-capable platforms
Since commit1f7c58145497ed01d566e08734a62feef1696807 ("package/gnu-efi: enable on RISC-V 64-bit"), we allow building on RISC-V... and that includes noMMU RISC-V. This unfortunately fails badly with:
/home/autobuild/autobuild/instance-2/output-1/host/bin/../riscv64-buildroot-linux-uclibc/bin/ld.real: unrecognized option '-Wl,-elf2flt=-r' /home/autobuild/autobuild/instance-2/output-1/host/bin/../riscv64-buildroot-linux-uclibc/bin/ld.real: use the --help option for usage information
Since we're anyway not interested in gnu-efi on noMMU platforms, let's not even spend time on trying to fix this and make MMU support a requirement for gnu-efi.
Fixes:
http://autobuild.buildroot.net/results/8b4a503939bdbe773ceee69e01a3ea16873a75fa/
--- package/gnu-efi/Config.in | 1 + 1 file changed, 1 insertion(+)
package/gnu-efi/Config.in +1 -0
@@ -5,6 +5,7 @@ config BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS default y if BR2_aarch64 default y if BR2_i386 default y if BR2_x86_64 + depends on BR2_USE_MMU config BR2_PACKAGE_GNU_EFI bool "gnu-efi"
Signature · 6 lines
2.46.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 3/3 package/gnu-efi: mark as not supported on ARM soft-float
In reply to Thomas Petazzoni via buildrootlib/print.c in gnu-efi contains some floating point computation. On ARM soft-float configurations, these floating point operations generate calls to __eabi_*() functions that are provided by gcc. However, gnu-efi builds some freestanding code, so it doesn't link with libgcc, and therefore the build fails with:
arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1431:(.text+0x78c): undefined reference to __aeabi_i2d' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1431:(.text+0x7a0): undefined reference to __aeabi_dsub' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1431:(.text+0x7a4): undefined reference to __aeabi_d2f' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1432:(.text+0x7b4): undefined reference to __aeabi_fcmplt' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1438:(.text+0x7c8): undefined reference to __aeabi_fmul' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1440:(.text+0x7d4): undefined reference to __aeabi_fcmpeq' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1444:(.text+0x7f8): undefined reference to __aeabi_fmul' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1440:(.text+0x808): undefined reference to __aeabi_fcmpeq' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1440:(.text+0x818): undefined reference to __aeabi_f2iz' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1451:(.text+0x834): undefined reference to __aeabi_i2f' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1451:(.text+0x840): undefined reference to __aeabi_fcmpeq' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1453:(.text+0x858): undefined reference to __aeabi_fmul' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1451:(.text+0x860): undefined reference to __aeabi_f2iz' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1451:(.text+0x868): undefined reference to __aeabi_i2f' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1451:(.text+0x870): undefined reference to __aeabi_fcmpeq' arm-buildroot-linux-gnueabi-ld: /output-1/build/gnu-efi-3.0.18//lib/print.c:1451:(.text+0x89c): undefined reference to __aeabi_f2iz'
Since we don't care about gnu-efi support on ARM soft-float configurations, let's disable such configurations.
Note that we have chosen to use BR2_ARM_SOFT_FLOAT as we're for now making this specific to ARM as we're not sure what is the situation on other CPU architectures (for example RISC-V without FPU maybe). This can be revisited once we get more data on the behavior on other CPU architectures that can support soft-float.
Fixes:
http://autobuild.buildroot.net/results/98d955fd2fcf4a3db1ab46e4f553447031a23b92/
--- package/gnu-efi/Config.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/gnu-efi/Config.in +1 -1
@@ -1,6 +1,6 @@ config BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS bool - default y if BR2_arm && BR2_ARM_CPU_HAS_ARM + default y if BR2_arm && BR2_ARM_CPU_HAS_ARM && !BR2_ARM_SOFT_FLOAT default y if BR2_RISCV_64 default y if BR2_aarch64 default y if BR2_i386
Signature · 6 lines
2.46.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Thomas, All,
On 2024-08-18 00:02 +0200, Thomas Petazzoni via buildroot spake thusly:
Quoted 20 lines
Since the bump of gnu-efi to version 3.0.17 in Buildroot commit
fa9893ad8fb94278d7e8b80cd3e795469223faf0, the build of gnu-efi fails on ARM big endian and AArch64 big endian.Indeed, since that bump, gnu-efi builds some "apps", using a special linker file part of gnu-efi that explicitly sets the architecture:
OUTPUT_FORMAT("elf32-littlearm", "elf32-littlearm", "elf32-littlearm")
OUTPUT_FORMAT("elf64-littleaarch64", "elf64-littleaarch64", "elf64-littleaarch64")Due to this, big endian builds are now failing:
armeb-buildroot-linux-gnueabi-ld:
../gnuefi/crt0-efi-arm.o: compiled for a big endian system and target is little endian armeb-buildroot-linux-gnueabi-ld: failed to merge target specific data of file../gnuefi/crt0-efi-arm.oSince we are not really interested in supporting gnu-efi on ARM big endian and AArch64 big endian and it is not supported upstream, let's disabled on those architectures.
Quoted 6 lines
Fixes:
http://autobuild.buildroot.org/results/4d385d6759346e19664d0bded1e419f004f82b47/ (ARM big endian)
http://autobuild.buildroot.net/results/b6df43408ca4cd469962c96d49d9ac7935b6dbe9/ (AArch64 big endian)Signed-off-by Thomas Petazzoni <[email protected]>
Whole series of three patches applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 26 lines
--- package/gnu-efi/Config.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)package/gnu-efi/Config.in +1
-2@@ -1,9 +1,8 @@ config BR2_PACKAGE_GNU_EFI_ARCH_SUPPORTS bool - default y if BR2_ARM_CPU_HAS_ARM + default y if BR2_arm && BR2_ARM_CPU_HAS_ARM default y if BR2_RISCV_64 default y if BR2_aarch64 - default y if BR2_aarch64_be default y if BR2_i386 default y if BR2_x86_64Signature · 6 lines
2.46.0 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot