Re: [edk2] Problems with building ArmRealViewEbPkg and BeagleBoardPkg

Subject: Re: [edk2] Problems with building ArmRealViewEbPkg and BeagleBoardPkg

From: Adhyas Avasthi <adhyas@gmail.com>

To: edk2-devel@lists.sourceforge.net

Date: 2011-05-17 04:15:04

So, another attempt, and I had to remove the -mfpa=3Dfpu parameter from
tools-def.txt file, as Andrew suggested earlier.
This got me a bit farther in building ArmRealViewEbPkg but then I
landed into a link error I suppose. Below is the error output. Any
ideas?
I also took a patch Olivier shared earlier (couple of months back)
when I faced similar problem on BeagleBoard but the patch does not
solve the issue. Olivier, can you take a look at this problem ?

"/home/adhyas/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-ld" -o
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Arm=
RealViewEbPkg/SecForPei/Sec/DEBUG/ArmRealViewEbSec.dll
 --oformat=3Delf32-littlearm -nostdlib -u _ModuleEntryPoint -e
_ModuleEntryPoint -Map
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Arm=
RealViewEbPkg/SecForPei/Sec/DEBUG/ArmRealViewEbSec.map
-(  /home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM=
/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/OUTPUT/BasePcdLibNull.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Mde=
Pkg/Library/BaseMemoryLib/BaseMemoryLib/OUTPUT/BaseMemoryLib.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Mde=
Pkg/Library/BaseLib/BaseLib/OUTPUT/BaseLib.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Mde=
Pkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic/OUTPUT/BaseIoLibIntrinsic=
.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Mde=
Pkg/Library/BasePrintLib/BasePrintLib/OUTPUT/BasePrintLib.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Arm=
RealViewEbPkg/Library/SerialPortLib/SerialPortLib/OUTPUT/ArmEbSerialPortLib=
.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Mde=
Pkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort/OUTPUT/BaseDebugL=
ibSerialPort.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Arm=
Pkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib/OUTPUT/CompilerIntr=
insicsLib.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Arm=
RealViewEbPkg/SecForPei/Sec/OUTPUT/ArmRealViewEbSec.lib
-)
/bin/sh: -c: line 0: syntax error near unexpected token `('
/bin/sh: -c: line 0:
`"/home/adhyas/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-ld" -o
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Arm=
RealViewEbPkg/SecForPei/Sec/DEBUG/ArmRealViewEbSec.dll
 --oformat=3Delf32-littlearm -nostdlib -u _ModuleEntryPoint -e
_ModuleEntryPoint -Map
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Arm=
RealViewEbPkg/SecForPei/Sec/DEBUG/ArmRealViewEbSec.map
-(  /home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM=
/MdePkg/Library/BasePcdLibNull/BasePcdLibNull/OUTPUT/BasePcdLibNull.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Mde=
Pkg/Library/BaseMemoryLib/BaseMemoryLib/OUTPUT/BaseMemoryLib.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Mde=
Pkg/Library/BaseLib/BaseLib/OUTPUT/BaseLib.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Mde=
Pkg/Library/BaseIoLibIntrinsic/BaseIoLibIntrinsic/OUTPUT/BaseIoLibIntrinsic=
.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Mde=
Pkg/Library/BasePrintLib/BasePrintLib/OUTPUT/BasePrintLib.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Arm=
RealViewEbPkg/Library/SerialPortLib/SerialPortLib/OUTPUT/ArmEbSerialPortLib=
.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Mde=
Pkg/Library/BaseDebugLibSerialPort/BaseDebugLibSerialPort/OUTPUT/BaseDebugL=
ibSerialPort.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Arm=
Pkg/Library/CompilerIntrinsicsLib/CompilerIntrinsicsLib/OUTPUT/CompilerIntr=
insicsLib.lib
/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Arm=
RealViewEbPkg/SecForPei/Sec/OUTPUT/ArmRealViewEbSec.lib
-) '
make: *** [/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARM=
GCC/ARM/ArmRealViewEbPkg/SecForPei/Sec/DEBUG/ArmRealViewEbSec.dll]
Error 1


build.py...
 : error 7000: Failed to execute command
	make --no-print-directory tbuild
[/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Ar=
mRealViewEbPkg/SecForPei/Sec]


build.py...
 : error 7000: Failed to execute command
	make --no-print-directory tbuild
[/home/adhyas/philosia/smi/old/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/ARM/Md=
eModulePkg/Core/Pei/PeiMain]


build.py...
 : error F002: Failed to build module
	/home/adhyas/philosia/smi/old/edk2/ArmRealViewEbPkg/SecForPei/Sec.inf
[ARM, ARMGCC, DEBUG]

- Failed -
Build end time: 20:13:00, May.16 2011
Build total time: 00:25

adhyas@adhyas-laptop2:~/philosia/smi/old/edk2/ArmRealViewEbPkg$

Thanks,
Adhyas


On Sun, May 15, 2011 at 9:05 AM, Andrew Fish  wrote:
>
> On May 14, 2011, at 10:55 PM, Adhyas Avasthi wrote:
>
>> Andrew
>>
>> Thanks for the pointers. I am using fresh svn tree (just did another
>> svn up, and there are no changes). The host is Ubuntu 10.04 Linux
>> x86_64. I am using CodeSourcery arm-2011.03-42-arm-none-eabi toolchain
>> for cross compilation. Is thata a supported cross compiler version or
>> should I downgrade? The wiki link you shared does not talk about Linux
>> build using CodeSourcery.
>>
>> I was actually trying to see if I can use the ArmRealViewEbPkg to boot
>> into qemu's available RealViewEb VM till the EFI Shell. Has anyone on
>> this listed tested ArmRealViewEbPkg on qemu VM ?
>>
>
> Thats a question for Oliver.
>
>> Your suggestion for ArmRealViewEbPkg worked and I went past this first
>> hurdle, although there seems to be an issue with the Pkg code itself.
>> Here is the new error I get after it compiles for a while:
>>
>>
>> Building ... /home/adhyas/philosia/internal/edk2/ArmRealViewEbPkg/SecFor=
Pei/Sec.inf
>> [ARM]
>> "/home/adhyas/CodeSourcery/Sourcery_G++_Lite/bin/arm-none-eabi-gcc"
>> -march=3Darmv7-a -mthumb -march=3Darmv7-a -mlittle-endian -g -O0
>> -mabi=3Daapcs -mapcs -fno-short-enums -save-temps -combine -fsigned-char
>> -fshort-wchar -fno-strict-aliasing -ffunction-sections -fdata-sections
>> -Wall -Werror -Wno-missing-braces -fomit-frame-pointer -c -include
>> AutoGen.h -o /home/adhyas/philosia/internal/edk2/Build/ArmRealViewEb/DEB=
UG_ARMGCC/ARM/ArmRealViewEbPkg/SecForPei/Sec/OUTPUT/./Sec.obj
>> -I/home/adhyas/philosia/internal/edk2/ArmRealViewEbPkg/SecForPei/Arm
>> -I/home/adhyas/philosia/internal/edk2/ArmRealViewEbPkg/SecForPei
>> -I/home/adhyas/philosia/internal/edk2/Build/ArmRealViewEb/DEBUG_ARMGCC/A=
RM/ArmRealViewEbPkg/SecForPei/Sec/DEBUG
>> -I/home/adhyas/philosia/internal/edk2/MdePkg
>> -I/home/adhyas/philosia/internal/edk2/MdePkg/Include
>> -I/home/adhyas/philosia/internal/edk2/MdePkg/Include/Arm
>> -I/home/adhyas/philosia/internal/edk2/MdeModulePkg
>> -I/home/adhyas/philosia/internal/edk2/MdeModulePkg/Include
>> -I/home/adhyas/philosia/internal/edk2/EmbeddedPkg
>> -I/home/adhyas/philosia/internal/edk2/EmbeddedPkg/Include
>> -I/home/adhyas/philosia/internal/edk2/ArmPkg
>> -I/home/adhyas/philosia/internal/edk2/ArmPkg/Include
>> -I/home/adhyas/philosia/internal/edk2/ArmRealViewEbPkg
>> -I/home/adhyas/philosia/internal/edk2/ArmRealViewEbPkg/Include
>> /home/adhyas/philosia/internal/edk2/ArmRealViewEbPkg/SecForPei/Sec.c
>> /home/adhyas/philosia/internal/edk2/ArmRealViewEbPkg/SecForPei/Sec.c:38:=
27:
>> error: expected '=3D', ',', ';', 'asm' or '__attribute__' before
>> 'mSecTemporaryRamSupportPpi'
>
> Sorry this I can't figure out? What I can't figure out is line 38 looks l=
ike:
>
> EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI =A0 mSecTemporaryRamSupportPpi =3D {Sec=
TemporaryRamSupport};
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =
=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 ^
>
> and offset 27 is in the middle of EFI_PEI_TEMPORARY_RAM_SUPPORT_PPI?
>
> While we like -Wall on all toolchains to keep the code clean, you may be =
able to temporarily remove the -Werror to make some progress.
>
>> /home/adhyas/philosia/internal/edk2/ArmRealViewEbPkg/SecForPei/Sec.c:44:=
6:
>> error: 'mSecTemporaryRamSupportPpi' undeclared here (not in a
>> function)
>> make: *** [/home/adhyas/philosia/internal/edk2/Build/ArmRealViewEb/DEBUG=
_ARMGCC/ARM/ArmRealViewEbPkg/SecForPei/Sec/OUTPUT/Sec.obj]
>> Error 1
>>
>
>
> -------------------------------------------------------------------------=
-----
> Achieve unprecedented app performance and reliability
> What every C/C++ and Fortran developer should know.
> Learn how Intel has extended the reach of its next-generation tools
> to help boost performance applications - inlcuding clusters.
> http://p.sf.net/sfu/intel-dev2devmay
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>



-- =

Adhyas
********************************************************************
Two types have compatible type if their types are the same.
=A0 =A0 =97 ANSI C Standard, 3.1.2.6.
********************************************************************

---------------------------------------------------------------------------=
---
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel