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-15 06:55:53

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 ?

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/SecForPei=
/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/DEBUG_=
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/ARM/=
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'
/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_AR=
MGCC/ARM/ArmRealViewEbPkg/SecForPei/Sec/OUTPUT/Sec.obj]
Error 1


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


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


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

- Failed -


Thanks,
Adhyas

On Sat, May 14, 2011 at 9:21 PM, Andrew Fish  wrote:
> Adyyas,
>
> Did you find https://sourceforge.net/apps/mediawiki/tianocore/index.php?t=
itle=3DBeagle_Board_Wiki
>
> We seam to be really good at hiding stuff on our web page. You have to cl=
ick All Projects (on the left under "All Projects"), to get a list of sub p=
roject info.
>
>
> Are you building on Windows, Linux, or Mac OS X?
>
> For the BeagleBoard you can build from a batch file. On Windows it would =
be ba.bat. For Linux or OS X it would be ./build.sh?
>
> So this works for me:
>> svn up
>> cd BeagleBoardPkg
>> ./build.sh
>
> On the other hand your BeagleBoard failure looks like a version of gcc is=
sue. If you look at your Conf/build_rules.txt, it is a copy of =A0https://e=
dk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/BaseTools/Conf/build_rule.t=
emplate.
>
> It kind of looks like you are having the different versions of gcc have d=
ifferent syntax issue.
>
> Notice how different versions of gcc have a different scheme? -\ -\, vs. =
-( -), vs. -filelist. It looks from you error that your version of the comp=
iler does not like the -( -) syntax?
>
> [Static-Library-File]
> =A0 =A0
> =A0 =A0 =A0 =A0*.lib
>
> =A0 =A0
> =A0 =A0 =A0 =A0$(MAKE_FILE)
>
> =A0 =A0
> =A0 =A0 =A0 =A0$(DEBUG_DIR)(+)$(MODULE_NAME).dll
>
> =A0 =A0
> =A0 =A0 =A0 =A0"$(DLINK)" /OUT:${dst} $(DLINK_FLAGS) $(DLINK_SPATH) @$(ST=
ATIC_LIBRARY_FILES_LIST)
>
> =A0 =A0
> =A0 =A0 =A0 =A0"$(DLINK)" -o ${dst} $(DLINK_FLAGS) -\( $(DLINK_SPATH) @$(=
STATIC_LIBRARY_FILES_LIST) -\) $(DLINK2_FLAGS)
> =A0 =A0 =A0 =A0"$(OBJCOPY)" $(OBJCOPY_FLAGS) ${dst}
>
> =A0 =A0
> =A0 =A0 =A0 =A0"$(DLINK)" -o ${dst} $(DLINK_FLAGS) -( $(DLINK_SPATH) $(ST=
ATIC_LIBRARY_FILES) -) $(DLINK2_FLAGS)
>
> =A0 =A0
> =A0 =A0 =A0 =A0"$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) --via $=
(STATIC_LIBRARY_FILES_LIST) $(DLINK2_FLAGS)
>
> =A0 =A0
> =A0 =A0 =A0 =A0#$(STATIC_LIBRARY_FILES_LIST) has wrong paths for cygwin
> =A0 =A0 =A0 =A0"$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) $(STATI=
C_LIBRARY_FILES) $(DLINK2_FLAGS)
>
> =A0 =A0
> =A0 =A0 =A0 =A0"$(DLINK)" $(DLINK_FLAGS) -o ${dst} $(DLINK_SPATH) -fileli=
st $(STATIC_LIBRARY_FILES_LIST) =A0$(DLINK2_FLAGS)
>
>
> On the ArmRealViewEbPkg.dsc side:
>
> On my Mac:
>>. edksetup.sh BaseTools
>>ArmRealViewEbPkg/ArmRealViewEbPkg.dsc -t XCODE32 -a ARM
>
> works for me?
>
> This kind of error message:
> build.py...
> /home/adhyas/philosia/internal/edk2/ArmRealViewEbPkg/ArmRealViewEbPkg.dsc=
(...): error 4000: Instance of library class [DebugPrintErrorLevelLib] is n=
ot found
> =A0 =A0 =A0 =A0in [/home/adhyas/philosia/internal/edk2/MdePkg/Library/Bas=
eDebugLibSerialPort/BaseDebugLibSerialPort.inf] [ARM]
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0consumed by module [/home/adhyas/philosia/=
internal/edk2/ArmRealViewEbPkg/SecForPei/Sec.inf]
>
>
> Usually means the library class to instance mapping in the .DSC file is b=
roken. The INF for a given module calls out a library class (C API that the=
 driver/application is calling). The .DSC file gets to chose which library =
to use for the given compile. So for example you could turn off debug print=
s by picking a NULL version of a Serial Lib of you could provide a platform=
 specific serial lib to make it work with your platform.
>
> So have you changed anything? Or are your using the top of the svn tree?
>
> Andrew Fish
>
>
>
>
>
> On May 14, 2011, at 7:24 PM, Adhyas Avasthi wrote:
>
>> Hello Guys
>>
>> I am facing some issues building any of ARM packages. My host is
>> x86_64 and I have installed CodeSourcery G++ Lite for EABI on my
>> system.
>> I modified the Conf/tools_def.txt to point to my SourceryPath, I also
>> modified the Conf/target.txt file for appropriate entries (changed
>> MYTOOLS to ARMGCC etc.)
>>
>> Then I did a "make -C BaseTools" to build my BaseTools and also
>> exported environment variables "WORKSPACE" and "EDK_TOOLS_PATH"
>> Then I issued the command "build -a ARM -p
>> ArmRealViewEbPkg/ArmRealViewEbPkg.dsc -t ARMGCC"
>> This does not build anything at all. Find the error message attaced.
>>
>> Then I tried "build -a ARM -p BeagleBoardPkg/BeagleBoardPkg.dsc -t
>> ARMGCC" and this does start building the package but breaks midway
>> with the error attached.
>>
>> Is there something else I should be doing in order to build any ARM
>> packages ? Is there a proper Readme I can follow to ensure that this
>> builds with CodeSourcery ?
>>
>> Thanks,
>> 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
>
>
> -------------------------------------------------------------------------=
-----
> 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