summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/Makefile.inc
diff options
context:
space:
mode:
authorJeremy Compostella <jeremy.compostella@intel.com>2019-12-12 14:39:11 -0700
committerPatrick Georgi <pgeorgi@google.com>2019-12-17 13:14:40 +0000
commit0f9858f5a1690bce8b7111c60a0d01206e67af34 (patch)
tree363f1a34e3289ccb008b39ff8eefd4fe27bf3ccc /src/soc/intel/apollolake/Makefile.inc
parent31e2188c385ce1d9326d18044c5e6a567a68b048 (diff)
downloadcoreboot-0f9858f5a1690bce8b7111c60a0d01206e67af34.tar.xz
soc/intel/apollolake: add support for extracting LBP2 from IFWI
Add support for automatic extraction of the Second Logical Boot Partition from the supplied IFWI binary. Change-Id: Ia2a9ca233bddb8e9fb4e980f0ae5e6fcf3fc757c Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37681 Reviewed-by: Furquan Shaikh <furquan@google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/intel/apollolake/Makefile.inc')
-rw-r--r--src/soc/intel/apollolake/Makefile.inc12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/soc/intel/apollolake/Makefile.inc b/src/soc/intel/apollolake/Makefile.inc
index 24375b3599..d63316969b 100644
--- a/src/soc/intel/apollolake/Makefile.inc
+++ b/src/soc/intel/apollolake/Makefile.inc
@@ -117,8 +117,16 @@ pdpt-type := raw
endif
ifeq ($(CONFIG_NEED_LBP2),y)
-files_added::
- $(CBFSTOOL) $(obj)/coreboot.rom write -r $(CONFIG_LBP2_FMAP_NAME) -f $(CONFIG_LBP2_FILE_NAME) --fill-upward
+$(objcbfs)/lbp2.bin: $(IFWITOOL)
+ifeq ($(CONFIG_LBP2_FROM_IFWI),y)
+ $(IFWITOOL) $(CONFIG_IFWI_FILE_NAME) create -f $@ -s
+ $(IFWITOOL) $@ delete -n OBBP
+else
+ cp $(CONFIG_LBP2_FILE_NAME) $@
+endif
+
+files_added:: $(objcbfs)/lbp2.bin
+ $(CBFSTOOL) $(obj)/coreboot.rom write -r $(CONFIG_LBP2_FMAP_NAME) -f $< --fill-upward
endif
# Bootblock on Apollolake platform lies in the IFWI region. In order to place