Mike/others,

Further info...


I've cloned https://github.com/tianocore/edk2, 

Downloaded the Linaro toolchain binaries, 'wget 
http://releases.linaro.org/13.07/components/toolchain/binaries/gcc-linaro-aarch64-linux-gnu-4.8-2013.07-1_linux.tar.xz'
Unpacked them ' tar xf gcc-linaro-aarch64-linux-gnu-4.8-2013.07-1_linux.tar.xz'

Set the env variable ' export AARCH64LINUXGCC_TOOLS_PATH=<path to 
gcc-linaro-aarch64 directory>/bin/'

And used the following in Conf/target.txt
        ACTIVE_PLATFORM       = MdeModulePkg/MdeModulePkg.dsc
        TARGET                               = DEBUG
        TARGET_ARCH                 = AARCH64      (must be caps even though 
the listed arch in the comment is mixed case)
                TOOL_CHAIN_TAG         = ARMLINUXGCC

If you tried building, be sure to clean the Build directory first -- I had 
mixed results when switching between toolschains...

The first relocation is 0x0, which I believe is R_ARM_NONE (as opposed to 
R_AARCH64_NONE which is defined as 256). I believe this can be ignored by 
adding a case with a break stmt to the (e_machine == EM_AARCH64) sections.
The other is 0x105 (261) or R_AARCH64_PREL32 (S + A - P) which I really have no 
idea how to handle. (I haven't looked at GenFW, etc. to try and figure out.)
(Both of these relocations show up in you log capture.)

Anyways, using the Linaro tool chain, I've build the HelloWorld.efi app and 
successfully run it, as well as building other driver code that (modulo hw 
issues), runs as expected as well.





// Joseph Thomas
// Principal Software Engineer
// Dot Hill Systems
// 2905 NorthWest Blvd., Suite 20
// Plymouth, MN 55441
// 763.226.2640

-----Original Message-----
From: Brainerd, Mike [mailto:mike.brain...@amd.com] 
Sent: Tuesday, September 16, 2014 5:51 PM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] EDK2 GenFw

I downloaded EDK2 yesterday, 'git clone https://github.com/tianocore/edk2'.
I have also downloaded 'linaro-edk2' with the same issues.
And, it does appear to be relocation issues.

Command:   build -v
This is a truncated output: 

"echo" objcopy not needed for 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
objcopy not needed for 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
cp -f 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.debug
echo --strip-unneeded -R .eh_frame 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
--strip-unneeded -R .eh_frame 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
echo 
--add-gnu-debuglink=/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG\HelloWorld.debug
 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
--add-gnu-debuglink=/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUGHelloWorld.debug
 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
cp -f 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.debug
 /home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64
"GenFw" -e UEFI_APPLICATION -o 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.efi
 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
"echo" Symbol renaming not needed for 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportDxe/OUTPUT/./IncompatiblePciDeviceSupport.obj
Symbol renaming not needed for 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportDxe/OUTPUT/./IncompatiblePciDeviceSupport.obj
"gcc"   -g -fshort-wchar -fno-strict-aliasing -Wall -Werror -Wno-array-bounds 
-ffunction-sections -fdata-sections -c -include AutoGen.h 
-DSTRING_ARRAY_NAME=IncompatiblePciDeviceSupportStrings -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 -O0 -o 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportDxe/OUTPUT/./AutoGen.obj
 
-I/home/develop/sandbox/edk2/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe
 
-I/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportDxe/DEBUG
 -I/home/develop/sandbox/edk2/MdePkg 
-I/home/develop/sandbox/edk2/MdePkg/Include 
-I/home/develop/sandbox/edk2/MdePkg/Include/A
 Arch64 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportDxe/DEBUG/AutoGen.c
GenFw: ERROR 3000: Invalid
  WriteSections64(): 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
 unsupported ELF EM_AARCH64 relocation 0x105.
GenFw: ERROR 3000: Invalid
  
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
 bad symbol definition.
GenFw: ERROR 3000: Invalid
  WriteSections64(): 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
 unsupported ELF EM_AARCH64 relocation 0x0.
GenFw: ERROR 3000: Invalid
  
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
 bad symbol definition.
GenFw: ERROR 3000: Invalid
  WriteSections64(): 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
 unsupported ELF EM_AARCH64 relocation 0x0.
GenFw: ERROR 3000: Invalid
  WriteSections64(): 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
 unsupported ELF EM_AARCH64 relocation 0x105.
GenFw: ERROR 3000: Invalid
  WriteSections64(): 
/home/develop/sandbox/edk2/Build/MdeModule/DEBUG_GCC48/AARCH64/MdeModulePkg/Application/HelloWorld/HelloWorld/DEBUG/HelloWorld.dll
 unsupported 

This continues on for quite some time...

Any help is apprieciated.
Regards,
Mike

> -----Original Message-----
> From: Olivier Martin [mailto:olivier.mar...@arm.com]
> Sent: Tuesday, September 16, 2014 5:14 PM
> To: edk2-devel@lists.sourceforge.net
> Subject: Re: [edk2] EDK2 GenFw
> 
> As Andrew said, it is the correct mailing-list.
> Could you send the error message? And tell which toolchain (and its 
> version) you are using?
> Issue with GenFw are generally issues related to ELF relocations not 
> handle by the tool.
> 
> ________________________________________
> From: Andrew Fish [af...@apple.com]
> Sent: 16 September 2014 23:05
> To: edk2-devel@lists.sourceforge.net
> Subject: Re: [edk2] EDK2 GenFw
> 
> On Sep 16, 2014, at 2:57 PM, Brainerd, Mike 
> <mike.brain...@amd.com<mailto:mike.brain...@amd.com>> wrote:
> 
> I have ported EDK2 to build on aarch64 platform.
> After fixing Makefile errors and some 'set but not used errors' I got 
> a HelloWorld application to a .dll.
> When 'BaseTools(GenFw)' go to build .efi file it has problems with 
> conversion to ARM v8.
> I have looked and cannot find where to post a bug report on the GenFw tool.
> Can anyone direct me to the correct list?
> 
> Why don't you start with this list.
> 
> Thanks,
> 
> Andrew Fish
> 
> Regards,
> 
> MICHAEL BRAINERD   <image002.png>
> Contractor | AMD Server
> 7171 Southwest Parkway, Austin, TX 78735 USA O +(1) 512-602-3491
> <image003.png>   facebook<https://www.facebook.com/AMD>  |
> amd.com<http://www.amd.com/>
> 
> ----------------------------------------------------------------------
> --------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce.
> Perforce version control. Predictably reliable.
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.
> cl ktrk_______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net<mailto:edk2-
> de...@lists.sourceforge.net>
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
> 
> 
> -- IMPORTANT NOTICE: The contents of this email and any attachments 
> are confidential and may also be privileged. If you are not the 
> intended recipient, please notify the sender immediately and do not 
> disclose the contents to any other person, use it for any purpose, or 
> store or copy the information in any medium.  Thank you.
> 
> ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, 
> Registered in England & Wales, Company No:  2557590 ARM Holdings plc, 
> Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in 
> England & Wales, Company No:  2548782
> 
> 
> ----------------------------------------------------------------------
> --------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce.
> Perforce version control. Predictably reliable.
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.
> cl
> ktrk
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce.
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to