diff options
author | Robert Lippert <rlippert@google.com> | 2017-10-04 16:36:38 -0700 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-10-23 10:41:53 -0400 |
commit | f0e2eeb93d0f6d9f050968f99c366c7c768734f2 (patch) | |
tree | d1698eaece00c7b81d15ce67ca5153ef4f004019 /src/build/buildpnor | |
parent | 7a18fd613a1f85dd42a215607a2a05e5e5ce8a0e (diff) | |
download | talos-hostboot-f0e2eeb93d0f6d9f050968f99c366c7c768734f2.tar.gz talos-hostboot-f0e2eeb93d0f6d9f050968f99c366c7c768734f2.zip |
buildsbepart: sort EC images for consistent output
Perl default enumeration over hash keys doesn't seem to be
stable. In order to make a reproducible build sort the EC
images so they end up in the same order each time.
Resolves #115
Signed-off-by: Robert Lippert <rlippert@google.com>
Change-Id: I82861ce8dbc0cb8e24fd68eeffcf10d1f06e51d5
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/47963
Tested-by: Jenkins Server <pfd-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>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/buildpnor')
-rwxr-xr-x | src/build/buildpnor/buildSbePart.pl | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/build/buildpnor/buildSbePart.pl b/src/build/buildpnor/buildSbePart.pl index 655d0f5d4..b0a7fc5b2 100755 --- a/src/build/buildpnor/buildSbePart.pl +++ b/src/build/buildpnor/buildSbePart.pl @@ -6,7 +6,10 @@ # # OpenPOWER HostBoot Project # -# COPYRIGHT International Business Machines Corp. 2013,2014 +# Contributors Listed Below - COPYRIGHT 2013,2017 +# [+] Google Inc. +# [+] International Business Machines Corp. +# # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -187,7 +190,7 @@ sub genOutputImage print $FILEHANDLE pack('N', 1); #Insert header data for each EC provided - for $key ( keys %{$i_ecImgs}) + for $key (sort { $a <=> $b} keys %{$i_ecImgs}) { trace(2, "$this_func: Inserting header for EC=$key"); my $filesize = -s $$i_ecImgs{$key}; @@ -221,7 +224,7 @@ sub genOutputImage close $FILEHANDLE; #Insert actual image for each EC provided - for $key ( keys %{$i_ecImgs}) + for $key (sort { $a <=> $b} keys %{$i_ecImgs}) { trace(2, "$this_func: Inserting data for EC=$key, offset=$ecOffsets{$key}"); |