OpenCorePkg.fdf 3.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105
## @file
#  Compile standalone firmware filesystem files.
#
#  Copyright (C) 2022-2023, Mike Beaton. All rights reserved.<BR>
#  SPDX-License-Identifier: BSD-3-Clause
##

#
# For now disable non-64-bit build; Mac Pro cannot use it, and EDK-II
# build system does not separate 64 bit and 32 bit .ffs files, which
# we want to distribute.
#
# If we needed all archs in future we could distribute the complete
# .fv files, from which the .ffs can be re-extracted.
#
!if ($(ARCH) == X64)

!if ($(ARCH) == X64)
  [FV.FfsFilesX64]
!else
  [FV.FfsFilesIA32]
!endif

  BlockSize          = 0x10000
  NumBlocks          = 8
  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

  #
  # DXE Drivers (other .inf files for conversion to .ffs may be added here)
  #
  INF  OpenCorePkg/Staging/EnableGop/EnableGop.inf

!if ($(ARCH) == X64)
  [FV.EnableGopDirectX64]
!else
  [FV.EnableGopDirectIA32]
!endif

  BlockSize          = 0x10000
  NumBlocks          = 8
  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

  #
  # DXE Drivers
  #

  #
  # EnableGopDirect intentionally has the same GUID as EnableGop, so it must go in a separate FV.
  # (We don't care about the FV, rather the intermediate FFS files which are generated during build.)
  #
  INF  OpenCorePkg/Staging/EnableGop/EnableGopDirect.inf

!endif

#
# Ideally we would match the compressed layout of DXE drivers in Mac Pro 144.0.0.0.0 firmware,
# as per the commented out lines, but Mac Pro will not load this with standard compression.
# With lines commented out we make a different, non-compressed layout which the Mac Pro will load.
#
# TODO: Is there a way to make a Tiano-compressed COMPRESS section, as in Mac Pro firmware, using
# EDK-II build tools? If we manually reconstuct one with UEFITool 0.25.1, Mac Pro will load it.
#
# Note: `GUIDED A31280AD-481E-41B6-95E8-127F4C984779` will make a Tiano compressed GUIDED
# section, but this is different and 144.0.0.0.0 will not load it.
#
[Rule.Common.DXE_DRIVER]
  FILE DRIVER = $(NAMED_GUID) Checksum {
#    COMPRESS {
#      GUIDED {
        DXE_DEPEX    DXE_DEPEX Optional      $(INF_OUTPUT)/$(MODULE_NAME).depex
        PE32         PE32                    $(INF_OUTPUT)/$(MODULE_NAME).efi
        UI           STRING="$(MODULE_NAME)" Optional
#      }
#    }
  }