public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Konstantin Aladyshev" <aladyshev22@gmail.com>
To: Jake Garver <jake@nvidia.com>
Cc: "devel@edk2.groups.io" <devel@edk2.groups.io>,
	"bob.c.feng@intel.com" <bob.c.feng@intel.com>,
	 "gaoliming@byosoft.com.cn" <gaoliming@byosoft.com.cn>,
	"yuwei.chen@intel.com" <yuwei.chen@intel.com>
Subject: Re: [PATCH] Revert "BaseTools/Conf: Fix Dynamic-Library-File template"
Date: Mon, 12 Dec 2022 19:07:36 +0300	[thread overview]
Message-ID: <CACSj6VUUqOOPjdj28EGuA-kSa9d2EUhfHpx4MoKTFC=VDWdXpA@mail.gmail.com> (raw)
In-Reply-To: <MN2PR12MB4488D41CE4CA64C212A51700ADE29@MN2PR12MB4488.namprd12.prod.outlook.com>

Hi, Jake!

No, unfortunately I don't have any way to fix this, besides the patch revert.

To reproduce the issue you can add the mentioned PCI_* defines to some
simple DXE_DRIVER.

For example:

SimpleDriver/SimpleDriver.inf
```
[Defines]
  INF_VERSION                    = 1.25
  BASE_NAME                      = SimpleDriver
  FILE_GUID                      = 384aeb18-105d-4af1-bf17-5e349e8f4d4c
  MODULE_TYPE                    = UEFI_DRIVER
  VERSION_STRING                 = 1.0
  ENTRY_POINT                    = SimpleDriverEntryPoint
  UNLOAD_IMAGE                   = SimpleDriverUnload
  PCI_VENDOR_ID                  = 0x1234
  PCI_DEVICE_ID                  = 0x5678
  PCI_CLASS_CODE                 = 0x0001
  PCI_REVISION                   = 0x0002

[Sources]
  SimpleDriver.c

[Packages]
  MdePkg/MdePkg.dec

[LibraryClasses]
  UefiDriverEntryPoint
  UefiLib
```

SimpleDriver/SimpleDriver.c
```
#include <Library/UefiBootServicesTableLib.h>
#include <Library/UefiLib.h>


EFI_STATUS
EFIAPI
SimpleDriverUnload (
  EFI_HANDLE ImageHandle
  )
{
  return EFI_SUCCESS;
}

EFI_STATUS
EFIAPI
SimpleDriverEntryPoint (
  IN EFI_HANDLE        ImageHandle,
  IN EFI_SYSTEM_TABLE  *SystemTable
  )
{
  return EFI_SUCCESS;
}
```
It is enough to reproduce the issue.
Normally the build system should compile the driver code fine and then
call the EfiRom utility to produce the OptionROM image. But with the
d372ab585a2cdc5348af5f701c56c631235fe698 in place the driver build
fails.

Best regards,
Konstantin Aladyshev

On Mon, Dec 12, 2022 at 6:35 PM Jake Garver <jake@nvidia.com> wrote:
>
> Hi, Konstantin,
>
> Do you have a fix for the cyclic redundancy issue when building OptionROMs?  If not, can you help me reproduce it?
>
> I'd hate to revert d372ab as it fixed dependency issues we frequently ran into during parallel builds.
>
> Thanks,
> Jake
> ________________________________
> From: Konstantin Aladyshev <aladyshev22@gmail.com>
> Sent: Monday, December 12, 2022 8:09 AM
> To: devel@edk2.groups.io <devel@edk2.groups.io>
> Cc: bob.c.feng@intel.com <bob.c.feng@intel.com>; gaoliming@byosoft.com.cn <gaoliming@byosoft.com.cn>; yuwei.chen@intel.com <yuwei.chen@intel.com>; Jake Garver <jake@nvidia.com>; Konstantin Aladyshev <aladyshev22@gmail.com>
> Subject: [PATCH] Revert "BaseTools/Conf: Fix Dynamic-Library-File template"
>
> External email: Use caution opening links or attachments
>
>
> Revert commit d372ab585a2cdc5348af5f701c56c631235fe698.
>
> EdkII build system supports OptionROM generation if particular PCI_*
> defines are present in the module INF file:
> ```
> [Defines]
>   ...
>   PCI_VENDOR_ID                  = <...>
>   PCI_DEVICE_ID                  = <...>
>   PCI_CLASS_CODE                 = <...>
>   PCI_REVISION                   = <...>
> ```
> Although after the commit d372ab585a2cdc5348af5f701c56c631235fe698
> it is no longer possible.
> The build system fails with the error:
> ```
> Cyclic dependency detected while generating rule for
> "<...>/DEBUG/<...>.efi" file
> ```
> Revert d372ab585a2cdc5348af5f701c56c631235fe698 until the issue
> is resolved.
> ---
>  BaseTools/Conf/build_rule.template | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/BaseTools/Conf/build_rule.template b/BaseTools/Conf/build_rule.template
> index af4819de92..32053f6353 100755
> --- a/BaseTools/Conf/build_rule.template
> +++ b/BaseTools/Conf/build_rule.template
> @@ -342,8 +342,6 @@
>
>
>      <OutputFile>
>
>          $(OUTPUT_DIR)(+)$(MODULE_NAME).efi
>
> -        $(DEBUG_DIR)(+)$(MODULE_NAME).efi
>
> -        $(OUTPUT_DIR)(+)$(MODULE_NAME).map
>
>
>
>      <Command.MSFT, Command.INTEL, Command.CLANGPDB>
>
>          "$(GENFW)" -e $(MODULE_TYPE) -o ${dst} ${src} $(GENFW_FLAGS)
>
> --
> 2.34.1
>

  reply	other threads:[~2022-12-12 16:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-12 13:09 [PATCH] Revert "BaseTools/Conf: Fix Dynamic-Library-File template" Konstantin Aladyshev
2022-12-12 15:35 ` Jake Garver
2022-12-12 16:07   ` Konstantin Aladyshev [this message]
2022-12-13 15:42     ` Jake Garver
2022-12-13 16:24       ` Konstantin Aladyshev
2022-12-13 16:22 ` [PATCH] Fix cyclic dependency error on OptionROM build Konstantin Aladyshev
2022-12-13 18:47   ` Jake Garver
2023-01-15 10:53     ` Konstantin Aladyshev
2023-01-17  5:04     ` Bob Feng
     [not found]     ` <173B00341150B4F6.23170@groups.io>
2023-01-17  5:17       ` [edk2-devel] " Bob Feng
2023-01-17  8:23         ` Konstantin Aladyshev
2023-01-17  9:22           ` Bob Feng

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='CACSj6VUUqOOPjdj28EGuA-kSa9d2EUhfHpx4MoKTFC=VDWdXpA@mail.gmail.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