summaryrefslogtreecommitdiffstats
path: root/src/build
diff options
context:
space:
mode:
authorPatrick Williams <iawillia@us.ibm.com>2014-02-27 17:37:30 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-03-07 12:31:25 -0600
commit814f44ddaa4614172ffdc41d297291cc08be31ab (patch)
tree17bbb480e94af39a7da4860bbd99b30ab9c32884 /src/build
parent07519a5eaddd5b7a02bf73fa3a46f9c2319fcd30 (diff)
downloadtalos-hostboot-814f44ddaa4614172ffdc41d297291cc08be31ab.tar.gz
talos-hostboot-814f44ddaa4614172ffdc41d297291cc08be31ab.zip
Speed up buildpnor.
Change-Id: Id213a80e01e8a4a05e5cbe7c619393cfc1a9e1c7 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/9224 Tested-by: Jenkins Server Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build')
-rwxr-xr-xsrc/build/buildpnor/buildpnor.pl17
-rwxr-xr-xsrc/build/mkrules/hbfw/img/makefile18
2 files changed, 23 insertions, 12 deletions
diff --git a/src/build/buildpnor/buildpnor.pl b/src/build/buildpnor/buildpnor.pl
index a476f5d8c..0f89bc2c5 100755
--- a/src/build/buildpnor/buildpnor.pl
+++ b/src/build/buildpnor/buildpnor.pl
@@ -6,7 +6,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2012,2013
+# COPYRIGHT International Business Machines Corp. 2012,2014
#
# p1
#
@@ -33,7 +33,18 @@ use strict;
use XML::Simple;
use Data::Dumper;
use File::Basename;
-use Digest::SHA1;
+
+# Digest::SHA1 module is now Digest::SHA in newer version of perl. Need to
+# do the below eval blocks to support both modules.
+BEGIN
+{
+ eval "use Digest::SHA;";
+ if ($@)
+ {
+ eval "use Digest::SHA1;";
+ die $@ if $@;
+ }
+}
################################################################################
# Set PREFERRED_PARSER to XML::Parser. Otherwise it uses XML::SAX which contains
@@ -567,7 +578,7 @@ sub fillPnorImage
#fcp --target tuleta.pnor --partition-offset 0 --name HBI --write hostboot_extended.bin
if ($g_ffsCmd eq "") {
- my $Out = `$g_fcpCmd $inputFile $i_pnorBinName:$eyeCatch --offset $offset --write`;
+ my $Out = `$g_fcpCmd $inputFile $i_pnorBinName:$eyeCatch --offset $offset --write --buffer 0x40000000`;
} else {
my $Out = `$g_ffsCmd --target $i_pnorBinName --partition-offset $offset --name $eyeCatch --write $inputFile`;
}
diff --git a/src/build/mkrules/hbfw/img/makefile b/src/build/mkrules/hbfw/img/makefile
index 021493ad4..a680cf4cf 100755
--- a/src/build/mkrules/hbfw/img/makefile
+++ b/src/build/mkrules/hbfw/img/makefile
@@ -98,7 +98,7 @@ cp_hbfiles: .SPECTARG
echo -en VERSION\\0 > ${BASE_SHA_IMAGE}
sha512sum ${BASE_IMAGE} | awk '{print $$1}' | xxd -pr -r >> ${BASE_SHA_IMAGE}
dd if=${BASE_SHA_IMAGE} of=secureboot.header ibs=4k conv=sync
- dd if=/dev/zero of=hbb.footer bs=1 count=128K
+ dd if=/dev/zero of=hbb.footer count=1 bs=128K
cat sbe.header secureboot.header ${BASE_IMAGE} hbb.footer > hostboot.stage.bin
head -c 524288 hostboot.stage.bin > ${BASE_W_HEADER_IMAGE}
currentsb -chain
@@ -124,28 +124,28 @@ cp_hbfiles: .SPECTARG
dd if=${TEMP_IMAGE} of=${EXT_HEADER_IMAGE} ibs=5120k conv=sync
ecc --inject ${EXT_HEADER_IMAGE} --output ${EXT_ECC_HEADER_IMAGE} --p8
# create data for a test partition in pnor
- dd if=/dev/urandom of=${TESTDATA} bs=1 count=28K
+ dd if=/dev/urandom of=${TESTDATA} count=1 bs=28K
ecc --inject ${TESTDATA} --output ${TESTDATA_ECC} --p8
# Fill the following partitions with FF's and then ECC them
- dd if=/dev/zero count=128K bs=1 | tr "\000" "\377" > ${TEMP_IMAGE}
+ dd if=/dev/zero bs=128K count=1 | tr "\000" "\377" > ${TEMP_IMAGE}
ecc --inject ${TEMP_IMAGE} --output ${HBEL_ECC_IMAGE} --p8
# GUARD partition
- dd if=/dev/zero count=16K bs=1 | tr "\000" "\377" > ${TEMP_IMAGE}
+ dd if=/dev/zero bs=16K count=1 | tr "\000" "\377" > ${TEMP_IMAGE}
ecc --inject ${TEMP_IMAGE} --output ${GUARD_ECC_IMAGE} --p8
# GLOBAL partition
- dd if=/dev/zero count=32K bs=1 | tr "\000" "\377" > ${TEMP_IMAGE}
+ dd if=/dev/zero bs=32K count=1 | tr "\000" "\377" > ${TEMP_IMAGE}
ecc --inject ${TEMP_IMAGE} --output ${GLOBAL_ECC_IMAGE} --p8
# DJVPD partition
- dd if=/dev/zero count=256K bs=1 | tr "\000" "\377" > ${TEMP_IMAGE}
+ dd if=/dev/zero bs=256K count=1 | tr "\000" "\377" > ${TEMP_IMAGE}
ecc --inject ${TEMP_IMAGE} --output ${DJVPD_ECC_IMAGE} --p8
# MVPD partition
- dd if=/dev/zero count=512K bs=1 | tr "\000" "\377" > ${TEMP_IMAGE}
+ dd if=/dev/zero bs=512K count=1 | tr "\000" "\377" > ${TEMP_IMAGE}
ecc --inject ${TEMP_IMAGE} --output ${MVPD_ECC_IMAGE} --p8
# CVPD partition
- dd if=/dev/zero count=256K bs=1 | tr "\000" "\377" > ${TEMP_IMAGE}
+ dd if=/dev/zero bs=256K count=1 | tr "\000" "\377" > ${TEMP_IMAGE}
ecc --inject ${TEMP_IMAGE} --output ${CVPD_ECC_IMAGE} --p8
# PAYLOAD partition
- dd if=/dev/zero count=20480K bs=1 | tr "\000" "\377" > ${TEMP_IMAGE}
+ dd if=/dev/zero bs=20480K count=1 | tr "\000" "\377" > ${TEMP_IMAGE}
ecc --inject ${TEMP_IMAGE} --output ${PAYLOAD_ECC_IMAGE} --p8
rm ${TEMP_IMAGE}
OpenPOWER on IntegriCloud