# Copyright (c) 2014, Linaro Limited. All rights reserved.\r
# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.\r
#\r
-# This program and the accompanying materials\r
-# are licensed and made available under the terms and conditions of the BSD License\r
-# which accompanies this distribution. The full text of the license may be found at\r
-# http://opensource.org/licenses/bsd-license.php\r
-#\r
-# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+# SPDX-License-Identifier: BSD-2-Clause-Patent\r
#\r
\r
################################################################################\r
#\r
################################################################################\r
\r
+[Defines]\r
+!if $(FD_SIZE_IN_MB) == 2\r
+ DEFINE FVMAIN_COMPACT_SIZE = 0x1ff000\r
+!endif\r
+!if $(FD_SIZE_IN_MB) == 3\r
+ DEFINE FVMAIN_COMPACT_SIZE = 0x2ff000\r
+!endif\r
+\r
[FD.QEMU_EFI]\r
BaseAddress = 0x00000000|gArmTokenSpaceGuid.PcdFdBaseAddress # QEMU assigns 0 - 0x8000000 for a BootROM\r
-Size = 0x00200000|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device\r
+Size = $(FD_SIZE)|gArmTokenSpaceGuid.PcdFdSize # The size in bytes of the FLASH Device\r
ErasePolarity = 1\r
\r
# This one is tricky, it must be: BlockSize * NumBlocks = Size\r
BlockSize = 0x00001000\r
-NumBlocks = 0x200\r
+NumBlocks = $(FD_NUM_BLOCKS)\r
\r
################################################################################\r
#\r
!endif\r
}\r
\r
-0x00001000|0x001ff000\r
+0x00001000|$(FVMAIN_COMPACT_SIZE)\r
gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize\r
FV = FVMAIN_COMPACT\r
\r