Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Dasharo iPXE menu in OvmfPkg QEMU build #537

Closed
2 tasks done
macpijan opened this issue Oct 19, 2023 · 11 comments
Closed
2 tasks done

Include Dasharo iPXE menu in OvmfPkg QEMU build #537

macpijan opened this issue Oct 19, 2023 · 11 comments
Assignees
Labels
qemu_q35 QEMU Q35

Comments

@macpijan
Copy link
Contributor

macpijan commented Oct 19, 2023

Dasharo version (if applicable)

v0.1.0

Dasharo variant (if applicable)

Emulation QEMU Q35

Affected component(s) or functionality (if applicable)

edk2/OvmfPkg

Brief summary

Additional context

@macpijan macpijan added this to the Emulation QEMU Q35 v0.1.0 milestone Oct 19, 2023
@pietrushnic pietrushnic added the qemu_q35 QEMU Q35 label Oct 23, 2023
@pietrushnic
Copy link

The problem with network booting is that when it is enabled, we can't prevent PXE autoboot in default OVMF. The key question is how to approach this. @miczyg1 do you know how to approach this?

@miczyg1
Copy link
Contributor

miczyg1 commented Oct 23, 2023

  1. iPXE would have to be separately built before the OVMF and put into the workspace (maybe included in FDF too
  2. OVMF package DSC would have to mimic UefiPayloadPkg DSC:
  #
  # Network definition
  #
  DEFINE NETWORK_PXE_BOOT               = FALSE
  DEFINE NETWORK_ENABLE                 = FALSE
  DEFINE NETWORK_TLS_ENABLE             = FALSE
  DEFINE NETWORK_IP6_ENABLE             = FALSE
  DEFINE NETWORK_IP4_ENABLE             = TRUE
  DEFINE NETWORK_LAN_ROM                = FALSE

!if $(NETWORK_PXE_BOOT) == TRUE
  DEFINE NETWORK_SNP_ENABLE             = TRUE
  DEFINE NETWORK_HTTP_BOOT_ENABLE       = FALSE
  DEFINE NETWORK_ISCSI_ENABLE           = FALSE
!else
  DEFINE NETWORK_SNP_ENABLE             = FALSE
  DEFINE NETWORK_HTTP_BOOT_ENABLE       = TRUE
  DEFINE NETWORK_ALLOW_HTTP_CONNECTIONS = TRUE
  DEFINE NETWORK_ISCSI_ENABLE           = TRUE
!endif

!include NetworkPkg/NetworkDefines.dsc.inc
  #
  # IPXE support
  #
  DEFINE NETWORK_IPXE                   = FALSE
  1. The PlatformBootManagerLib must register a bootable option with iPXE similar to how UefiPayload does it in this own PlatformBootManagerLib https://github.com/Dasharo/edk2/blob/dasharo/UefiPayloadPkg/Library/PlatformBootManagerLib/PlatformBootManager.c#L1577

@pietrushnic
Copy link

I'm pretty sure we had this problem for another platform, how did we solve it? Are we adding iPXE binary to the EDK II workspace?

@pietrushnic
Copy link

@miczyg1
Copy link
Contributor

miczyg1 commented Oct 23, 2023

I'm pretty sure we had this problem for another platform, how did we solve it? Are we adding iPXE binary to the EDK II workspace?

Yes, before starting the build process of EDKII we just copy the freshly built ipxe.efi to the EDKII workspace where FDF expects it to be.

@pietrushnic pietrushnic self-assigned this Oct 24, 2023
@pietrushnic
Copy link

@macpijan

Required changes were implemented in:

More detailed descriptions in dedicated issues.

Please let me know how you would like to incorporate those changes.

@pietrushnic
Copy link

@macpijan I guess the dependency of this issue was moved to https://github.com/Dasharo/open-source-firmware-validation/pull/70/files, which was merged, so if Dasharo/edk2#101 will be merged we should be able to mark this as complete, correct?

@macpijan
Copy link
Contributor Author

macpijan commented Nov 8, 2023

Precisely @pietrushnic

@pietrushnic
Copy link

@macpijan So the key question is who is responsible for approving Dasharo/edk2#101 because the review I received was already addressed. Do we have to wait for @miczyg1 to resolve the discussion and approve that PR?

@macpijan
Copy link
Contributor Author

macpijan commented Nov 8, 2023

because the review I received was already addressed

If I were you here, I would resolve this myself leaving a comment that we can go back to that if necessary.

I would rather not resolve that discussion by myself, as I am not really familiar with the details of this discussion.

@pietrushnic
Copy link

@macpijan I merged Dasharo/edk2#101, now remaining piece is verification of #544 to close this item.

@macpijan macpijan closed this as completed Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qemu_q35 QEMU Q35
Projects
None yet
Development

No branches or pull requests

3 participants