public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Andrew Fish" <afish@apple.com>
To: edk2-devel-groups-io <devel@edk2.groups.io>,
	Daniele Crudo <crudo.daniele@gmail.com>
Subject: Re: [edk2-devel] Issues with edk2 compilation with xcode5 on mac OS - files compiled but strange behaviors
Date: Thu, 15 Oct 2020 19:11:31 -0700	[thread overview]
Message-ID: <D02FD40C-DE74-4B98-9B6A-1422868460AA@apple.com> (raw)
In-Reply-To: <Gmro.1602775373552931958.Cqup@groups.io>

[-- Attachment #1: Type: text/plain, Size: 3313 bytes --]

Daniele,

The logo issue is due to the  [Hii-Binary-Package.UEFI_HII] build rule not being supported by XCODE and RVCT those toolchains don’t contain resource compilers for PE/COFF files so they can’t inject HII into PE/COFF images. I submitted patches to fix this a while back and they got stuck and I got bogged down on my day job. This reminds me I need to get those patches moving again. 

Due to the issue above the XCODE build skips some drivers/apps in OVMF [1] but I don’t think that is your issue?

I don’t think it is likely that your graphics issue is related to HII resources. Most of the times when I track down the “it does not work with clang (Xcode uses clang)” it ends up being the clang compiler optimizing away undefined behavior that the other compilers ignored. I’m not sure if there is a another clang toolchain you could try? That would be helpful to know if it is likely an undefined behavior difference. 

Unfortunately the graphics issue is going to be hard to track down if we can’t reproduce it locally. 

[1] Easiest way to find them is:
/Volumes/Case/edk2-github(master)>git grep '$(TOOL_CHAIN_TAG) == "XCODE5"'
OvmfPkg/OvmfPkgIa32.dsc:252:!if $(TOOL_CHAIN_TAG) == "XCODE5"
OvmfPkg/OvmfPkgIa32X64.dsc:256:!if $(TOOL_CHAIN_TAG) == "XCODE5"
OvmfPkg/OvmfPkgX64.dsc:256:!if $(TOOL_CHAIN_TAG) == "XCODE5"
OvmfPkg/OvmfXen.dsc:233:!if $(TOOL_CHAIN_TAG) == "XCODE5"
UefiCpuPkg/UefiCpuPkg.dsc:63:!if $(TOOL_CHAIN_TAG) == "XCODE5"

Thanks,

Andrew Fish

> On Oct 15, 2020, at 8:22 AM, crudo.daniele@gmail.com wrote:
> 
> Good morning, I have an issue with compiled OVMF_CODE.fd and OVMF_VARS.fd with xcode5 on mac os - Catalina 10.15.7 (I tried v. 202005 and v. 202008 stable releases from github).
> My commands for v. 202008, on mac OS:
> 
> git clone https://github.com/tianocore/edk2.git
> cd edk2
> git clean -ffdx
> git reset --hard
> git submodule deinit --force --all
> git checkout edk2-stable202008
> git submodule update --init --force
> source edksetup.sh
> nice make -C "$EDK_TOOLS_PATH" -j $(getconf _NPROCESSORS_ONLN)
> build -a X64 -b RELEASE -p OvmfPkg/OvmfPkgX64.dsc -t XCODE5
> 
> Files are compiled and saved (apparently correctly).
> And I'm using OVMF_CODE.fd and OVMF_VARS.fd to boot a mac OS vm with QEMU/KVM.
> I noticed that with that files I have no tianocore logo at boot and moreover, since I have gpu passthrough I cannot boot the vm if hdmi is not attached (2 monitors setup, hdmi<-->hdmi and dvi<-->dvi to vga adapter<-->vga).
> If I have hdmi attached I can boot without any problem.
> 
> I tried to compile with the same commands edk2 on kali linux, except for the last line which became:
> build -a X64 -b RELEASE -p OvmfPkg/OvmfPkgX64.dsc -t GCC5
> 
> and the generated files work well (I have the tianocore logo and I can boot without hdmi attached, i.e. only one monitor).
> 
> What's going on?
> Anybody can explain?
> Is xcode5 incompatible, is there something wrong in the code or is it my fault?
> At the beginning I thought about an edk2 bug, so I opened an issue into the bugtracker, full history here:
> Bug 3006 <https://bugzilla.tianocore.org/show_bug.cgi?id=3006>
> 
> I attach also the compilation log from mac OS.
> 
> Thanks
> 
> Daniele
> 
> <log-macOs.txt.zip>


[-- Attachment #2: Type: text/html, Size: 9452 bytes --]

  reply	other threads:[~2020-10-16  2:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-15 15:22 Issues with edk2 compilation with xcode5 on mac OS - files compiled but strange behaviors crudo.daniele
2020-10-16  2:11 ` Andrew Fish [this message]
2020-10-16  6:24   ` [edk2-devel] " crudo.daniele
2020-10-16 10:15     ` Daniele Crudo
2020-10-16 17:26     ` Andrew Fish
     [not found]       ` <CAOTX=C-nMhQZq6qgPqUkUXy=EHiuLRt5X4LXxxJn_aKLmkjajg@mail.gmail.com>
2020-10-16 19:24         ` Daniele Crudo
2020-10-16 20:05           ` Andrew Fish
2020-10-17 12:19             ` Daniele Crudo
2020-10-17 15:39               ` Andrew Fish

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=D02FD40C-DE74-4B98-9B6A-1422868460AA@apple.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox