summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2013-11-12 18:34:02 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2013-11-12 18:34:02 +0000
commit8184a764391f25c65d83e21dbf2159b746e99017 (patch)
tree38d316125914742d832bbb05cc90a87ab79a620b
parent128ef095b06aa16dfb2aa990af41de85eb6f6ea7 (diff)
downloadedk2-platforms-8184a764391f25c65d83e21dbf2159b746e99017.tar.xz
OvmfPkg: Increase DEBUG build size to 2MB by default
The 1MB image with full debug and the shell included is too large to implement flash based non-volatile variable. After this change, building with -D FD_SIZE_1MB will force the smaller flash size. The default size for RELEASE build remains at 1MB, so using -b RELEASE on the build command line will result in a 1MB flash size. For RELEASE builds -D FD_SIZE_2MB can be used to produce a 2MB flash image. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@14833 6f19259b-4bc3-4df7-8a09-765794883524
-rw-r--r--OvmfPkg/OvmfPkgIa32.fdf14
-rw-r--r--OvmfPkg/OvmfPkgIa32X64.fdf14
-rw-r--r--OvmfPkg/OvmfPkgX64.fdf14
3 files changed, 42 insertions, 0 deletions
diff --git a/OvmfPkg/OvmfPkgIa32.fdf b/OvmfPkg/OvmfPkgIa32.fdf
index df4f2276ee..40f0651244 100644
--- a/OvmfPkg/OvmfPkgIa32.fdf
+++ b/OvmfPkg/OvmfPkgIa32.fdf
@@ -14,7 +14,21 @@
##
################################################################################
+
+#
+# Default flash size for DEBUG build is 2MB. For RELEASE it is 1MB.
+#
+# Defining FD_SIZE_1MB or FD_SIZE_2MB on the build command line can
+# override this.
+#
+[Defines]
+!if $(TARGET) == RELEASE
!ifndef $(FD_SIZE_2MB)
+DEFINE FD_SIZE_1MB=
+!endif
+!endif
+
+!ifdef $(FD_SIZE_1MB)
[FD.OVMF]
BaseAddress = 0xFFF00000
Size = 0x00100000
diff --git a/OvmfPkg/OvmfPkgIa32X64.fdf b/OvmfPkg/OvmfPkgIa32X64.fdf
index d93a7ff2e5..f5fa4ed261 100644
--- a/OvmfPkg/OvmfPkgIa32X64.fdf
+++ b/OvmfPkg/OvmfPkgIa32X64.fdf
@@ -14,7 +14,21 @@
##
################################################################################
+
+#
+# Default flash size for DEBUG build is 2MB. For RELEASE it is 1MB.
+#
+# Defining FD_SIZE_1MB or FD_SIZE_2MB on the build command line can
+# override this.
+#
+[Defines]
+!if $(TARGET) == RELEASE
!ifndef $(FD_SIZE_2MB)
+DEFINE FD_SIZE_1MB=
+!endif
+!endif
+
+!ifdef $(FD_SIZE_1MB)
[FD.OVMF]
BaseAddress = 0xFFF00000
Size = 0x00100000
diff --git a/OvmfPkg/OvmfPkgX64.fdf b/OvmfPkg/OvmfPkgX64.fdf
index deee977271..329e98959b 100644
--- a/OvmfPkg/OvmfPkgX64.fdf
+++ b/OvmfPkg/OvmfPkgX64.fdf
@@ -14,7 +14,21 @@
##
################################################################################
+
+#
+# Default flash size for DEBUG build is 2MB. For RELEASE it is 1MB.
+#
+# Defining FD_SIZE_1MB or FD_SIZE_2MB on the build command line can
+# override this.
+#
+[Defines]
+!if $(TARGET) == RELEASE
!ifndef $(FD_SIZE_2MB)
+DEFINE FD_SIZE_1MB=
+!endif
+!endif
+
+!ifdef $(FD_SIZE_1MB)
[FD.OVMF]
BaseAddress = 0xFFF00000
Size = 0x00100000