]> git.proxmox.com Git - mirror_edk2.git/commit - OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg: introduce the FD_SIZE_IN_KB macro / build flag
authorLaszlo Ersek <lersek@redhat.com>
Wed, 3 May 2017 15:54:49 +0000 (17:54 +0200)
committerLaszlo Ersek <lersek@redhat.com>
Thu, 4 May 2017 22:55:40 +0000 (00:55 +0200)
commit210270730c0e29d3b3381b519017ec5b3f347144
tree8ebe759e1df6b37174fd9be272c55b2e4ca998ba
parent4bf3b994e8b207fc919958b4a212a8342aaaa749
OvmfPkg: introduce the FD_SIZE_IN_KB macro / build flag

FD_SIZE_xMB defines have existed for flash size selection. They can be
passed as "-D FD_SIZE_xMB" on the command line. Passing multiple of them
at the same time has never been supported; earlier settings on the command
line cannot be overridden.

Introduce the integer valued FD_SIZE_IN_KB macro, which provides the
following improvements:

- several instances of it are permitted on the command line, with the last
  one taking effect,

- conditional statements in the DSC and FDF files need only check a single
  macro, and multiple values can be checked in a single !if with the ||
  operator,

- nested !ifdef / !else ladders can be replaced with flat equality tests,

- in the future, flash sizes can be expressed with a finer than MB
  granularity, if necessary.

For now, we're going to preserve the FD_SIZE_xMB defines as convenience
wrappers for FD_SIZE_IN_KB.

FD_SIZE_IN_KB is being added to the DSC files because this way we can
depend on it in both the DSC and FDF files.

Cc: Gary Ching-Pang Lin <glin@suse.com>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
OvmfPkg/OvmfPkg.fdf.inc
OvmfPkg/OvmfPkgIa32.dsc
OvmfPkg/OvmfPkgIa32X64.dsc
OvmfPkg/OvmfPkgX64.dsc