Since the configuration header never changes unless the board parameters
in ConfigurationHeader.dat are updated, we can take a snapshot of the
binary and add it to the FDF definition. This way, it will get emitted
by the EDK2 build system instead of having to use a separate
post-processing tool to add it to the flash image.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ard Biesheuvel <ard.biesheu...@linaro.org>
---
 BeagleBoardPkg/BeagleBoardPkg.fdf      |  11 ++++++++++-
 BeagleBoardPkg/ConfigurationHeader.bin | Bin 0 -> 512 bytes
 2 files changed, 10 insertions(+), 1 deletion(-)
 create mode 100644 BeagleBoardPkg/ConfigurationHeader.bin

diff --git a/BeagleBoardPkg/BeagleBoardPkg.fdf 
b/BeagleBoardPkg/BeagleBoardPkg.fdf
index a6392440e64f..339bd943236a 100644
--- a/BeagleBoardPkg/BeagleBoardPkg.fdf
+++ b/BeagleBoardPkg/BeagleBoardPkg.fdf
@@ -48,7 +48,16 @@ [FD.BeagleBoard_EFI]
 # RegionType <FV, DATA, or FILE>
 #
 
################################################################################
-0x00000000|0x000B0000
+0x00000000|0x00000200
+FILE = BeagleBoardPkg/ConfigurationHeader.bin
+
+0x00000200|0x00000008
+DATA = {
+  0xF8, 0xDF, 0x0A, 0x00,   # image size:   0xB0000 - 0x208 == 0xAFDF8
+  0x08, 0x82, 0x00, 0x80    # entry point:  0x80008208
+}
+
+0x00000208|0x000AFDF8
 gArmTokenSpaceGuid.PcdFvBaseAddress|gArmTokenSpaceGuid.PcdFvSize
 FV = FVMAIN_COMPACT
 
diff --git a/BeagleBoardPkg/ConfigurationHeader.bin 
b/BeagleBoardPkg/ConfigurationHeader.bin
new file mode 100644
index 
0000000000000000000000000000000000000000..150b3849fc35f6526f51ce32b3ab30c9555b284f
GIT binary patch
literal 512
zcmZ3$z`zgy#K^$eBiJ=0#M93`n1SH~P$C9d63BM;2y*m=iv0%yG-;}G4<0yhfRT}b
z;V&ZtYXi_^W*`pWVq)e3GDLxFb07o*9v@B^n`Z+f11DGxD)mK>0cZpm90HjKW&uec
n;)04d0%?%hf({p$jG$u2j?CSqq{_&^_=p9s97s7x?@$B)<?bO_

literal 0
HcmV?d00001

-- 
1.9.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to