summaryrefslogtreecommitdiffstats
path: root/src/build/mkrules
diff options
context:
space:
mode:
authorRichard J. Knight <rjknight@us.ibm.com>2017-10-27 16:14:07 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-11-08 11:25:50 -0500
commit1100f64331cb45c9c0ac439f673b962bf98c27d3 (patch)
treee66dffc70a6f950a85b5297abea0388b7b4df6a6 /src/build/mkrules
parent219a0628c4f8f773b930b6936b9a9474e0da829b (diff)
downloadtalos-hostboot-1100f64331cb45c9c0ac439f673b962bf98c27d3.tar.gz
talos-hostboot-1100f64331cb45c9c0ac439f673b962bf98c27d3.zip
Add script to edit hostboot binary images to enable CFM testing
-Add editimgid perl script to grab image id from binary file and upate it with /cfm extension -Modify hbfw/img/makefile to call script when CFM_TEST_IMAGE environment variable is set -Update hbRelease and dist.targets to process the new perl script Change-Id: Ib4816e44932b37c2b432969b8f910d4f0ed381b2 RTC:160351 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48957 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: PAMELA J. EGGLER <eggler@us.ibm.com> Reviewed-by: Stephen M. Cprek <smcprek@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/build/mkrules')
-rwxr-xr-xsrc/build/mkrules/dist.targets.mk1
-rwxr-xr-xsrc/build/mkrules/hbfw/img/makefile35
2 files changed, 33 insertions, 3 deletions
diff --git a/src/build/mkrules/dist.targets.mk b/src/build/mkrules/dist.targets.mk
index de5220e62..46c32c504 100755
--- a/src/build/mkrules/dist.targets.mk
+++ b/src/build/mkrules/dist.targets.mk
@@ -127,6 +127,7 @@ COPY_RENAME_FILES = \
target_types_openpower.xml:src/usr/targeting/common/xmltohb/target_types_empty.xml:openpower \
makefile:src/build/mkrules/hbfw/makefile:fsp \
img/makefile:src/build/mkrules/hbfw/img/makefile:fsp \
+ img/editimgid:src/build/tools/editimgid:fsp \
hbicore.bin:img/hbicore$(UNDERSCORE_TEST).bin:vpo \
img/hostboot_bootloader.bin:img/hbibl.bin:fsp,openpower,vpo \
img/hostboot_securerom.bin:img/securerom.bin:fsp,openpower,vpo \
diff --git a/src/build/mkrules/hbfw/img/makefile b/src/build/mkrules/hbfw/img/makefile
index 6e1a2d197..d878a6521 100755
--- a/src/build/mkrules/hbfw/img/makefile
+++ b/src/build/mkrules/hbfw/img/makefile
@@ -38,7 +38,16 @@ VPATH += ../fsp
DEFAULT_PATH = ${.PATH}
SRCPATH = ${DEFAULT_PATH:M*src*}
-build_all: cp_hbfiles gen_default_images
+# Modify the dependency list when building a CFM test image
+.if(${CFM_TEST_IMAGE} != "")
+ BUILD_ALL_DEPS = cp_hbfiles gen_default_images update_image_id
+ GEN_DEFAULT_IMAGES_DEPS = cp_hbfiles update_image_id dump-secureboot-config
+.else
+ BUILD_ALL_DEPS = cp_hbfiles gen_default_images
+ GEN_DEFAULT_IMAGES_DEPS = cp_hbfiles dump-secureboot-config
+.endif
+
+build_all: $(BUILD_ALL_DEPS)
install_all: gen_system_specific_images build_sbe_partitions build_pnor_images
#Some useful search paths
@@ -49,7 +58,8 @@ ENGD_SRCPATH = ${SRCPATH:S/hbfw\/img/engd\/href/g}
SBEI_OBJPATH = ${HBFW_OBJPATH:S/hbfw\/img/sbei\/sbfw\/img/g}
ENGD_WOFPATH = ${HBFW_OBJPATH:S/hbfw\/img/engd\/wofdata/g}
ENGD_MEMDPATH = ${HBFW_OBJPATH:S/hbfw\/img/engd\/memd/g}
-
+HBFW_SIMPATH = ${HBFW_OBJPATH:S/img/simics/g}
+HBFW_IMGPATH = ${.PATH:M*img*}
#################################################
# Copy Hostboot binary images to obj dir to be grabbed
# during build flash pass and consumption by HWSV.
@@ -57,6 +67,15 @@ ENGD_MEMDPATH = ${HBFW_OBJPATH:S/hbfw\/img/engd\/memd/g}
# changes expected in the future which will require using OBJ version.
#################################################
+#variables defined to ease finding symbol files used for
+#editing image tag for CFM images
+hostboot_SYMS=hbicore.syms
+hostboot_runtime_SYMS=hbirt.syms
+hostboot_securerom_SYMS=securerom.syms
+hostboot_bootloader_SYMS=hbibl.syms
+
+IMAGE_EDIT_PROGRAM=editimgid
+
# Input default images
BOOTLDR_IMG = hostboot_bootloader.bin
HBBL_IMG = hbbl.bin
@@ -176,10 +195,20 @@ PNOR_LAYOUT = ${pnorLayoutFSP.xml:P}
DEFAULT_PARAMS = --systemBinFiles ${GEN_DEFAULT_BIN_FILES} --pnorLayout ${PNOR_LAYOUT}
.endif
+# rule to update hostboot image tags for custom CFM image, only enabled
+# when the enviroment variable CFM_TEST_IMAGE is populated
+update_image_id: cp_hbfiles validate_cfm_image_name
+ ${HBFW_IMGPATH:F${IMAGE_EDIT_PROGRAM}} --binFile=${CFM_TEST_IMAGE:p} \
+ --symsFile=${HBFW_SIMPATH:F${${CFM_TEST_IMAGE:R}_SYMS}}
+
+# make sure the files exist - the perl script isnt all that smart
+validate_cfm_image_name: ${CFM_TEST_IMAGE:p} \
+ ${HBFW_SIMPATH:F${${CFM_TEST_IMAGE:R}_SYMS}}
+
cp_hbfiles: .SPECTARG
${BASE_IMAGES:@image@cp -f ${SRCPATH:F${image}} ${image};@}
-gen_default_images: cp_hbfiles dump-secureboot-config
+gen_default_images: ${GEN_DEFAULT_IMAGES_DEPS}
currentsb -chain
ecc --inject ${HBB_IMG} --output ${HBB_ECC_IMG} --p8
OpenPOWER on IntegriCloud