Hi Ard,

> From: Ard Biesheuvel [mailto:[email protected]]
> Sent: Thursday, January 07, 2016 1:46 PM
> 
> On 7 January 2016 at 08:05, Bhupesh Sharma <[email protected]>
> wrote:
> > Hi Ard, Leif
> >
> > I am trying to experiment with compile the EDK2 UEFI using the AARCH64-
> BE toolchain made available from Linaro.
> > I have tried hand editing the BaseTools/Conf/tools_def.template to
> > remove the little endian awareness from here, but cannot seem to make
> > a headway. The same platform can be compile well using a little-endian
> > toolchain from Linaro
> >
> > BE Toolchain used:
> > -----------------
> > gcc-linaro-aarch64_be-linux-gnu-4.8-2014.04_linux
> >
> > Steps used:
> > -----------
> > In BaseTools/Conf/tools_def.template
> >
> >         - GCC_AARCH64_CC_FLAGS : remove '-mlittle-endian'
> >         - GCC_AARCH64_RC_FLAGS : change 'elf64-littleaarch64' to 'elf-
> bigaarch64'
> >         - GCC47_AARCH64_ASM_FLAGS (the same flag is used for GCC48 and
> GCC 49) : remove '-mlittle-endian'
> >
> > Set the following variables:
> >         - GCC48_AARCH64_PREFIX = aarch64_be-linux-gnu-
> >         - ARCH=AARCH64
> >         - TARGET_TOOLS=GCC48
> >
> > Use compilation command:
> >         - build -p "path of .dsc" -a AARCH64 -t GCC48 -b RELEASE
> >
> > Error Message:
> > --------------
> >
> > aarch64_be-linux-gnu-ld: failed to merge target specific data of file
> > /PATH/OUTPUT/LibraryName.lib(ModuleEntryPoint.obj)
> > aarch64_be-linux-gnu-ld:
> > /PATH/OUTPUT/LibraryName.lib(LibraryName.obj): compiled for a little
> > endian system and target is big endian
> >
> >
> > Any pointers on what can be going wrong here?
> >
> 
> You fail to explain what the purpose of this exercise is.
> 
> The whole idea of UEFI is that it is standardized, and it is standardized
> on little endian. Even if you manage to get something running, you will
> none of the benefits of this standardization, since there is no way to
> expose the BE-ness of the firmware interfaces in a standards compliant
> way, so you will not be able to run OSes, option ROMs or UEFI based
> factory tooling etc.

Right. I missed the background here. Some networking customers require
AARCH64 solutions which have all the components - Bootloader, OS and user-space 
working in BE mode.

Although Linux OS and user-space applications can be properly compiled and used 
in AARCH64 BE mode,
UEFI Bootloader doesn't seem to support the same (while we can compile other 
Bootloader like u-boot in a BE mode). 
 
Regards,
Bhupesh
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to