Hey Leif

Thanks for your help

> -----Original Message-----
> From: Leif Lindholm [mailto:leif.lindh...@linaro.org]
> Sent: Thursday, October 08, 2015 12:08
> To: Yehuda Yitschak
> Cc: edk2-devel@lists.01.org
> Subject: Re: Cross compiling EDK2 for Aarch64
> 
> Hi Yehuda,
> 
> On Thu, Oct 08, 2015 at 08:24:07AM +0000, Yehuda Yitschak wrote:
> > I am new to the EDK2 projects and for starters I am trying to cross
> > compile the project for aarch64 on an x86_64 host
> >
> > I looked around in Linaro website and Tiano-core website but couldn't
> > find any instruction on how to _cross_ compile
> >
> > I tried to follow the instruction here:
> > https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/build
> >
> > but when I try to compile using the "build" command the build script
> > uses the x86 compiler and naturally it fails
> 
> Any particular reason why you skipped past the first half of the page to
> follow the instructions under the headline "The Hard Way"?

2 reasons.  I am unable to clone the uefi-tools git using "git clone 
git://git.linaro.org/uefi/uefi-tools.git".  I get this output
        Cloning into 'uefi-tools'...
        fatal: unable to connect to git.linaro.org:
        git.linaro.org[0: 54.247.55.40]: errno=Connection timed out
maybe the GIT moved, or I have some permission issues ? 

Second, I wanted to get a better understanding of the build process

> 
> > I tried working around this by setting the environment variable
> > GCC48_BIN however then the build system tries to call "make" from the
> > path in GCC48_BIN which off course fails
> 
> This doesn't make sense.
> 
> Can you please provide some information on the actual steps you have
> attempted, and the exact error output that yielded,  in order for us to be
> able to help?
> 
Following the "hard way" I perform these steps 
        - git clone http://git.linaro.org/uefi/linaro-edk2.git
        - cd linaro-edk2
        - git checkout master
        - . edksetup.sh
        - make -C BaseTools
Up to this point everything is working fine

When running 
        "build -a ARM -b DEBUG -t GCC48 -p 
ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-CTA5s.dsc -D EDK2_ARMVE_STANDALONE=1" 
I get an error saying the dsc file doesn't exist. I'm also interested in 
aarch64 so I changed the command to:
        " build -a AARCH64 -b DEBUG -t GCC48 -p 
ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc -D 
EDK2_ARMVE_STANDALONE=1"
Then I get 
        Build environment: 
Linux-3.13.0-63-generic-x86_64-with-Ubuntu-14.04-trusty
        Build start time: 12:53:44, Oct.08 2015

        WORKSPACE        = /home/yehuday/projects/uefi/linaro-edk2
        ECP_SOURCE       = 
/home/yehuday/projects/uefi/linaro-edk2/EdkCompatibilityPkg
        EDK_SOURCE       = 
/home/yehuday/projects/uefi/linaro-edk2/EdkCompatibilityPkg
        EFI_SOURCE       = 
/home/yehuday/projects/uefi/linaro-edk2/EdkCompatibilityPkg
        EDK_TOOLS_PATH   = /home/yehuday/projects/uefi/linaro-edk2/BaseTools
        
        
        Architecture(s)  = AARCH64
        Build target     = DEBUG
        Toolchain        = GCC48
        
        Active Platform          = 
/home/yehuday/projects/uefi/linaro-edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
        Flash Image Definition   = 
/home/yehuday/projects/uefi/linaro-edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf
        
        Processing meta-data ...... done!
        Building ... 
/home/yehuday/projects/uefi/linaro-edk2/MdePkg/Library/DxePcdLib/DxePcdLib.inf 
[AARCH64]
        gcc: error: unrecognized command line option '-mlittle-endian'
        make: *** 
[/home/yehuday/projects/uefi/linaro-edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC48/AARCH64/MdePkg/Library/DxePcdLib/DxePcdLib/OUTPUT/DxePcdLib.obj]
 Error 1
        "gcc"  
-I/home/yehuday/projects/uefi/linaro-edk2/ArmPlatformPkg/ArmVExpressPkg/Include 
-I/home/yehuday/projects/uefi/linaro-    
edk2/ArmPlatformPkg/ArmVExpressPkg/Include/Platform/RTSM -g -fshort-wchar 
-fno-strict-aliasing -Wall -Werror -Wno-array-bounds -ffunction-sections 
-fdata-sections -c -include AutoGen.h        
-DSTRING_ARRAY_NAME=DxePcdLibStrings -g -Os -fshort-wchar -fno-strict-aliasing 
-Wall -Werror -Wno-array-bounds -c -include AutoGen.h -mcmodel=large 
-mlittle-endian -fno-short-enums -  save-temps -fverbose-asm -fsigned-char 
-ffunction-sections -fdata-sections -fomit-frame-pointer -fno-builtin 
-Wno-address -fno-asynchronous-unwind-tables -O0 -o        
/home/yehuday/projects/uefi/linaro-edk2/Build/ArmVExpress-FVP-AArch64/DEBUG_GCC48/AARCH64/MdePkg/Library/DxePcdLib/DxePcdLib/OUTPUT/./DxePcdLib.obj
 -   I/home/yehuday/projects/uefi/linaro-edk2/MdePkg/Library/DxePcdLib 
-I/home/yehuday/projects/uefi/linaro-edk2/Build/ArmVExpress-FVP-      
AArch64/DEBUG_GCC48/AARCH64/MdePkg/Library/DxePcdLib/DxePcdL
 ib/DEBUG -I/home/yehuday/projects/uefi/linaro-edk2/MdePkg 
-I/home/yehuday/projects/uefi/linaro-        edk2/MdePkg/Include 
-I/home/yehuday/projects/uefi/linaro-edk2/MdePkg/Include/AArch64 
/home/yehuday/projects/uefi/linaro-edk2/MdePkg/Library/DxePcdLib/DxePcdLib.c
        
        build.py...
         : error 7000: Failed to execute command

I figure the build system is using the x86 gcc which is causing the errors.

As I mentioned I tried setting GCC48_BIN to the binary folder of a Linaro 
aarch64 GCC using "export GCC48_BIN=<path_to_bin_folder_of_aarch64_gcc>"
Then I got:

        Build environment: 
Linux-3.13.0-63-generic-x86_64-with-Ubuntu-14.04-trusty
        Build start time: 12:57:49, Oct.08 2015
        
        WORKSPACE        = /home/yehuday/projects/uefi/linaro-edk2
        ECP_SOURCE       = 
/home/yehuday/projects/uefi/linaro-edk2/EdkCompatibilityPkg
        EDK_SOURCE       = 
/home/yehuday/projects/uefi/linaro-edk2/EdkCompatibilityPkg
        EFI_SOURCE       = 
/home/yehuday/projects/uefi/linaro-edk2/EdkCompatibilityPkg
        EDK_TOOLS_PATH   = /home/yehuday/projects/uefi/linaro-edk2/BaseTools
        
        
        Architecture(s)  = AARCH64
        Build target     = DEBUG
        Toolchain        = GCC48
        
        Active Platform          = 
/home/yehuday/projects/uefi/linaro-edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.dsc
        Flash Image Definition   = 
/home/yehuday/projects/uefi/linaro-edk2/ArmPlatformPkg/ArmVExpressPkg/ArmVExpress-FVP-AArch64.fdf
        
        Processing meta-data ..... done!
        Building ... 
/home/yehuday/projects/uefi/linaro-edk2/MdePkg/Library/DxePcdLib/DxePcdLib.inf 
[AARCH64]
        
        
        build.py...
         : error 7000: Failed to start command
                
/home/yehuday/compilers/armv8/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/bin/make
 tbuild [/home/yehuday/projects/uefi/linaro-edk2/Build/ArmVExpress-FVP-   
AArch64/DEBUG_GCC48/AARCH64/MdePkg/Library/DxePcdLib/DxePcdLib]
        

        build.py...
         : error 7000: Failed to start command
                
/home/yehuday/compilers/armv8/gcc-linaro-4.9-2014.11-x86_64_aarch64-linux-gnu/bin/make
 tbuild [/home/yehuday/projects/uefi/linaro-edk2/Build/ArmVExpress-FVP-   
AArch64/DEBUG_GCC48/AARCH64/MdePkg/Library/BaseLib/BaseLib]


I don't have a aarch64 compiler installed properly using apt-get but I tried 
that before and that also didn't solve the problem

I hope this gives enough details

regards

Yehuda 


> Regards,
> 
> Leif
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to