[edk2,2/4] ArmVirtPkg/ArmVirtQemu: factor out shared FV.FvMain definition

Message ID 1468314987-19885-3-git-send-email-ard.biesheuvel@linaro.org
State Superseded
Headers show

Commit Message

Ard Biesheuvel July 12, 2016, 9:16 a.m.
The FDF definition of [FV.FvMain] is identical between ArmVirtQemu and
ArmVirtQemuKernel, and needs to remain that way. So factor it out into
a separate include file, and replace both definitions with an !include
directive.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

---
 ArmVirtPkg/ArmVirtQemu.fdf           | 154 +----------------
 ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 178 ++++++++++++++++++++
 ArmVirtPkg/ArmVirtQemuKernel.fdf     | 154 +----------------
 3 files changed, 180 insertions(+), 306 deletions(-)

-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Comments

Laszlo Ersek July 12, 2016, 9:37 a.m. | #1
On 07/12/16 11:16, Ard Biesheuvel wrote:
> The FDF definition of [FV.FvMain] is identical between ArmVirtQemu and

> ArmVirtQemuKernel, and needs to remain that way. So factor it out into

> a separate include file, and replace both definitions with an !include

> directive.

> 

> Contributed-under: TianoCore Contribution Agreement 1.0

> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>

> ---

>  ArmVirtPkg/ArmVirtQemu.fdf           | 154 +----------------

>  ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc | 178 ++++++++++++++++++++

>  ArmVirtPkg/ArmVirtQemuKernel.fdf     | 154 +----------------

>  3 files changed, 180 insertions(+), 306 deletions(-)


I didn't verify every single line, of course :)

It looks good to me. Given that "ArmVirtQemuFvMain.fdf.inc" is a new
file, please double-check that it has uniform CRLF line endings.

Also, normally we start files with a @file DoxyGen directive (or
whatever it is called), but the current FDF files under ArmVirtPkg don't
conform to that already, so meh.

Reviewed-by: Laszlo Ersek <lersek@redhat.com>


Thanks
Laszlo

> diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf

> index d98a01cef35f..9176cf24f105 100644

> --- a/ArmVirtPkg/ArmVirtQemu.fdf

> +++ b/ArmVirtPkg/ArmVirtQemu.fdf

> @@ -82,159 +82,7 @@ [FD.QEMU_EFI]

>  #

>  ################################################################################

>  

> -[FV.FvMain]

> -BlockSize          = 0x40

> -NumBlocks          = 0         # This FV gets compressed so make it just big enough

> -FvAlignment        = 16        # FV alignment and FV attributes setting.

> -ERASE_POLARITY     = 1

> -MEMORY_MAPPED      = TRUE

> -STICKY_WRITE       = TRUE

> -LOCK_CAP           = TRUE

> -LOCK_STATUS        = TRUE

> -WRITE_DISABLED_CAP = TRUE

> -WRITE_ENABLED_CAP  = TRUE

> -WRITE_STATUS       = TRUE

> -WRITE_LOCK_CAP     = TRUE

> -WRITE_LOCK_STATUS  = TRUE

> -READ_DISABLED_CAP  = TRUE

> -READ_ENABLED_CAP   = TRUE

> -READ_STATUS        = TRUE

> -READ_LOCK_CAP      = TRUE

> -READ_LOCK_STATUS   = TRUE

> -

> -  INF MdeModulePkg/Core/Dxe/DxeMain.inf

> -  INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf

> -  INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf

> -  INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf

> -  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf

> -

> -  #

> -  # PI DXE Drivers producing Architectural Protocols (EFI Services)

> -  #

> -  INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf

> -  INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf

> -  INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf

> -  INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf

> -  INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf

> -  INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf

> -!if $(SECURE_BOOT_ENABLE) == TRUE

> -  INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf

> -!endif

> -  INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf

> -  INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf

> -  INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf

> -  INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf

> -  INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf

> -

> -  #

> -  # Multiple Console IO support

> -  #

> -  INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf

> -  INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf

> -  INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf

> -  INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf

> -  INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf

> -

> -  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

> -  INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf

> -  INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf

> -  INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf

> -

> -  #

> -  # FAT filesystem + GPT/MBR partitioning

> -  #

> -  INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf

> -  INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf

> -  INF FatPkg/EnhancedFatDxe/Fat.inf

> -  INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf

> -

> -  #

> -  # Platform Driver

> -  #

> -  INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf

> -  INF OvmfPkg/VirtioNetDxe/VirtioNet.inf

> -  INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf

> -  INF OvmfPkg/VirtioRngDxe/VirtioRng.inf

> -

> -  #

> -  # UEFI application (Shell Embedded Boot Loader)

> -  #

> -  INF ShellPkg/Application/Shell/Shell.inf

> -

> -  #

> -  # Bds

> -  #

> -  INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf

> -  INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf

> -  INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf

> -  INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf

> -  INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf

> -  INF MdeModulePkg/Application/UiApp/UiApp.inf

> -

> -  #

> -  # Networking stack

> -  #

> -  INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf

> -  INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf

> -  INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf

> -  INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf

> -  INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf

> -  INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf

> -  INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf

> -  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf

> -  INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf

> -  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf

> -  INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf

> -

> -  #

> -  # SCSI Bus and Disk Driver

> -  #

> -  INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf

> -  INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf

> -

> -  #

> -  # SMBIOS Support

> -  #

> -  INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf

> -  INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf

> -

> -!if $(ARCH) == AARCH64

> -  #

> -  # ACPI Support

> -  #

> -  INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf

> -  INF OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf

> -!endif

> -

> -  #

> -  # PCI support

> -  #

> -  INF ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf

> -  INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf

> -  INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf

> -  INF OvmfPkg/Virtio10Dxe/Virtio10.inf

> -

> -  #

> -  # Video support

> -  #

> -  INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf

> -  INF OvmfPkg/PlatformDxe/Platform.inf

> -

> -  #

> -  # USB Support

> -  #

> -  INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf

> -  INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf

> -  INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf

> -  INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf

> -  INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf

> -

> -  #

> -  # TianoCore logo (splash screen)

> -  #

> -  FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {

> -    SECTION RAW = MdeModulePkg/Logo/Logo.bmp

> -  }

> +!include ArmVirtQemuFvMain.fdf.inc

>  

>  [FV.FVMAIN_COMPACT]

>  FvAlignment        = 16

> diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc

> new file mode 100644

> index 000000000000..7bed6785d099

> --- /dev/null

> +++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc

> @@ -0,0 +1,178 @@

> +#

> +#  Copyright (c) 2011-2015, ARM Limited. All rights reserved.

> +#  Copyright (c) 2014-2016, Linaro Limited. All rights reserved.

> +#  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.

> +#

> +#  This program and the accompanying materials

> +#  are licensed and made available under the terms and conditions of the BSD License

> +#  which accompanies this distribution.  The full text of the license may be found at

> +#  http://opensource.org/licenses/bsd-license.php

> +#

> +#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,

> +#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.

> +#

> +

> +################################################################################

> +#

> +# FV Section

> +#

> +# [FV] section is used to define what components or modules are placed within a flash

> +# device file.  This section also defines order the components and modules are positioned

> +# within the image.  The [FV] section consists of define statements, set statements and

> +# module statements.

> +#

> +################################################################################

> +

> +[FV.FvMain]

> +BlockSize          = 0x40

> +NumBlocks          = 0         # This FV gets compressed so make it just big enough

> +FvAlignment        = 16        # FV alignment and FV attributes setting.

> +ERASE_POLARITY     = 1

> +MEMORY_MAPPED      = TRUE

> +STICKY_WRITE       = TRUE

> +LOCK_CAP           = TRUE

> +LOCK_STATUS        = TRUE

> +WRITE_DISABLED_CAP = TRUE

> +WRITE_ENABLED_CAP  = TRUE

> +WRITE_STATUS       = TRUE

> +WRITE_LOCK_CAP     = TRUE

> +WRITE_LOCK_STATUS  = TRUE

> +READ_DISABLED_CAP  = TRUE

> +READ_ENABLED_CAP   = TRUE

> +READ_STATUS        = TRUE

> +READ_LOCK_CAP      = TRUE

> +READ_LOCK_STATUS   = TRUE

> +

> +  INF MdeModulePkg/Core/Dxe/DxeMain.inf

> +  INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf

> +  INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf

> +  INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf

> +  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf

> +

> +  #

> +  # PI DXE Drivers producing Architectural Protocols (EFI Services)

> +  #

> +  INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf

> +  INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf

> +  INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf

> +  INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf

> +  INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf

> +  INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf

> +!if $(SECURE_BOOT_ENABLE) == TRUE

> +  INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf

> +!endif

> +  INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf

> +  INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf

> +  INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf

> +  INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf

> +  INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf

> +

> +  #

> +  # Multiple Console IO support

> +  #

> +  INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf

> +  INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf

> +  INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf

> +  INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf

> +  INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf

> +

> +  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

> +  INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf

> +  INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf

> +  INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf

> +

> +  #

> +  # FAT filesystem + GPT/MBR partitioning

> +  #

> +  INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf

> +  INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf

> +  INF FatPkg/EnhancedFatDxe/Fat.inf

> +  INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf

> +

> +  #

> +  # Platform Driver

> +  #

> +  INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf

> +  INF OvmfPkg/VirtioNetDxe/VirtioNet.inf

> +  INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf

> +  INF OvmfPkg/VirtioRngDxe/VirtioRng.inf

> +

> +  #

> +  # UEFI application (Shell Embedded Boot Loader)

> +  #

> +  INF ShellPkg/Application/Shell/Shell.inf

> +

> +  #

> +  # Bds

> +  #

> +  INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf

> +  INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf

> +  INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf

> +  INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf

> +  INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf

> +  INF MdeModulePkg/Application/UiApp/UiApp.inf

> +

> +  #

> +  # Networking stack

> +  #

> +  INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf

> +  INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf

> +  INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf

> +  INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf

> +  INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf

> +  INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf

> +  INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf

> +  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf

> +  INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf

> +  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf

> +  INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf

> +

> +  #

> +  # SCSI Bus and Disk Driver

> +  #

> +  INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf

> +  INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf

> +

> +  #

> +  # SMBIOS Support

> +  #

> +  INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf

> +  INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf

> +

> +!if $(ARCH) == AARCH64

> +  #

> +  # ACPI Support

> +  #

> +  INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf

> +  INF OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf

> +!endif

> +

> +  #

> +  # PCI support

> +  #

> +  INF ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf

> +  INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf

> +  INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf

> +  INF OvmfPkg/Virtio10Dxe/Virtio10.inf

> +

> +  #

> +  # Video support

> +  #

> +  INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf

> +  INF OvmfPkg/PlatformDxe/Platform.inf

> +

> +  #

> +  # USB Support

> +  #

> +  INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf

> +  INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf

> +  INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf

> +  INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf

> +  INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf

> +

> +  #

> +  # TianoCore logo (splash screen)

> +  #

> +  FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {

> +    SECTION RAW = MdeModulePkg/Logo/Logo.bmp

> +  }

> diff --git a/ArmVirtPkg/ArmVirtQemuKernel.fdf b/ArmVirtPkg/ArmVirtQemuKernel.fdf

> index dcea9771a288..ee9fa189f85a 100644

> --- a/ArmVirtPkg/ArmVirtQemuKernel.fdf

> +++ b/ArmVirtPkg/ArmVirtQemuKernel.fdf

> @@ -104,159 +104,7 @@ [FD.QEMU_EFI]

>  #

>  ################################################################################

>  

> -[FV.FvMain]

> -BlockSize          = 0x40

> -NumBlocks          = 0         # This FV gets compressed so make it just big enough

> -FvAlignment        = 16        # FV alignment and FV attributes setting.

> -ERASE_POLARITY     = 1

> -MEMORY_MAPPED      = TRUE

> -STICKY_WRITE       = TRUE

> -LOCK_CAP           = TRUE

> -LOCK_STATUS        = TRUE

> -WRITE_DISABLED_CAP = TRUE

> -WRITE_ENABLED_CAP  = TRUE

> -WRITE_STATUS       = TRUE

> -WRITE_LOCK_CAP     = TRUE

> -WRITE_LOCK_STATUS  = TRUE

> -READ_DISABLED_CAP  = TRUE

> -READ_ENABLED_CAP   = TRUE

> -READ_STATUS        = TRUE

> -READ_LOCK_CAP      = TRUE

> -READ_LOCK_STATUS   = TRUE

> -

> -  INF MdeModulePkg/Core/Dxe/DxeMain.inf

> -  INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf

> -  INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf

> -  INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf

> -  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf

> -

> -  #

> -  # PI DXE Drivers producing Architectural Protocols (EFI Services)

> -  #

> -  INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf

> -  INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf

> -  INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf

> -  INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf

> -  INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf

> -  INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf

> -!if $(SECURE_BOOT_ENABLE) == TRUE

> -  INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf

> -!endif

> -  INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf

> -  INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf

> -  INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf

> -  INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf

> -  INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf

> -

> -  #

> -  # Multiple Console IO support

> -  #

> -  INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf

> -  INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf

> -  INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf

> -  INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf

> -  INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf

> -

> -  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf

> -  INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf

> -  INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf

> -  INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf

> -

> -  #

> -  # FAT filesystem + GPT/MBR partitioning

> -  #

> -  INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf

> -  INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf

> -  INF FatPkg/EnhancedFatDxe/Fat.inf

> -  INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf

> -

> -  #

> -  # Platform Driver

> -  #

> -  INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf

> -  INF OvmfPkg/VirtioNetDxe/VirtioNet.inf

> -  INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf

> -  INF OvmfPkg/VirtioRngDxe/VirtioRng.inf

> -

> -  #

> -  # UEFI application (Shell Embedded Boot Loader)

> -  #

> -  INF ShellPkg/Application/Shell/Shell.inf

> -

> -  #

> -  # Bds

> -  #

> -  INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf

> -  INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf

> -  INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf

> -  INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf

> -  INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf

> -  INF MdeModulePkg/Application/UiApp/UiApp.inf

> -

> -  #

> -  # Networking stack

> -  #

> -  INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf

> -  INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf

> -  INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf

> -  INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf

> -  INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf

> -  INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf

> -  INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf

> -  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf

> -  INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf

> -  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf

> -  INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf

> -

> -  #

> -  # SCSI Bus and Disk Driver

> -  #

> -  INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf

> -  INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf

> -

> -  #

> -  # SMBIOS Support

> -  #

> -  INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf

> -  INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf

> -

> -!if $(ARCH) == AARCH64

> -  #

> -  # ACPI Support

> -  #

> -  INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf

> -  INF OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf

> -!endif

> -

> -  #

> -  # PCI support

> -  #

> -  INF ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf

> -  INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf

> -  INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf

> -  INF OvmfPkg/Virtio10Dxe/Virtio10.inf

> -

> -  #

> -  # Video support

> -  #

> -  INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf

> -  INF OvmfPkg/PlatformDxe/Platform.inf

> -

> -  #

> -  # USB Support

> -  #

> -  INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf

> -  INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf

> -  INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf

> -  INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf

> -  INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf

> -

> -  #

> -  # TianoCore logo (splash screen)

> -  #

> -  FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {

> -    SECTION RAW = MdeModulePkg/Logo/Logo.bmp

> -  }

> +!include ArmVirtQemuFvMain.fdf.inc

>  

>  [FV.FVMAIN_COMPACT]

>  FvAlignment        = 16

> 


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Patch

diff --git a/ArmVirtPkg/ArmVirtQemu.fdf b/ArmVirtPkg/ArmVirtQemu.fdf
index d98a01cef35f..9176cf24f105 100644
--- a/ArmVirtPkg/ArmVirtQemu.fdf
+++ b/ArmVirtPkg/ArmVirtQemu.fdf
@@ -82,159 +82,7 @@  [FD.QEMU_EFI]
 #
 ################################################################################
 
-[FV.FvMain]
-BlockSize          = 0x40
-NumBlocks          = 0         # This FV gets compressed so make it just big enough
-FvAlignment        = 16        # FV alignment and FV attributes setting.
-ERASE_POLARITY     = 1
-MEMORY_MAPPED      = TRUE
-STICKY_WRITE       = TRUE
-LOCK_CAP           = TRUE
-LOCK_STATUS        = TRUE
-WRITE_DISABLED_CAP = TRUE
-WRITE_ENABLED_CAP  = TRUE
-WRITE_STATUS       = TRUE
-WRITE_LOCK_CAP     = TRUE
-WRITE_LOCK_STATUS  = TRUE
-READ_DISABLED_CAP  = TRUE
-READ_ENABLED_CAP   = TRUE
-READ_STATUS        = TRUE
-READ_LOCK_CAP      = TRUE
-READ_LOCK_STATUS   = TRUE
-
-  INF MdeModulePkg/Core/Dxe/DxeMain.inf
-  INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
-  INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
-  INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
-  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
-
-  #
-  # PI DXE Drivers producing Architectural Protocols (EFI Services)
-  #
-  INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
-  INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
-  INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
-  INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
-  INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
-  INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
-!if $(SECURE_BOOT_ENABLE) == TRUE
-  INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
-!endif
-  INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
-  INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
-  INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
-  INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
-  INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
-
-  #
-  # Multiple Console IO support
-  #
-  INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
-  INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
-  INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
-  INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
-  INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
-
-  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
-  INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
-  INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
-  INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
-
-  #
-  # FAT filesystem + GPT/MBR partitioning
-  #
-  INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
-  INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
-  INF FatPkg/EnhancedFatDxe/Fat.inf
-  INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
-
-  #
-  # Platform Driver
-  #
-  INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
-  INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
-  INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
-  INF OvmfPkg/VirtioRngDxe/VirtioRng.inf
-
-  #
-  # UEFI application (Shell Embedded Boot Loader)
-  #
-  INF ShellPkg/Application/Shell/Shell.inf
-
-  #
-  # Bds
-  #
-  INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
-  INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
-  INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
-  INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
-  INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
-  INF MdeModulePkg/Application/UiApp/UiApp.inf
-
-  #
-  # Networking stack
-  #
-  INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-
-  #
-  # SCSI Bus and Disk Driver
-  #
-  INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
-  INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
-
-  #
-  # SMBIOS Support
-  #
-  INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
-  INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
-
-!if $(ARCH) == AARCH64
-  #
-  # ACPI Support
-  #
-  INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
-  INF OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf
-!endif
-
-  #
-  # PCI support
-  #
-  INF ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
-  INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
-  INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
-  INF OvmfPkg/Virtio10Dxe/Virtio10.inf
-
-  #
-  # Video support
-  #
-  INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
-  INF OvmfPkg/PlatformDxe/Platform.inf
-
-  #
-  # USB Support
-  #
-  INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
-  INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
-  INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
-  INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
-  INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
-
-  #
-  # TianoCore logo (splash screen)
-  #
-  FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
-    SECTION RAW = MdeModulePkg/Logo/Logo.bmp
-  }
+!include ArmVirtQemuFvMain.fdf.inc
 
 [FV.FVMAIN_COMPACT]
 FvAlignment        = 16
diff --git a/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
new file mode 100644
index 000000000000..7bed6785d099
--- /dev/null
+++ b/ArmVirtPkg/ArmVirtQemuFvMain.fdf.inc
@@ -0,0 +1,178 @@ 
+#
+#  Copyright (c) 2011-2015, ARM Limited. All rights reserved.
+#  Copyright (c) 2014-2016, Linaro Limited. All rights reserved.
+#  Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+#
+#  This program and the accompanying materials
+#  are licensed and made available under the terms and conditions of the BSD License
+#  which accompanies this distribution.  The full text of the license may be found at
+#  http://opensource.org/licenses/bsd-license.php
+#
+#  THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
+#
+
+################################################################################
+#
+# FV Section
+#
+# [FV] section is used to define what components or modules are placed within a flash
+# device file.  This section also defines order the components and modules are positioned
+# within the image.  The [FV] section consists of define statements, set statements and
+# module statements.
+#
+################################################################################
+
+[FV.FvMain]
+BlockSize          = 0x40
+NumBlocks          = 0         # This FV gets compressed so make it just big enough
+FvAlignment        = 16        # FV alignment and FV attributes setting.
+ERASE_POLARITY     = 1
+MEMORY_MAPPED      = TRUE
+STICKY_WRITE       = TRUE
+LOCK_CAP           = TRUE
+LOCK_STATUS        = TRUE
+WRITE_DISABLED_CAP = TRUE
+WRITE_ENABLED_CAP  = TRUE
+WRITE_STATUS       = TRUE
+WRITE_LOCK_CAP     = TRUE
+WRITE_LOCK_STATUS  = TRUE
+READ_DISABLED_CAP  = TRUE
+READ_ENABLED_CAP   = TRUE
+READ_STATUS        = TRUE
+READ_LOCK_CAP      = TRUE
+READ_LOCK_STATUS   = TRUE
+
+  INF MdeModulePkg/Core/Dxe/DxeMain.inf
+  INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
+  INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
+  INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
+  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
+
+  #
+  # PI DXE Drivers producing Architectural Protocols (EFI Services)
+  #
+  INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
+  INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
+  INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
+  INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
+  INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
+  INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
+!if $(SECURE_BOOT_ENABLE) == TRUE
+  INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
+!endif
+  INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
+  INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
+  INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
+  INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
+  INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
+
+  #
+  # Multiple Console IO support
+  #
+  INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
+  INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
+  INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
+  INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
+  INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
+
+  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
+  INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
+  INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
+  INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
+
+  #
+  # FAT filesystem + GPT/MBR partitioning
+  #
+  INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
+  INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
+  INF FatPkg/EnhancedFatDxe/Fat.inf
+  INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
+
+  #
+  # Platform Driver
+  #
+  INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
+  INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
+  INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
+  INF OvmfPkg/VirtioRngDxe/VirtioRng.inf
+
+  #
+  # UEFI application (Shell Embedded Boot Loader)
+  #
+  INF ShellPkg/Application/Shell/Shell.inf
+
+  #
+  # Bds
+  #
+  INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
+  INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
+  INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
+  INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
+  INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
+  INF MdeModulePkg/Application/UiApp/UiApp.inf
+
+  #
+  # Networking stack
+  #
+  INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
+  INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
+  INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
+  INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
+  INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
+  INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
+  INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
+  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
+  INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
+  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
+  INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
+
+  #
+  # SCSI Bus and Disk Driver
+  #
+  INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
+  INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
+
+  #
+  # SMBIOS Support
+  #
+  INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
+  INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
+
+!if $(ARCH) == AARCH64
+  #
+  # ACPI Support
+  #
+  INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
+  INF OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf
+!endif
+
+  #
+  # PCI support
+  #
+  INF ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
+  INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
+  INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
+  INF OvmfPkg/Virtio10Dxe/Virtio10.inf
+
+  #
+  # Video support
+  #
+  INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
+  INF OvmfPkg/PlatformDxe/Platform.inf
+
+  #
+  # USB Support
+  #
+  INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
+  INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
+  INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
+  INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
+  INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
+
+  #
+  # TianoCore logo (splash screen)
+  #
+  FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
+    SECTION RAW = MdeModulePkg/Logo/Logo.bmp
+  }
diff --git a/ArmVirtPkg/ArmVirtQemuKernel.fdf b/ArmVirtPkg/ArmVirtQemuKernel.fdf
index dcea9771a288..ee9fa189f85a 100644
--- a/ArmVirtPkg/ArmVirtQemuKernel.fdf
+++ b/ArmVirtPkg/ArmVirtQemuKernel.fdf
@@ -104,159 +104,7 @@  [FD.QEMU_EFI]
 #
 ################################################################################
 
-[FV.FvMain]
-BlockSize          = 0x40
-NumBlocks          = 0         # This FV gets compressed so make it just big enough
-FvAlignment        = 16        # FV alignment and FV attributes setting.
-ERASE_POLARITY     = 1
-MEMORY_MAPPED      = TRUE
-STICKY_WRITE       = TRUE
-LOCK_CAP           = TRUE
-LOCK_STATUS        = TRUE
-WRITE_DISABLED_CAP = TRUE
-WRITE_ENABLED_CAP  = TRUE
-WRITE_STATUS       = TRUE
-WRITE_LOCK_CAP     = TRUE
-WRITE_LOCK_STATUS  = TRUE
-READ_DISABLED_CAP  = TRUE
-READ_ENABLED_CAP   = TRUE
-READ_STATUS        = TRUE
-READ_LOCK_CAP      = TRUE
-READ_LOCK_STATUS   = TRUE
-
-  INF MdeModulePkg/Core/Dxe/DxeMain.inf
-  INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
-  INF ArmVirtPkg/VirtioFdtDxe/VirtioFdtDxe.inf
-  INF ArmVirtPkg/FdtClientDxe/FdtClientDxe.inf
-  INF ArmVirtPkg/HighMemDxe/HighMemDxe.inf
-
-  #
-  # PI DXE Drivers producing Architectural Protocols (EFI Services)
-  #
-  INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
-  INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
-  INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
-  INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
-  INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
-  INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
-!if $(SECURE_BOOT_ENABLE) == TRUE
-  INF SecurityPkg/VariableAuthenticated/SecureBootConfigDxe/SecureBootConfigDxe.inf
-!endif
-  INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
-  INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
-  INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
-  INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
-  INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
-
-  #
-  # Multiple Console IO support
-  #
-  INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
-  INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
-  INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
-  INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
-  INF MdeModulePkg/Universal/SerialDxe/SerialDxe.inf
-
-  INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
-  INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
-  INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
-  INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
-
-  #
-  # FAT filesystem + GPT/MBR partitioning
-  #
-  INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
-  INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
-  INF FatPkg/EnhancedFatDxe/Fat.inf
-  INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
-
-  #
-  # Platform Driver
-  #
-  INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
-  INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
-  INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
-  INF OvmfPkg/VirtioRngDxe/VirtioRng.inf
-
-  #
-  # UEFI application (Shell Embedded Boot Loader)
-  #
-  INF ShellPkg/Application/Shell/Shell.inf
-
-  #
-  # Bds
-  #
-  INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
-  INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
-  INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
-  INF MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf
-  INF MdeModulePkg/Universal/BdsDxe/BdsDxe.inf
-  INF MdeModulePkg/Application/UiApp/UiApp.inf
-
-  #
-  # Networking stack
-  #
-  INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
-  INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
-  INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
-  INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
-  INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
-  INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
-  INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
-  INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
-
-  #
-  # SCSI Bus and Disk Driver
-  #
-  INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
-  INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
-
-  #
-  # SMBIOS Support
-  #
-  INF MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf
-  INF OvmfPkg/SmbiosPlatformDxe/SmbiosPlatformDxe.inf
-
-!if $(ARCH) == AARCH64
-  #
-  # ACPI Support
-  #
-  INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
-  INF OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf
-!endif
-
-  #
-  # PCI support
-  #
-  INF ArmVirtPkg/PciHostBridgeDxe/PciHostBridgeDxe.inf
-  INF MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf
-  INF OvmfPkg/VirtioPciDeviceDxe/VirtioPciDeviceDxe.inf
-  INF OvmfPkg/Virtio10Dxe/Virtio10.inf
-
-  #
-  # Video support
-  #
-  INF OvmfPkg/QemuVideoDxe/QemuVideoDxe.inf
-  INF OvmfPkg/PlatformDxe/Platform.inf
-
-  #
-  # USB Support
-  #
-  INF MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf
-  INF MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf
-  INF MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf
-  INF MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf
-  INF MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf
-
-  #
-  # TianoCore logo (splash screen)
-  #
-  FILE FREEFORM = PCD(gEfiIntelFrameworkModulePkgTokenSpaceGuid.PcdLogoFile) {
-    SECTION RAW = MdeModulePkg/Logo/Logo.bmp
-  }
+!include ArmVirtQemuFvMain.fdf.inc
 
 [FV.FVMAIN_COMPACT]
 FvAlignment        = 16