Vishal Bhoj | 82c8071 | 2015-12-15 21:13:33 +0530 | [diff] [blame^] | 1 | #
|
| 2 | # Copyright (c) 2011, 2013, ARM Limited. All rights reserved.
|
| 3 | # Copyright (c) 2014, Linaro Limited. All rights reserved.
|
| 4 | #
|
| 5 | # This program and the accompanying materials
|
| 6 | # are licensed and made available under the terms and conditions of the BSD License
|
| 7 | # which accompanies this distribution. The full text of the license may be found at
|
| 8 | # http://opensource.org/licenses/bsd-license.php
|
| 9 | #
|
| 10 | # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
| 11 | # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
| 12 | #
|
| 13 |
|
| 14 | ################################################################################
|
| 15 | #
|
| 16 | # FD Section
|
| 17 | # The [FD] Section is made up of the definition statements and a
|
| 18 | # description of what goes into the Flash Device Image. Each FD section
|
| 19 | # defines one flash "device" image. A flash device image may be one of
|
| 20 | # the following: Removable media bootable image (like a boot floppy
|
| 21 | # image,) an Option ROM image (that would be "flashed" into an add-in
|
| 22 | # card,) a System "Flash" image (that would be burned into a system's
|
| 23 | # flash) or an Update ("Capsule") image that will be used to update and
|
| 24 | # existing system flash.
|
| 25 | #
|
| 26 | ################################################################################
|
| 27 |
|
| 28 | [FD.QEMU_EFI]
|
| 29 | BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # QEMU assigns 0 - 0x8000000 for a BootROM
|
| 30 | Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device
|
| 31 | ErasePolarity = 1
|
| 32 |
|
| 33 | # This one is tricky, it must be: BlockSize * NumBlocks = Size
|
| 34 | BlockSize = 0x00001000
|
| 35 | NumBlocks = 0x200
|
| 36 |
|
| 37 | ################################################################################
|
| 38 | #
|
| 39 | # Following are lists of FD Region layout which correspond to the locations of different
|
| 40 | # images within the flash device.
|
| 41 | #
|
| 42 | # Regions must be defined in ascending order and may not overlap.
|
| 43 | #
|
| 44 | # A Layout Region start with a eight digit hex offset (leading "0x" required) followed by
|
| 45 | # the pipe "|" character, followed by the size of the region, also in hex with the leading
|
| 46 | # "0x" characters. Like:
|
| 47 | # Offset|Size
|
| 48 | # PcdOffsetCName|PcdSizeCName
|
| 49 | # RegionType <FV, DATA, or FILE>
|
| 50 | #
|
| 51 | ################################################################################
|
| 52 |
|
| 53 | #
|
| 54 | # UEFI has trouble dealing with FVs that reside at physical address 0x0.
|
| 55 | # So instead, put a hardcoded 'jump to 0x1000' at offset 0x0, and put the
|
| 56 | # real FV at offset 0x1000
|
| 57 | #
|
| 58 | 0x00000000|0x00001000
|
| 59 | DATA = {
|
| 60 | !if $(ARCH) == AARCH64
|
| 61 | 0x00, 0x04, 0x00, 0x14 # 'b 0x1000' in AArch64 ASM
|
| 62 | !else
|
| 63 | 0xfe, 0x03, 0x00, 0xea # 'b 0x1000' in AArch32 ASM
|
| 64 | !endif
|
| 65 | }
|
| 66 |
|
| 67 | 0x00001000|0x001ff000
|
| 68 | gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
|
| 69 | FV = FVMAIN_COMPACT
|
| 70 |
|
| 71 |
|
| 72 | ################################################################################
|
| 73 | #
|
| 74 | # FV Section
|
| 75 | #
|
| 76 | # [FV] section is used to define what components or modules are placed within a flash
|
| 77 | # device file. This section also defines order the components and modules are positioned
|
| 78 | # within the image. The [FV] section consists of define statements, set statements and
|
| 79 | # module statements.
|
| 80 | #
|
| 81 | ################################################################################
|
| 82 |
|
| 83 | [FV.FvMain]
|
| 84 | BlockSize = 0x40
|
| 85 | NumBlocks = 0 # This FV gets compressed so make it just big enough
|
| 86 | FvAlignment = 16 # FV alignment and FV attributes setting.
|
| 87 | ERASE_POLARITY = 1
|
| 88 | MEMORY_MAPPED = TRUE
|
| 89 | STICKY_WRITE = TRUE
|
| 90 | LOCK_CAP = TRUE
|
| 91 | LOCK_STATUS = TRUE
|
| 92 | WRITE_DISABLED_CAP = TRUE
|
| 93 | WRITE_ENABLED_CAP = TRUE
|
| 94 | WRITE_STATUS = TRUE
|
| 95 | WRITE_LOCK_CAP = TRUE
|
| 96 | WRITE_LOCK_STATUS = TRUE
|
| 97 | READ_DISABLED_CAP = TRUE
|
| 98 | READ_ENABLED_CAP = TRUE
|
| 99 | READ_STATUS = TRUE
|
| 100 | READ_LOCK_CAP = TRUE
|
| 101 | READ_LOCK_STATUS = TRUE
|
| 102 |
|
| 103 | APRIORI DXE {
|
| 104 | INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
|
| 105 | INF ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf
|
| 106 | }
|
| 107 | INF MdeModulePkg/Core/Dxe/DxeMain.inf
|
| 108 | INF MdeModulePkg/Universal/PCD/Dxe/Pcd.inf
|
| 109 | INF ArmPlatformPkg/ArmVirtualizationPkg/VirtFdtDxe/VirtFdtDxe.inf
|
| 110 |
|
| 111 | #
|
| 112 | # PI DXE Drivers producing Architectural Protocols (EFI Services)
|
| 113 | #
|
| 114 | INF ArmPkg/Drivers/CpuDxe/CpuDxe.inf
|
| 115 | INF MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf
|
| 116 | INF MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.inf
|
| 117 | INF MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf
|
| 118 | INF MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf
|
| 119 | INF MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxe.inf
|
| 120 | INF MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxe.inf
|
| 121 | INF EmbeddedPkg/ResetRuntimeDxe/ResetRuntimeDxe.inf
|
| 122 | INF EmbeddedPkg/RealTimeClockRuntimeDxe/RealTimeClockRuntimeDxe.inf
|
| 123 | INF EmbeddedPkg/MetronomeDxe/MetronomeDxe.inf
|
| 124 | INF MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf
|
| 125 |
|
| 126 | #
|
| 127 | # Multiple Console IO support
|
| 128 | #
|
| 129 | INF MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf
|
| 130 | INF MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf
|
| 131 | INF MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf
|
| 132 | INF MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxe.inf
|
| 133 | INF EmbeddedPkg/SerialDxe/SerialDxe.inf
|
| 134 |
|
| 135 | INF ArmPkg/Drivers/ArmGic/ArmGicDxe.inf
|
| 136 | INF ArmPkg/Drivers/TimerDxe/TimerDxe.inf
|
| 137 | INF ArmPlatformPkg/Drivers/NorFlashDxe/NorFlashDxe.inf
|
| 138 | INF MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf
|
| 139 |
|
| 140 | #
|
| 141 | # FAT filesystem + GPT/MBR partitioning
|
| 142 | #
|
| 143 | INF MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf
|
| 144 | INF MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf
|
| 145 | INF FatBinPkg/EnhancedFatDxe/Fat.inf
|
| 146 | INF MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf
|
| 147 |
|
| 148 | #
|
| 149 | # Platform Driver
|
| 150 | #
|
| 151 | INF OvmfPkg/VirtioBlkDxe/VirtioBlk.inf
|
| 152 | INF OvmfPkg/VirtioNetDxe/VirtioNet.inf
|
| 153 | INF OvmfPkg/VirtioScsiDxe/VirtioScsi.inf
|
| 154 |
|
| 155 | #
|
| 156 | # UEFI application (Shell Embedded Boot Loader)
|
| 157 | #
|
| 158 | INF ShellBinPkg/UefiShell/UefiShell.inf
|
| 159 |
|
| 160 | #
|
| 161 | # Bds
|
| 162 | #
|
| 163 | INF MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf
|
| 164 | !ifdef INTEL_BDS
|
| 165 | INF MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf
|
| 166 | INF MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf
|
| 167 | INF IntelFrameworkModulePkg/Universal/BdsDxe/BdsDxe.inf
|
| 168 | !else
|
| 169 | INF ArmPlatformPkg/Bds/Bds.inf
|
| 170 | !endif
|
| 171 |
|
| 172 | #
|
| 173 | # Networking stack
|
| 174 | #
|
| 175 | INF MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.inf
|
| 176 | INF MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf
|
| 177 | INF MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf
|
| 178 | INF MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigDxe.inf
|
| 179 | INF MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf
|
| 180 | INF MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf
|
| 181 | INF MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.inf
|
| 182 | INF MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf
|
| 183 | INF MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf
|
| 184 | INF MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf
|
| 185 | INF MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf
|
| 186 | INF MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf
|
| 187 |
|
| 188 | #
|
| 189 | # SCSI Bus and Disk Driver
|
| 190 | #
|
| 191 | INF MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf
|
| 192 | INF MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf
|
| 193 |
|
| 194 | #
|
| 195 | # ACPI Support
|
| 196 | #
|
| 197 | INF MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf
|
| 198 | INF OvmfPkg/AcpiPlatformDxe/QemuFwCfgAcpiPlatformDxe.inf
|
| 199 |
|
| 200 | [FV.FVMAIN_COMPACT]
|
| 201 | FvAlignment = 16
|
| 202 | ERASE_POLARITY = 1
|
| 203 | MEMORY_MAPPED = TRUE
|
| 204 | STICKY_WRITE = TRUE
|
| 205 | LOCK_CAP = TRUE
|
| 206 | LOCK_STATUS = TRUE
|
| 207 | WRITE_DISABLED_CAP = TRUE
|
| 208 | WRITE_ENABLED_CAP = TRUE
|
| 209 | WRITE_STATUS = TRUE
|
| 210 | WRITE_LOCK_CAP = TRUE
|
| 211 | WRITE_LOCK_STATUS = TRUE
|
| 212 | READ_DISABLED_CAP = TRUE
|
| 213 | READ_ENABLED_CAP = TRUE
|
| 214 | READ_STATUS = TRUE
|
| 215 | READ_LOCK_CAP = TRUE
|
| 216 | READ_LOCK_STATUS = TRUE
|
| 217 |
|
| 218 | APRIORI PEI {
|
| 219 | INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
|
| 220 | }
|
| 221 | INF ArmPlatformPkg/PrePeiCore/PrePeiCoreUniCore.inf
|
| 222 | INF MdeModulePkg/Core/Pei/PeiMain.inf
|
| 223 | INF ArmPlatformPkg/PlatformPei/PlatformPeim.inf
|
| 224 | INF ArmPlatformPkg/MemoryInitPei/MemoryInitPeim.inf
|
| 225 | INF ArmPkg/Drivers/CpuPei/CpuPei.inf
|
| 226 | INF MdeModulePkg/Universal/PCD/Pei/Pcd.inf
|
| 227 | INF MdeModulePkg/Universal/Variable/Pei/VariablePei.inf
|
| 228 | INF MdeModulePkg/Core/DxeIplPeim/DxeIpl.inf
|
| 229 |
|
| 230 | FILE FV_IMAGE = 9E21FD93-9C72-4c15-8C4B-E77F1DB2D792 {
|
| 231 | SECTION GUIDED EE4E5898-3914-4259-9D6E-DC7BD79403CF PROCESSING_REQUIRED = TRUE {
|
| 232 | SECTION FV_IMAGE = FVMAIN
|
| 233 | }
|
| 234 | }
|
| 235 |
|
| 236 |
|
| 237 | ################################################################################
|
| 238 | #
|
| 239 | # Rules are use with the [FV] section's module INF type to define
|
| 240 | # how an FFS file is created for a given INF file. The following Rule are the default
|
| 241 | # rules for the different module type. User can add the customized rules to define the
|
| 242 | # content of the FFS file.
|
| 243 | #
|
| 244 | ################################################################################
|
| 245 |
|
| 246 |
|
| 247 | ############################################################################
|
| 248 | # Example of a DXE_DRIVER FFS file with a Checksum encapsulation section #
|
| 249 | ############################################################################
|
| 250 | #
|
| 251 | #[Rule.Common.DXE_DRIVER]
|
| 252 | # FILE DRIVER = $(NAMED_GUID) {
|
| 253 | # DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 254 | # COMPRESS PI_STD {
|
| 255 | # GUIDED {
|
| 256 | # PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 257 | # UI STRING="$(MODULE_NAME)" Optional
|
| 258 | # VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
| 259 | # }
|
| 260 | # }
|
| 261 | # }
|
| 262 | #
|
| 263 | ############################################################################
|
| 264 |
|
| 265 | [Rule.Common.SEC]
|
| 266 | FILE SEC = $(NAMED_GUID) RELOCS_STRIPPED {
|
| 267 | TE TE Align = 128 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 268 | }
|
| 269 |
|
| 270 | [Rule.Common.PEI_CORE]
|
| 271 | FILE PEI_CORE = $(NAMED_GUID) {
|
| 272 | TE TE Align = 8 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 273 | UI STRING ="$(MODULE_NAME)" Optional
|
| 274 | }
|
| 275 |
|
| 276 | [Rule.Common.PEIM]
|
| 277 | FILE PEIM = $(NAMED_GUID) {
|
| 278 | PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 279 | TE TE Align = 8 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 280 | UI STRING="$(MODULE_NAME)" Optional
|
| 281 | }
|
| 282 |
|
| 283 | [Rule.Common.PEIM.TIANOCOMPRESSED]
|
| 284 | FILE PEIM = $(NAMED_GUID) DEBUG_MYTOOLS_IA32 {
|
| 285 | PEI_DEPEX PEI_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 286 | GUIDED A31280AD-481E-41B6-95E8-127F4C984779 PROCESSING_REQUIRED = TRUE {
|
| 287 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 288 | UI STRING="$(MODULE_NAME)" Optional
|
| 289 | }
|
| 290 | }
|
| 291 |
|
| 292 | [Rule.Common.DXE_CORE]
|
| 293 | FILE DXE_CORE = $(NAMED_GUID) {
|
| 294 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 295 | UI STRING="$(MODULE_NAME)" Optional
|
| 296 | }
|
| 297 |
|
| 298 | [Rule.Common.UEFI_DRIVER]
|
| 299 | FILE DRIVER = $(NAMED_GUID) {
|
| 300 | DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 301 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 302 | UI STRING="$(MODULE_NAME)" Optional
|
| 303 | }
|
| 304 |
|
| 305 | [Rule.Common.DXE_DRIVER]
|
| 306 | FILE DRIVER = $(NAMED_GUID) {
|
| 307 | DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 308 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 309 | UI STRING="$(MODULE_NAME)" Optional
|
| 310 | }
|
| 311 |
|
| 312 | [Rule.Common.DXE_RUNTIME_DRIVER]
|
| 313 | FILE DRIVER = $(NAMED_GUID) {
|
| 314 | DXE_DEPEX DXE_DEPEX Optional $(INF_OUTPUT)/$(MODULE_NAME).depex
|
| 315 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 316 | UI STRING="$(MODULE_NAME)" Optional
|
| 317 | }
|
| 318 |
|
| 319 | [Rule.Common.UEFI_APPLICATION]
|
| 320 | FILE APPLICATION = $(NAMED_GUID) {
|
| 321 | UI STRING ="$(MODULE_NAME)" Optional
|
| 322 | PE32 PE32 $(INF_OUTPUT)/$(MODULE_NAME).efi
|
| 323 | }
|
| 324 |
|
| 325 | [Rule.Common.UEFI_DRIVER.BINARY]
|
| 326 | FILE DRIVER = $(NAMED_GUID) {
|
| 327 | DXE_DEPEX DXE_DEPEX Optional |.depex
|
| 328 | PE32 PE32 |.efi
|
| 329 | UI STRING="$(MODULE_NAME)" Optional
|
| 330 | VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
| 331 | }
|
| 332 |
|
| 333 | [Rule.Common.UEFI_APPLICATION.BINARY]
|
| 334 | FILE APPLICATION = $(NAMED_GUID) {
|
| 335 | PE32 PE32 |.efi
|
| 336 | UI STRING="$(MODULE_NAME)" Optional
|
| 337 | VERSION STRING="$(INF_VERSION)" Optional BUILD_NUM=$(BUILD_NUMBER)
|
| 338 | }
|
| 339 |
|
| 340 | [Rule.Common.USER_DEFINED.ACPITABLE]
|
| 341 | FILE FREEFORM = $(NAMED_GUID) {
|
| 342 | RAW ACPI |.acpi
|
| 343 | RAW ASL |.aml
|
| 344 | UI STRING="$(MODULE_NAME)" Optional
|
| 345 | }
|