On 01/15/2013 09:56 AM, Andrew Fish wrote:
>
>
> On Jan 15, 2013, at 5:39 AM, Piker Alpha <pikeral...@yahoo.com
> <mailto:pikeral...@yahoo.com>> wrote:
>
>> I would like to add my $0.02
>>
>> Now. I don't want to offend anyone here, nor their hard work, but I
>> use OS X and that platform is even more behind. I was stunned to find
>> out that while Apple is using EFI for years, one cannot even compile
>> stuff properly.
>>
>
> The only OS X issue I know about is:
> The Xcode C/C++/Objective C compiler, called clang,  is constantly
> improving its diagnostics and we have warning set as errors. So new
> releases of Xcode tend to throw a couple of new warnings that get mapped
> to compiler errors. They are very easy to fix, but the package
> maintainers seem to lag behind in getting these issues fixed and
> integrated. Most of the package maintainers primarily use Windows/Visual
> Studio. So if these couple of warnings are fixed with casting clang
> works great.
>
> If I get a chance in the next few days I'll post the patches to make
> clang compile to the mailing list.
>
> On Linux I  would guess the parameter passing issue is related to the
> X64 (x86-64) ABI differences  (note I don't use these tool chains since
> I use Xcode so I could be wrong). Linux and OS X use the System V x86-64
> calling convention while EFI uses the X64 Microsoft calling convention
> (see http://en.wikipedia.org/wiki/X86_calling_conventions for details on
> the difference). For clang we added a target (called a triple) to
> support the EFI ABI. On some of the gcc compilers the default ABI is
> still the System V x86-64 calling convention and EFIABI is mapped to
> mean use an alternate calling convention that matches the EFI calling
> convention. So why am I going into to all this detail? Well on Visual
> Studio (and clang) if you don't use EFIABI correctly nothing bad
> happens, but if you are using GCC that maps EFIABI to an alternate
> calling convention and you don't use EFIABI correctly then bad things
> happen.
>
> GCC maps EFIAPI to match the EFI calling convention. See
> https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2/BaseTools/Conf/tools_def.template
>
> -m64 "-DEFIAPI=__attribute__((ms_abi))" -DNO_BUILTIN_VA_FUNCS -mno-red-zone 
> -Wno-address -mcmodel=large
>
> I also noticed that the StdLib readme.txt states that only GCC 4.4 and
> 4.5 are currently supported and the bug reports in this thread seem to
> be against GCC 4.6. So that would probably explain why there are new
> warnings in the code base. I've not tried to compile the StdLib with the
> latest Xcode and it is not listed as being a supported toolchain.
>
>> I presume that Apple is using Windows in a virtual machine, or use
>> BootCamp for their development. But in any event. This should change,
>> because for someone like me, living in a non-windows world – using
>> Linux since age 7 and OS X since 2007 – this is total madness. Won't
>> ever use Windows. Not even in a virtual machine.
>
> We use OS X Xcode clang complier and do not use Windows to build EFI at
> Apple. It works great for us.
>

$.02 more:

Microsoft's compilers and the EDK2 build tools run reasonably well under 
wine (www.winehq.org), a Windows ABI implementation which runs on Linux. 
  (Parallel builds are slower than they would be natively, due to wine's 
overhead.)  You can download certain (older?) versions of the compilers 
for free as part of Microsoft's driver development kits (DDK).  We do 
all our development using compilers extracted from WINDDK 3790.1830. 
See the TOOL_CHAIN_TAG of DDK3790 in tools_def.template.  That lets us 
use Linux on our desktops and on a big shared build machine, and still 
use Microsoft's tool chain.

Unfortunately, this makes debugging difficult:  gdb doesn't understand 
Microsoft's symbolic debugging data, and Microsoft's debuggers don't 
seem to run under wine.  When I need to use windbg, I run Windows in a VM.

I'd prefer to use native gcc for all our development.  But our platform 
incorporates quite a bit of closed-source code from a 3rd party, which 
unfortunately only builds with Microsoft's tools.  Porting all that code 
to work properly with gcc isn't really an option for us.

Hope you can find a workable development system.

Sincerely,
Brian

>> Note: Anything expressed here is my own personal view and not that of
>> my employer.
>>
>> Regards,
>>
>> Pike
>>
>> ------------------------------------------------------------------------
>> *Van:* Mauro Faccenda <facce...@gmail.com <mailto:facce...@gmail.com>>
>> *Aan:* edk2-devel@lists.sourceforge.net
>> <mailto:edk2-devel@lists.sourceforge.net>
>> *Verzonden:* dinsdag 15 januari 13:40 2013
>> *Onderwerp:* Re: [edk2] difficulties getting started with EDK2 Development
>>
>> Hi Космынин,
>>
>> Thanks for your answer. I've noticed that the whole environment is on
>> a 'unstable' state and I was about to send a new message reporting the
>> a problem I am having when I call gethostbyname() (I guess it is the
>> same you mentioned with the GetHostByDns.efi) it makes qemu (with a
>> DEBUG enabled OVMF) hangs with some messages, and i still couldn't
>> find a workaround. But it seems it is a known problem.
>>
>> You mentioned that Linux isn't a stable platform for development, it
>> should be my preferred platform (licencing issues), but we can also
>> use any other. What would you (or anyone else) recommend?
>>
>> Regards,
>>
>> Mauro
>>
>> On Tue, Jan 15, 2013 at 5:18 AM, Космынин Олег Олегович
>> <okosmy...@kraftway.ru <mailto:okosmy...@kraftway.ru>> wrote:
>> > Sadly, Linux is not a platform for stable development, there are at
>> least 2 bugs we found in toolchain (gcc46), one is critical, i
>> reported it but no answers.
>> > One bug with debug sections (check your log for: cannot fill debug
>> link section) - it will stop DEBUG() macro from working, and another
>> bug simply corrupt pointer in some cases (try to run GetHostByDns.efi
>> and it will ASSERT). gcc45 & gcc44 not work at all on my setup (ubuntu
>> 12.10, latest svn rev).
>> >
>> > Errors in StdLib you mentioned really exist, can't comment on your
>> main (  IN int Argc,  IN char **Argv  ) issue.
>> >
>> > Overall, after 2.5 months of studying/developing for UEFI
>> implementation from Intel I got impression it is in pre-alpha stage
>> and you should expect lots of bugs.
>> >
>> > Good luck in your work
>> >
>> > ________________________________________
>> > From: Mauro Faccenda [facce...@gmail.com <mailto:facce...@gmail.com>]
>> > Sent: 11 January 2013 18:24
>> > To: edk2-devel@lists.sourceforge.net
>> <mailto:edk2-devel@lists.sourceforge.net>
>> > Subject: [edk2] difficulties getting started with EDK2 Development
>> >
>> > Hi all,
>> >
>> > I am trying to get started with EDK2 development and I'd like to
>> > report some difficulties I had and am having.
>> >
>> > If any of you can point to some way to fix or even better way of doing
>> > anything, I'd appreciate.
>> >
>> > I am willing to use a plain Ubuntu 12.04 64bits as development
>> > platform as it comes with GCC 4.6 which seems to be well supported by
>> > the EDK2 and BaseTools.
>> >
>> > But here comes to me the first question: which (if any) are the
>> > recommended (default) platform for development? I guess it is using
>> > Windows with VS since the configuration comes with all parameters set
>> > to use it. But I'd like to know If there is any 'better supported'
>> > Linux platform (distro, distro version+gcc version).
>> >
>> > The Project Wiki mentions Ubuntu 9.10, 10.10 and 10.04, and GCC 4.4,
>> > but doesn't recommend any.
>> >
>> > For instance, I followed this documentation:
>> >
>> http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=Using_EDK_II_with_Native_GCC_4.4
>> >
>> > Moving on, as I want to play with network connections, I built my own
>> > OVMF with the Intel's E1000 Network drivers successfully using the
>> > sources from EDK2 trunk.
>> >
>> > I already could run qemu with network support (using tap + bridge with
>> > host physical interface) and use ping.efi (from the EDK2 Toolkit)
>> > against devices on my network, also no problems besides the latency
>> > being a bit high (>400ms, from the host I get less than 1ms).
>> >
>> > Then I started building some applications to test running in the
>> > environment. I've built the MdeModulePkg and could run some of them.
>> > But when I tried to build AppPkg I got the following error:
>> > $ build -t GCC46 -a X64 -p AppPkg/AppPkg.dsc
>> > [...]
>> > edk2/StdLib/LibC/Containers/Queues/Fifo.c:508:27: error: assignment
>> > from incompatible pointer type [-Werror]
>> > cc1: all warnings being treated as errors
>> >
>> > As it seems to be a warning promoted to an error, I manually ran the
>> > same gcc command removing the -Werror parameter and it compiled
>> > successfully.
>> >
>> > Is this a bug? Should I report?
>> >
>> > Then I ran the build command again, which brought another error:
>> >
>> > edk2/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.c:269:1: error:
>> > conflicting types for ‘IIO_CursorDelta’
>> > edk2/StdLib/LibC/Uefi/InteractiveIO/IIOutilities.h:122:1: note:
>> > previous declaration of ‘IIO_CursorDelta’ was here
>> >
>> > I opened both files looking for the definition of IIO_CursorDelta and
>> > in .h file I got:
>> > --
>> > int
>> > EFIAPI
>> > IIO_CursorDelta (
>> >  cIIO *This,
>> >  CURSOR_XY    *StartXY,
>> >  CURSOR_XY    *EndXY
>> >  );
>> > --
>> > while in the .c I got:
>> > --
>> > UINT32
>> > EFIAPI
>> > IIO_CursorDelta (
>> >  cIIO        *This,
>> >  CURSOR_XY    *StartXY,
>> >  CURSOR_XY    *EndXY
>> > ) [...]
>> > --
>> >
>> > So I changed the .h from int to UINT32 and ran the build again. This
>> > time with success. Should I report this?
>> >
>> > After that, I started to play with AppPkg/Applications/Main/Main.c,
>> > trying to poke around to see what I can or can't do and got something
>> > strange. I've changed the Main.c to just print the Argc value:
>> > --
>> > #include  <stdio.h>
>> > int
>> > EFIAPI
>> > main (
>> >  IN int Argc,
>> >  IN char **Argv
>> >  )
>> > {
>> > printf("\nArgc=%d\n", Argc);
>> >  return 0;
>> > }
>> > --
>> > And whenever I run it on UEFI Shell (using qemu), I always get really
>> > big values (> 37000000) no matter with how many parameter I run and if
>> > I run with the same parameter multiple times, the value sometimes
>> > changes, as you can see on the image below:
>> >
>> > http://s1.postimage.org/dxeg7ahdr/argc.png
>> >
>> > This isn't exactly a problem, since I still can successfully run
>> > normal code but I'd like to know if am I doing something stupid, if
>> > this is some kind of bug or if it is a side effect of something I
>> > couldn't see yet.
>> >
>> > Any tips or clarifications will be really appreciated.
>> >
>> > Anyway, thanks for the good job you all have been doing on this
>> project. =)
>> >
>> > Mauro Faccenda
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Master HTML5, CSS3, ASP.NET <http://ASP.NET>, MVC, AJAX,
>> Knockout.js, Web API and
>> > much more. Get web development skills now with LearnDevNow -
>> > 350+ hours of step-by-step video tutorials by Microsoft MVPs and
>> experts.
>> > SALE $99.99 this month only -- learn more at:
>> > http://p.sf.net/sfu/learnmore_122812
>> > _______________________________________________
>> > edk2-devel mailing list
>> > edk2-devel@lists.sourceforge.net
>> <mailto:edk2-devel@lists.sourceforge.net>
>> > https://lists.sourceforge.net/lists/listinfo/edk2-devel
>> >
>> >
>> ------------------------------------------------------------------------------
>> > Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
>> > and more. Get SQL Server skills now (including 2012) with LearnDevNow -
>> > 200+ hours of step-by-step video tutorials by Microsoft MVPs and
>> experts.
>> > SALE $99.99 this month only - learn more at:
>> > http://p.sf.net/sfu/learnmore_122512
>> > _______________________________________________
>> > edk2-devel mailing list
>> > edk2-devel@lists.sourceforge.net
>> <mailto:edk2-devel@lists.sourceforge.net>
>> > https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>
>> ------------------------------------------------------------------------------
>> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
>> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
>> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
>> SALE $99.99 this month only - learn more at:
>> http://p.sf.net/sfu/learnmore_122512
>> _______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net <mailto:edk2-devel@lists.sourceforge.net>
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>
>>
>> ------------------------------------------------------------------------------
>> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
>> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
>> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
>> SALE $99.99 this month only - learn more at:
>> http://p.sf.net/sfu/learnmore_122512_______________________________________________
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
>
> ------------------------------------------------------------------------------
> Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
> and more. Get SQL Server skills now (including 2012) with LearnDevNow -
> 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
> SALE $99.99 this month only - learn more at:
> http://p.sf.net/sfu/learnmore_122512
>
>
>
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>

------------------------------------------------------------------------------
Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS
and more. Get SQL Server skills now (including 2012) with LearnDevNow -
200+ hours of step-by-step video tutorials by Microsoft MVPs and experts.
SALE $99.99 this month only - learn more at:
http://p.sf.net/sfu/learnmore_122512
_______________________________________________
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

Reply via email to