public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* Re: [edk2-devel] Loading Prebuilt EFI without INF in UEFIPayloadPkg.dsc
       [not found] <cDNW.1740074913515061077.4VZ1@groups.io>
@ 2025-02-20 18:23 ` Alireza Banejad via groups.io
  2025-02-20 18:25 ` Ard Biesheuvel via groups.io
  2025-02-21  6:57 ` 丰立波 via groups.io
  2 siblings, 0 replies; 3+ messages in thread
From: Alireza Banejad via groups.io @ 2025-02-20 18:23 UTC (permalink / raw)
  To: devel, greg.wilson

Hi Greg,
To do so what you need to do is put the EFI binary inside the Flash
Definition Format File (.FDF) not the DSC or the INF files.
This file is meant to define how blobs and binaries should be stacked
upon each other. what normally happens is that if you are building an
UEFI module source code with its INF. You would define that INF inside
the DSC with its proper library classes and also put inside the proper
section of the associated FDF file.
However in your case, since you are simply adding a pre-built binary
all you need to do is to define the binary based on the rules inside
of that FDF file.
This is a sample rule defined in UEFIPayLoadPkg.fdf:
[Rule.Common.UEFI_DRIVER]
  FILE DRIVER = $(NAMED_GUID) {
    DXE_DEPEX    DXE_DEPEX Optional      $(INF_OUTPUT)/$(MODULE_NAME).depex
    PE32     PE32                    $(INF_OUTPUT)/$(MODULE_NAME).efi
    UI       STRING="$(MODULE_NAME)" Optional
    VERSION  STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
  }
which you would add into your FDF at the DXE section like this:
[FV.DXEFV]
...
  FILE DRIVER = 85299F8F-F2B9-4487-AF60-231434A5EFF6 {
    SECTION PE32 = DIR/TO/EFI/E4297X8.EFI
  }
...
Hope this helps

On Thu, Feb 20, 2025 at 9:38 PM greg.wilson via groups.io
<greg.wilson=gd-ms.uk@groups.io> wrote:
>
> Hi,
>
> I am trying to automatically load an EFI file in EDK2, before the UEFI Shell is available.
>
> It is a prebuilt UNDI Network Driver from Intel,  E4297X8.EFI, from the complete Ethernet Drivers package zip file. ..\Release_29.3\APPS\EFI\EFIx64
>
> The Open Source ICE driver doesn't contain bindings for the E823-L NAC  we have, even though it is part of the E800 series of Network Controller.
>
> Is there a way to build an INF file, that doesn't have an entry point, to load the preexisting E4297X8.EFI file? I hope there is a way to "embed" it in the built payload, being loaded through Slimboot.
>
> Kind regards.
>
> Greg.
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121133): https://edk2.groups.io/g/devel/message/121133
Mute This Topic: https://groups.io/mt/111294067/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] Loading Prebuilt EFI without INF in UEFIPayloadPkg.dsc
       [not found] <cDNW.1740074913515061077.4VZ1@groups.io>
  2025-02-20 18:23 ` [edk2-devel] Loading Prebuilt EFI without INF in UEFIPayloadPkg.dsc Alireza Banejad via groups.io
@ 2025-02-20 18:25 ` Ard Biesheuvel via groups.io
  2025-02-21  6:57 ` 丰立波 via groups.io
  2 siblings, 0 replies; 3+ messages in thread
From: Ard Biesheuvel via groups.io @ 2025-02-20 18:25 UTC (permalink / raw)
  To: devel, greg.wilson

Hi Greg,

On Thu, 20 Feb 2025 at 19:08, greg.wilson via groups.io
<greg.wilson=gd-ms.uk@groups.io> wrote:
>
> Hi,
>
> I am trying to automatically load an EFI file in EDK2, before the UEFI Shell is available.
>
> It is a prebuilt UNDI Network Driver from Intel,  E4297X8.EFI, from the complete Ethernet Drivers package zip file. ..\Release_29.3\APPS\EFI\EFIx64
>
> The Open Source ICE driver doesn't contain bindings for the E823-L NAC  we have, even though it is part of the E800 series of Network Controller.
>
> Is there a way to build an INF file, that doesn't have an entry point, to load the preexisting E4297X8.EFI file? I hope there is a way to "embed" it in the built payload, being loaded through Slimboot.
>

There is an example here

https://github.com/tianocore/edk2-non-osi/blob/master/Emulator/X86EmulatorDxe/X86EmulatorDxe.inf

The depex should be implied for UEFI_DRIVER types, so I'm not sure
whether that is needed. If you do need it, you can just borrow the one
from that repo.


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121134): https://edk2.groups.io/g/devel/message/121134
Mute This Topic: https://groups.io/mt/111294067/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [edk2-devel] Loading Prebuilt EFI without INF in UEFIPayloadPkg.dsc
       [not found] <cDNW.1740074913515061077.4VZ1@groups.io>
  2025-02-20 18:23 ` [edk2-devel] Loading Prebuilt EFI without INF in UEFIPayloadPkg.dsc Alireza Banejad via groups.io
  2025-02-20 18:25 ` Ard Biesheuvel via groups.io
@ 2025-02-21  6:57 ` 丰立波 via groups.io
  2 siblings, 0 replies; 3+ messages in thread
From: 丰立波 via groups.io @ 2025-02-21  6:57 UTC (permalink / raw)
  To: devel, greg.wilson

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

Hi, Greg,


You can add the similar code in your project .fdf file to insert the prebuilt UEFI driver.


FILE DRIVER = 3d696f3f-b3e3-4ca6-b299-2e7e5c7986b7 {
  SECTION PE32 = $(PLATFORM_PACKAGE)/ThirdParty/IntelGopDriverRelease.efi
  SECTION UI   = "IntelGOP"
}


during DXE dispatching, the prebuilt UEFI driver can be found and loaded by calling ENTRY_POINT function, just like other UEFI drivers.
Binding E823-L NAC happens during the PCIe device enumeration, the function, EFI_DRIVER_BINDING_PROTOCOL.Supported() examines the binding criteria. You can load the prebuilt UEFI driver, but you can't use the driver for your device.



Best Regards


Feng Libo


Original:
From:greg.wilson via groups.io<greg.wilson=gd-ms.uk@groups.io>Date:2025-02-21 02:08:33(中国 (GMT+08:00))To:devel<devel@edk2.groups.io>Cc:Subject:[edk2-devel] Loading Prebuilt EFI without INF in UEFIPayloadPkg.dscHi,

I am trying to automatically load an EFI file in EDK2, before the UEFI Shell is available. 

It is a prebuilt UNDI Network Driver from Intel,  E4297X8.EFI, from the complete Ethernet Drivers package zip file. ..\Release_29.3\APPS\EFI\EFIx64

The Open Source ICE driver doesn't contain bindings for the E823-L NAC  we have, even though it is part of the E800 series of Network Controller.

Is there a way to build an INF file, that doesn't have an entry point, to load the preexisting E4297X8.EFI file? I hope there is a way to "embed" it in the built payload, being loaded through Slimboot.

Kind regards.
 
Greg.








-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#121135): https://edk2.groups.io/g/devel/message/121135
Mute This Topic: https://groups.io/mt/111294067/7686176
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [rebecca@openfw.io]
-=-=-=-=-=-=-=-=-=-=-=-



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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-02-21  6:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <cDNW.1740074913515061077.4VZ1@groups.io>
2025-02-20 18:23 ` [edk2-devel] Loading Prebuilt EFI without INF in UEFIPayloadPkg.dsc Alireza Banejad via groups.io
2025-02-20 18:25 ` Ard Biesheuvel via groups.io
2025-02-21  6:57 ` 丰立波 via groups.io

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox